Giter Site home page Giter Site logo

espressif / esp-protocols Goto Github PK

View Code? Open in Web Editor NEW
157.0 15.0 104.0 18.19 MB

Collection of ESP-IDF components related to networking protocols

CMake 2.01% Python 4.57% C 57.30% C++ 34.76% Makefile 0.20% Shell 0.19% PHP 0.74% Pawn 0.08% Roff 0.14%
asio esp-idf esp32 pppos mdns websocket

esp-protocols's Introduction

Collection of protocol components for ESP-IDF

How to use

The ESP-Protocols repository contains a collection of protocol components for ESP-IDF. Additionally, each component is available in IDF Component Registry. Please refer to instructions in ESP-IDF

Components

esp_modem

mDNS

esp_websocket_client

ASIO port

esp_mqtt_cxx

console_simple_init

console_cmd_ping

console_cmd_ifconfig

console_cmd_wifi

ESP PPP Link (eppp)

esp_wifi_remote

mbedtls_cxx

esp-protocols's People

Contributors

0xfeedc0de64 avatar 0xjakob avatar antmak avatar david-cermak avatar diplfranzhoepfinger avatar dobairoland avatar esp-marius avatar esp-yjm avatar espressif-abhikroy avatar euripedesrocha avatar gabsuren avatar ginkgm avatar gjc13 avatar heyinling avatar hfudev avatar igrr avatar jonathandreyer avatar kostaond avatar krone-trailer-franzhoepfinger avatar lapshin avatar mahavirj avatar me-no-dev avatar projectgus avatar renzbagaporo avatar sjurinho avatar suda-morris avatar suren-gabrielyan-espressif avatar tore-espressif avatar wqx6 avatar zwx1995esp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esp-protocols's Issues

Timeout and RTS/CTS vs DTR config on LILYGO® TTGO T-SIM7000G (IDFGH-8630)

Dear community/Espressif!

I am trying to get esp-modem to work with my board, and I am a bit confused by the configuration.
When I tried TinyGSM (which works), I did not have to set these pins (or at least PIN_DTR is not used), but here i have to set RTC/CTS.

As far as I can see, no such pins are designated on the board, is that because it doesn't have HW flow control?
https://www.aliexpress.com/item/4000571249574.html?spm=a2g0o.9042311.0.0.31624c4dHiqssj

Either way it seems like the SIM7000G chip should be supported by this library, so I am not sure why it doesn't work.
I think I have set all pins correctly and feel that I have almost tried everything.
Yes, I have yelled at the card, as required, but to no avail. :-)

I have actually also tried to contact the card through UART using esp-idf-uart (see test()), but I am not succeeding there either, so it feels like there is something that I am missing. I send to it, but I get nothing (or zero length) in response.

As for trying esp-modem:
esp_modem_new_dev(ESP_MODEM_DCE_SIM7000, &dte_config, &dce_config, esp_netif)
succeeds but then running
esp_modem_get_signal_quality(dce, &rssi, &ber)
fails with ESP_ERR_TIMEOUT.

Now I'd like to be frank and admit that I am by no means an UART-expert, so it is quite possible that this is a very dumb question, but perhaps someone can point me in the right direction?

This works (TinyGSM, Arduino):
https://github.com/nicklasb/PoCs/blob/main/sms_power/SMS_power.ino

But this doesn't (adapted esp-idf esp-modem example, basically):
https://github.com/nicklasb/Controller/blob/master/components/sdp/gsm/gsm_init.c

(yeah, I have tried all kinds of powering up sequences)
Kind regards, Nicklas

esp_modem - cant exit CMUX on BG96 (IDFGH-7954)

Hi,
esp_modem example works fine to enter CMUX on BG96, but i am having problem to exit CMUX and switch to command mode.
For some reason my BG96 is not responding on close DLCI0 command.

V (543) command_lib: set_cmux
V (543) command_lib: generic_command_common
V (543) command_lib: generic_command
D (543) command_lib: generic_command command AT+CMUX=0

D (553) command_lib: Response: 
OK

V (653) CMUX Received: 0x3ffc0d10   f9 03 73 01 d7 f9                                 |..s...|
D (653) CMUX: Payload frame: dlci:00 type:73 payload:0 available:2
V (663) CMUX Received: 0x3ffc0d10   f9 07 73 01 15 f9                                 |..s...|
D (663) CMUX: Payload frame: dlci:01 type:73 payload:0 available:2
V (673) CMUX Received: 0x3ffc0d10   f9 0b 73 01 92 f9                                 |..s...|
D (673) CMUX: Payload frame: dlci:02 type:73 payload:0 available:2
V (683) command_lib: set_echo
V (683) command_lib: generic_command_common
V (693) command_lib: generic_command
D (693) command_lib: generic_command command ATE0

V (703) CMUX Received: 0x3ffc0d10   f9 05 ef 0d 0d 0a 4f 4b  0d 0a 5f f9              |......OK.._.|
D (713) CMUX: Payload frame: dlci:01 type:ef payload:6 available:8
D (713) command_lib: Response: 
OK

V (723) command_lib: set_pdp_context
V (723) command_lib: generic_command_common
V (723) command_lib: generic_command
D (733) command_lib: generic_command command AT+CGDCONT=1,"IP","plus"

V (763) CMUX Received: 0x3ffc0d10   f9 05 ef 0d 0d 0a 4f 4b  0d 0a 5f f9              |......OK.._.|
D (763) CMUX: Payload frame: dlci:01 type:ef payload:6 available:8
D (773) command_lib: Response: 
OK

V (773) command_lib: set_data_mode
V (773) command_lib: generic_command
D (783) command_lib: generic_command command ATD*99##

V (793) CMUX Received: 0x3ffc0d10   f9 05 ef 2b 0d 0a 43 4f  4e 4e 45 43 54 20 31 35  |...+..CONNECT 15|
V (793) CMUX Received: 0x3ffc0d20   30 30 30 30 30 30 30 0d  0a 83 f9 f9 01 ff 09 e3  |0000000.........|
V (803) CMUX Received: 0x3ffc0d30   05 07 89 8f f9                                    |.....|
D (813) CMUX: Payload frame: dlci:01 type:ef payload:21 available:33
D (823) command_lib: Response: 
CONNECT 150000000

D (823) CMUX: Payload frame: dlci:00 type:ff payload:4 available:6
Modem has correctly entered multiplexed command/data mode
V (833) command_lib: get_operator_name
V (843) command_lib: generic_get_string
V (853) CMUX Received: 0x3ffc0d10   f9 09 ef 3b 0d 0a 2b 43  4f 50 53 3a 20 30 2c 30  |...;..+COPS: 0,0|
V (853) CMUX Received: 0x3ffc0d20   2c 22 50 6c 75 73 22 2c  30 0d 0a 0d 0a 4f 4b 0d  |,"Plus",0....OK.|
V (863) CMUX Received: 0x3ffc0d30   0a 18 f9                                          |...|
D (873) CMUX: Payload frame: dlci:02 type:ef payload:29 available:31
} (873) command_lib: Token: {

V (883) command_lib: Token: {+COPS: 0,0,"Plus",0}

} (883) command_lib: Token: {

V (893) command_lib: Token: {OK}

Operator name:"Plus",0
V (893) command_lib: get_imsi
V (893) command_lib: generic_get_string
V (903) command_lib: generic_get_string
V (913) CMUX Received: 0x3ffc0d10   f9 09 ef 33 0d 0a 32 36  30 30 31 31 35 30 34 36  |...3..2600115046|
V (913) CMUX Received: 0x3ffc0d20   35 30 35 31 38 0d 0a 0d  0a 4f 4b 0d 0a 16 f9     |50518....OK....|
D (923) CMUX: Payload frame: dlci:02 type:ef payload:25 available:27
} (933) command_lib: Token: {

V (933) command_lib: Token: {260011504650518}

} (933) command_lib: Token: {

V (943) command_lib: Token: {OK}

Modem IMSI number:260011504650518
I (943) gpio: GPIO[0]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
V (1093) CMUX Received: 0x3ffc0d10   f9 01 ff 09 e3 05 07 89  8f f9                    |..........|
D (1093) CMUX: Payload frame: dlci:00 type:ff payload:4 available:6
V (1393) CMUX Received: 0x3ffc0d10   f9 01 ff 09 e3 05 07 89  8f f9                    |..........|
D (1393) CMUX: Payload frame: dlci:00 type:ff payload:4 available:6
V (1693) CMUX Received: 0x3ffc0d10   f9 01 ff 09 e3 05 07 89  8f f9                    |..........|
D (1693) CMUX: Payload frame: dlci:00 type:ff payload:4 available:6
V (1813) CMUX Received: 0x3ffc0d10   f9 09 ef 1b 0d 0a 2b 43  47 52 45 47 3a 20 31 0d  |......+CGREG: 1.|
V (1813) CMUX Received: 0x3ffc0d20   0a 20 f9                                          |. .|
D (1823) CMUX: Payload frame: dlci:02 type:ef payload:13 available:15
V (1993) CMUX Received: 0x3ffc0d10   f9 01 ff 09 e3 05 0b 49  8f f9                    |.......I..|
D (1993) CMUX: Payload frame: dlci:00 type:ff payload:4 available:6
V (2293) CMUX Received: 0x3ffc0d10   f9 01 ff 09 e3 05 0b 49  8f f9                    |.......I..|
D (2293) CMUX: Payload frame: dlci:00 type:ff payload:4 available:6
V (2593) CMUX Received: 0x3ffc0d10   f9 01 ff 09 e3 05 0b 49  8f f9                    |.......I..|
D (2593) CMUX: Payload frame: dlci:00 type:ff payload:4 available:6
V (2893) CMUX Received: 0x3ffc0d10   f9 01 ff 09 e3 05 0b 49  8f f9                    |.......I..|
D (2893) CMUX: Payload frame: dlci:00 type:ff payload:4 available:6
V (3193) CMUX Received: 0x3ffc0d10   f9 01 ff 09 e3 05 0b 09  8f f9                    |..........|
D (3193) CMUX: Payload frame: dlci:00 type:ff payload:4 available:6
V (3493) CMUX Received: 0x3ffc0d10   f9 01 ff                                          |...|
V (3493) CMUX Received: 0x3ffc0d10   09 e3 05 0b 09 8f f9                              |.......|
D (3503) CMUX: Payload frame: dlci:00 type:ff payload:4 available:6
V (3793) CMUX Received: 0x3ffc0d10   f9 01 ff 09 e3 05 0b 09  8f f9                    |..........|
D (3793) CMUX: Payload frame: dlci:00 type:ff payload:4 available:6
V (4093) CMUX Received: 0x3ffc0d10   f9 01 ff 09 e3 05 0b 09  8f f9                    |..........|
D (4093) CMUX: Payload frame: dlci:00 type:ff payload:4 available:6
V (6843) CMUX Received: 0x3ffc0d10   f9 05 ef 6b 7e ff 7d 23  c0 21 7d 21 7d 20 7d 20  |...k~.}#.!}!} } |
V (6843) CMUX Received: 0x3ffc0d20   7d 39 7d 22 7d 26 7d 20  7d 20 7d 20 7d 20 7d 23  |}9}"}&} } } } }#|
V (6853) CMUX Received: 0x3ffc0d30   7d 25 c2 23 7d 25 7d 25  7d 26 97 68 37 bc 7d 27  |}%.#}%}%}&.h7.}'|
V (6863) CMUX Received: 0x3ffc0d40   7d 22 7d 28 7d 22 82 8a  7e f3 f9 f9 05 ef 5d 7e  |}"}(}"..~.....]~|
D (6863) CMUX: Payload frame: dlci:01 type:ef payload:53 available:60
D (6873) CMUX: Payload frame: dlci:01 type:ef payload:46 available:1
V (6883) CMUX Received: 0x3ffc0d50   ff 7d 23 c0 21 7d 22 7d  21 7d 20 7d 34 7d 22 7d  |.}#.!}"}!} }4}"}|
V (6893) CMUX Received: 0x3ffc0d60   26 7d 20 7d 20 7d 20 7d  20 7d 25 7d 26 7d 39 53  |&} } } } }%}&}9S|
V (6903) CMUX Received: 0x3ffc0d70   51 ec 7d 27 7d 22 7d 28  7d 22 82 4d 7e 33 f9     |Q.}'}"}(}".M~3.|
D (6913) CMUX: Payload frame: dlci:01 type:ef payload:45 available:47
V (6913) CMUX Received: 0x3ffc0d10   f9 05 ef 5b 7e ff 7d 23  c0 21 7d 21 7d 21 7d 20  |...[~.}#.!}!}!} |
V (6923) CMUX Received: 0x3ffc0d20   7d 34 7d 22 7d 26 7d 20  7d 20 7d 20 7d 20 7d 25  |}4}"}&} } } } }%|
V (6933) CMUX Received: 0x3ffc0d30   7d 26 97 68 37 bc 7d 27  7d 22 7d 28 7d 22 67 95  |}&.h7.}'}"}(}"g.|
V (6943) CMUX Received: 0x3ffc0d40   7e d7 f9                                          |~..|
D (6953) CMUX: Payload frame: dlci:01 type:ef payload:45 available:47
V (6973) CMUX Received: 0x3ffc0d10   f9 05 ef 2b 7e ff 7d 23  c0 21 7d 2b 7d 22 7d 20  |...+~.}#.!}+}"} |
V (6973) CMUX Received: 0x3ffc0d20   7d 28 97 68 37 bc 43 ac  7e 83 f9                 |}(.h7.C.~..|
D (6983) CMUX: Payload frame: dlci:01 type:ef payload:21 available:23
V (7573) CMUX Received: 0x3ffc0d10   f9 05 ef 15 7e 80 21 01  00 00 04 67 c3 7e 4d f9  |....~.!....g.~M.|
V (7573) CMUX Received: 0x3ffc0d20   f9 05 ef 21 7e 80 21 04  01 00 0a 02 06 00 2d 0f  |...!~.!.......-.|
V (7583) CMUX Received: 0x3ffc0d30   01 f8 30 7e 6e f9                                 |..0~n.|
D (7593) CMUX: Payload frame: dlci:01 type:ef payload:10 available:34
D (7593) CMUX: Payload frame: dlci:01 type:ef payload:16 available:18
V (7603) CMUX Received: 0x3ffc0d10   f9 05 ef 15 7e 80 21 01  01 00 04 bb 99 7e 4d f9  |....~.!......~M.|
D (7613) CMUX: Payload frame: dlci:01 type:ef payload:10 available:12
V (7623) CMUX Received: 0x3ffc0d10   f9 05 ef 39 7e 80 21 03  02 00 16 03 06 0a 9b 6e  |...9~.!........n|
V (7623) CMUX Received: 0x3ffc0d20   cc 81 06 d4 02 7f fe 83  06 d4 02 60 36 46 ad 7e  |...........`6F.~|
V (7633) CMUX Received: 0x3ffc0d30   7c f9                                             ||.|
D (7643) CMUX: Payload frame: dlci:01 type:ef payload:28 available:30
V (7663) CMUX Received: 0x3ffc0d10   f9 05 ef 39 7e 80 21 02  03 00 16 03 06 0a 9b 6e  |...9~.!........n|
V (7663) CMUX Received: 0x3ffc0d20   cc 81 06 d4 02 7f fe 83  06 d4 02 60 36 77 33 7e  |...........`6w3~|
V (7673) CMUX Received: 0x3ffc0d30   7c f9                                             ||.|
D (7683) CMUX: Payload frame: dlci:01 type:ef payload:28 available:30
I (7683) esp-netif_lwip-ppp: Connected
I (7693) esp-netif_lwip-ppp: Name Server1: 212.2.127.254
I (7693) esp-netif_lwip-ppp: Name Server2: 212.2.96.54
I (12583) main: BUTTON_SINGLE_CLICK
V (12593) CMUX Received: 0x3ffc0d10   f9 05 ef 25 7e ff 7d 23  c0 21 7d 26 7d 22 7d 20  |...%~.}#.!}&}"} |
V (12593) CMUX Received: 0x3ffc0d20   7d 24 94 7d 2d 7e 69 f9                           |}$.}-~i.|
D (12603) CMUX: Payload frame: dlci:01 type:ef payload:18 available:20
V (14563) CMUX Received: 0x3ffc0d10   f9 01 ff 09 e3 05 07 8b  8f f9 f9 05 ef 1d 0d 0a  |................|
V (14563) CMUX Received: 0x3ffc0d20   4e 4f 20 43 41 52 52 49  45 52 0d 0a 43 f9        |NO CARRIER..C.|
D (14573) CMUX: Payload frame: dlci:00 type:ff payload:4 available:26
D (14573) CMUX: Payload frame: dlci:01 type:ef payload:14 available:16
V (14863) CMUX Received: 0x3ffc0d10   f9 01 ff 09 e3 05 07 8b  8f f9                    |..........|
D (14863) CMUX: Payload frame: dlci:00 type:ff payload:4 available:6
V (15163) CMUX Received: 0x3ffc0d10   f9 01 ff 09 e3 05 07 8b  8f f9                    |..........|
D (15163) CMUX: Payload frame: dlci:00 type:ff payload:4 available:6
V (15463) CMUX Received: 0x3ffc0d10   f9 01 ff 09 e3 05 07 8b  8f f9                    |..........|
D (15463) CMUX: Payload frame: dlci:00 type:ff payload:4 available:6
V (15763) CMUX Received: 0x3ffc0d10   f9 01 ff 09 e3 05 07 0b  8f f9                    |..........|
D (15763) CMUX: Payload frame: dlci:00 type:ff payload:4 available:6
V (16063) CMUX Received: 0x3ffc0d10   f9 01 ff 09 e3 05 07 0b  8f f9                    |..........|
D (16063) CMUX: Payload frame: dlci:00 type:ff payload:4 available:6
V (16363) CMUX Received: 0x3ffc0d10   f9 01 ff 09 e3 05 07 0b  8f f9                    |..........|
D (16363) CMUX: Payload frame: dlci:00 type:ff payload:4 available:6
V (16663) CMUX Received: 0x3ffc0d10   f9 01 ff                                          |...|
V (16663) CMUX Received: 0x3ffc0d10   09 e3 05 07 0b 8f f9                              |.......|
D (16663) CMUX: Payload frame: dlci:00 type:ff payload:4 available:6
V (16963) CMUX Received: 0x3ffc0d10   f9 01 ff 09 e3 05 07 09  8f f9                    |..........|
D (16963) CMUX: Payload frame: dlci:00 type:ff payload:4 available:6
V (17773) CMUX Received: 0x3ffc0d10   f9 01 ff 09 e3 05 07 09  8f f9                    |..........|
D (17773) CMUX: Payload frame: dlci:00 type:ff payload:4 available:6
V (18073) CMUX Received: 0x3ffc0d10   f9 01 ff 09 e3 05 07 09  8f f9                    |..........|
D (18073) CMUX: Payload frame: dlci:00 type:ff payload:4 available:6
V (18413) CMUX Received: 0x3ffc0d10   f9 01 ff 09 e3 05 07 09  8f f9                    |..........|
D (18413) CMUX: Payload frame: dlci:00 type:ff payload:4 available:6
I (24583) esp-netif_lwip-ppp: User interrupt
I (24583) esp_modem_netif: PPP state changed event 5
V (24583) CMUX Received: 0x3ffc0d10   f9 07 73 01 15 f9                                 |..s...|
D (24583) CMUX: Payload frame: dlci:01 type:73 payload:0 available:2
V (24603) CMUX Received: 0x3ffc0d10   f9 0b 73 01 92 f9                                 |..s...|
D (24603) CMUX: Payload frame: dlci:02 type:73 payload:0 available:2
E (25623) cmux_example: Failed to configure COMMAND_MODE command mode... exiting

Maybe i am missing something. This is code i am using to switch CMUX->COMMAND mode:

    if (dce->set_mode(esp_modem::modem_mode::COMMAND_MODE)) {
        std::cout << "Modem has correctly entered COMMAND_MODE mode" << std::endl;
    } else {
        ESP_LOGE(TAG, "Failed to configure COMMAND_MODE command mode... exiting");
        return;
    }

Thanks

About the problem of CMUX protocol mismatch (IDFGH-7490)

Hello, this warning will be reported when running the esp_modem_cmux example,I don't know if it's a cache size issue.
module:ESP32 S2 WROVER
4G module:合宙Air724UG

W (7798) CMUX: Protocol mismatch: Missed leading SOF, recovering...

ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x1768
load:0x4004c000,len:0xa48
load:0x40050000,len:0x2e58
entry 0x4004c204
I (21) boot: ESP-IDF v4.4.1 2nd stage bootloader
I (21) boot: compile time 13:03:43
I (21) boot: chip revision: 0
I (24) boot.esp32s2: SPI Speed : 80MHz
I (29) boot.esp32s2: SPI Mode : DIO
I (33) boot.esp32s2: SPI Flash Size : 4MB
I (38) boot: Enabling RNG early entropy source...
I (43) boot: Partition Table:
I (47) boot: ## Label Usage Type ST Offset Length
I (54) boot: 0 nvs WiFi data 01 02 00009000 00004000
I (62) boot: 1 otadata OTA data 01 00 0000d000 00002000
I (69) boot: 2 phy_init RF data 01 01 0000f000 00001000
I (77) boot: 3 factory factory app 00 00 00010000 00100000
I (84) boot: 4 ota_0 OTA app 00 10 00110000 00100000
I (92) boot: 5 ota_1 OTA app 00 11 00210000 00100000
I (99) boot: End of partition table
I (103) boot: Defaulting to factory image
I (108) esp_image: segment 0: paddr=00010020 vaddr=3f000020 size=25924h (153892) map
I (147) esp_image: segment 1: paddr=0003594c vaddr=3ffbe710 size=01e04h ( 7684) load
I (149) esp_image: segment 2: paddr=00037758 vaddr=40022000 size=088c0h ( 35008) load
I (162) esp_image: segment 3: paddr=00040020 vaddr=40080020 size=7056ch (460140) map
I (254) esp_image: segment 4: paddr=000b0594 vaddr=4002a8c0 size=03e48h ( 15944) load
I (258) esp_image: segment 5: paddr=000b43e4 vaddr=50000000 size=00010h ( 16) load
I (266) boot: Loaded app from partition at offset 0x10000
I (266) boot: Disabling RNG early entropy source...
I (282) cach����f�ѥ���cache : size 8KB, 4Ways, cache line size 32Byte
I (283) cpu_start: Pro cpu up.
I (294) cpu_start: Pro cpu start user code
I (294) cpu_start: cpu freq: 160000000
I (294) cpu_start: Application information:
I (299) cpu_start: Project name: simple_cmux_client
I (305) cpu_start: App version: 1
I (309) cpu_start: Compile time: May 30 2022 17:25:46
I (315) cpu_start: ELF file SHA256: 83828e316ca86c55...
I (321) cpu_start: ESP-IDF: v4.4.1
I (326) heap_init: Initializing. RAM available for dynamic allocation:
I (333) heap_init: At 3FFC3390 len 00038C70 (227 KiB): DRAM
I (340) heap_init: At 3FFFC000 len 00003A10 (14 KiB): DRAM
I (346) heap_init: At 3FF9E000 len 00002000 (8 KiB): RTCRAM
I (353) spi_flash: detected chip: generic
I (357) spi_flash: flash io: dio
I (367) cpu_start: Starting scheduler on PRO CPU.
I (368) uart: queue free spaces: 30
Modem has correctly entered multiplexed command/data mode
Operator name:"46000",7
W (7798) CMUX: Protocol mismatch: Missed leading SOF, recovering...
I (7798) CMUX: Protocol recovered
I (13798) esp-netif_lwip-ppp: Connected
I (13798) esp-netif_lwip-ppp: Name Server1: 211.136.17.107
I (13798) esp-netif_lwip-ppp: Name Server2: 0.0.0.0
I (13798) cmux_example: IP : 10.167.128.10
I (13808) cmux_example: Netmask : 255.255.255.255
I (13818) cmux_example: Gateway : 192.168.0.1

more Control over CMUX virtual Channels (IDFGH-8559)

the Issue
#167
was about enter CMUX and leave CMUX.

but this was not the right Question. Or at least not getting to the point too much.

if we enter CMUX Mode we can have up to 5 Virtual Channels according to CMUX Spec.
as i understood, ESP-Modem does establish 2 channels, 1 AT Channel, and one Data Channel.

but now +PPP disconnect comes in as a URC, then this cannel is in command mode.
so we now have 2 Channels in Command mode.

so

  1. ... how to get more info about each channel ?
  2. ... how to switch this channel again into Data Mode ?

Command Timeouts (IDFGH-8185)

This is somewhat related to #66

From testing and from the BG96/95 modem data sheet require longer timeouts.

  • set_radio_state/AT+CFUN= upto 15s
  • set_pdp_context/AT+CGACT= upto 150s

I have from testing been seeing both of these commands timing out when using the default 300ms.

It would also be useful if the esp_modem_at function had a custom timeout parameter.

See BG95&BG77_AT_Commands_Manual.pdf pages 27 and 134.

About HW Flow Control (IDFGH-7281)

Hello:

if i want to use ESP_MODEM_FLOW_CONTROL_HW.

the Scenario would be (in my Opinion, but i might be wrong)

  1. Connect to the Modem with ESP_MODEM_FLOW_CONTROL_NONE
  2. issue a esp_modem_set_flow_control(dce, 2, 2)
  3. Disconnect
  4. Reconnect to the Modem with ESP_MODEM_FLOW_CONTROL_HW

how do i achieve this ?

another way would be:

  1. Connect to the Modem with ESP_MODEM_FLOW_CONTROL_NONE
  2. issue a esp_modem_set_flow_control(dce, 2, 2)
  3. change FlowControl from ESP_MODEM_FLOW_CONTROL_NONE --> ESP_MODEM_FLOW_CONTROL_HW

Literature Reading:
SIM7070_SIM7080_SIM7090 Series_AT Command Manual_V1.05.pdf
Sections about Flow Control.

abort() was called at PC 0x420c4603 on core 1 (IDFGH-8042)

it seems there is an exception somwhere, 

i assume from "throw" ... 


ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x2f (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd03e0,len:0x32b0
load:0x403b6000,len:0xbb8
load:0x403b9000,len:0x4c0c
entry 0x403b6260
W (30) boot.esp32s3: eFuse virtual mode is enabled. If Secure boot or Flash encryption is enabled then it does not provide any security. FOR TESTING ONLY!
I (46) boot: ESP-IDF 01d014c-dirty 2nd stage bootloader
I (46) boot: compile time 18:11:37
I (47) boot: chip revision: 0
I (49) boot.esp32s3: Boot SPI Speed : 80MHz
I (54) boot.esp32s3: SPI Mode       : DIO
I (58) boot.esp32s3: SPI Flash Size : 8MB
I (63) boot: Enabling RNG early entropy source...
I (68) boot: Partition Table:
I (72) boot: ## Label            Usage          Type ST Offset   Length
I (79) boot:  0 otadata          OTA data         01 00 0000d000 00002000
I (87) boot:  1 reserved         WiFi data        01 02 0000f000 00001000
I (94) boot:  2 ota_0            OTA app          00 10 00010000 00280000
I (102) boot:  3 ota_1            OTA app          00 11 00290000 00280000
I (109) boot:  4 prod             Unknown data     01 ff 00610000 00003000
I (117) boot:  5 safeNVrb0        Unknown data     01 ff 00613000 00003000
I (124) boot:  6 safeNVrb1        Unknown data     01 ff 00616000 00003000
I (132) boot:  7 safeNVrb2        Unknown data     01 ff 00619000 00003000
I (139) boot:  8 config           WiFi data        01 02 0061c000 00046000
I (147) boot:  9 appl             WiFi data        01 02 00662000 00004000
I (154) boot: 10 shared           WiFi data        01 02 00666000 00003000
W (162) efuse: Loading virtual efuse blocks from flash
EFUSE_BLKx:
0) 0x00800101 0x000f0000 0x09c00000 0x00500000 0x00000022 0x00000000
1) 0x727003f0 0x000034b4 0x00000000 0x01000000 0x7031de00 0x6e8ac420
2) 0x8f51410c 0xc5e48240 0x526721a1 0xbaca0429 0xfcc9f281 0x04ff0210 0xc8f6ec10 0x2e60d8e8
3) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4) 0x7e68a2e3 0x08fe1124 0x53ed80b5 0xa7d5faa7 0x1b37941e 0x0b3d3af1 0x7e3e1a92 0x7dee2768
5) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
6) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
7) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
8) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
9) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
10) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000

I (254) boot: 11 efuse_em         efuse            01 05 00669000 00002000
I (262) boot: 12 nvs_key          NVS keys         01 04 0066b000 00001000
I (269) boot: 13 nvs              WiFi data        01 02 0066c000 00004000
I (277) boot: 14 spiffs           Unknown data     01 82 00670000 0018f000
I (284) boot: End of partition table
[boot] Custom bootloader message defined in the KConfig file.
I (294) boot: Loading Image: 0!
I (298) esp_image: segment 0: paddr=00010020 vaddr=3c100020 size=50980h (330112) map
I (366) esp_image: segment 1: paddr=000609a8 vaddr=3fc97f30 size=05148h ( 20808) load
I (370) esp_image: segment 2: paddr=00065af8 vaddr=40374000 size=0a520h ( 42272) load
I (381) esp_image: segment 3: paddr=00070020 vaddr=42000020 size=fb590h (1029520) map
I (566) esp_image: segment 4: paddr=0016b5b8 vaddr=4037e520 size=09a04h ( 39428) load
I (575) esp_image: segment 5: paddr=00174fc4 vaddr=50000000 size=00010h (    16) load
I (575) esp_image: segment 6: paddr=00174fdc vaddr=600fe000 size=00028h (    40) load
I (581) esp_image: segment 7: paddr=0017500c vaddr=00000000 size=0afc4h ( 44996)
I (597) esp_image: Verifying image signature...
I (597) secure_boot_v2: Verifying with RSA-PSS...
I (602) secure_boot_v2: Signature verified successfully!
I (614) boot: Loaded app from partition at offset 0x10000
I (614) secure_boot_v2: enabling secure boot v2...
I (617) secure_boot_v2: secure boot v2 is already enabled, continuing..
I (624) boot: Disabling RNG early entropy source...
I (641) cpu_start: Pro cpu up.
I (642) cpu_start: Starting app cpu, entry point is 0x403755ac
0x403755ac: call_start_cpu1 at C:/Espressif/frameworks/esp-idf-master/components/esp_system/port/cpu_start.c:152

I (0) cpu_start: App cpu up.
I (655) cpu_start: Pro cpu start user code
I (655) cpu_start: cpu freq: 160000000 Hz
I (655) cpu_start: Application information:
I (658) cpu_start: Project name:     ksc2n_A_Sample
I (663) cpu_start: App version:      Tag_Plan_SW_2224_v1.0-148-g843e
I (670) cpu_start: Compile time:     Aug  9 2022 16:39:37
I (676) cpu_start: ELF file SHA256:  7f1eb3a5116bb9ed...
I (682) cpu_start: ESP-IDF:          v5.0-dev-3290-g01d014c42d-dirty
I (690) heap_init: Initializing. RAM available for dynamic allocation:
I (697) heap_init: At 3FCB6AD8 len 00029528 (165 KiB): D/IRAM
I (703) heap_init: At 3FCE0000 len 0000EE34 (59 KiB): STACK/DRAM
I (710) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (716) heap_init: At 600FE028 len 00001FD8 (7 KiB): RTCRAM
I (723) spi_flash: detected chip: generic
I (727) spi_flash: flash io: dio
W (731) cpu_start: eFuse virtual mode is enabled. If Secure boot or Flash encryption is enabled then it does not provide any security. FOR TESTING ONLY!
W (746) efuse: Loading virtual efuse blocks from flash
EFUSE_BLKx:
0) 0x00800101 0x000f0000 0x09c00000 0x00500000 0x00000022 0x00000000
1) 0x727003f0 0x000034b4 0x00000000 0x01000000 0x7031de00 0x6e8ac420
2) 0x8f51410c 0xc5e48240 0x526721a1 0xbaca0429 0xfcc9f281 0x04ff0210 0xc8f6ec10 0x2e60d8e8
3) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4) 0x7e68a2e3 0x08fe1124 0x53ed80b5 0xa7d5faa7 0x1b37941e 0x0b3d3af1 0x7e3e1a92 0x7dee2768
5) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
6) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
7) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
8) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
9) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
10) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000

I (840) sleep: Configure to isolate all GPIO pins in sleep state
I (844) sleep: Enable automatic switching of GPIO sleep configuration
I (851) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (1037) DEM: The DEM is initialized.
I (1057) system_api: Base MAC address is not set
I (1057) system_api: read default base MAC address from EFUSE
I (1057) BE_CommManager: Client initialized successfully
I (1057) gpio: GPIO[6]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1067) gpio: GPIO[7]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1077) gpio: GPIO[10]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1087) gpio: GPIO[11]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1097) gpio: GPIO[45]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1107) gpio: GPIO[46]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1117) gpio: GPIO[47]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1127) gpio: GPIO[48]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1137) gpio: GPIO[4]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 1| Intr:0
I (1147) gpio: GPIO[5]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 1| Intr:0
I (1157) EcuManager: +++++++  initialisation completed
I (1187) HAL_CAN_DRV: Driver installed
I (1187) HAL_CAN_DRV: Driver started
I (1187) HAL_CAN_DRV: Starting transmissions
I (1197) pp: pp rom version: e7ae62f
I (1197) net80211: net80211 rom version: e7ae62f
I (1207) wifi:wifi driver task: 3fce891c, prio:23, stack:6656, core=0
I (1207) wifi:wifi firmware version: 0ca6d0b
I (1207) wifi:wifi certification version: v7.0
I (1217) wifi:config NVS flash: disabled
I (1217) wifi:config nano formating: disabled
I (1217) wifi:Init data frame dynamic rx buffer num: 32
I (1227) wifi:Init management frame dynamic rx buffer num: 32
I (1227) wifi:Init management short buffer num: 32
I (1237) wifi:Init dynamic tx buffer num: 32
I (1237) wifi:Init static tx FG buffer num: 2
I (1247) wifi:Init static rx buffer size: 1600
I (1247) wifi:Init static rx buffer num: 10
I (1247) wifi:Init dynamic rx buffer num: 32
I (1257) wifi_init: rx ba win: 6
I (1257) wifi_init: tcpip mbox: 32
I (1267) wifi_init: udp mbox: 6
I (1267) wifi_init: tcp mbox: 6
I (1267) wifi_init: tcp tx win: 5744
I (1277) wifi_init: tcp rx win: 5744
I (1277) wifi_init: tcp mss: 1440
I (1287) wifi_init: WiFi IRAM OP enabled
I (1287) wifi_init: WiFi RX IRAM OP enabled
I (1297) statusLED: statusLED initialization!
I (1297) statusLED: statusLED initialized!
I (1307) EcuManager: +++++++  ECU state changed from ECU_STATE_NOT_INIT to ECU_STATE_INITIALIZING
I (1307) ESPModem: Modem successfully initialized
I (1307) EcuManager: Wakeup cause undefined, probably normal startup.
I (1327) EcuManager: NV data check status OK !
I (1327) EcuManager: +++++++  ECU state changed from ECU_STATE_INITIALIZING to ECU_STATE_NORMAL
I (1337) ResourceManager: ++  RESOURCE_CAN_0 changed state: from RESOURCE_STATE_INIT to RESOURCE_STATE_STARTING with target state: RESOURCE_TARGET_STATE_STARTED
I (1357) ResourceManager: ++  RESOURCE_ISOLIB_CAN_0 changed state: from RESOURCE_STATE_INIT to RESOURCE_STATE_STOPPED with target state: RESOURCE_TARGET_STATE_STARTED
I (1367) ResourceManager: ++  RESOURCE_WIFI_CON changed state: from RESOURCE_STATE_INIT to RESOURCE_STATE_STARTING with target state: RESOURCE_TARGET_STATE_STARTED
I (1387) ResourceManager: ++  send start AP command
I (1387) WiFi_AP: WiFi starts as AP
I (1397) phy_init: phy_version 501,79e7e9b,Apr 19 2022,11:10:08
I (1507) wifi:mode : softAP (34:b4:72:70:03:f1)
I (1507) wifi:Total power save buffer number: 16
I (1507) wifi:Init max length of beacon: 752/752
I (1507) wifi:Init max length of beacon: 752/752
I (1507) ResourceManager: ++  RESOURCE_INTERNET changed state: from RESOURCE_STATE_INIT to RESOURCE_STATE_STARTING with target state: RESOURCE_TARGET_STATE_STARTED
I (1507) WiFi_AP: received WIFI_EVENT_AP_START
I (1527) ResourceManager: ++  RESOURCE_CAN_0 changed state: from RESOURCE_STATE_STARTING to RESOURCE_STATE_STARTED with target state: RESOURCE_TARGET_STATE_STARTED
I (1547) ResourceManager: ++  RESOURCE_ISOLIB_CAN_0 changed state: from RESOURCE_STATE_STOPPED to RESOURCE_STATE_STARTING with target state: RESOURCE_TARGET_STATE_STARTED
I (1557) ResourceManager: ++  RESOURCE_WIFI_CON changed state: from RESOURCE_STATE_STARTING to RESOURCE_STATE_CONNECTING with target state: RESOURCE_TARGET_STATE_STARTED
I (1577) ResourceManager: ++  connect the STA to the remote AP
W (1587) WiFi_AP: WiFi_AP::connect called but not supported
I (1587) statusLED: Displayed code (status) changed to STATE_BLINK_CODE_22 - J1939 Error
I (1607) ResourceManager: ++  RESOURCE_ISOLIB_CAN_0 changed state: from RESOURCE_STATE_STARTING to RESOURCE_STATE_STARTED with target state: RESOURCE_TARGET_STATE_STARTED
I (1617) ResourceManager: ++  connect the STA to the remote AP
W (1617) WiFi_AP: WiFi_AP::connect called but not supported
I (2157) statusLED: Displayed code (status) changed to STATE_05_HZ_BLINK_RATE - Normal
I (2177) CF2_IsoBus: NETWORK EVENT CF2 32
I (2177) CF3_Telematic: NETWORK EVENT CF3 32
I (2177) CF2_IsoBus: NETWORK EVENT CF2 200
I (2177) CF3_Telematic: NETWORK EVENT CF3 200
I (5287) ESPModem: Modem powered ON successfully
I (5297) ESPmodem_Cmux: config NETWORK
I (5297) uart: queue free spaces: 30
I (5307) ESPmodem_Cmux: AT command OK
I (5317) ESPmodem_Cmux: delete 2-wire UART
I (5317) uart: ALREADY NULL
I (5337) ResourceManager: ++  RESOURCE_INTERNET changed state: from RESOURCE_STATE_STARTING to RESOURCE_STATE_CONNECTING with target state: RESOURCE_TARGET_STATE_STARTED
I (5347) ESPmodem_Cmux: config MODEM
I (5347) ESPmodem_Cmux: config NETWORK to 4-wire
I (5347) uart: queue free spaces: 30
I (5347) ESPmodem_Cmux: config dce to 4-wire
I (5357) ESPmodem_Cmux: setting flow_control
I (5367) ESPmodem_Cmux: set_flow_control OK
I (5367) ESPmodem_Cmux: esp_modem_set_network_mode OK
I (5377) ESPmodem_Cmux: set_preferred_mode OK
I (5387) ESPmodem_Cmux: set_network_bands OK
I (5397) ESPmodem_Cmux: Module name: SIMCOM_SIM7070
I (5397) ESPmodem_Cmux: Module SW version: Revision:1951B10SIM7070
I (5407) ESPmodem_Cmux: IMEI: 865456053946891
I (5417) ESPmodem_Cmux: IMSI: 901288005633611
I (5427) ESPmodem_Cmux: Waiting for 500 ms
I (5937) ESPmodem_Cmux: current config state: 7
I (5947) ESPmodem_Cmux: Waiting for 500 ms
I (6457) ESPmodem_Cmux: current config state: 7
I (6467) ESPmodem_Cmux: Waiting for 500 ms
I (6977) ESPmodem_Cmux: current config state: 7
I (6987) ESPmodem_Cmux: Waiting for 500 ms
I (7497) ESPmodem_Cmux: current config state: 7
I (7507) ESPmodem_Cmux: Operator name: "A1 BG",9
I (7527) ESPmodem_Cmux: Mode: 9
I (7537) ESPmodem_Cmux: Radio state: 1
I (7567) ESPmodem_Cmux: Battery status: voltage=4290, charging_status=0, level=99
I (7567) ESPmodem_Cmux: Signal quality: rssi=26, ber=99
I (7717) ESPmodem_Cmux: PPP state changed event 259
I (7717) ESPmodem_Cmux: Modem has correctly entered multiplexed command/data mode
I (7717) ESPmodem_Cmux: PPP state changed event 262
I (7727) ESPmodem_Cmux: Attached to nework, wait for IP
I (13737) ESPmodem_Cmux: PPP state changed event 263
I (13737) ESPmodem_Cmux: PPP state changed event 265
I (13787) esp-netif_lwip-ppp: Connected
I (13787) esp-netif_lwip-ppp: Name Server1: 217.14.160.130
I (13787) esp-netif_lwip-ppp: Name Server2: 217.14.164.35
I (13787) ESPmodem_Cmux: Modem Connect to PPP Server
I (13797) ESPmodem_Cmux: ~~~~~~~~~~~~~~
I (13797) ESPmodem_Cmux: IP          : 100.82.28.119
I (13807) ESPmodem_Cmux: Netmask     : 255.255.255.255
I (13807) ESPmodem_Cmux: Gateway     : 10.64.64.64
I (13817) ESPmodem_Cmux: Name Server1: 217.14.160.130
I (13817) ESPmodem_Cmux: Name Server2: 217.14.164.35
I (13827) ESPmodem_Cmux: ~~~~~~~~~~~~~~
I (13827) ESPmodem_Cmux: GOT ip event!!!
I (13837) ESPmodem_Cmux: PPP state changed event 266
I (13837) ResourceManager: ++  RESOURCE_INTERNET changed state: from RESOURCE_STATE_CONNECTING to RESOURCE_STATE_STARTED with target state: RESOURCE_TARGET_STATE_STARTED
I (16167) BE_CommManager: MQTT_EVENT_BEFORE_CONNECT
! (20967) MODEM: ESP Modem invalid state entered due to timeout for command: AT+CGNSINF

abort() was called at PC 0x420c4603 on core 1
0x420c4603: __cxxabiv1::__terminate(void (*)()) at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32s3-elf/src/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:47



Backtrace:0x4037603a:0x3fca41100x4037e8c9:0x3fca4130 0x40385242:0x3fca4150 0x420c4603:0x3fca41c0 0x420c464a:0x3fca41e0 0x420b56e7:0x3fca4200 0x42020aee:0x3fca4220 0x42021267:0x3fca4290 0x42026e3a:0x3fca42c0 0x42027b37:0x3fca42f0 0x4202e3bd:0x3fca44f0 0x4200ffd9:0x3fca4510 0x4201cd6b:0x3fca4580 0x4201145f:0x3fca45a0 0x420112db:0x3fca45d0 0x420f241f:0x3fca4600 0x4200aa55:0x3fca4620 0x40382045:0x3fca4640
0x4037603a: panic_abort at C:/Espressif/frameworks/esp-idf-master/components/esp_system/panic.c:409

0x4037e8c9: esp_system_abort at C:/Espressif/frameworks/esp-idf-master/components/esp_system/esp_system.c:135

0x40385242: abort at C:/Espressif/frameworks/esp-idf-master/components/newlib/abort.c:46

0x420c4603: __cxxabiv1::__terminate(void (*)()) at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32s3-elf/src/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:47

0x420c464a: std::terminate() at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32s3-elf/src/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:57

0x420b56e7: __cxa_throw at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32s3-elf/src/gcc/libstdc++-v3/libsupc++/eh_throw.cc:95

0x42020aee: esp_modem::DTE::command(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<esp_modem::command_result (unsigned char*, unsigned int)>, unsigned int, char) at C:/Projects/ksc2n_appl_A/src/SERVICES/EspModem_Driver/include/cxx_include/esp_modem_exception.hpp:63
 (inlined by) esp_modem::DTE::command(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<esp_modem::command_result (unsigned char*, unsigned int)>, unsigned int, char) at C:/Projects/ksc2n_appl_A/src/SERVICES/EspModem_Driver/src/esp_modem_dte.cpp:60

0x42021267: esp_modem::DTE::command(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<esp_modem::command_result (unsigned char*, unsigned int)>, unsigned int) at C:/Projects/ksc2n_appl_A/src/SERVICES/EspModem_Driver/src/esp_modem_dte.cpp:69

0x42026e3a: esp_modem::dce_commands::generic_get_string(esp_modem::CommandableIf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string_view<char, std::char_traits<char> >&, unsigned int) at C:/Projects/ksc2n_appl_A/src/SERVICES/EspModem_Driver/src/esp_modem_command_library.cpp:67

0x42027b37: esp_modem::dce_commands::get_gnss_information_sim70xx(esp_modem::CommandableIf*, gps_s&) at C:/Projects/ksc2n_appl_A/src/SERVICES/EspModem_Driver/src/esp_modem_command_library.cpp:619

0x4202e3bd: esp_modem::GenericModule::get_gnss_information_sim70xx(gps_s&) at C:/Projects/ksc2n_appl_A/src/SERVICES/EspModem_Driver/src/esp_modem_modules.cpp:48

0x4200ffd9: esp_modem::command_result esp_modem::DCE::get_gnss_information_sim70xx<gps_s&>(gps_s&) at C:/Projects/ksc2n_appl_A/src/SERVICES/EspModem_Driver/include/cxx_include/esp_modem_dce.hpp:117
 (inlined by) ModemManager_getCurrentFixStatus at C:/Projects/ksc2n_appl_A/src/SERVICES/EspModem_Manager/ModemManager_Wrapper.cpp:775

0x4201cd6b: GNSS_IF_UpdateCurrentTime at C:/Projects/ksc2n_appl_A/src/SERVICES/GNSS_IF/GNSS_IF.c:72

0x4201145f: EcuM_Normal_StateHandler at C:/Projects/ksc2n_appl_A/src/SERVICES/EcuManager/EcuManager.c:601

0x420112db: EcuM_MainFunction at C:/Projects/ksc2n_appl_A/src/SERVICES/EcuManager/EcuManager.c:221

0x420f241f: osw::Event::run() const at C:/Projects/ksc2n_appl_A/src/OS/os_wrapper/src/Event.cpp:27

0x4200aa55: osw::Task<0u>::run(void*) at C:/Projects/ksc2n_appl_A/src/OS/os_wrapper/include/Task.hpp:179

0x40382045: vPortTaskWrapper at C:/Espressif/frameworks/esp-idf-master/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:141





ELF file SHA256: 7f1eb3a5116bb9ed

Rebooting...
�ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x2f (SPI_FAST_FLASH_BOOT)
Saved PC:0x4200444a
0x4200444a: esp_vApplicationIdleHook at C:/Espressif/frameworks/esp-idf-master/components/esp_system/freertos_hooks.c:62

SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd03e0,len:0x32b0
load:0x403b6000,len:0xbb8
load:0x403b9000,len:0x4c0c
entry 0x403b6260
W (32) boot.esp32s3: eFuse virtual mode is enabled. If Secure boot or Flash encryption is enabled then it does not provide any security. FOR TESTING ONLY!
I (48) boot: ESP-IDF 01d014c-dirty 2nd stage bootloader
I (49) boot: compile time 18:11:37
I (49) boot: chip revision: 0
I (51) boot.esp32s3: Boot SPI Speed : 80MHz
I (56) boot.esp32s3: SPI Mode       : DIO
I (60) boot.esp32s3: SPI Flash Size : 8MB
I (65) boot: Enabling RNG early entropy source...
I (71) boot: Partition Table:
I (74) boot: ## Label            Usage          Type ST Offset   Length
I (81) boot:  0 otadata          OTA data         01 00 0000d000 00002000
I (89) boot:  1 reserved         WiFi data        01 02 0000f000 00001000
I (96) boot:  2 ota_0            OTA app          00 10 00010000 00280000
I (104) boot:  3 ota_1            OTA app          00 11 00290000 00280000
I (111) boot:  4 prod             Unknown data     01 ff 00610000 00003000
I (119) boot:  5 safeNVrb0        Unknown data     01 ff 00613000 00003000
I (126) boot:  6 safeNVrb1        Unknown data     01 ff 00616000 00003000
I (134) boot:  7 safeNVrb2        Unknown data     01 ff 00619000 00003000
I (142) boot:  8 config           WiFi data        01 02 0061c000 00046000
I (149) boot:  9 appl             WiFi data        01 02 00662000 00004000
I (157) boot: 10 shared           WiFi data        01 02 00666000 00003000
W (164) efuse: Loading virtual efuse blocks from flash
EFUSE_BLKx:
0) 0x00800101 0x000f0000 0x09c00000 0x00500000 0x00000022 0x00000000
1) 0x727003f0 0x000034b4 0x00000000 0x01000000 0x7031de00 0x6e8ac420
2) 0x8f51410c 0xc5e48240 0x526721a1 0xbaca0429 0xfcc9f281 0x04ff0210 0xc8f6ec10 0x2e60d8e8
3) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4) 0x7e68a2e3 0x08fe1124 0x53ed80b5 0xa7d5faa7 0x1b37941e 0x0b3d3af1 0x7e3e1a92 0x7dee2768
5) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
6) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
7) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
8) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
9) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
10) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000

I (256) boot: 11 efuse_em         efuse            01 05 00669000 00002000
I (264) boot: 12 nvs_key          NVS keys         01 04 0066b000 00001000
I (271) boot: 13 nvs              WiFi data        01 02 0066c000 00004000
I (279) boot: 14 spiffs           Unknown data     01 82 00670000 0018f000
I (287) boot: End of partition table
[boot] Custom bootloader message defined in the KConfig file.
I (296) boot: Loading Image: 0!
I (300) esp_image: segment 0: paddr=00010020 vaddr=3c100020 size=50980h (330112) map
I (368) esp_image: segment 1: paddr=000609a8 vaddr=3fc97f30 size=05148h ( 20808) load
I (373) esp_image: segment 2: paddr=00065af8 vaddr=40374000 size=0a520h ( 42272) load
I (383) esp_image: segment 3: paddr=00070020 vaddr=42000020 size=fb590h (1029520) map
I (569) esp_image: segment 4: paddr=0016b5b8 vaddr=4037e520 size=09a04h ( 39428) load
I (578) esp_image: segment 5: paddr=00174fc4 vaddr=50000000 size=00010h (    16) load
I (579) esp_image: segment 6: paddr=00174fdc vaddr=600fe000 size=00028h (    40) load
I (584) esp_image: segment 7: paddr=0017500c vaddr=00000000 size=0afc4h ( 44996)
I (600) esp_image: Verifying image signature...
I (601) secure_boot_v2: Verifying with RSA-PSS...
I (606) secure_boot_v2: Signature verified successfully!
I (617) boot: Loaded app from partition at offset 0x10000
I (617) secure_boot_v2: enabling secure boot v2...
I (620) secure_boot_v2: secure boot v2 is already enabled, continuing..
I (628) boot: Disabling RNG early entropy source...
I (645) cpu_start: Pro cpu up.
I (645) cpu_start: Starting app cpu, entry point is 0x403755ac
0x403755ac: call_start_cpu1 at C:/Espressif/frameworks/esp-idf-master/components/esp_system/port/cpu_start.c:152

I (609) cpu_start: App cpu up.
I (659) cpu_start: Pro cpu start user code
I (659) cpu_start: cpu freq: 160000000 Hz
I (659) cpu_start: Application information:
I (662) cpu_start: Project name:     ksc2n_A_Sample
I (668) cpu_start: App version:      Tag_Plan_SW_2224_v1.0-148-g843e
I (675) cpu_start: Compile time:     Aug  9 2022 16:39:37
I (681) cpu_start: ELF file SHA256:  7f1eb3a5116bb9ed...
I (687) cpu_start: ESP-IDF:          v5.0-dev-3290-g01d014c42d-dirty
I (694) heap_init: Initializing. RAM available for dynamic allocation:
I (701) heap_init: At 3FCB6AD8 len 00029528 (165 KiB): D/IRAM
I (707) heap_init: At 3FCE0000 len 0000EE34 (59 KiB): STACK/DRAM
I (714) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (720) heap_init: At 600FE028 len 00001FD8 (7 KiB): RTCRAM
I (727) spi_flash: detected chip: generic
I (731) spi_flash: flash io: dio
W (735) cpu_start: eFuse virtual mode is enabled. If Secure boot or Flash encryption is enabled then it does not provide any security. FOR TESTING ONLY!
W (750) efuse: Loading virtual efuse blocks from flash
EFUSE_BLKx:
0) 0x00800101 0x000f0000 0x09c00000 0x00500000 0x00000022 0x00000000
1) 0x727003f0 0x000034b4 0x00000000 0x01000000 0x7031de00 0x6e8ac420
2) 0x8f51410c 0xc5e48240 0x526721a1 0xbaca0429 0xfcc9f281 0x04ff0210 0xc8f6ec10 0x2e60d8e8
3) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4) 0x7e68a2e3 0x08fe1124 0x53ed80b5 0xa7d5faa7 0x1b37941e 0x0b3d3af1 0x7e3e1a92 0x7dee2768
5) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
6) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
7) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
8) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
9) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
10) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000

I (844) sleep: Configure to isolate all GPIO pins in sleep state
I (848) sleep: Enable automatic switching of GPIO sleep configuration
I (856) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (1041) DEM: The DEM is initialized.
I (1061) system_api: Base MAC address is not set
I (1061) system_api: read default base MAC address from EFUSE
I (1061) BE_CommManager: Client initialized successfully
I (1061) gpio: GPIO[6]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1071) gpio: GPIO[7]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1081) gpio: GPIO[10]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1091) gpio: GPIO[11]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1101) gpio: GPIO[45]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1111) gpio: GPIO[46]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1121) gpio: GPIO[47]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1131) gpio: GPIO[48]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1141) gpio: GPIO[4]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 1| Intr:0
I (1151) gpio: GPIO[5]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 1| Intr:0
I (1161) EcuManager: +++++++  initialisation completed
I (1191) HAL_CAN_DRV: Driver installed
I (1191) HAL_CAN_DRV: Driver started
I (1191) HAL_CAN_DRV: Starting transmissions
I (1201) pp: pp rom version: e7ae62f
I (1201) net80211: net80211 rom version: e7ae62f
I (1211) wifi:wifi driver task: 3fce891c, prio:23, stack:6656, core=0
I (1211) wifi:wifi firmware version: 0ca6d0b
I (1211) wifi:wifi certification version: v7.0
I (1221) wifi:config NVS flash: disabled
I (1221) wifi:config nano formating: disabled
I (1221) wifi:Init data frame dynamic rx buffer num: 32
I (1231) wifi:Init management frame dynamic rx buffer num: 32
I (1231) wifi:Init management short buffer num: 32
I (1241) wifi:Init dynamic tx buffer num: 32
I (1241) wifi:Init static tx FG buffer num: 2
I (1251) wifi:Init static rx buffer size: 1600
I (1251) wifi:Init static rx buffer num: 10
I (1251) wifi:Init dynamic rx buffer num: 32
I (1261) wifi_init: rx ba win: 6
I (1261) wifi_init: tcpip mbox: 32
I (1271) wifi_init: udp mbox: 6
I (1271) wifi_init: tcp mbox: 6
I (1271) wifi_init: tcp tx win: 5744
I (1281) wifi_init: tcp rx win: 5744
I (1281) wifi_init: tcp mss: 1440
I (1291) wifi_init: WiFi IRAM OP enabled
I (1291) wifi_init: WiFi RX IRAM OP enabled
I (1301) statusLED: statusLED initialization!
I (1301) statusLED: statusLED initialized!
I (1311) EcuManager: +++++++  ECU state changed from ECU_STATE_NOT_INIT to ECU_STATE_INITIALIZING
I (1311) ESPModem: Modem successfully initialized
I (1311) EcuManager: Wakeup cause undefined, probably normal startup.
I (1331) EcuManager: NV data check status OK !
I (1331) EcuManager: +++++++  ECU state changed from ECU_STATE_INITIALIZING to ECU_STATE_NORMAL
I (1341) ResourceManager: ++  RESOURCE_CAN_0 changed state: from RESOURCE_STATE_INIT to RESOURCE_STATE_STARTING with target state: RESOURCE_TARGET_STATE_STARTED
I (1361) ResourceManager: ++  RESOURCE_ISOLIB_CAN_0 changed state: from RESOURCE_STATE_INIT to RESOURCE_STATE_STOPPED with target state: RESOURCE_TARGET_STATE_STARTED
I (1371) ResourceManager: ++  RESOURCE_WIFI_CON changed state: from RESOURCE_STATE_INIT to RESOURCE_STATE_STARTING with target state: RESOURCE_TARGET_STATE_STARTED
I (1391) ResourceManager: ++  send start AP command
I (1391) WiFi_AP: WiFi starts as AP
I (1401) phy_init: phy_version 501,79e7e9b,Apr 19 2022,11:10:08
I (1511) wifi:mode : softAP (34:b4:72:70:03:f1)
I (1511) wifi:Total power save buffer number: 16
I (1511) wifi:Init max length of beacon: 752/752
I (1511) wifi:Init max length of beacon: 752/752
I (1521) ResourceManager: ++  RESOURCE_INTERNET changed state: from RESOURCE_STATE_INIT to RESOURCE_STATE_STARTING with target state: RESOURCE_TARGET_STATE_STARTED
I (1521) WiFi_AP: received WIFI_EVENT_AP_START
I (1531) ResourceManager: ++  RESOURCE_CAN_0 changed state: from RESOURCE_STATE_STARTING to RESOURCE_STATE_STARTED with target state: RESOURCE_TARGET_STATE_STARTED
I (1551) ResourceManager: ++  RESOURCE_ISOLIB_CAN_0 changed state: from RESOURCE_STATE_STOPPED to RESOURCE_STATE_STARTING with target state: RESOURCE_TARGET_STATE_STARTED
I (1571) ResourceManager: ++  RESOURCE_WIFI_CON changed state: from RESOURCE_STATE_STARTING to RESOURCE_STATE_CONNECTING with target state: RESOURCE_TARGET_STATE_STARTED
I (1581) ResourceManager: ++  connect the STA to the remote AP
W (1591) WiFi_AP: WiFi_AP::connect called but not supported
I (1591) statusLED: Displayed code (status) changed to STATE_BLINK_CODE_22 - J1939 Error
I (1611) ResourceManager: ++  RESOURCE_ISOLIB_CAN_0 changed state: from RESOURCE_STATE_STARTING to RESOURCE_STATE_STARTED with target state: RESOURCE_TARGET_STATE_STARTED
I (1621) ResourceManager: ++  connect the STA to the remote AP
W (1631) WiFi_AP: WiFi_AP::connect called but not supported
I (2171) statusLED: Displayed code (status) changed to STATE_05_HZ_BLINK_RATE - Normal
I (2191) CF2_IsoBus: NETWORK EVENT CF2 32
I (2191) CF3_Telematic: NETWORK EVENT CF3 32
I (2191) CF2_IsoBus: NETWORK EVENT CF2 200
I (2191) CF3_Telematic: NETWORK EVENT CF3 200

Done
PS C:\Projects\ksc2n_appl_A>

Error while building project with dependency `esp_websocket_client==0.0.2` (IDFGH-7986)

Hi. I'm using ESP-IDF v5.0-dev-4547-gfde4afc67a and I have installed esp_websocket_client (latest version 0.0.2) via dependency manager. When I try to build project I'm getting error:

.../managed_components/espressif__esp_websocket_client/include/esp_websocket_client.h:16:10: fatal error: esp_event.h: No such file or directory
   16 | #include "esp_event.h"
      |          ^~~~~~~~~~~~~
compilation terminated.
HINT: Please check if you've specified all component dependencies with 'idf_component_register(REQUIRES ...)'.

I have check that in 6e4e4fa esp_event has been added to REQUIRES in CMakeLists.txt but new package version with the latest changes is not published to IDF Component Registry yet.

Please make the new version of esp_websocket_client and push it to the Component Registry so we can use esp_websocket_client in our projects.

@suren-gabrielyan-espressif sorry for tag but maybe you can publish the new version of package?

Thanks in advance.
Cheers.

Question about get_network_attachment_state (IDFGH-7892)

Hello,

if I am in CMUX Mode, and sending Data over the Data Channel.
and i issue say a "get_network_attachment_state" ?

will it issue the AT Command, wait for the Response, and then Continue with the Data Transmission ?

OR does it issue the AT Command, continue the Data Transmission, and then get the Response ?

Bug while changing modem mode from "data" to "command" (IDFGH-7502)

When my BG95-M3 modem is in data mode, if I try to move to command mode with api esp_modem_set_mode(dce, ESP_MODEM_MODE_COMMAND), then I can the send AT commands, but the esp_modem still thinks it is in data mode, so if I try to move back to data mode, it will fail...

After investigating, it seems device->set_mode(modem_mode::COMMAND_MODE) returns false at

if (!device->set_mode(modem_mode::COMMAND_MODE)) {
return false;
}
which explain why internal mode is not changed (see: )

"CMUX: Protocol mismatch: Missed leading SOF, recovering..." warning in esp_modem (IDFGH-8102)

Hello,
I am facing an issue with the "esp_modem" component. I am getting a warning " CMUX: Protocol mismatch: Missed leading SOF, recovering..." and the success rate of connection after this warning is 60%, 40% of times it does not connect. I have tried increasing the rx tx buffer, but still no luck. And, even if connection happens, I get "Protocol Recovered" log very very rarely.

P.S. I am on the latest commit.

@david-cermak

Ap_to_pppos example (IDFGH-7669)

AP_to_pppos example doesn't seem to work fully after enabling the debug logs, I get this:

D (1132) memory_layout: Available memory region 0x40095e40 - 0x40096000
V (1138) memory_layout: Examining memory region 0x40096000 - 0x40098000
D (1145) memory_layout: Available memory region 0x40096000 - 0x40098000
V (1152) memory_layout: Examining memory region 0x40098000 - 0x4009a000
D (1159) memory_layout: Available memory region 0x40098000 - 0x4009a000
V (1165) memory_layout: Examining memory region 0x4009a000 - 0x4009c000
D (1172) memory_layout: Available memory region 0x4009a000 - 0x4009c000
V (1179) memory_layout: Examining memory region 0x4009c000 - 0x4009e000
D (1185) memory_layout: Available memory region 0x4009c000 - 0x4009e000
V (1192) memory_layout: Examining memory region 0x4009e000 - 0x400a0000
D (1199) memory_layout: Available memory region 0x4009e000 - 0x400a0000
I (1205) heap_init: Initializing. RAM available for dynamic allocation:
D (1213) heap_init: New heap initialised at 0x3ffae6e0
I (1218) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
D (1224) heap_init: New heap initialised at 0x3ffb7790
I (1229) heap_init: At 3FFB7790 len 00028870 (162 KiB): DRAM
I (1236) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (1242) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
D (1249) heap_init: New heap initialised at 0x40095e40
I (1254) heap_init: At 40095E40 len 0000A1C0 (40 KiB): IRAM
V (1260) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args
V (1266) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0xE
D (1275) intr_alloc: Connected src 46 to int 2 (cpu 0)
D (1280) FLASH_HAL: extra_dummy: 1
V (1283) memspi: raw_chip_id: 164020

V (1287) memspi: chip_id: 204016

V (1290) memspi: raw_chip_id: 164020

V (1294) memspi: chip_id: 204016

D (1298) spi_flash: trying chip: issi
D (1302) spi_flash: trying chip: gd
D (1305) spi_flash: trying chip: mxic
D (1309) spi_flash: trying chip: winbond
D (1313) spi_flash: trying chip: generic
I (1317) spi_flash: detected chip: generic
I (1322) spi_flash: flash io: dio
D (1326) cpu_start: calling init function: 0x4013a7cc
0x4013a7cc: _GLOBAL__sub_I__ZN9__gnu_cxx9__freeresEv at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/eh_alloc.cc:348

D (1331) cpu_start: calling init function: 0x4013a57c
0x4013a57c: _GLOBAL__sub_I___cxa_get_globals_fast at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/eh_globals.cc:145

D (1336) cpu_start: calling init function: 0x400e5f94
0x400e5f94: s_set_default_wifi_log_level at C:/Users/prath/esp/esp-idf/components/esp_wifi/src/wifi_init.c:63

D (1341) cpu_start: calling init function: 0x400da3fc
0x400da3fc: esp_ipc_init at C:/Users/prath/esp/esp-idf/components/esp_ipc/src/esp_ipc.c:102

D (1346) cpu_start: calling init function: 0x400d3094
0x400d3094: esp_reset_reason_init at C:/Users/prath/esp/esp-idf/components/esp_system/port/soc/esp32/reset_reason.c:68

D (1351) cpu_start: calling init function: 0x400d237c
0x400d237c: esp_ota_init_app_elf_sha256 at C:/Users/prath/esp/esp-idf/components/app_update/esp_app_desc.c:68

V (1356) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args
V (1363) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0xC02
D (1371) intr_alloc: Connected src 17 to int 3 (cpu 0)
V (1376) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args
V (1383) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0x40E
D (1391) intr_alloc: Connected src 24 to int 9 (cpu 0)
I (1396) cpu_start: Starting scheduler on PRO CPU.
V (0) intr_alloc: esp_intr_alloc_intrstatus (cpu 1): checking args
V (0) intr_alloc: esp_intr_alloc_intrstatus (cpu 1): Args okay. Resulting flags 0x40E
D (10) intr_alloc: Connected src 25 to int 2 (cpu 1)
I (10) cpu_start: Starting scheduler on APP CPU.
D (1446) heap_init: New heap initialised at 0x3ffe0440
D (1446) heap_init: New heap initialised at 0x3ffe4350
V (1456) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args
V (1456) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0xE
D (1456) intr_alloc: Connected src 16 to int 12 (cpu 0)
I (1476) ap_to_pppos: Enabling PWRKEY
I (8576) ap_to_pppos: Enabling PWRKEY ... done
D (8576) partition: Loading the partition table
V (8576) calculated md5: 0x3ffba2b8   f4 ad 4f 45 38 56 4b 5d  74 35 b6 2c 75 b6 95 24  |..OE8VK]t5.,u..$|
V (8576) stored md5: 0x3f428070   f4 ad 4f 45 38 56 4b 5d  74 35 b6 2c 75 b6 95 24  |..OE8VK]t5.,u..$|
D (8586) partition: Partition table MD5 verified
D (8606) esp_netif_lwip: LwIP stack has been initialized
D (8606) esp_netif_lwip: esp-netif has been successfully initialized
D (8606) event: running task for loop 0x3ffbd0f8
D (8616) event: created task for loop 0x3ffbd0f8
D (8616) event: created event loop 0x3ffbd0f8
D (8626) esp_netif_objects: esp_netif_add_to_list 0x3ffbe04c
D (8626) esp_netif_objects: esp_netif_add_to_list netif added successfully (total netifs: 1)
D (8636) esp-netif_lwip-ppp: esp_netif_new_ppp: PPP connection created: 0x3ffbe380
I (8646) uart: ESP_INTR_FLAG_IRAM flag not set while CONFIG_UART_ISR_IN_IRAM is enabled, flag updated
I (8656) uart: queue free spaces: 30
V (8656) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args
V (8656) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0x40E
D (8656) intr_alloc: Connected src 35 to int 13 (cpu 0)
V (8676) command_lib: set_pdp_context
V (8686) command_lib: generic_command_common
V (8686) command_lib: generic_command
D (8686) command_lib: generic_command command AT+CGDCONT=1,"IP","internet"

Why isn't there a DTE config for this example like the pppos _client example, I can't find where to set my TX and RX pins for the modem. I'm assuming this is the reason the modem isn't responding to any commands.
Pls help me with a fix or how to correctly configure this example.

Thanks,
Nakul

AT+COPS? on Quectel BG96/BG95 (IDFGH-7770)

Reading the operator name using the esp_modem_get_operator_name with a BG95 and BG96 returns the following value.

"Vodafone",9

The modules have factory default configuration.

It is still very useful to know the access technology, preferred fix would ideally include this. e.g. esp_modem_get_operator_name(esp_modem_dce_t *dce_wrap, char *p_name, int* act)

Our current work around currently is to strip the double quotes and parse the act code.

	/* access technology */
	*p_act_out   = -1;
	char* p_last = strrchr(p_name, ',') + 1;
	if (p_last != NULL) {
		int act    = (int)strtol(p_last, NULL, 0);
		*p_act_out = act;
	}

	/* operator name */
	char operator_without_quotes[CELLULAR_OPERATOR_NAME_LENGTH] = {'\0'};
	ESP_LOGD(TAG, "name=%s", p_name);
	char* p_tmp = strtok(p_name, "\"");
	strncpy(operator_without_quotes, p_tmp, CELLULAR_OPERATOR_NAME_LENGTH);
	ESP_LOGD(TAG, "fixed name=%s", operator_without_quotes);
	strncpy(p_name, operator_without_quotes, CELLULAR_OPERATOR_NAME_LENGTH);

Unable to establish a GPRS connection (IDFGH-7643)

Hello,
I am using the lilygo esp32 board with gsm. I am not able to connect to gprs, it gets stuck at pdp context cmd,


D (1036) memory_layout: Available memory region 0x4008ccc8 - 0x4008e000
V (1042) memory_layout: Examining memory region 0x4008e000 - 0x40090000
D (1049) memory_layout: Available memory region 0x4008e000 - 0x40090000
V (1056) memory_layout: Examining memory region 0x40090000 - 0x40092000
D (1063) memory_layout: Available memory region 0x40090000 - 0x40092000
V (1069) memory_layout: Examining memory region 0x40092000 - 0x40094000
D (1076) memory_layout: Available memory region 0x40092000 - 0x40094000
V (1083) memory_layout: Examining memory region 0x40094000 - 0x40096000
D (1089) memory_layout: Available memory region 0x40094000 - 0x40096000
V (1096) memory_layout: Examining memory region 0x40096000 - 0x40098000
D (1103) memory_layout: Available memory region 0x40096000 - 0x40098000
V (1109) memory_layout: Examining memory region 0x40098000 - 0x4009a000
D (1116) memory_layout: Available memory region 0x40098000 - 0x4009a000
V (1123) memory_layout: Examining memory region 0x4009a000 - 0x4009c000
D (1129) memory_layout: Available memory region 0x4009a000 - 0x4009c000
V (1136) memory_layout: Examining memory region 0x4009c000 - 0x4009e000
D (1143) memory_layout: Available memory region 0x4009c000 - 0x4009e000
V (1149) memory_layout: Examining memory region 0x4009e000 - 0x400a0000
D (1156) memory_layout: Available memory region 0x4009e000 - 0x400a0000
I (1163) heap_init: Initializing. RAM available for dynamic allocation:
D (1170) heap_init: New heap initialised at 0x3ffae6e0
I (1175) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
D (1181) heap_init: New heap initialised at 0x3ffb3f58
I (1187) heap_init: At 3FFB3F58 len 0002C0A8 (176 KiB): DRAM
I (1193) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (1199) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
D (1206) heap_init: New heap initialised at 0x4008ccc8
I (1211) heap_init: At 4008CCC8 len 00013338 (76 KiB): IRAM
V (1218) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args
V (1224) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0xE
D (1232) intr_alloc: Connected src 46 to int 2 (cpu 0)
D (1238) FLASH_HAL: extra_dummy: 1
V (1241) memspi: raw_chip_id: 164020

V (1244) memspi: chip_id: 204016

V (1248) memspi: raw_chip_id: 164020

V (1252) memspi: chip_id: 204016

D (1255) spi_flash: trying chip: issi
D (1259) spi_flash: trying chip: gd
D (1263) spi_flash: trying chip: mxic
D (1266) spi_flash: trying chip: winbond
D (1270) spi_flash: trying chip: generic
I (1274) spi_flash: detected chip: generic
I (1279) spi_flash: flash io: dio
D (1283) cpu_start: calling init function: 0x40129898
0x40129898: _GLOBAL__sub_I__ZN9__gnu_cxx9__freeresEv at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/eh_alloc.cc:348

D (1288) cpu_start: calling init function: 0x40129648
0x40129648: _GLOBAL__sub_I___cxa_get_globals_fast at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/eh_globals.cc:145

D (1293) cpu_start: calling init function: 0x400ebd00
0x400ebd00: s_set_default_wifi_log_level at C:/Users/prath/esp/esp-idf/components/esp_wifi/src/wifi_init.c:63

D (1298) cpu_start: calling init function: 0x400e4ce8
0x400e4ce8: esp_ipc_init at C:/Users/prath/esp/esp-idf/components/esp_ipc/src/esp_ipc.c:102

D (1304) cpu_start: calling init function: 0x400d3504
0x400d3504: esp_reset_reason_init at C:/Users/prath/esp/esp-idf/components/esp_system/port/soc/esp32/reset_reason.c:68

D (1309) cpu_start: calling init function: 0x400d283c
0x400d283c: esp_ota_init_app_elf_sha256 at C:/Users/prath/esp/esp-idf/components/app_update/esp_app_desc.c:68

V (1314) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args
V (1320) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0xC02
D (1328) intr_alloc: Connected src 17 to int 3 (cpu 0)
V (1334) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args
V (1340) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0x40E
D (1348) intr_alloc: Connected src 24 to int 9 (cpu 0)
I (1353) cpu_start: Starting scheduler on PRO CPU.
V (0) intr_alloc: esp_intr_alloc_intrstatus (cpu 1): checking args
V (0) intr_alloc: esp_intr_alloc_intrstatus (cpu 1): Args okay. Resulting flags 0x40E
D (10) intr_alloc: Connected src 25 to int 2 (cpu 1)
I (10) cpu_start: Starting scheduler on APP CPU.
D (1403) heap_init: New heap initialised at 0x3ffe0440
D (1403) heap_init: New heap initialised at 0x3ffe4350
V (1413) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args
V (1413) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0xE
D (1413) intr_alloc: Connected src 16 to int 12 (cpu 0)
I (1433) pppos_example: Enabling PWRKEY
I (7433) pppos_example: Enabling PWRKEY ... done
D (7433) esp_netif_lwip: LwIP stack has been initialized
D (7433) esp_netif_lwip: esp-netif has been successfully initialized
D (7433) event: running task for loop 0x3ffb94c4
D (7443) event: created task for loop 0x3ffb94c4
D (7443) event: created event loop 0x3ffb94c4
D (7453) esp_netif_objects: esp_netif_add_to_list 0x3ffba490
D (7453) esp_netif_objects: esp_netif_add_to_list netif added successfully (total netifs: 1)
D (7463) esp-netif_lwip-ppp: esp_netif_new_ppp: PPP connection created: 0x3ffba7c0
D (7473) esp-netif_lwip-ppp: Phase Dead
I (7473) pppos_example: Initializing esp_modem for the SIM800 module...
I (7483) uart: queue free spaces: 30
V (7483) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args
V (7483) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0xE
D (7483) intr_alloc: Connected src 35 to int 13 (cpu 0)
V (7503) command_lib: get_signal_quality
V (7513) command_lib: generic_get_string
V (7513) command_lib: Token: {AT+CSQ}

V (7513) command_lib: Token: {+CSQ: 0,0}

} (7523) command_lib: Token: {

V (7523) command_lib: Token: {OK}

I (7533) pppos_example: Signal quality: rssi=0, ber=0
V (7533) command_lib: set_echo
V (7533) command_lib: generic_command_common
V (7543) command_lib: generic_command
D (7543) command_lib: generic_command command ATE0

D (7553) command_lib: Response: ATE0
OK


V (7553) command_lib: set_pdp_context
V (7563) command_lib: generic_command_common
V (7563) command_lib: generic_command
D (7563) command_lib: generic_command command AT+CGDCONT=1,"IP","internet"

D (7583) command_lib: Response:
ERROR


```
` 

esp_websocket_client is not able to use the global CA store (IDFGH-7589)

I experience problems with using the websocket client with the global CA store.
The global CA store has been enabled in sdkconfig.

I generate my websocket client config like this:

    esp_websocket_client_config_t ws_cfg = {
        .uri = url.data(),
        .task_stack = 4*1024,
        .subprotocol = "ocpp1.6",
        .pingpong_timeout_sec = 20,
        .use_global_ca_store = use_global_ca_store,
        .skip_cert_common_name_check = skip_cert_common_name_check
    };

    if (!cert.empty())
    {
        ws_cfg.cert_pem = cert.data();
        ws_cfg.cert_len = cert.size();
    }

And I get to see error messages like this:

W (13330) WEBSOCKET_CLIENT esp_websocket_client.c:416 esp_websocket_client_init(): `reconnect_timeout_ms` is not set, or it is less than or equal to zero, using default time out 10000 (milliseconds)
W (13340) WEBSOCKET_CLIENT esp_websocket_client.c:273 esp_websocket_client_set_config(): `network_timeout_ms` is not set, or it is less than or equal to zero, using default time out 10000 (milliseconds)
E (13490) esp-tls-mbedtls esp_tls_mbedtls.c:417 set_global_ca_store(): global_cacert is NULL
E (13490) esp-tls-mbedtls esp_tls_mbedtls.c:88 esp_create_mbedtls_handle(): Failed to set client configurations, returned [0x0103] (ESP_ERR_INVALID_STATE)
E (13500) esp-tls esp_tls.c:425 esp_tls_low_level_conn(): create_ssl_handle failed
E (13510) esp-tls esp_tls.c:467 esp_tls_conn_new_sync(): Failed to open new connection
E (13520) TRANSPORT_BASE transport_ssl.c:116 ssl_connect(): Failed to open a new connection
E (13530) TRANSPORT_WS transport_ws.c:144 ws_connect(): Error connecting to host ocpp.space.fronius.com:443
E (13530) WEBSOCKET_CLIENT esp_websocket_client.c:661 esp_websocket_client_task(): esp_transport_connect() failed with -1
E (13550) WEBSOCKET_CLIENT esp_websocket_client.c:190 esp_websocket_client_error(): esp_transport_connect() failed with -1
W (13560) ESPOCPP OcppSocket.cpp:111 websocketClientEventHandler(): WEBSOCKET_EVENTS event_id=WEBSOCKET_EVENT_ERROR esp_transport_connect() failed with -1

I'm suspecting the global_cacert is NULL message, I'm missing the crt_bundle_attach function pointer as seen in the http client and mqtt client.

Should I try to replicate the crt_bundle_attach functionality in the websocket client (and pull-request)?

Memory usage esp_modem (IDFGH-7716)

Is it normal that the library uses 1,25 MB of ram?
I've tried to narrow it a bit down, but unfortunately wasn't able to find the source of the memory usage.

Once esp_modem_new is added to the code the app uses at startup, even before executing esp_modem_new, 1,25MB more ram.
Without esp_modem_new: heap_caps_get_free_size(MALLOC_CAP_DEFAULT) = 4.367.500
With esp_modem_new: heap_caps_get_free_size(MALLOC_CAP_DEFAULT) = 3.056.596

void app_main(void)
{
	ESP_LOGI("MAIN", "FREE HEAP CAPS: %zu", heap_caps_get_free_size(MALLOC_CAP_DEFAULT));


	esp_netif_config_t cfg = ESP_NETIF_DEFAULT_PPP();
	esp_netif = esp_netif_new(&cfg);
	if (esp_netif == NULL)
	  goto err;

	esp_modem_dte_config_t dte_config = ESP_MODEM_DTE_DEFAULT_CONFIG();
	dte_config.uart_config.rx_io_num = io_sim_rx;
	dte_config.uart_config.tx_io_num = io_sim_tx;
	dte_config.uart_config.cts_io_num = UART_PIN_NO_CHANGE;
	dte_config.uart_config.rts_io_num = UART_PIN_NO_CHANGE;
	dte_config.uart_config.baud_rate = 115200;
	dte_config.uart_config.port_num = UART_NUM_1;
	dte_config.uart_config.parity = UART_PARITY_DISABLE;
	dte_config.uart_config.stop_bits = UART_STOP_BITS_1;

	esp_modem_dce_config_t dce_config = ESP_MODEM_DCE_DEFAULT_CONFIG(settings_sim_apn);

	dce = esp_modem_new(&dte_config, &dce_config, esp_netif);
}

I'm using ESP-IDF v4.2.3

BUG: The `ModuleIf` and `CommandableIf` do not define `virtual` destructors (IDFGH-6677)

In the following snippet, the ModuleIf abstract class defines an interface from which the GenericModule and other implementations derive. However, it does not define a virtual destructor. This is a bug that makes it impossible to destroy the derived object via a base class pointer.

/**
* @brief Interface for classes implementing a module for the modem
*/
class ModuleIf {
public:
/**
* @brief Sets the data mode up (provides the necessary configuration to connect to the cellular network)
* @return true on success
*/
virtual bool setup_data_mode() = 0;
/**
* @brief Sets the operation mode
* @param mode Desired mode
* @return true on success
*/
virtual bool set_mode(modem_mode mode) = 0;
};

Same for the CommandableIf abstract class.

/**
* @brief Interface for classes eligible to send AT commands (Modules, DCEs, DTEs)
*/
class CommandableIf {
public:
/**
* @brief Sends custom AT command
* @param command Command to be sent
* @param got_line callback if a line received
* @param time_ms timeout in milliseconds
* @return OK, FAIL or TIMEOUT
*/
virtual command_result command(const std::string &command, got_line_cb got_line, uint32_t time_ms, const char separator) = 0;
virtual command_result command(const std::string &command, got_line_cb got_line, uint32_t time_ms) = 0;
};

Modem: Connection to the MQTT BackEnd is not functioning properly (IDFGH-8038)

There is an error observed in the ESP log when using the Modem for connection to the Backend server.
The error is sporadic.
Logfile:

PS C:\Projects\Releases_Ksc2n\ksc-2n-Tag_Plan_SW_2232_v1.0> idf.py monitor
Executing action: monitor
Serial port COM8
Connecting....
Detecting chip type... ESP32-S3
Running idf_monitor in directory c:\projects\releases_ksc2n\ksc-2n-tag_plan_sw_2232_v1.0
Executing "C:\Espressif\python_env\idf5.0_py3.8_env\Scripts\python.exe C:\Espressif\frameworks\esp-idf-master\tools/idf_monitor.py -p COM8 -b 115200 --toolchain-prefix xtensa-esp32s3-elf- --target esp32s3 c:\projects\releases_ksc2n\ksc-2n-tag_plan_sw_2232_v1.0\build\ksc2n_A_Sample.elf -m 'C:\Espressif\python_env\idf5.0_py3.8_env\Scripts\python.exe' 'C:\Espressif\frameworks\esp-idf-master\tools\idf.py'"...
←[0;33m--- WARNING: GDB cannot open serial ports accessed as COMx←[0m
←[0;33m--- Using \\.\COM8 instead...←[0m
←[0;33m--- idf_monitor on \\.\COM8 115200 ---←[0m
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x2f (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd03e0,len:0x32c0
load:0x403b6000,len:0xbb8
load:0x403b9000,len:0x4c0c
entry 0x403b6260
W (30) boot.esp32s3: eFuse virtual mode is enabled. If Secure boot or Flash encryption is enabled then it does not provide any security. FOR TESTING ONLY!
I (46) boot: ESP-IDF v5.0-dev-3290-g01d014c42d-dirty 2nd stage bootloader
I (47) boot: compile time 12:43:33
I (47) boot: chip revision: 0
I (50) boot.esp32s3: Boot SPI Speed : 80MHz
I (55) boot.esp32s3: SPI Mode       : DIO
I (60) boot.esp32s3: SPI Flash Size : 8MB
I (65) boot: Enabling RNG early entropy source...
I (70) boot: Partition Table:
I (74) boot: ## Label            Usage          Type ST Offset   Length
I (81) boot:  0 otadata          OTA data         01 00 0000d000 00002000
I (88) boot:  1 reserved         WiFi data        01 02 0000f000 00001000
I (96) boot:  2 ota_0            OTA app          00 10 00010000 00280000
I (103) boot:  3 ota_1            OTA app          00 11 00290000 00280000
I (111) boot:  4 prod             Unknown data     01 ff 00610000 00003000
I (118) boot:  5 safeNVrb0        Unknown data     01 ff 00613000 00003000
I (126) boot:  6 safeNVrb1        Unknown data     01 ff 00616000 00003000
I (133) boot:  7 safeNVrb2        Unknown data     01 ff 00619000 00003000
I (141) boot:  8 config           WiFi data        01 02 0061c000 00046000
I (149) boot:  9 appl             WiFi data        01 02 00662000 00004000
I (156) boot: 10 shared           WiFi data        01 02 00666000 00003000
W (164) efuse: Loading virtual efuse blocks from flash
EFUSE_BLKx:
0) 0x00800101 0x000f0000 0x09c00000 0x00500000 0x00000022 0x00000000
1) 0x727003f0 0x000034b4 0x00000000 0x01000000 0x7031de00 0x6e8ac420
2) 0x8f51410c 0xc5e48240 0x526721a1 0xbaca0429 0xfcc9f281 0x04ff0210 0xc8f6ec10 0x2e60d8e8
3) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4) 0x7e68a2e3 0x08fe1124 0x53ed80b5 0xa7d5faa7 0x1b37941e 0x0b3d3af1 0x7e3e1a92 0x7dee2768
5) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
6) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
7) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
8) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
9) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
10) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000

I (256) boot: 11 efuse_em         efuse            01 05 00669000 00002000
I (263) boot: 12 nvs_key          NVS keys         01 04 0066b000 00001000
I (271) boot: 13 nvs              WiFi data        01 02 0066c000 00004000
I (278) boot: 14 spiffs           Unknown data     01 82 00670000 0018f000
I (286) boot: End of partition table
[boot] Custom bootloader message defined in the KConfig file.
I (296) boot: Loading Image: 0!
I (300) esp_image: segment 0: paddr=00010020 vaddr=3c100020 size=50c14h (330772) map
I (367) esp_image: segment 1: paddr=00060c3c vaddr=3fc97f30 size=05158h ( 20824) load
I (372) esp_image: segment 2: paddr=00065d9c vaddr=40374000 size=0a27ch ( 41596) load
I (382) esp_image: segment 3: paddr=00070020 vaddr=42000020 size=fbdd4h (1031636) map
I (568) esp_image: segment 4: paddr=0016bdfc vaddr=4037e27c size=09ca8h ( 40104) load
I (577) esp_image: segment 5: paddr=00175aac vaddr=50000000 size=00010h (    16) load
I (577) esp_image: segment 6: paddr=00175ac4 vaddr=600fe000 size=00028h (    40) load
I (583) esp_image: segment 7: paddr=00175af4 vaddr=00000000 size=0a4dch ( 42204)
I (599) esp_image: Verifying image signature...
I (599) secure_boot_v2: Verifying with RSA-PSS...
I (604) secure_boot_v2: Signature verified successfully!
I (616) boot: Loaded app from partition at offset 0x10000
I (616) secure_boot_v2: enabling secure boot v2...
I (619) secure_boot_v2: secure boot v2 is already enabled, continuing..
I (626) boot: Disabling RNG early entropy source...
I (644) cpu_start: Pro cpu up.
I (644) cpu_start: Starting app cpu, entry point is 0x403755ac
0x403755ac: call_start_cpu1 at C:/Espressif/frameworks/esp-idf-master/components/esp_system/port/cpu_start.c:152

I (0) cpu_start: App cpu up.
I (657) cpu_start: Pro cpu start user code
I (657) cpu_start: cpu freq: 160000000 Hz
I (657) cpu_start: Application information:
I (660) cpu_start: Project name:     ksc2n_A_Sample
I (666) cpu_start: App version:      1
I (670) cpu_start: Compile time:     Aug 10 2022 12:42:59
I (676) cpu_start: ELF file SHA256:  9f611768122a2dc7...
I (682) cpu_start: ESP-IDF:          v5.0-dev-3290-g01d014c42d-dirty
I (689) heap_init: Initializing. RAM available for dynamic allocation:
I (696) heap_init: At 3FCBE6C0 len 00021940 (134 KiB): D/IRAM
I (703) heap_init: At 3FCE0000 len 0000EE34 (59 KiB): STACK/DRAM
I (710) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (716) heap_init: At 600FE028 len 00001FD8 (7 KiB): RTCRAM
I (723) spi_flash: detected chip: generic
I (727) spi_flash: flash io: dio
W (730) cpu_start: eFuse virtual mode is enabled. If Secure boot or Flash encryption is enabled then it does not provide any security. FOR TESTING ONLY!
W (745) efuse: Loading virtual efuse blocks from flash
EFUSE_BLKx:
0) 0x00800101 0x000f0000 0x09c00000 0x00500000 0x00000022 0x00000000
1) 0x727003f0 0x000034b4 0x00000000 0x01000000 0x7031de00 0x6e8ac420
2) 0x8f51410c 0xc5e48240 0x526721a1 0xbaca0429 0xfcc9f281 0x04ff0210 0xc8f6ec10 0x2e60d8e8
3) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4) 0x7e68a2e3 0x08fe1124 0x53ed80b5 0xa7d5faa7 0x1b37941e 0x0b3d3af1 0x7e3e1a92 0x7dee2768
5) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
6) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
7) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
8) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
9) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
10) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000

I (840) sleep: Configure to isolate all GPIO pins in sleep state
I (844) sleep: Enable automatic switching of GPIO sleep configuration
I (851) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (915) DEM: The DEM is initialized.
I (945) system_api: Base MAC address is not set
I (945) system_api: read default base MAC address from EFUSE
I (945) BE_CommManager: Client initialized successfully
I (955) gpio: GPIO[6]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (965) gpio: GPIO[7]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (975) gpio: GPIO[10]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (985) gpio: GPIO[11]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (995) gpio: GPIO[45]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (995) gpio: GPIO[46]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1005) gpio: GPIO[47]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1015) gpio: GPIO[48]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1025) gpio: GPIO[4]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 1| Intr:0
I (1035) gpio: GPIO[5]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 1| Intr:0
I (1045) EcuManager: +++++++  initialisation completed
I (1065) HAL_CAN_DRV: Driver installed
I (1065) HAL_CAN_DRV: Driver started
I (1065) HAL_CAN_DRV: Starting transmissions
I (1075) pp: pp rom version: e7ae62f
I (1075) net80211: net80211 rom version: e7ae62f
I (1085) wifi:wifi driver task: 3fce8014, prio:23, stack:6656, core=0
I (1085) wifi:wifi firmware version: 0ca6d0b
I (1085) wifi:wifi certification version: v7.0
I (1085) wifi:config NVS flash: disabled
I (1095) wifi:config nano formating: disabled
I (1095) wifi:Init data frame dynamic rx buffer num: 32
I (1105) wifi:Init management frame dynamic rx buffer num: 32
I (1105) wifi:Init management short buffer num: 32
I (1115) wifi:Init dynamic tx buffer num: 32
I (1115) wifi:Init static tx FG buffer num: 2
I (1115) wifi:Init static rx buffer size: 1600
I (1125) wifi:Init static rx buffer num: 10
I (1125) wifi:Init dynamic rx buffer num: 32
I (1135) wifi_init: rx ba win: 6
I (1135) wifi_init: tcpip mbox: 32
I (1135) wifi_init: udp mbox: 6
I (1145) wifi_init: tcp mbox: 6
I (1145) wifi_init: tcp tx win: 5744
I (1145) wifi_init: tcp rx win: 5744
I (1155) wifi_init: tcp mss: 1440
I (1155) wifi_init: WiFi IRAM OP enabled
I (1165) wifi_init: WiFi RX IRAM OP enabled
I (1165) statusLED: statusLED initialization!
I (1175) ESPModem: Modem successfully initialized
I (1175) statusLED: statusLED initialized!
I (1185) EcuManager: +++++++  ECU state changed from ECU_STATE_NOT_INIT to ECU_STATE_INITIALIZING
I (1195) EcuManager: Wakeup cause undefined, probably normal startup.
I (1195) EcuManager: NV data check status OK !
I (1205) EcuManager: +++++++  ECU state changed from ECU_STATE_INITIALIZING to ECU_STATE_NORMAL
I (1215) ResourceManager: ++  RESOURCE_CAN_0 changed state: from RESOURCE_STATE_INIT to RESOURCE_STATE_STARTING with target state: RESOURCE_TARGET_STATE_STARTED
I (1225) ResourceManager: ++  RESOURCE_ISOLIB_CAN_0 changed state: from RESOURCE_STATE_INIT to RESOURCE_STATE_STOPPED with target state: RESOURCE_TARGET_STATE_STARTED
I (1245) ResourceManager: ++  RESOURCE_WIFI_CON changed state: from RESOURCE_STATE_INIT to RESOURCE_STATE_STARTING with target state: RESOURCE_TARGET_STATE_STARTED
I (1255) ResourceManager: ++  send start AP command
I (1265) WiFi_AP: WiFi starts as AP
I (1265) phy_init: phy_version 501,79e7e9b,Apr 19 2022,11:10:08
I (1385) wifi:mode : softAP (34:b4:72:70:03:f1)
I (1385) wifi:Total power save buffer number: 16
I (1385) wifi:Init max length of beacon: 752/752
I (1385) wifi:Init max length of beacon: 752/752
I (1385) ResourceManager: ++  RESOURCE_INTERNET changed state: from RESOURCE_STATE_INIT to RESOURCE_STATE_STARTING with target state: RESOURCE_TARGET_STATE_STARTED
I (1385) WiFi_AP: received WIFI_EVENT_AP_START
I (1405) ResourceManager: ++  RESOURCE_CAN_0 changed state: from RESOURCE_STATE_STARTING to RESOURCE_STATE_STARTED with target state: RESOURCE_TARGET_STATE_STARTED
I (1425) ResourceManager: ++  RESOURCE_ISOLIB_CAN_0 changed state: from RESOURCE_STATE_STOPPED to RESOURCE_STATE_STARTING with target state: RESOURCE_TARGET_STATE_STARTED
I (1445) ResourceManager: ++  RESOURCE_WIFI_CON changed state: from RESOURCE_STATE_STARTING to RESOURCE_STATE_CONNECTING with target state: RESOURCE_TARGET_STATE_STARTED
I (1455) ResourceManager: ++  connect the STA to the remote AP
W (1465) WiFi_AP: WiFi_AP::connect called but not supported
I (1465) statusLED: Displayed code (status) changed to STATE_BLINK_CODE_22 - J1939 Error
I (1485) ResourceManager: ++  RESOURCE_ISOLIB_CAN_0 changed state: from RESOURCE_STATE_STARTING to RESOURCE_STATE_STARTED with target state: RESOURCE_TARGET_STATE_STARTED
I (1495) ResourceManager: ++  connect the STA to the remote AP
W (1495) WiFi_AP: WiFi_AP::connect called but not supported
I (2045) statusLED: Displayed code (status) changed to STATE_05_HZ_BLINK_RATE - Normal
I (2065) CF2_IsoBus: NETWORK EVENT CF2 32
I (2065) CF3_Telematic: NETWORK EVENT CF3 32
I (2065) CF2_IsoBus: NETWORK EVENT CF2 200
I (2065) CF3_Telematic: NETWORK EVENT CF3 200
I (5185) ESPModem: Modem powered ON successfully
I (5195) ESPmodem_Cmux: config NETWORK
I (5195) uart: queue free spaces: 30
I (5205) ESPmodem_Cmux: AT command OK
I (5215) ESPmodem_Cmux: delete 2-wire UART
I (5215) uart: ALREADY NULL
I (5235) ResourceManager: ++  RESOURCE_INTERNET changed state: from RESOURCE_STATE_STARTING to RESOURCE_STATE_CONNECTING with target state: RESOURCE_TARGET_STATE_STARTED
I (5245) ESPmodem_Cmux: config MODEM
I (5245) ESPmodem_Cmux: config NETWORK to 4-wire
I (5245) uart: queue free spaces: 30
I (5245) ESPmodem_Cmux: config dce to 4-wire
I (5255) ESPmodem_Cmux: setting flow_control
I (5265) ESPmodem_Cmux: set_flow_control OK
I (5265) ESPmodem_Cmux: esp_modem_set_network_mode OK
I (5275) ESPmodem_Cmux: set_preferred_mode OK
I (5285) ESPmodem_Cmux: set_network_bands OK
I (5295) ESPmodem_Cmux: Module name: SIMCOM_SIM7070
I (5295) ESPmodem_Cmux: Module SW version: Revision:1951B10SIM7070
I (5305) ESPmodem_Cmux: IMEI: 865456053946891
I (5315) ESPmodem_Cmux: IMSI: 901288005633611
I (5325) ESPmodem_Cmux: Waiting for 500 ms
I (5835) ESPmodem_Cmux: current config state: 7
I (5845) ESPmodem_Cmux: Waiting for 500 ms
I (6355) ESPmodem_Cmux: current config state: 7
I (6365) ESPmodem_Cmux: Operator name: "A1 BG",9
I (6385) ESPmodem_Cmux: Mode: 9
I (6395) ESPmodem_Cmux: Radio state: 1
I (6425) ESPmodem_Cmux: Battery status: voltage=4291, charging_status=0, level=99
I (6425) ESPmodem_Cmux: Signal quality: rssi=99, ber=99
I (6575) ESPmodem_Cmux: PPP state changed event 259
I (6575) ESPmodem_Cmux: PPP state changed event 262
I (6575) ESPmodem_Cmux: Modem has correctly entered multiplexed command/data mode
I (6595) ESPmodem_Cmux: Attached to nework, wait for IP
I (12595) ESPmodem_Cmux: PPP state changed event 263
I (12595) ESPmodem_Cmux: PPP state changed event 265
I (12645) esp-netif_lwip-ppp: Connected
I (12645) esp-netif_lwip-ppp: Name Server1: 217.14.160.130
I (12645) esp-netif_lwip-ppp: Name Server2: 217.14.164.35
I (12655) ESPmodem_Cmux: Modem Connect to PPP Server
I (12655) ESPmodem_Cmux: ~~~~~~~~~~~~~~
I (12665) ESPmodem_Cmux: IP          : 100.82.28.119
I (12665) ESPmodem_Cmux: Netmask     : 255.255.255.255
I (12675) ESPmodem_Cmux: Gateway     : 10.64.64.64
I (12675) ESPmodem_Cmux: Name Server1: 217.14.160.130
I (12685) ESPmodem_Cmux: Name Server2: 217.14.164.35
I (12685) ESPmodem_Cmux: ~~~~~~~~~~~~~~
I (12695) ESPmodem_Cmux: GOT ip event!!!
I (12695) ESPmodem_Cmux: PPP state changed event 266
I (12705) ResourceManager: ++  RESOURCE_INTERNET changed state: from RESOURCE_STATE_CONNECTING to RESOURCE_STATE_STARTED with target state: RESOURCE_TARGET_STATE_STARTED
I (16055) BE_CommManager: MQTT_EVENT_BEFORE_CONNECT
E (24105) esp-tls-mbedtls: mbedtls_ssl_handshake returned -0x7280
I (24115) esp-tls-mbedtls: Certificate verified.
E (24115) esp-tls: Failed to open new connection
E (24115) TRANSPORT_BASE: Failed to open a new connection
E (24145) mqtt_client: Error transport connect
E (24145) BE_CommManager: MQTT_EVENT_ERROR
E (24145) BE_CommManager: Last error code reported from esp-tls: 0x801a: ESP_ERR_MBEDTLS_SSL_HANDSHAKE_FAILED
E (24155) BE_CommManager: Last tls stack error number: 0x7280: ERROR
E (24165) BE_CommManager: Last captured errno : 0 (Success)
I (24165) BE_CommManager: MQTT_EVENT_DISCONNECTED
I (26055) mqtt_client: Client force reconnect requested
I (26055) BE_CommManager: MQTT_EVENT_BEFORE_CONNECT
W (40985) esp-tls: Failed to open new connection in specified timeout
E (40985) TRANSPORT_BASE: Failed to open a new connection
E (40985) mqtt_client: Error transport connect
E (40985) BE_CommManager: MQTT_EVENT_ERROR
E (40995) BE_CommManager: Last error code reported from esp-tls: 0x8006: ESP_ERR_ESP_TLS_CONNECTION_TIMEOUT
E (41005) BE_CommManager: Last tls stack error number: 0x0: ESP_OK
E (41005) BE_CommManager: Last captured errno : 0 (Success)
I (41015) BE_CommManager: MQTT_EVENT_DISCONNECTED
I (41055) mqtt_client: Client force reconnect requested
I (41055) BE_CommManager: MQTT_EVENT_BEFORE_CONNECT
E (51065) esp-tls: [sock=54] select() timeout
E (51065) esp-tls: Failed to open new connection
E (51065) TRANSPORT_BASE: Failed to open a new connection
E (51065) mqtt_client: Error transport connect
E (51075) BE_CommManager: MQTT_EVENT_ERROR
E (51075) BE_CommManager: Last error code reported from esp-tls: 0x8006: ESP_ERR_ESP_TLS_CONNECTION_TIMEOUT
E (51085) BE_CommManager: Last tls stack error number: 0x0: ESP_OK
E (51095) BE_CommManager: Last captured errno : 0 (Success)
I (51095) BE_CommManager: MQTT_EVENT_DISCONNECTED
I (56055) mqtt_client: Client force reconnect requested
I (56055) BE_CommManager: MQTT_EVENT_BEFORE_CONNECT
E (66065) esp-tls: [sock=54] select() timeout
E (66065) esp-tls: Failed to open new connection
E (66065) TRANSPORT_BASE: Failed to open a new connection
E (66065) mqtt_client: Error transport connect
E (66075) BE_CommManager: MQTT_EVENT_ERROR
E (66075) BE_CommManager: Last error code reported from esp-tls: 0x8006: ESP_ERR_ESP_TLS_CONNECTION_TIMEOUT
E (66085) BE_CommManager: Last tls stack error number: 0x0: ESP_OK
E (66095) BE_CommManager: Last captured errno : 0 (Success)
I (66095) BE_CommManager: MQTT_EVENT_DISCONNECTED
I (71055) mqtt_client: Client force reconnect requested
I (71055) BE_CommManager: MQTT_EVENT_BEFORE_CONNECT

PS C:\Projects\Releases_Ksc2n\ksc-2n-Tag_Plan_SW_2232_v1.0>

Error handling in esp_websocket_client_send_with_opcode() (IDFGH-8053)

Hi, looking at line 1004/1005 of esp_websocket_client.c it strikes me that there might be an error situation not correctly reflected in the the return value of esp_websocket_client_send_with_opcode() (see my comment in the snippet):

        wlen = esp_transport_ws_send_raw(client->transport, current_opcode, (char *)client->tx_buffer, need_write,
                                        (timeout==portMAX_DELAY)? -1 : timeout * portTICK_PERIOD_MS);
        if (wlen < 0 || (wlen == 0 && need_write != 0)) {
            ret = wlen;  /* <--- BvH HERE */
            ESP_LOGE(TAG, "Network error: esp_transport_write() returned %d, errno=%d", ret, errno);
            esp_websocket_free_buf(client, true);
            esp_websocket_client_abort_connection(client);
            goto unlock_and_return;
        }

When 0 is returned from esp_transport_ws_send_raw() while there was data to send (need_write != 0), the return value is set to 0, which is also ESP_OK. If and only if the transport layer can indeed return 0 in this case, I would suggest:

ret = (wlen < 0) ? wlen : ESP_FAIL;

Before filing a pull request, I would like to know if I am right or if there is more to this...

Thanks for the great components BTW !

creating DCE fails with null pointer(error 259) (IDFGH-7764)

Hello,

we faced the following issue when creating DCE for SIM7070

E (11360) modem_api: create_modem_dce: Exception caught with ESP err_code=259
E (11360) modem_api:
I (11360) ESPmodem_Cmux: setting flow_control
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.

Core  0 register dump:
PC      : 0x4201fde3  PS      : 0x00060f30  A0      : 0x8201f1fd  A1      : 0x3fc9d980
0x4201fde3: std::__shared_ptr<esp_modem::GenericModule, (__gnu_cxx::_Lock_policy)2>::get() const at c:\espressif\tools\xtensa-esp32s3-elf\esp-2022r1-rc1-11.2.0\xtensa-esp32s3-elf\xtensa-esp32s3-elf\include\c++\11.2.0\bits/shared_ptr_base.h:1296 (discriminator 14)
 (inlined by) std::__shared_ptr_access<esp_modem::GenericModule, (__gnu_cxx::_Lock_policy)2, false, false>::_M_get() const at c:\espressif\tools\xtensa-esp32s3-elf\esp-2022r1-rc1-11.2.0\xtensa-esp32s3-elf\xtensa-esp32s3-elf\include\c++\11.2.0\bits/shared_ptr_base.h:993 (discriminator 14)
 (inlined by) std::__shared_ptr_access<esp_modem::GenericModule, (__gnu_cxx::_Lock_policy)2, false, false>::operator->() const at c:\espressif\tools\xtensa-esp32s3-elf\esp-2022r1-rc1-11.2.0\xtensa-esp32s3-elf\xtensa-esp32s3-elf\include\c++\11.2.0\bits/shared_ptr_base.h:987 (discriminator 14)
 (inlined by) esp_modem::command_result esp_modem::DCE::set_flow_control<int, int>(int&&, int&&) at C:/Rilabs/Krone/Sources/KSC2N/GitLab/KSC2N-APPL/ksc-2n/src/SERVICES/EspModem_Driver/include/cxx_include/esp_modem_dce.hpp:117 (discriminator 14)
 (inlined by) ModemManager_Configuration at C:/Rilabs/Krone/Sources/KSC2N/GitLab/KSC2N-APPL/ksc-2n/src/SERVICES/EspModem_Manager/ModemManager_Wrapper.cpp:326 (discriminator 14)

A2      : 0x00000000  A3      : 0x00000001  A4      : 0x00000001  A5      : 0x00000000
A6      : 0x0000019a  A7      : 0x00000000  A8      : 0x8201fdd4  A9      : 0x3fc9d930
A10     : 0x00000003  A11     : 0x3c11064c  A12     : 0x3c110ba8  A13     : 0x00002c60
A14     : 0x3c11064c  A15     : 0x00000047  SAR     : 0x00000004  EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000008  LBEG    : 0x400556d5  LEND    : 0x400556e5  LCOUNT  : 0xfffffffc


Backtrace:0x4201fde0:0x3fc9d9800x4201f1fa:0x3fc9daf0 0x420ec933:0x3fc9db10 0x4200a97d:0x3fc9db30 0x40380a59:0x3fc9db50
0x4201fde0: std::__uniq_ptr_impl<esp_modem::DCE, std::default_delete<esp_modem::DCE> >::_M_ptr() const at c:\espressif\tools\xtensa-esp32s3-elf\esp-2022r1-rc1-11.2.0\xtensa-esp32s3-elf\xtensa-esp32s3-elf\include\c++\11.2.0\bits/unique_ptr.h:173 (discriminator 14)
 (inlined by) std::unique_ptr<esp_modem::DCE, std::default_delete<esp_modem::DCE> >::get() const at c:\espressif\tools\xtensa-esp32s3-elf\esp-2022r1-rc1-11.2.0\xtensa-esp32s3-elf\xtensa-esp32s3-elf\include\c++\11.2.0\bits/unique_ptr.h:422 (discriminator 14)
 (inlined by) std::unique_ptr<esp_modem::DCE, std::default_delete<esp_modem::DCE> >::operator->() const at c:\espressif\tools\xtensa-esp32s3-elf\esp-2022r1-rc1-11.2.0\xtensa-esp32s3-elf\xtensa-esp32s3-elf\include\c++\11.2.0\bits/unique_ptr.h:416 (discriminator 14)
 (inlined by) ModemManager_Configuration at C:/Rilabs/Krone/Sources/KSC2N/GitLab/KSC2N-APPL/ksc-2n/src/SERVICES/EspModem_Manager/ModemManager_Wrapper.cpp:326 (discriminator 14)

0x4201f1fa: ModemManager_MainFunction at C:/Rilabs/Krone/Sources/KSC2N/GitLab/KSC2N-APPL/ksc-2n/src/SERVICES/EspModem_Manager/ModemManager.c:96

0x420ec933: osw::Event::run() const at C:/Rilabs/Krone/Sources/KSC2N/GitLab/KSC2N-APPL/ksc-2n/src/OS/os_wrapper/src/Event.cpp:27

0x4200a97d: osw::Task<0u>::run(void*) at C:/Rilabs/Krone/Sources/KSC2N/GitLab/KSC2N-APPL/ksc-2n/src/OS/os_wrapper/include/Task.hpp:173

0x40380a59: vPortTaskWrapper at C:/Espressif/frameworks/esp-idf-master_5_0/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:141

esp-modem build problems (IDFGH-7729)

IDF: 4.4.1
Verison: 0.1.17
Tool Chain: esp-2021r2-patch3-8.4.0
Target: esp32

Processing 3 dependencies:
[1/3] espressif/esp-modbus (1.0.3)
[2/3] espressif/esp_modem (0.1.17)
[3/3] idf (4.4.1)

Hi we are attempting to migrate from the older version of the esp-modem to the latest version and have come across some build issues.

Unknown netif type

In file included from /Users/ash/dev/project/managed_components/espressif__esp_modem/include/esp_modem_api.h:19,
                 from /Users/ash/dev/project/components/cellular-test/src/cellular_test.c:11:
/Users/ash/dev/project/managed_components/espressif__esp_modem/include/esp_modem_c_api_types.h:66:116: error: unknown type name 'esp_netif_t'; did you mean 'esp_err_t'?
 esp_modem_dce_t *esp_modem_new(const esp_modem_dte_config_t *dte_config, const esp_modem_dce_config_t *dce_config, esp_netif_t *netif);
                                                                                                                    ^~~~~~~~~~~
                                                                                                                    esp_err_t

Invalid cast

/Users/ash/dev/project/components/cellular-test/src/cellular_test.c:180:10: warning: assignment to 'esp_modem_dce_t *' {aka 'struct esp_modem_dce_wrap *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
    p_dce = esp_modem_new_dev(ESP_MODEM_DCE_BG96, &dte_config, &dce_config, p_esp_netif);

Where p_dce is 'esp_modem_dce_t*'

Missing functions

/Users/ash/dev/project/components/cellular-test/src/cellular_test.c: In function 'cellular_connect_task':
/Users/ash/dev/project/components/cellular-test/src/cellular_test.c:170:10: error: implicit declaration of function 'esp_modem_new_dev'; did you mean 'esp_modem_reset'? [-Werror=implicit-function-declaration]
  p_dce = esp_modem_new_dev(ESP_MODEM_DCE_BG96, &dte_config, &dce_config, p_esp_netif);
          ^~~~~~~~~~~~~~~~~
          esp_modem_reset

My cellular-test component has esp_modem in the PRIV_REQUIRES list, and I can see the component has been correctly configured in the managed_components directory.

Suggestion for custom commands (IDFGH-7621)

I am currently implementing the modem protocol on a SIM7070, and in my use case I would like for it to use the modems built in feature to check received APN on network connection, however this is not available in the library. I have been trying to add a custom command, but I am having some trouble with it. Therefore it would be nice if the library exposed a simple "custom command" that sends a desired string as a command, and simply returns the received data in a string, something like:

char return_string[50];
esp_modem_send_custom_command(dce, "AT+CGNAPN", &return_string);

Which would return for example "+CGNAPN: 1,telenor.iot".

This would make running a few custom commands very easy, at the expense of the user creating his own custom code to deal with the results.

PPP Events (IDFGH-7883)

We are testing reconnection handling on PPP and having issues detecting connection losses.

When the device disconnects we can observe esp-netif_lwip-ppp: Connection lost info log message however no status event is fired. It looks like internally the PPP disconnect is detected but not propagated.

We are able to trigger connection losses by using a faraday cage and we are fortunate enough that our MVNO offer a sim reconnection facility via a portal.

We are subscribing to the PPP status events using the following.

esp_event_handler_register(NETIF_PPP_STATUS, ESP_EVENT_ANY_ID, ppp_event_handler, NULL);

CONFIG_LWIP_PPP_NOTIFY_PHASE_SUPPORT is set to y

We do not wish to use MQTT or other app state to determine disconnect logic.

How to retry PPP on failure? (IDFGH-7471)

I'm using a SIM7600 modem and I'm largely following the pattern for setup and retry set by the AP to PPPoS example (note: the pppos_client example has no retry logic at all that I can see).

When the modem disconnects, I see:

  • Disconnect event
  • Logging indicating I've put the modem in command, then data mode
  • User interrupted event from the PPP event handler

And then nothing. No disconnect bit, no connect bit, no IP events, nothing.

If it helps I can try to make a minimal repro example but I wonder if some documentation could be added for how this is meant to work?

NULL pointer at netif->ip_info (IDFGH-7942)

Hi all
I'm having huge trouble getting my SIM7600 working again after I updated ESP-IDF.
I'm getting a run time error because it's trying to load a null pointer (LoadProhibited). I pasted a snippet of the debug log output.

D (72461) esp_netif_lwip: esp_netif_update_default_netif_lwip 0x3ffc32c4
D (72468) esp_netif_lwip: call api in lwip: ret=0x0, give sem
I (72474) Modem: Modem has correctly entered DATA_MODE
D (78484) esp-netif_lwip-ppp: Phase Authenticate
D (78485) event: running post NETIF_PPP_STATUS:263 with handler 0x400da864 and context 0x3ffc4930 on loop 0x3ffbded4
0x400da864: esp_modem::Netif::on_ppp_changed(void*, char const*, long, void*) at C:/Users/Ockert/esp/Projects/esp_water_dispenser/components/espressif__esp_modem/src/esp_modem_netif.cpp:28

D (78486) esp-netif_lwip-ppp: Phase Network
D (78493) event: running post NETIF_PPP_STATUS:265 with handler 0x400da864 and context 0x3ffc4930 on loop 0x3ffbded4
0x400da864: esp_modem::Netif::on_ppp_changed(void*, char const*, long, void*) at C:/Users/Ockert/esp/Projects/esp_water_dispenser/components/espressif__esp_modem/src/esp_modem_netif.cpp:28

D (78555) esp_netif_lwip: esp_netif_internal_dhcpc_cb lwip-netif:0x3ffc3348
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.

Core  0 register dump:
PC      : 0x400f9854  PS      : 0x00060130  A0      : 0x800f9979  A1      : 0x3ffc0070  
A2      : 0x3ffc3348  A3      : 0x00000000  A4      : 0x3ffc35d0  A5      : 0x0a060a06  
A6      : 0x00000000  A7      : 0x00000000  A8      : 0xbd6f7764  A9      : 0x00000000  
A10     : 0x3ffc35d0  A11     : 0x3f411554  A12     : 0x3f411754  A13     : 0x000132db  
0x400f9854: esp_netif_internal_dhcpc_cb at C:/Users/Ockert/esp/esp-idf/components/esp_netif/lwip/esp_netif_lwip.c:1120

A14     : 0x3f411554  A15     : 0x3f412168  SAR     : 0x00000004  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00000000  LBEG    : 0x400014fd  LEND    : 0x4000150d  LCOUNT  : 0xfffffff8  


Backtrace:0x400f9851:0x3ffc00700x400f9976:0x3ffc00c0 0x400fe84b:0x3ffc00e0 0x400fe8f6:0x3ffc0100 0x4010d899:0x3ffc0180 0x40115305:0x3ffc01b0 0x40117ea5:0x3ffc01d0 0x401180da:0x3ffc01f0 0x401149bf:0x3ffc0210 0x4010d669:0x3ffc0230 0x4010df64:0x3ffc0260 0x4010e0c1:0x3ffc0280 0x400fca75:0x3ffc02a0 0x400fcaf0:0x3ffc02c0 0x40089aa9:0x3ffc02f0 
0x400f9851: esp_netif_internal_dhcpc_cb at C:/Users/Ockert/esp/esp-idf/components/esp_netif/lwip/esp_netif_lwip.c:1117 (discriminator 9)

0x400f9976: netif_callback_fn at C:/Users/Ockert/esp/esp-idf/components/esp_netif/lwip/esp_netif_lwip.c:117

0x400fe84b: netif_invoke_ext_callback at C:/Users/Ockert/esp/esp-idf/components/lwip/lwip/src/core/netif.c:1819

0x400fe8f6: netif_set_addr at C:/Users/Ockert/esp/esp-idf/components/lwip/lwip/src/core/netif.c:733

0x4010d899: sifaddr at C:/Users/Ockert/esp/esp-idf/components/lwip/lwip/src/netif/ppp/ppp.c:1065

0x40115305: ipcp_up at C:/Users/Ockert/esp/esp-idf/components/lwip/lwip/src/netif/ppp/ipcp.c:2036

0x40117ea5: fsm_rconfack at C:/Users/Ockert/esp/esp-idf/components/lwip/lwip/src/netif/ppp/fsm.c:496

0x401180da: fsm_input at C:/Users/Ockert/esp/esp-idf/components/lwip/lwip/src/netif/ppp/fsm.c:360

0x401149bf: ipcp_input at C:/Users/Ockert/esp/esp-idf/components/lwip/lwip/src/netif/ppp/ipcp.c:693

0x4010d669: ppp_input at C:/Users/Ockert/esp/esp-idf/components/lwip/lwip/src/netif/ppp/ppp.c:934

0x4010df64: pppos_input at C:/Users/Ockert/esp/esp-idf/components/lwip/lwip/src/netif/ppp/pppos.c:577

0x4010e0c1: pppos_input_sys at C:/Users/Ockert/esp/esp-idf/components/lwip/lwip/src/netif/ppp/pppos.c:448 (discriminator 3)

0x400fca75: tcpip_thread_handle_msg at C:/Users/Ockert/esp/esp-idf/components/lwip/lwip/src/api/tcpip.c:174

0x400fcaf0: tcpip_thread at C:/Users/Ockert/esp/esp-idf/components/lwip/lwip/src/api/tcpip.c:148

0x40089aa9: vPortTaskWrapper at C:/Users/Ockert/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:141

It seems like the value in NETIF is null (or very close to null for esp_netif->ip_info_old) if I log the pointer address (outside range 0x3fxxxxxx - 0x6xxxxxxx like the docs suggest.

    esp_netif_ip_info_t *ip_info = esp_netif->ip_info;
    esp_netif_ip_info_t *ip_info_old = esp_netif->ip_info_old;

I was on version 0.1.12 of the esp_modem component and switched between 0.1.18 and 0.1.12 to see if it might be fixed in the newer component with no luck.

I also tried checking out previous versions of the IDF master branch that I know was working flawlessly for me ~2 weeks before with

cd $IDF_PATH
git fetch
git checkout [commit_id]
git pull
git submodule update --init --recursive

and I still got the same issue. I also tried checking out v5.0 as the last merge was 5th of July (at this point) which should have worked for me but it didn't.

I also needed to add esp_event esp_netif to the esp_modem's dependencies for it to compile.

What did I mess up?
Did I not checkout correctly?
Is there a bug?
What can I do to help?

Please let me know, I will gladly supply more information!
Thanks for making epic products and a great framework!

Unable to add PPP support for other modems (IDFGH-8466)

So I've got this FiPy I've wanted to try and hook up using the pppos examples, I've tried some older versions of the pppos-client example and gotten the IP connected where it reports back the IP address, but then I get stuck with DNS lookup failed err=202 res=0x0 and couldn't find a way past it.

So I wanted to try this newest version, and I've not really found how to add another DCE configuration here, and simply changing the pins with the BG96 gives me signal failed with 263, switching to the generic one gives me a stack-overflow error.

I also tried this example: https://github.com/N5GEH/n5geh.devices.iot_wa_aio but again I ran into the previous dns error when trying to connect to MQTT or HTTP

static functions (IDFGH-8694)

I just noticed that more functions has been set as static functions esp_modem_command_library.cpp. That will prevent reusability of esp_modem::dce_commands functions when a new device is added, for example: generic_command, generic_get_string

Using the asio component in esp-idf v5.0-beta1-720-gda9a78ebfc is not possible (IDFGH-8515) (IDFGH-8516)

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

v5.0-beta1-720-gda9a78ebfc

Operating System used.

Linux

How did you build your project?

Command line with idf.py

If you are using Windows, please specify command line type.

No response

What is the expected behavior?

I expect that the asio component is available to be used by the build system, including the header and source code from asio itself.

What is the actual behavior?

The folder managed_components/espressif__asio/asio/ is empty and idf.py build reports that the registered include directory is not a directory, see build logs below.

Steps to reproduce.

  1. Create a simple c++ project
  2. Add asio dependency via idf.py add-dependency espressif/asio^1.0.2 as described on https://components.espressif.com/components/espressif/asio
  3. idf.py build

Build or installation Logs.

$ cd prj
$ idf.py build
...
Processing 2 dependencies:
[1/2] espressif/asio (1.0.2)
[2/2] idf (5.0.0)
-- Project sdkconfig file /home/user/projects/esp/sip_call/sdkconfig
Loading defaults file /home/user/projects/esp/sip_call/sdkconfig.defaults...
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of time_t
-- Check size of time_t - done
-- Found Python3: /home/user/.espressif/python_env/idf5.0_py3.10_env/bin/python (found version "3.10.6") found components: Interpreter 
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS - Success
-- App "sip-client" version: 8cea32b-dirty
-- Adding linker script /home/user/projects/esp/sip_call/build/esp-idf/esp_system/ld/memory.ld
-- Adding linker script /home/user/projects/esp/esp-idf/components/esp_system/ld/esp32c3/sections.ld.in
-- Adding linker script /home/user/projects/esp/esp-idf/components/esp_rom/esp32c3/ld/esp32c3.rom.ld
-- Adding linker script /home/user/projects/esp/esp-idf/components/esp_rom/esp32c3/ld/esp32c3.rom.api.ld
-- Adding linker script /home/user/projects/esp/esp-idf/components/esp_rom/esp32c3/ld/esp32c3.rom.libgcc.ld
-- Adding linker script /home/user/projects/esp/esp-idf/components/esp_rom/esp32c3/ld/esp32c3.rom.newlib.ld
-- Adding linker script /home/user/projects/esp/esp-idf/components/esp_rom/esp32c3/ld/esp32c3.rom.version.ld
-- Adding linker script /home/user/projects/esp/esp-idf/components/esp_rom/esp32c3/ld/esp32c3.rom.eco3.ld
-- Adding linker script /home/user/projects/esp/esp-idf/components/soc/esp32c3/ld/esp32c3.peripherals.ld
CMake Error at /home/user/projects/esp/esp-idf/tools/cmake/component.cmake:312 (message):
  Include directory
  '/home/user/projects/esp/sip_call/managed_components/espressif__asio/asio/asio/include'
  is not a directory.
Call Stack (most recent call first):
  /home/user/projects/esp/esp-idf/tools/cmake/component.cmake:486 (__component_add_include_dirs)
  managed_components/espressif__asio/CMakeLists.txt:26 (idf_component_register)


-- Configuring incomplete, errors occurred!
See also "/home/user/projects/esp/sip_call/build/CMakeFiles/CMakeOutput.log".
cmake failed with exit code 1, output of the command is in the /home/user/projects/esp/sip_call/build/log/idf_py_stderr_output_98387 and /home/user/projects/esp/sip_call/build/log/idf_py_stdout_output_98387

More Information.

The dowload archive at https://components.espressif.com/components/espressif/asio https://components-file.espressif.com/0806398a-355d-4b0e-b4e5-22da7e2fc383.tgz also has an empty asio folder.
There is probably a issue with git submodules and the new idf component management/downloading/packaging.

I am trying to upgrade https://github.com/chrta/sip_call to newest commit of esp-idf in release/v5.0 branch, but this issue blocks me.

Unable to use the CMUX example (with BG96) (IDFGH-7328)

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):

.
..
...
D (888) event: running task for loop 0x3fce0814
D (898) event: created task for loop 0x3fce0814
D (898) event: created event loop 0x3fce0814
D (908) esp_netif_lwip: LwIP stack has been initialized
D (908) esp_netif_lwip: esp-netif has been successfully initialized
I (918) uart: queue free spaces: 30
V (918) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args
V (918) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0xE
D (918) intr_alloc: Connected src 28 to int 13 (cpu 0)
D (938) esp_netif_objects: esp_netif_add_to_list 0x3fce5b84
D (948) esp_netif_objects: esp_netif_add_to_list netif added successfully (total netifs: 1)
D (958) esp-netif_lwip-ppp: esp_netif_new_ppp: PPP connection created: 0x3fce5eb4
D (958) esp-netif_lwip-ppp: Phase Dead
V (968) command_lib: set_cmux
V (968) command_lib: generic_command_common
V (968) command_lib: generic_command
D (978) command_lib: generic_command command AT+CMUX=0

D (988) command_lib: Response: 
OK


V (2008) intr_alloc: esp_intr_free: Disabling int, killing handler
E (2008) cmux_example: Failed to configure desired mode... exiting
D (2008) event: deleted loop 0x3fce0814

As the problem seems to come from the line (below), I have also tried to separate both actions. From:

if (dce->set_mode(esp_modem::modem_mode::CMUX_MODE) && dce->set_mode(esp_modem::modem_mode::DATA_MODE)) {

to:

bool cmux_mode = dce->set_mode(esp_modem::modem_mode::CMUX_MODE);
ESP_LOGD(TAG, "set_mode in CMUX : %d", cmux_mode);
bool data_mode = dce->set_mode(esp_modem::modem_mode::DATA_MODE);
ESP_LOGD(TAG, "set_mode in DATA : %d", data_mode);

if (cmux_mode && data_mode) {

In this case, the log is:

.
..
...
D (888) event: running task for loop 0x3fce0764
D (888) event: created task for loop 0x3fce0764
D (898) event: created event loop 0x3fce0764
D (898) esp_netif_lwip: LwIP stack has been initialized
D (908) esp_netif_lwip: esp-netif has been successfully initialized
I (908) uart: queue free spaces: 30
V (918) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args
V (918) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0xE
D (918) intr_alloc: Connected src 28 to int 13 (cpu 0)
D (938) esp_netif_objects: esp_netif_add_to_list 0x3fce5b84
D (938) esp_netif_objects: esp_netif_add_to_list netif added successfully (total netifs: 1)
D (948) esp-netif_lwip-ppp: esp_netif_new_ppp: PPP connection created: 0x3fce5eb4
D (958) esp-netif_lwip-ppp: Phase Dead
V (958) command_lib: set_cmux
V (968) command_lib: generic_command_common
V (968) command_lib: generic_command
D (968) command_lib: generic_command command AT+CMUX=0

D (978) command_lib: Response: 
OK


V (1998) intr_alloc: esp_intr_free: Disabling int, killing handler
D (1998) cmux_example: set_mode in CMUX : 0
V (1998) command_lib: set_echo
V (1998) command_lib: generic_command_common
V (1998) command_lib: generic_command
D (2008) command_lib: generic_command command ATE0

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x8 (TG1WDT_SYS_RST),boot:0x28 (SPI_FAST_FLASH_BOOT)
Saved PC:0x4201b175
...
..
.

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

Unable to get network interface while using CMUX mode (IDFGH-8297)

[1/2] espressif/esp_modem (0.1.21)
[2/2] idf (4.4.1)

For the code:

    {
        int rssi, ber;
        err = esp_modem_get_signal_quality(dce, &rssi, &ber);
        if (err != ESP_OK) {
            ESP_LOGI(TAGI, "esp_modem_get_signal_quality failed with %d", err);
        }
        ESP_LOGI(TAGI, "Signal quality: rssi=%d, ber=%d", rssi, ber);
    }
    {
        int volt, bcs, bcl;
        err = esp_modem_get_battery_status(dce, &volt, &bcs, &bcl);
        if (err != ESP_OK) {
            ESP_LOGI(TAGI, "esp_modem_get_battery_status failed with %d", err);
        }
        ESP_LOGI(TAGI, "Battery status: volt=%d, bcs=%d, bcl=%d", volt, bcs, bcl);
    }

    // err = esp_modem_set_mode(dce, ESP_MODEM_MODE_DATA);
    // if (err != ESP_OK) {
    //     ESP_LOGE(TAGI, "esp_modem_set_mode(ESP_MODEM_MODE_DATA) failed with %d", err);
    //     return;
    // }
    err = esp_modem_set_mode(dce, ESP_MODEM_MODE_CMUX);
    if (err != ESP_OK) {
        ESP_LOGE(TAGI, "esp_modem_set_mode(ESP_MODEM_MODE_CMUX) failed with %d", err);
        return;
    }

I got:

I (21693) INET: Initializing esp_modem for the SIM800 module...
I (21733) INET: Operator[3584]: MTS
I (21743) INET: Signal quality: rssi=18, ber=0
I (21743) INET: Battery status: volt=4070, bcs=0, bcl=83
D (21753) command_lib: generic_command command AT+CMUX=0

D (21753) command_lib: Response:
OK


D (21853) CMUX: Payload frame: dlci:00 type:73 payload:0 available:2
D (21863) CMUX: Payload frame: dlci:01 type:73 payload:0 available:12
D (21863) CMUX: Payload frame: dlci:00 type:ef payload:4 available:6
E (22883) INET: esp_modem_set_mode(ESP_MODEM_MODE_CMUX) failed with -1
D (22883) INET: Wait for IP settings...

If I uncomment the DATA mode block and comment CMUX block, then I can use network. But I need CMUX mode, huh...

usb 4G modem usb_host_install occurred panic_abort (IDFGH-8748)

I use example pppos_client and open CONFIG_EXAMPLE_SERIAL_CONFIG_USB on esp-idf release/v5.0 panic error.
The error occurred in the statement esp_modem_new_dev_usb

dependencies:
espressif/esp_modem: "^0.1.25"
espressif/esp_modem_usb_dte:
version: "^1.0.0"

Logs:

I (1227) BLE: BLE Host Task Started
I (1232) PPP_CLIENT: Initializing esp_modem for the BG96 module...
I (1237) PPP_CLIENT: Waiting for USB device connection...
I (1242) NimBLE: GAP procedure initiated: stop advertising.

Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.

Core  0 register dump:
PC      : 0x42033dfd  PS      : 0x00060530  A0      : 0x8202b066  A1      : 0x3fcf39c0  
0x42033dfd: usb_host_install at /home/zhuxy/esp/esp-idf/components/usb/usb_host.c:441 (discriminator 2)

A2      : 0x00000000  A3      : 0x3c0e71cc  A4      : 0x3fcb4f5c  A5      : 0x3fcb4fb4  
A6      : 0x00000105  A7      : 0xff000000  A8      : 0x82033d63  A9      : 0x3fcf39a0  
A10     : 0x00000105  A11     : 0x3c0e71f0  A12     : 0x3fcb5040  A13     : 0x00000105  
A14     : 0x00000000  A15     : 0x3fcb5034  SAR     : 0x00000001  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x0000001c  LBEG    : 0x400570e8  LEND    : 0x400570f3  LCOUNT  : 0x00000000  

Backtrace: 0x42033dfa:0x3fcf39c0 0x4202b063:0x3fcf3a20 0x4202b423:0x3fcf3c00 0x4202aa90:0x3fcf3c30 0x4202a792:0x3fcf3c70 0x4200b69b:0x3fcf3cb0 0x4200a417:0x3fcf3e20 0x420adac7:0x3fcf3e50 0x40385921:0x3fcf3e80
0x42033dfa: usb_host_install at /home/zhuxy/esp/esp-idf/components/usb/usb_host.c:441 (discriminator 2)
0x4202b063: esp_modem::UsbTerminal::UsbTerminal(esp_modem_dte_config const*) at /home/zhuxy/esp-projects/IoT-Station/managed_components/espressif__esp_modem_usb_dte/esp_modem_usb.cpp:59
0x4202b423: std::_MakeUniq<esp_modem::UsbTerminal>::__single_object std::make_unique<esp_modem::UsbTerminal, esp_modem_dte_config const*&>(esp_modem_dte_config const*&) at /home/zhuxy/.espressif/tools/xtensa-esp32s3-elf/esp-2022r1-11.2.0/xtensa-esp32s3-elf/xtensa-esp32s3-elf/include/c++/11.2.0/bits/unique_ptr.h:962
 (inlined by) esp_modem::create_usb_terminal(esp_modem_dte_config const*) at /home/zhuxy/esp-projects/IoT-Station/managed_components/espressif__esp_modem_usb_dte/esp_modem_usb.cpp:179
0x4202aa90: esp_modem::create_usb_dte(esp_modem_dte_config const*) at /home/zhuxy/esp-projects/IoT-Station/managed_components/espressif__esp_modem_usb_dte/esp_modem_usb_api_target.cpp:17
0x4202a792: esp_modem_new_dev_usb at /home/zhuxy/esp-projects/IoT-Station/managed_components/espressif__esp_modem_usb_dte/esp_modem_usb_c_api.cpp:19
0x4200b69b: ppp_client_init at /home/zhuxy/esp-projects/IoT-Station/main/src/ppp_client.c:205 (discriminator 13)
0x4200a417: app_main at /home/zhuxy/esp-projects/IoT-Station/main/main.c:254 (discriminator 2)
0x420adac7: main_task at /home/zhuxy/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/port_common.c:131 (discriminator 2)
0x40385921: vPortTaskWrapper at /home/zhuxy/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:151

Disable CMUX when it is no longer required (IDFGH-7372)

Hi everyone,

Does it possible to disable the CMUX after the usage? My idea is to activate the CMUX when the use of PPP is necessary and disable it after the PPP mode is no longer required. I ask that because I have tried with the following code (at the end of the simple_cmux_example), but it is not working.

if (dce->set_mode(esp_modem::modem_mode::COMMAND_MODE)) {
    std::cout << "Modem has correctly entered command mode" << std::endl;
} else {
    ESP_LOGE(TAG, "Failed to configure desired mode... exiting");
    return;
}

Best regards,

Jonathan Dreyer

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.