Closed sijokwork closed 4 years ago
I wonder why your modem disconnected but go into PPPERR_USER
rather than PPPERR_CONNECT
? Have you manually called pppapi_close
function? Or after you entered PPP mode, you will exit to command mode from time to time? Can you enbale CONFIG_PPP_DEBUG_ON=y
and give out more runtime information?
Yes, After ppp_status_cb callback with PPPERR_USER then call pppapi_close(ppp, 0); function , re init the command mode for AT commands , these are function inside https://github.com/loboris/ESP32-PPPOS-EXAMPLE/blob/master/components/pppos/libGSM.c ,
Some intervel the device would sleep ,then disconnect the gsm module by power off .
This crash will not happen frequently for our device. But its essential to avoid the crash for our IOT device ,below i am pasting the CONFIG_PPP_DEBUG_ON=y with out error condition
I (30510) [PPPOS CLIENT]: AT COMMAND: [AT..] E (30820) [PPPOS CLIENT]: AT: TIMEOUT W (30820) [PPPOS CLIENT]: Wrong response, restarting... I (33920) [PPPOS CLIENT]: AT COMMAND: [AT..] I (33950) [PPPOS CLIENT]: AT RESPONSE: [..+CPIN: READY....RDY....+CFUN: 1....SMS Ready....Call Ready..AT...OK..] I (34050) [PPPOS CLIENT]: AT COMMAND: [AT+CIMI..] I (34080) [PPPOS CLIENT]: AT RESPONSE: [AT+CIMI...404809911000126....OK..] I (39190) [PPPOS CLIENT]: AT COMMAND: [ATE0..] I (39220) [PPPOS CLIENT]: AT RESPONSE: [ATE0...OK..] I (39320) [PPPOS CLIENT]: AT COMMAND: [AT+CFUN=1..] I (39350) [PPPOS CLIENT]: AT RESPONSE: [..OK..] I (40450) [PPPOS CLIENT]: AT COMMAND: [AT+CNMI=0,0,0,0,0..] I (40480) [PPPOS CLIENT]: AT RESPONSE: [..OK..] I (40580) [PPPOS CLIENT]: AT COMMAND: [AT+CPIN?..] I (40610) [PPPOS CLIENT]: AT RESPONSE: [..+CPIN: READY....OK..] I (40710) [PPPOS CLIENT]: AT COMMAND: [AT+CSQ..] I (40750) [PPPOS CLIENT]: AT BAD RESPONSE: [..+CSQ: 20,0....OK..] I (40750) [PPPOS CLIENT]: AT : [AT+CSQ I (40750) [PPPOS CLIENT]: SIGNAL STRENGTH: [..+CSQ: 20,0....OK..] I (40850) [PPPOS CLIENT]: AT COMMAND: [AT+CREG?..] I (40890) [PPPOS CLIENT]: AT RESPONSE: [..+CREG: 0,1....OK..] I (42990) [PPPOS CLIENT]: AT COMMAND: [AT+CGDCONT=1,"IP","surfnet"..] I (43030) [PPPOS CLIENT]: AT RESPONSE: [..OK..] I (43130) [PPPOS CLIENT]: AT COMMAND: [AT+CGDATA="PPP",1..] I (43180) [PPPOS CLIENT]: AT RESPONSE: [..CONNECT..~.}#.!}!}!} }<}!}$}&@}#}$.#}%}&....}"}&} } } } }'}"}(}"}7.~~~] I (44180) [PPPOS CLIENT]: GSM initialized. ppp phase changed[1]: phase=0 ppp_connect[1]: holdoff=0 ppp phase changed[1]: phase=1 pppos_connect: unit 1: connecting ppp_start[1] pppos_send_config[1]: out_accm=FF FF FF FF ppp_send_config[1] pppos_recv_config[1]: in_accm=FF FF FF FF ppp_recv_config[1] ppp: auth protocols: PAP=1 CHAP=0 CHAP_MD5=0 CHAP_MS=0 CHAP_MS2=0 pppos_write[1]: len=24 ppp_start[1]: finished pppos_input[1]: got 175 bytes pppos_write[1]: len=32 pppos_write[1]: len=32 pppos_write[1]: len=32 pppos_input[1]: got 46 bytes netif_set_mtu[1]: mtu=1500 pppos_send_config[1]: out_accm=0 0 0 0 ppp_send_config[1] pppos_recv_config[1]: in_accm=0 0 0 0 ppp_recv_config[1] ppp phase changed[1]: phase=5 pppos_write[1]: len=10 pppos_input[1]: got 45 bytes Remote message: TTP Com PPP - Password Verified OK PAP authentication succeeded ppp phase changed[1]: phase=7 ccp_set[1]: is_open=1, is_up=0, receive_method=0, transmit_method=0 pppos_write[1]: len=32 pppos_write[1]: len=18 pppos_input[1]: got 31 bytes Protocol-Reject for 0x8057 received pppos_input[1]: got 32 bytes pppos_write[1]: len=26 pppos_write[1]: len=14 pppos_input[1]: got 28 bytes pppos_write[1]: len=26 pppos_input[1]: got 28 bytes sifvjcomp[1]: VJ compress enable=0 slot=0 max slot=0 sifup[1]: err_code=0 I (50780) [PPPOS CLIENT]: status_cb: Connected I (50780) [PPPOS CLIENT]: ipaddr = 10.1.0.148 I (50780) [PPPOS CLIENT]: gateway = 10.0.0.1 I (50790) [PPPOS CLIENT]: netmask = 255.255.255.255 I (50800) [PPPOS CLIENT]: ip6addr = :: local IP address 10.1.0.148 remote IP address 10.0.0.1 primary DNS address 66.198.145.145 secondary DNS address 129.250.35.250 ppp phase changed[1]: phase=8 I (50810) [SNTP-TIME_OBTAIN_MAIN]: Time is not set yet. Connecting to GSM and getting time over NTP. I (55820) [SNTP]: Initializing SNTP pppos_netif_output[1]: proto=0x21, len = 58 I (55820) [SNTP-TIME_OBTAIN]: Waiting for system time to be set... (1/25) pppos_netif_output[1]: proto=0x21, len = 58 I (56890) [ENGINE_RPM_EVENT]: Waiting Time update pppos_netif_output[1]: proto=0x21, len = 58 I (57820) [SNTP-TIME_OBTAIN]: Waiting for system time to be set... (2/25) pppos_netif_output[1]: proto=0x21, len = 58 I (59820) [SNTP-TIME_OBTAIN]: Waiting for system time to be set... (3/25) I (61820) [SNTP-TIME_OBTAIN]: Waiting for system time to be set... (4/25) pppos_netif_output[1]: proto=0x21, len = 58 pppos_netif_output[1]: proto=0x21, len = 58 I (63820) [SNTP-TIME_OBTAIN]: Waiting for system time to be set... (5/25) pppos_input[1]: got 128 bytes ppp_input[1]: ip in pbuf len=122 pppos_netif_output[1]: proto=0x21, len = 76 pppos_input[1]: got 128 bytes ppp_input[1]: ip in pbuf len=122 pppos_netif_output[1]: proto=0x21, len = 56 pppos_input[1]: got 81 bytes ppp_input[1]: ip in pbuf len=76 I (65820) [SNTP-TIME_OBTAIN_MAIN]: TIME SET TO Wed Dec 26 08:14:29 2018 I (65820) [SNTP-TIME_OBTAIN_MAIN]: The current date/time in is: Wed Dec 26 08:14:29 2018 I (65830) [MQTT_EVENT_HANDLER]: Dev ID:240AC4295CD0 D (65830) MQTT_CLIENT: MQTT client_id=ESP240AC4295CD0 pppos_netif_output[1]: proto=0x21, len = 64 pppos_netif_output[1]: proto=0x21, len = 64 pppos_netif_output[1]: proto=0x21, len = 64 pppos_netif_output[1]: proto=0x21, len = 64
@sijokwork IIRC, the ppp_close()
function should be called before the state go into PPPERR_USER
. And in PPPERR_USER
, what you can call is ppp_free()
. Please check this document for more information.
http://www.nongnu.org/lwip/2_1_x/group__ppp.html
@suda-morris , thank you for time ,in other scenario the state go into PPPERR_CONNECT then as per your suggestion ppp_close would happen ,then reinit AT Commands then too the crahsing happen :(. but i didnot call ppp_free . I have one more task running that aim to connect the MQTT part is that interfering with this ? pasting below runtime information.
I (30330) [PPPOS CLIENT]: AT COMMAND: [AT..] E (30640) [PPPOS CLIENT]: AT: TIMEOUT W (30640) [PPPOS CLIENT]: Wrong response, restarting... I (33740) [PPPOS CLIENT]: AT COMMAND: [AT..] I (33770) [PPPOS CLIENT]: AT RESPONSE: [..RDY....+CFUN: 1....+CPIN: READY....Call Ready....SMS Ready..AT...OK..] I (33870) [PPPOS CLIENT]: AT COMMAND: [AT+CIMI..] I (33890) [PPPOS CLIENT]: AT BAD RESPONSE: [AT+CI] I (33890) [PPPOS CLIENT]: AT : [AT+CIMI] W (33890) [PPPOS CLIENT]: Wrong response, restarting... I (36890) [PPPOS CLIENT]: Skip command: [AT..] I (36990) [PPPOS CLIENT]: AT COMMAND: [AT+CIMI..] I (37030) [PPPOS CLIENT]: AT RESPONSE: [AT+CIMI...404450952173072....OK..] I (37030) [PPPOS CLIENT]: IMSI command respnse: AT+CIMI...404450952173072....OK.. I (42140) [PPPOS CLIENT]: AT COMMAND: [ATE0..] I (42180) [PPPOS CLIENT]: AT RESPONSE: [ATE0...OK..] I (42280) [PPPOS CLIENT]: AT COMMAND: [AT+CFUN=1..] I (42320) [PPPOS CLIENT]: AT RESPONSE: [..OK..] I (43420) [PPPOS CLIENT]: AT COMMAND: [AT+CNMI=0,0,0,0,0..] I (43460) [PPPOS CLIENT]: AT RESPONSE: [..OK..] I (43560) [PPPOS CLIENT]: AT COMMAND: [AT+CPIN?..] I (43600) [PPPOS CLIENT]: AT RESPONSE: [..+CPIN: READY....OK..] I (43700) [PPPOS CLIENT]: AT COMMAND: [AT+CSQ..] I (43720) [PPPOS CLIENT]: AT BAD RESPONSE: [..+CSQ: 22,0....OK..] I (43720) [PPPOS CLIENT]: AT : [AT+CSQ] I (43720) [PPPOS CLIENT]: SIGNAL STRENGTH: [..+CSQ: 22,0....OK..] I (43820) [PPPOS CLIENT]: AT COMMAND: [AT+CREG?..] I (43840) [PPPOS CLIENT]: AT RESPONSE: [..+CREG: 0,1....OK..] I (45940) [PPPOS CLIENT]: AT COMMAND: [AT+CGDCONT=1,"IP","airtelgprs.com"..] I (46000) [PPPOS CLIENT]: AT RESPONSE: [..OK..] I (46100) [PPPOS CLIENT]: AT COMMAND: [AT+CGDATA="PPP",1..] I (46140) [PPPOS CLIENT]: AT RESPONSE: [..CONNECT..~.}#.!}!}!} }<}!}$}&@}#}$.#}%}&....}"}&} } } } }'}"}(}"}7.~~~] I (47140) [PPPOS CLIENT]: GSM initialized. ppp phase changed[1]: phase=0 I (52140) [PPPOS CLIENT]: 1. ppp_connect[1]: holdoff=0 ppp phase changed[1]: phase=1 pppos_connect: unit 1: connecting ppp_start[1] pppos_send_config[1]: out_accm=FF FF FF FF ppp_send_config[1] pppos_recv_config[1]: in_accm=FF FF FF FF ppp_recv_config[1] ppp: auth protocols: PAP=1 CHAP=0 CHAP_MD5=0 CHAP_MS=0 CHAP_MS2=0 pppos_write[1]: len=24 ppp_start[1]: finished I (52160) [PPPOS CLIENT]: 2. pppos_input[1]: got 175 bytes pppos_write[1]: len=32 pppos_write[1]: len=32 pppos_write[1]: len=32 pppos_input[1]: got 47 bytes netif_set_mtu[1]: mtu=1500 pppos_send_config[1]: out_accm=0 0 0 0 ppp_send_config[1] pppos_recv_config[1]: in_accm=0 0 0 0 ppp_recv_config[1] ppp phase changed[1]: phase=5 pppos_write[1]: len=10 pppos_input[1]: got 45 bytes Remote message: TTP Com PPP - Password Verified OK PAP authentication succeeded ppp phase changed[1]: phase=7 ccp_set[1]: is_open=1, is_up=0, receive_method=0, transmit_method=0 pppos_write[1]: len=32 pppos_write[1]: len=18 pppos_input[1]: got 31 bytes Protocol-Reject for 0x8057 received pppos_input[1]: got 32 bytes pppos_write[1]: len=26 pppos_write[1]: len=14 pppos_input[1]: got 29 bytes pppos_write[1]: len=26 pppos_input[1]: got 29 bytes sifvjcomp[1]: VJ compress enable=0 slot=0 max slot=0 sifup[1]: err_code=0 I (52880) [PPPOS CLIENT]: status_cb: Connected I (52880) [PPPOS CLIENT]: ipaddr = 100.85.230.181 I (52880) [PPPOS CLIENT]: gateway = 10.0.0.1 I (52890) [PPPOS CLIENT]: netmask = 255.255.255.255 I (52900) [PPPOS CLIENT]: ip6addr = :: local IP address 100.85.230.181 remote IP address 10.0.0.1 primary DNS address 125.22.47.102 secondary DNS address 203.145.160.5 ppp phase changed[1]: phase=8 I (52920) [SNTP-TIME_OBTAIN_MAIN]: Time is not set yet. Connecting to GSM and getting time over NTP. I (57920) [SNTP]: Initializing SNTP pppos_netif_output[1]: proto=0x21, len = 58 I (57920) [SNTP-TIME_OBTAIN]: Waiting for system time to be set... (1/25) pppos_netif_output[1]: proto=0x21, len = 58 pppos_input[1]: got 128 bytes ppp_input[1]: ip in pbuf len=122 pppos_netif_output[1]: proto=0x21, len = 76 pppos_input[1]: got 128 bytes ppp_input[1]: ip in pbuf len=122 pppos_netif_output[1]: proto=0x21, len = 56 pppos_input[1]: got 83 bytes ppp_input[1]: ip in pbuf len=76 I (59920) [SNTP-TIME_OBTAIN_MAIN]: The current date/time in is: Wed Dec 26 13:16:24 2018 I (59930) [MQTT_EVENT_HANDLER]: Dev ID::240AC4295BBC D (59930) MQTT_CLIENT: MQTT client_id=ESP240AC4295BBC D (59940) MQTT_CLIENT: Core selection enabled on 0 D (59950) TRANS_TCP: [sock=54],connecting to server IP:ipnumber,Port:1883... pppos_netif_output[1]: proto=0x21, len = 44 pppos_input[1]: got 49 bytes ppp_input[1]: ip in pbuf len=44 D (60250) MQTT_CLIENT: Transport connected to mqtt:ipnumber:1883 I (60250) MQTT_CLIENT: Sending MQTT CONNECT message, type: 1, id: 0000 pppos_netif_output[1]: proto=0x21, len = 40 pppos_netif_output[1]: proto=0x21, len = 85 pppos_input[1]: got 45 bytes ppp_input[1]: ip in pbuf len=40 pppos_input[1]: got 94 bytes ppp_input[1]: ip in pbuf len=44 ppp_input[1]: ip in pbuf len=40 pppos_netif_output[1]: proto=0x21, len = 40 W (61710) MQTT_CLIENT: Connection refused, not authorized I (61710) MQTT_CLIENT: Error MQTT Connected pppos_netif_output[1]: proto=0x21, len = 40 I (61720) MQTT_CLIENT: Reconnect after 10000 ms I (61730) [MQTT_EVENT_HANDLER]: MQTT_EVENT_DISCONNECTED pppos_input[1]: got 45 bytes ppp_input[1]: ip in pbuf len=40 D (71730) MQTT_CLIENT: Reconnecting... D (76730) TRANS_TCP: [sock=55],connecting to server IP:ipnumber,Port:1883... pppos_netif_output[1]: proto=0x21, len = 44 pppos_input[1]: got 49 bytes ppp_input[1]: ip in pbuf len=44 D (77470) MQTT_CLIENT: Transport connected to mqtt:ipnumber:1883 I (77470) MQTT_CLIENT: Sending MQTT CONNECT message, type: 1, id: 0000 pppos_netif_output[1]: proto=0x21, len = 40 pppos_netif_output[1]: proto=0x21, len = 85 pppos_input[1]: got 45 bytes ppp_input[1]: ip in pbuf len=40 pppos_input[1]: got 49 bytes ppp_input[1]: ip in pbuf len=44 W (78100) MQTT_CLIENT: Connection refused, not authorized I (78100) MQTT_CLIENT: Error MQTT Connected pppos_netif_output[1]: proto=0x21, len = 40 I (78110) MQTT_CLIENT: Reconnect after 10000 ms I (78110) [MQTT_EVENT_HANDLER]: MQTT_EVENT_DISCONNECTED pppos_input[1]: got 46 bytes ppp_input[1]: ip in pbuf len=40 pppos_netif_output[1]: proto=0x21, len = 40 pppos_input[1]: got 45 bytes ppp_input[1]: ip in pbuf len=40 D (88120) MQTT_CLIENT: Reconnecting...
pppos_input[1]: got 37 bytes
LCP terminated by peer (Normal Termination by NCP)
ppp phase changed[1]: phase=7
sifvjcomp[1]: VJ compress enable=0 slot=0 max slot=0
sifdown[1]: err_code=0
ccp_set[1]: is_open=0, is_up=0, receive_method=0, transmit_method=0
ppp phase changed[1]: phase=4
pppos_send_config[1]: out_accm=FF FF FF FF
ppp_send_config[1]
pppos_recv_config[1]: in_accm=0 0 0 0
ppp_recv_config[1]
pppos_write[1]: len=8
pppos_input[1]: got 32 bytes
D (93120) TRANS_TCP: [sock=56],connecting to server IP:ipnumber,Port:1883...
E (93120) MQTT_CLIENT: Error transport connect
I (93120) MQTT_CLIENT: Reconnect after 10000 ms
I (93120) [MQTT_EVENT_HANDLER]: MQTT_EVENT_DISCONNECTED
pppos_input[1]: got 16 bytes
ppp phase changed[1]: phase=10
Connection terminated.
ppp phase changed[1]: phase=0
ppp_link_terminated[1]
ppp_end[1]
E (98290) [PPPOS CLIENT]: status_cb: Connection lost
ppp_link_terminated[1]: finished.
E (98300) [PPPOS CLIENT]: Disconnected, trying again...
W (98300) [PPPOS CLIENT]: status_cb: User interrupt (disconnected)
D (101940) RTC_MODULE: adc mode takes adc1 lock.
D (101940) RTC_MODULE: returns adc1 lock.
E (102150) MQTT_CLIENT: Client has not connected
D (103130) MQTT_CLIENT: Reconnecting...
D (108130) TRANS_TCP: [sock=57],connecting to server IP:ipnumber,Port:1883...
E (108130) MQTT_CLIENT: Error transport connect
I (108130) MQTT_CLIENT: Reconnect after 10000 ms
I (108130) [MQTT_EVENT_HANDLER]: MQTT_EVENT_DISCONNECTED
I (108310) [PPPOS CLIENT]: GSM initialization start
I (108910) [PPPOS CLIENT]: AT COMMAND: [AT..]
I (108950) [PPPOS CLIENT]: AT RESPONSE: [..OK..]
I (109050) [PPPOS CLIENT]: AT COMMAND: [AT+CIMI..]
I (109080) [PPPOS CLIENT]: AT RESPONSE: [..404450952173072....OK..]
E (112370) MQTT_CLIENT: Client has not connected
I (114190) [PPPOS CLIENT]: AT COMMAND: [ATE0..]
I (114220) [PPPOS CLIENT]: AT RESPONSE: [..OK..]
I (114320) [PPPOS CLIENT]: AT COMMAND: [AT+CFUN=1..]
I (114370) [PPPOS CLIENT]: AT RESPONSE: [..OK..]
I (115470) [PPPOS CLIENT]: AT COMMAND: [AT+CNMI=0,0,0,0,0..]
I (115500) [PPPOS CLIENT]: AT RESPONSE: [..OK..]
I (115600) [PPPOS CLIENT]: AT COMMAND: [AT+CPIN?..]
I (115630) [PPPOS CLIENT]: AT RESPONSE: [..+CPIN: READY....OK..]
I (115730) [PPPOS CLIENT]: AT COMMAND: [AT+CSQ..]
I (115770) [PPPOS CLIENT]: AT BAD RESPONSE: [..+CSQ: 24,0....OK..]
I (115770) [PPPOS CLIENT]: AT : [AT+CSQ]
I (115770) [PPPOS CLIENT]: SIGNAL STRENGTH: [..+CSQ: 24,0....OK..]
I (115870) [PPPOS CLIENT]: AT COMMAND: [AT+CREG?..]
I (115910) [PPPOS CLIENT]: AT RESPONSE: [..+CREG: 0,1....OK..]
I (116010) [PPPOS CLIENT]: AT COMMAND: [AT+CGDCONT=1,"IP","airtelgprs.com"..]
I (116070) [PPPOS CLIENT]: AT RESPONSE: [..OK..]
I (116170) [PPPOS CLIENT]: AT COMMAND: [AT+CGDATA="PPP",1..]
I (116210) [PPPOS CLIENT]: AT RESPONSE: [..CONNECT..~.}#.!}!}%} }<}!}$}&@}#}$.#}%}&....}"}&} } } } }'}"}(}"&.~~~]
I (117210) [PPPOS CLIENT]: GSM initialized.
D (118140) MQTT_CLIENT: Reconnecting...
Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC : 0x400fa206 PS : 0x00060030 A0 : 0x800fc2b8 A1 : 0x3ffc3c40
0x400fa206: pppapi_do_ppp_set_default at ESP32Workspace/esp-idf/components/lwip/api/pppapi.c:355
A2 : 0x3ffc9690 A3 : 0x3ffc3c60 A4 : 0x3ffcbe00 A5 : 0x3ffc3d08
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x0a0d226d A9 : 0x3ffc3c10
A10 : 0x0000005a A11 : 0x0000005a A12 : 0x00000064 A13 : 0x0000005a
A14 : 0xfffffff6 A15 : 0x00000001 SAR : 0x00000004 EXCCAUSE: 0x0000001c
EXCVADDR: 0x0a0d2295 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0xffffffff
Backtrace: 0x400fa206:0x3ffc3c40 0x400fc2b5:0x3ffc3c60 0x400fa206: pppapi_do_ppp_set_default at ESP32Workspace/esp-idf/components/lwip/api/pppapi.c:355
0x400fc2b5: tcpip_thread at ESP32Workspace/esp-idf/components/lwip/api/tcpip.c:481
Two suggestions:
There is the solution that worked out. In my case we were checking the sim contact issue with the device we installed where will have so much vibrate issue and ppp state go into PPPERR_USER , there was no differentiate connect between PPPERR_USER and PPPERR_CONNECT , so it always call ppp_connect to reconnect it without call pppapi_pppos_create() and it crashed .
Changed to restart everything from beginning when ppp go to PPPERR_USER.
unfortunately i have landed some another issue which crashing the firmware when if i call only ppp_connect to reconnect it with more than 3-4 times in row with connect disconnect method ,
error header: ppp_free[3] CORRUPT HEAP: Bad head at 0x3ffca3e8. Expected 0xabba1234 got 0x3ffcd1c8
i think i should have free some data block which initialized with malloc in my program ! ,or is it from the ppp stack ? do you have any other suggestions ?
thank you for your valuable time and i appreciate :).
I am working on the same. can you please share the changes made in libgsm.c to make more robust.
@sijokwork @akbarhash IDF now has a new example showing how to establish PPPoS connection. Feel free to try it and welcome to push your ideas and suggestions.
@suda-morris definitely i try the new example and share the experience thanks
@sijokwork Hi, would you help share if any updates or experience for this issue? Thanks.
@sijokwork Hi, would you help share if any updates or experience for this issue? Thanks.
Feel free to open a new issue if you have met any problems in our esp-modem example. We're going to close this issue.
Environment
git describe --tags
to find it): v3.1 // v3.2-dev-1148-g96cd3b75cCompiler version (run
xtensa-esp32-elf-gcc --version
to find it):xtensa-esp32-elf-gcc (crosstool-NG crosstool-ng-1.22.0-80-g6c4433a) 5.2.0Problem Description
We are using ESP32 Module With GSM module on custom board for a IOT project ,the device would connect to MQTT broker and publish ,subscribe data with specified interval ,but some time i could see the device reset because of gsm module network disconnect . //Detailed problem description goes here. For network connectivity i am using gsm module compatible with sim800 type. and the library using the connectivity for the gsm module is @loboris loboris pppos library. so far i am not using the Jtag for debugging but used the UART .
Our IOT device would initiate connection through GSM module ,(we are not using wifi and not enabled it) and publish data through MQTT ,some time the network issue the modem get disconnected ppp status callback function, ppp_status_cb with PPPERR_USER would call in libGSM.c. because this reinitializing the pppapi_connect(ppp, 0); causing the below error
Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled. Core 0 register dump: PC : 0x4010c033 PS : 0x00060630 A0 : 0x8010c264 A1 : 0x3ffc3c20 0x4010c033: pppos_input at ESP32Workspace/esp-idf/components/lwip/netif/ppp/pppos.c:496
A2 : 0x00000000 A3 : 0x3ffcc738 A4 : 0x000000af A5 : 0x00000014 A6 : 0x00000000 A7 : 0x3ffd24d2 A8 : 0x8010ea31 A9 : 0x3ffc3bf0 A10 : 0x3ffc22a8 A11 : 0x3ffb2538 A12 : 0x3ffc230c A13 : 0x00000000 A14 : 0x3ffc237c A15 : 0x00002522 SAR : 0x00000004 EXCCAUSE: 0x0000001c EXCVADDR: 0x0000001c LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0xffffffff
Backtrace: 0x4010c033:0x3ffc3c20 0x4010c261:0x3ffc3c40 0x400fc222:0x3ffc3c60 0x4010c033: pppos_input at ESP32Workspace/esp-idf/components/lwip/netif/ppp/pppos.c:496
0x4010c261: pppos_input_sys at ESP32Workspace/esp-idf/components/lwip/netif/ppp/pppos.c:464 (discriminator 3)
0x400fc222: tcpip_thread at ESP32Workspace/esp-idf/components/lwip/api/tcpip.c:481
Debug Logs
Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled. Core 0 register dump: PC : 0x4010c033 PS : 0x00060630 A0 : 0x8010c264 A1 : 0x3ffc3c20 0x4010c033: pppos_input at ESP32Workspace/esp-idf/components/lwip/netif/ppp/pppos.c:496
A2 : 0x00000000 A3 : 0x3ffcc738 A4 : 0x000000af A5 : 0x00000014 A6 : 0x00000000 A7 : 0x3ffd24d2 A8 : 0x8010ea31 A9 : 0x3ffc3bf0 A10 : 0x3ffc22a8 A11 : 0x3ffb2538 A12 : 0x3ffc230c A13 : 0x00000000 A14 : 0x3ffc237c A15 : 0x00002522 SAR : 0x00000004 EXCCAUSE: 0x0000001c EXCVADDR: 0x0000001c LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0xffffffff
Backtrace: 0x4010c033:0x3ffc3c20 0x4010c261:0x3ffc3c40 0x400fc222:0x3ffc3c60 0x4010c033: pppos_input at ESP32Workspace/esp-idf/components/lwip/netif/ppp/pppos.c:496
0x4010c261: pppos_input_sys at ESP32Workspace/esp-idf/components/lwip/netif/ppp/pppos.c:464 (discriminator 3)
0x400fc222: tcpip_thread at ESP32Workspace/esp-idf/components/lwip/api/tcpip.c:481
So i need to know the how to fix the solution ,please provide a way to fix the issue.