#include <src/modems/Espressif.h>
Espressif
class
The loggerModem subclass for almost any Espressif wifi or wifi/bluetooth chip that has been flashed with Espressif's AT command firmware.
- Reference
- Detailed Descriptions
Base classes
- class loggerModem
- The loggerModem class provides an internet connection for the logger and supplies an Arduino Client instance to use to publish data.
Derived classes
- class EspressifESP32
- The loggerModem subclass for any breakout of the Espressif ESP32 wifi chip or ESP32 wifi/bluetooth chip that has been flashed with Espressif's AT command firmware.
- class EspressifESP8266
- The loggerModem subclass for any breakout of the Espressif ESP8266 wifi chip or ESP32 wifi/bluetooth chip that has been flashed with Espressif's AT command firmware.
Constructors, destructors, conversion operators
- Espressif(Stream* modemStream, int8_t powerPin, int8_t modemResetPin, const char* ssid, const char* pwd)
- Construct a new Espressif object.
- ~Espressif() virtual
- Destroy the Espressif object - no action taken.
Public variables
- Stream* _modemStream
- A pointer to the Arduino serial Stream used for communication between the MCU and the Espressif module.
Protected functions
- bool modemWakeFxn(void) -> bool override
- Perform the parts of the modem wake up process that are unique to a specific module, as opposed to the parts of setup that are common to all modem modules.
- bool ESPwaitForBoot(void) -> bool
- Waits for the Espressif module to reboot and print out it's boot up string. Because the boot up string is at a different baud rate (74880 baud), it usually comes out as junk.
Protected variables
Function documentation
Espressif:: Espressif(Stream* modemStream,
int8_t powerPin,
int8_t modemResetPin,
const char* ssid,
const char* pwd)
Construct a new Espressif object.
Parameters | |
---|---|
modemStream | The Arduino stream instance for serial communication. |
powerPin | The digital pin number of the mcu pin controlling power to the modem (active HIGH ). |
modemResetPin | The digital pin number of the pin on the mcu attached the the hard or panic reset pin of the modem. |
ssid | The wifi network ID. |
pwd | The wifi network password, assuming WPA2. |
The constructor initializes all of the provided member variables, constructs a loggerModem parent class with the appropriate timing for the module, calls the constructor for a TinyGSM modem on the provided modemStream, and creates a TinyGSM Client linked to the modem.
Should be set to a negative number if the modem should be continuously powered or the power cannot be controlled by the MCU.
Should be set to a negative number if the modem reset pin is not connected to the MCU. This is the ESP's RSTB/DIO16
pin.
bool Espressif:: modemWakeFxn(void) override protected
Perform the parts of the modem wake up process that are unique to a specific module, as opposed to the parts of setup that are common to all modem modules.
Returns | bool True if the unique part of the wake function ran successfully - does NOT indicate that the modem is now responsive. |
---|
bool Espressif:: ESPwaitForBoot(void) protected
Waits for the Espressif module to reboot and print out it's boot up string. Because the boot up string is at a different baud rate (74880 baud), it usually comes out as junk.
Returns | bool True if text (assumed to be the start message) was received; false if text was received after boot. |
---|
Variable documentation
Stream* Espressif:: _modemStream
A pointer to the Arduino serial Stream used for communication between the MCU and the Espressif module.
We need to keep the pointer to the stream for tossing junk on boot.