Closed jonathandreyer closed 2 years ago
Hi Jonathan,
Thanks for reporting this, it looks like there's a bug in
As the BG96 sends UIH
frames of 0xef
type (unlike SIM7600).
The quick fix is to replace it with
-if (data && type == 0xFF && len > 0 && dlci > 0) {
+if (data && ((type&0xEF) == 0xEF) && len > 0 && dlci > 0) {
I'll investigate the issue and fix it.
Hi @david-cermak,
Thanks for your support. I have tested your quick fix, but it does not seem work. With the PR #34, the simple_cmux_client example works well.
Best regards,
Jonathan Dreyer
@jonathandreyer Thanks for testing the fixes. Yes, I've discovered (with the real BG96) that it needs a small pause between switching to CMUX mode and actually accepting the CMUX commands.
Hi everyone,
I have tried to make the simple_cmux_client example work, but that is not successful. The log is (with log set as verbose):
As the problem seems to come from the line (below), I have also tried to separate both actions. From: https://github.com/espressif/esp-protocols/blob/38149c8d9bdf469806fe0685558eba74f3366d73/components/esp_modem/examples/simple_cmux_client/main/simple_cmux_client_main.cpp#L90
to:
In this case, the log is:
So the problem seems to appear during the second action, but the return code of the first action is strange. Regarding the example, it seems to me that there is a problem with the creation of SIM800 & SIM7600 object (line 83 & 75). Would it be more like dte instead of uart_dte? In the esp_modem library, I have seen that the data mode is done with the command ATD*99## (here), while in the documentation of the BG96, it indicates ATD*99# (like for sim8xx).
I have tested the PPPoS example, which works with a small fix (EXAMPLE_MODEM_UART_EVENT_TASK_STACK_SIZE set to 3072). Without that, I have a stack overflow in uart_task.
A test board, I use a Wemos D1 R32 with a ESP32-S3-WROOM-1 module and a BG96 modem (RAK 2011). As toolchain, I use the PlaformIO with custom platform to support the ESP-IDF v4.4 (https://github.com/jonathandreyer/platform-espressif32). In my case, it is the release v4.4.1.
Does somebody have an idea or have tested this CMUX example?
Best regards,
Jonathan Dreyer