|
Adafruit Library
|
Class for using the AirLift Co-Processor network iface. More...
#include <Wippersnapper_AIRLIFT.h>
Public Member Functions | |
| Wippersnapper_AIRLIFT () | |
| Initializes the Adafruit IO class for AirLift devices. | |
| ~Wippersnapper_AIRLIFT () | |
| Destructor for the Adafruit IO AirLift class. | |
| void | set_ssid_pass (const char *ssid, const char *ssidPassword) |
| Sets the WiFi client's ssid and password. More... | |
| void | set_ssid_pass () |
| Sets the WiFi client's ssid and password from the secrets.json provisioning file. | |
| bool | check_valid_ssid () |
| Performs a scan of local WiFi networks. More... | |
| void | set_wifi (SPIClass *wifi) |
| Sets the WiFi client. More... | |
| void | set_airlift_pins (int ssPin, int ackPin, int rstPin, int gpio0Pin) |
| Configures ESP32 "AirLift" pins. More... | |
| bool | firmwareCheck () |
| Checks the version of an ESP32 module running nina-fw. More... | |
| bool | compareVersions (const char *currentVersion, const char *requiredVersion) |
| Compares two version strings. More... | |
| void | getMacAddr () |
| Gets the ESP32's unique client identifier. More... | |
| int32_t | getRSSI () |
| Gets the current network RSSI value. More... | |
| void | setupMQTTClient (const char *clientID) |
| Initializes the MQTT client. More... | |
| ws_status_t | networkStatus () |
| Returns the network status of an ESP32 module. More... | |
| const char * | connectionType () |
| Returns the type of network connection used by Wippersnapper. More... | |
Public Member Functions inherited from Wippersnapper | |
| virtual | ~Wippersnapper () |
| Wippersnapper destructor. | |
| void | provision () |
| Provisions a WipperSnapper device with its network configuration and Adafruit IO credentials. | |
| virtual void | set_user_key () |
| Configures the device's Adafruit IO credentials. This method should be used only if filesystem-backed provisioning is not available. | |
| void | connect () |
| Connects to Adafruit IO+ Wippersnapper broker. | |
| void | disconnect () |
| Disconnects from Adafruit IO+ Wippersnapper. | |
| ws_board_status_t | getBoardStatus () |
| Returns the board definition status. More... | |
| bool | generateDeviceUID () |
| Attempts to generate unique device identifier. More... | |
| bool | generateWSTopics () |
| Generates device-specific Wippersnapper control topics and subscribes to them. More... | |
| bool | generateWSErrorTopics () |
| Builds MQTT topics for handling errors returned from the Adafruit IO broker and subscribes to them. More... | |
| bool | registerBoard () |
| Attempts to register hardware with Adafruit.io WipperSnapper. More... | |
| bool | encodePubRegistrationReq () |
| Encodes hardware registration request message and publishes the message to the Adafruit IO broker. More... | |
| void | decodeRegistrationResp (char *data, uint16_t len) |
| Decodes hardware registration response message from the Adafruit IO MQTT broker and initializes hardware components. More... | |
| void | pollRegistrationResp () |
| Polls the broker for the hardware registration response message. More... | |
| void | publishPinConfigComplete () |
| Publishes an ACK to the broker that the device has completed its hardware configuration. | |
| ws_status_t | run () |
| Processes incoming commands and handles network connection. More... | |
| void | processPackets () |
| Process all incoming packets from the Adafruit IO MQTT broker. Handles network connectivity. | |
| void | publish (const char *topic, uint8_t *payload, uint16_t bLen, uint8_t qos=0) |
| Publishes a message to the Adafruit IO MQTT broker. Handles network connectivity. More... | |
| void | pingBroker () |
| Pings the MQTT broker within the keepalive interval to keep the connection alive. Blinks the keepalive LED every STATUS_LED_KAT_BLINK_TIME milliseconds. | |
| void | runNetFSM () |
| Checks network and MQTT connectivity. Handles network re-connection and mqtt re-establishment. | |
| void | enableWDT (int timeoutMS=0) |
| Enables the watchdog timer. More... | |
| void | feedWDT () |
| Feeds the WDT to prevent hardware reset. | |
| void | haltError (String error, ws_led_status_t ledStatusColor=WS_LED_STATUS_ERROR_RUNTIME, int seconds_until_reboot=25) |
| Prints an error to the serial and halts the hardware until the WDT bites. More... | |
| void | errorWriteHang (String error) |
| Writes an error message to the serial and the filesystem, blinks WS_LED_STATUS_ERROR_RUNTIME pattern and hangs. More... | |
| bool | decodeSignalMsg (wippersnapper_signal_v1_CreateSignalRequest *encodedSignalMsg) |
| Decodes a signal buffer protobuf message. NOTE: Should be executed in-order after a new _buffer is received. More... | |
| bool | encodePinEvent (wippersnapper_signal_v1_CreateSignalRequest *outgoingSignalMsg, uint8_t pinName, int pinVal) |
| Handles MQTT messages on signal topic until timeout. More... | |
| bool | configureDigitalPinReq (wippersnapper_pin_v1_ConfigurePinRequest *pinMsg) |
| Configures a pin according to a wippersnapper_pin_v1_ConfigurePinRequest message. More... | |
| bool | configAnalogInPinReq (wippersnapper_pin_v1_ConfigurePinRequest *pinMsg) |
| Configures an analog input pin according to a wippersnapper_pin_v1_ConfigurePinRequest message. More... | |
Protected Member Functions | |
| void | _connect () |
| Establishes a connection with the wireless network. | |
| void | resetAirLift () |
| Resets the ESP32 module. | |
| void | _disconnect () |
| Disconnects from the wireless network. | |
Protected Attributes | |
| const char * | _ssid |
| const char * | _pass |
| const char * | _fv = "0.0.1" |
| int | _ssPin = -1 |
| int | _ackPin = -1 |
| int | _rstPin = -1 |
| int | _gpio0Pin = -1 |
| WiFiSSLClient * | _mqtt_client |
| SPIClass * | _wifi |
Protected Attributes inherited from Wippersnapper | |
| ws_status_t | _status = WS_IDLE |
| uint32_t | _last_mqtt_connect = 0 |
| uint32_t | _prv_ping = 0 |
| uint32_t | _prvKATBlink = 0 |
| const char * | _deviceId |
| char * | _device_uid |
| char * | _topic_description_status |
| char * | _topic_description_status_complete = NULL |
| char * | _topic_device_pin_config_complete |
| char * | _topic_signal_brkr = NULL |
| char * | _err_topic = NULL |
| char * | _throttle_topic = NULL |
| Adafruit_MQTT_Subscribe * | _topic_description_sub |
| Adafruit_MQTT_Publish * | _topic_signal_device_pub |
| Adafruit_MQTT_Subscribe * | _topic_signal_brkr_sub |
| Adafruit_MQTT_Subscribe * | _topic_signal_i2c_sub |
| Adafruit_MQTT_Subscribe * | _topic_signal_servo_sub |
| Adafruit_MQTT_Subscribe * | _topic_signal_pwm_sub |
| Adafruit_MQTT_Subscribe * | _topic_signal_ds18_sub |
| Adafruit_MQTT_Subscribe * | _topic_signal_pixels_sub |
| Adafruit_MQTT_Subscribe * | _topic_signal_uart_sub |
| Adafruit_MQTT_Subscribe * | _topic_signal_display_sub |
| Adafruit_MQTT_Subscribe * | _err_sub |
| Adafruit_MQTT_Subscribe * | _throttle_sub |
| wippersnapper_signal_v1_CreateSignalRequest | _outgoingSignalMsg |
Additional Inherited Members | |
Public Attributes inherited from Wippersnapper | |
| bool | lockStatusNeoPixel |
| True if status LED is using the status neopixel. | |
| bool | lockStatusDotStar |
| True if status LED is using the status dotstar. | |
| bool | lockStatusLED |
| True if status LED is using the built-in LED. | |
| float | status_pixel_brightness |
| std::vector< WipperSnapper_Component_I2C * > | i2cComponents |
| Vector containing all I2C components. | |
| WipperSnapper_Component_I2C * | _i2cPort0 |
| WipperSnapper I2C Component for I2C port #0. More... | |
| WipperSnapper_Component_I2C * | _i2cPort1 |
| WipperSnapper I2C Component for I2C port #1. More... | |
| bool | _isI2CPort0Init |
| True if I2C port 0 has been initialized, False otherwise. More... | |
| bool | _isI2CPort1Init |
| True if I2C port 1 has been initialized, False otherwise. More... | |
| uint8_t | _buffer [WS_MQTT_MAX_PAYLOAD_SIZE] |
| uint8_t | _buffer_outgoing [WS_MQTT_MAX_PAYLOAD_SIZE] |
| uint16_t | bufSize |
| ws_board_status_t | _boardStatus |
| Hardware's registration status. More... | |
| Wippersnapper_DigitalGPIO * | _digitalGPIO |
| Instance of digital gpio class. | |
| Wippersnapper_AnalogIO * | _analogIO |
| Instance of analog io class. | |
| Wippersnapper_FS * | _fileSystem |
| Instance of Filesystem (native USB) | |
| WipperSnapper_LittleFS * | _littleFS |
| Instance of LittleFS Filesystem (non-native USB) | |
| ws_pixels * | _ws_pixelsComponent |
| ptr to instance of ws_pixels class | |
| ws_pwm * | _pwmComponent |
| Instance of pwm class. | |
| ws_servo * | _servoComponent |
| Instance of servo class. | |
| ws_ds18x20 * | _ds18x20Component |
| Instance of DS18x20 class. | |
| ws_uart * | _uartComponent |
| Instance of UART class. | |
| DisplayController * | _displayController |
| Instance of display controller class. | |
| uint8_t | _macAddr [6] |
| char | sUID [13] |
| const char * | _airlift_version |
| const char * | _boardId |
| Adafruit_MQTT * | _mqtt |
| secretsConfig | _config |
| networkConfig | _multiNetworks [3] |
| bool | _isWiFiMulti = false |
| int32_t | totalDigitalPins |
| char * | _topic_description = NULL |
| char * | _topic_signal_device = NULL |
| char * | _topic_signal_i2c_brkr = NULL |
| char * | _topic_signal_i2c_device = NULL |
| char * | _topic_signal_servo_brkr = NULL |
| char * | _topic_signal_servo_device = NULL |
| char * | _topic_signal_pwm_brkr |
| char * | _topic_signal_pwm_device |
| char * | _topic_signal_ds18_brkr = NULL |
| char * | _topic_signal_ds18_device = NULL |
| char * | _topic_signal_pixels_brkr = NULL |
| char * | _topic_signal_pixels_device = NULL |
| char * | _topic_signal_uart_brkr = NULL |
| char * | _topic_signal_uart_device = NULL |
| char * | _topic_signal_display_brkr |
| char * | _topic_signal_display_device |
| wippersnapper_signal_v1_CreateSignalRequest | _incomingSignalMsg |
| wippersnapper_signal_v1_I2CRequest | msgSignalI2C |
| wippersnapper_signal_v1_Ds18x20Request | msgSignalDS |
| wippersnapper_signal_v1_ServoRequest | msgServo |
| ServoRequest wrapper message. | |
| wippersnapper_signal_v1_PWMRequest | msgPWM |
| wippersnapper_signal_v1_PixelsRequest | msgPixels |
| PixelsRequest wrapper message. | |
| wippersnapper_signal_v1_UARTRequest | msgSignalUART |
| UARTReq wrapper message. | |
| wippersnapper_signal_v1_DisplayRequest | msgSignalDisplay |
| DisplayRequest wrapper message. | |
| char * | throttleMessage |
| int | throttleTime |
| bool | pinCfgCompleted = false |
| ws_ledc * | _ledc = nullptr |
| Pointer to LEDC object. | |
Class for using the AirLift Co-Processor network iface.
|
inlinevirtual |
Sets the WiFi client's ssid and password.
| ssid | Wireless network's SSID. |
| ssidPassword | Wireless network's password. |
Reimplemented from Wippersnapper.
|
inlinevirtual |
Performs a scan of local WiFi networks.
_network_ssid is found, False otherwise. Reimplemented from Wippersnapper.
|
inline |
Sets the WiFi client.
| wifi | Instance of SPIClass. |
|
inline |
Configures ESP32 "AirLift" pins.
| ssPin | ESP32 S.S. pin. |
| ackPin | ESP32 ACK pin. |
| rstPin | ESP32 RST pin. |
| gpio0Pin | ESP32 GPIO0 pin. |
|
inline |
Checks the version of an ESP32 module running nina-fw.
|
inline |
Compares two version strings.
| currentVersion | Current version string. |
| requiredVersion | Required version string. |
|
inlinevirtual |
Gets the ESP32's unique client identifier.
Reimplemented from Wippersnapper.
|
inlinevirtual |
|
inlinevirtual |
Initializes the MQTT client.
| clientID | MQTT client identifier |
Reimplemented from Wippersnapper.
|
inlinevirtual |
|
inline |
Returns the type of network connection used by Wippersnapper.
|
protected |
Network SSID.
|
protected |
Network password.
|
protected |
nina-fw firmware version. (placeholder)
|
protected |
SPI S.S. pin.
|
protected |
SPI ACK pin.
|
protected |
SPI RST pin.
|
protected |
SPI GPIO0 pin, unused.
|
protected |
Instance of a secure WiFi client.
|
protected |
Instance of the SPI bus used by the AirLift.
1.8.13