Skip to content

Network management improvements, KeepAlive

Compare
Choose a tag to compare
@brentru brentru released this 15 Aug 14:12
801b3a3

Improvements for KeepAlive

  • keep_alive is now an init kwarg
  • The loop method now checks the time and sends a PINGREQ (expecting a PINGRESP, this is handled in the ping() method) to the server if the time elapsed is greater than or equal to the provided keep_alive value.

Network Management Improvements
*loop_forever now calls loop instead of _wait_for_msg. Also now handles network control, for both the socket and the NetworkManager (currently only the WiFiManager) objects.

  • Properties for network management (is_wifi_connected, is_sock_connected) have been added as well as additional management for both the socket and ESP32SPI wifi module (reconnect_socket, reconnect_wifi)

To use in CircuitPython, simply install the Adafruit CircuitPython bundle.

To use in CPython, pip install adafruit-circuitpython-minimqtt.

Read the docs for info on how to use it.