PPP over Serial (PPPoS) support for SIM800 within ESP-IDF for ESP32


While we have been looking for MicroPython libraries for the SIM800 module the other day, we found there’s PPPoS support for the SIM800 module within the Espressif ESP-IDF 3.3 for ESP32 already.

Bump. Just wanted to let you know that starting with ESP-IDF v3.3 for the ESP32, there are already C-level PPP over Serial (PPPoS) client implementations for the SIM800L and the BG96 around, see also esp-idf/README.md at release/v3.3 · espressif/esp-idf · GitHub. The implementation for the SIM800 can be found within sim800.c.

The example program pppos_client_main.c already does MQTT communication using this, based on the standard MQTT protocol implementation within the ESP-IDF.

When there’s interest and time permits, I will be happy to dive into the details in order to provide a MicroPython wrapper around it [1].

P.S.: While the development head of Pycom MicroPython is currently based on ESP-IDF v3.2, it might be possible to backport this feature [2]. Starting February 2020, the Pycom ecosystem is based on ESP-IDF 3.3.1 through ESP-IDF v3.3.1 by husigeza · Pull Request #16 · pycom/pycom-esp-idf · GitHub.

  1. https://micropython-dev-docs.readthedocs.io/en/latest/adding-module.html ↩︎

  2. However, I also recognized Pycom’s engineers started to work on support for ESP-IDF v3.3 and ESP-IDF v4.0 just recently, see

1 Like

@clemens asked

Well, why not? You know this SIM800L guy already and you actually did HTTP communication yourself with your Open Hive GSM and WiFi sensor nodes — Hiveeyes Arduino 0.16.0 documentation the other day.

Because some libs supporting some protocols only. Sodaq’s GPRSBee lib does support HTTP and I think FTP but not MQTT. So I fear it could be the some here, but vice versa MQTT only.

Regardless of being on the C-level anyway, we are talking about real network stack implementations here in comparison to any maybe-hybrid drivers coming from the Arduino ecosystem. Out of the PPP link gained from the modem through the respective DTE/DCE implementation, we gain a regular IP connection.

On top of that IP connection, any application protocol should work. There are already HTTP client examples within the ESP-IDF, see

which should be capable of being swapped in here.

How to bring that into MicroPython land is a total different story but should certainly be doable as all the primitives are just there. However, for people not knowing about these details yet like me, some research will have to be done on how to connect these bits together.

1 Like

will probably centered around the latter example

as this is based on lwIP [1] already. Through the respective Espressif-specific port [2], regular POSIX sockets are coming into MicroPython land through modlwip [3].

  1. lwIP - A Lightweight TCP/IP stack - Summary [Savannah] ↩︎

  2. GitHub - espressif/esp-lwip: Fork of lwIP (https://savannah.nongnu.org/projects/lwip/) with ESP-IDF specific patches ↩︎

  3. micropython/modlwip.c at v1.11 · micropython/micropython · GitHub ↩︎

The information within these tickets and recent commits might be helpful when having problems ramping up a PPPoS connection.

On this issue,

Pavel Slechta just commented:

I have a working MQTT connection. Code is here