This plugin contains code for "stream based" network protocol support on top of the lwIP TCP/IP stack plus some utilities.
"stream based" in this context means that the HAL entry points for streaming are used as the API (by dynamic pointer swapping on connect).
- Telnet ("raw" mode).
- Websocket.
- FTP (requires SD card plugin and card inserted).
- HTTP (requires SD card plugin and card inserted).
- WebDAV - as an extension the HTTP daemon. Note: saving files does not yet work with Windows mounts. Tested ok with WinSCP.
- mDNS - (multicast DomainName Server).
- SSDP - (Simple Service Discovery Protocol). Requires the HTTP daemon running.
The mDNS and SSDP protocols uses UPD multicast/unicast transmission of data and not all drivers are set up to handle that "out-of-the-box".
Various amount of manual code changes are needed to make them work, see the RP2040 readme.
- MQTT - (MQ Telemetry Transport). A programming API is provided for plugin code, not used by standard code.
MQTT requires lwIP 2.1.x for authentication support (username & password). Template/example code is available.
NOTE: The API is work in progress and calls and call signatures may change.
Driver | lwIP version | FlashFS | MQTT API |
---|---|---|---|
iMXRT1062 (Teensy 4.1) | 2.1.3 | littlefs | yes |
RP2040 (Pi Pico W) | 2.1.1 | littlefs | yes |
ESP32 | ? | littlefs | yes |
STM32F756 | 2.1.2 | no | yes |
STM32H7xx | ? | TBA | TBA |
MSP432E401Y | 2.0.2 | littlefs1 | no |
2023-05-19: Some driver/board combinations will soon get support for WizNet W5100S and W5500 ethernet modules via SPI interface.
lwIP library - 2.1.0 or later for http daemon.
Driver capable of networking and having the required "middleware" layer on top of lwIP.
These drivers has this "middleware" layer, further details for how to configure networking can be found on the driver page:
-
iMXRT1062 for Teensy 4.1, cabled Ethernet.
-
STM32F7xx for Nucleo-F756ZG, cabled Ethernet.
-
RP2040 for Pi Pico W, wireless (wifi).
-
MSP432E401Y for MSP432E401Y LaunchPad, cabled Ethernet.
-
TM4C129 for EK-TM4C1294XL Launchpad, cabled Ethernet.
-
ESP32, wireless (wifi).
Parts of websocket.c are pulled from patch 9525 by Sakari Kapanen.
base64.c, sha1.c by Brad Conte, pulled from from the same patch as mentioned above.
multipartparser.c by François Colas.
ftpd code by Florian Schulze, Philipp Tölke and David Olofson (modified by Terje Io for grblHAL use).
httpd code by Adam Dunkels and Simon Goldschmidt (modified by Terje Io for grblHAL use).
cJSON Dave Gamble and cJSON contributors.
wschat.html modified from original by tutorialspoint.com, for simple websocket testing (edit line 103 to set address and port before use).
NOTE: some drivers uses ports of lwIP provided by the MCU supplier.
NOTE: this plugin is only for the protocol layer. Driver specific code is required for initialising lwIP and start/stop/polling the services.
2023-05-19