Include PPP (Point-to-Point Protocol) Support in MicroPython Firmware for Raspberry Pi Pico W / Pico 2W
Description
Background:
Currently, the official MicroPython firmware for Raspberry Pi Pico W and Pico 2W supports network connectivity via the onboard WiFi chip. However, some projects require network connectivity via external modems (e.g., 4G/LTE/3G GSM modules) using UART and PPP. The PPP module is not currently included in the official builds.
Use Case:
- Connecting Pico W or Pico 2W to the internet via a serial modem using PPP (e.g., when WiFi is unavailable or not suitable).
- Enabling MQTT and other network protocols over mobile data networks.
Request:
- Please consider adding PPP (Point-to-Point Protocol) support (as a module or built-in) to the official MicroPython firmware for Raspberry Pi Pico W and Pico 2W.
Benefits:
- Allows greater flexibility for IoT projects.
- Enables use of Pico W/2W in remote areas with cellular connectivity.
- Unifies network API for both WiFi and modem scenarios.
References:
Thank you!
Code Size
I am unsure
Implementation
I would like to sponsor development of this feature
Code of Conduct
Yes, I agree
docs: Note which ports have default or optional network.PPP support.
Summary
Someone was asking on Discord why only esp32 had network.PPP support. This PR adds a note in the docs about availability on custom builds of stm32 and rp2 ports. It also adds the default values of these macros to the respective mpconfigport.h files, to improve discoverability.
Testing
- Built stm32 port
PYBD_SF2board with the new macro line changed to 1, verified build succeeded. It was also necessary to disable VFAT to save binary size. - Built rp2 port
RPI_PICO_Wboard with the new macro line changed to 1, verified build succeeded and it was possible to instantiate anetwork.PPPobject.
Trade-offs and Alternatives
- It's a bit fiddly to have these notes in the docs about piecemeal support, but it gives a better user experience than following the documentation and finding the support is missing.