Seems to work better for me now. Here is a real disconnection (from network side): D (3088634) SIMCOM rx: 50 44 3a 20 44 49 53 43 4f 4e 4e 45 43 54 45 44 PD: DISCONNECTED D (3088634) SIMCOM rx: 0d 0a d4 f9 f9 11 ff 2f 0d 0a 2b 50 50 50 44 3a ......./..+PPPD: D (3088634) gsm-mux: ProcessFrame(CHAN=3, ADDR=0d, CTRL=ff, FCS=d4, LEN=29) D (3088634) gsm-mux: ChanProcessFrame(CHAN=3, ADDR=0d, CTRL=ff, LEN=26, IFP=3) D (3088634) simcom: rx line ch=3 len=19 : +PPPD: DISCONNECTED I (3088634) simcom: PPP Connection disconnected D (3088634) SIMCOM rx: 20 44 49 53 43 4f 4e 4e 45 43 54 45 44 0d 0a d9 DISCONNECTED... D (3088634) SIMCOM rx: f9 . D (3088634) gsm-mux: ProcessFrame(CHAN=4, ADDR=11, CTRL=ff, FCS=d9, LEN=29) D (3088634) gsm-mux: ChanProcessFrame(CHAN=4, ADDR=11, CTRL=ff, LEN=26, IFP=3) D (3088634) simcom: rx line ch=4 len=19 : +PPPD: DISCONNECTED I (3088634) simcom: PPP Connection disconnected E (3088644) ovms-server-v2: Status: Error: Disconnected from OVMS Server V2 I (3089474) simcom: Lost network connection (+PPP disconnect in NetMode) I (3089474) simcom: State: Enter NetLoss state D (3089474) SIMCOM tx: f9 0d ff 19 41 54 2b 43 47 41 54 54 3d 30 0d 0a ....AT+CGATT=0.. D (3089474) SIMCOM tx: 14 f9 .. I (3089474) gsm-ppp: Shutting down (hard)... I (3089474) ovms-server-v2: Network is down, so disconnect network connection D (3090734) SIMCOM rx: f9 0d ff 0d 0d 0a 4f 4b 0d 0a 0f f9 ......OK.... D (3091614) SIMCOM rx: f9 09 ff 25 7e ff 7d 23 c0 21 7d 25 7d 29 7d 20 ...%~.}#.!}%})} D (3091614) SIMCOM rx: 7d 24 ff 7d 21 7e fb f9 }$.}!~.. I (3094604) gsm-ppp: StatusCallBack: User Interrupt I (3094604) gsm-ppp: PPP connection has been closed D (3094624) SIMCOM rx: f9 09 ff 1d 0d 0a 4e 4f 20 43 41 52 52 49 45 52 ......NO CARRIER D (3094624) SIMCOM rx: 0d 0a d1 f9 f9 0d ff 1d 0d 0a 4e 4f 20 43 41 52 ..........NO CAR D (3094624) SIMCOM rx: 52 49 45 52 0d 0a 13 f9 f9 11 ff 1d 0d 0a 4e 4f RIER..........NO D (3094624) SIMCOM rx: 20 43 41 52 52 49 45 52 0d 0a 1e f9 f9 09 ff 2f CARRIER......./ D (3094624) SIMCOM rx: 0d 0a 2b 50 50 50 44 3a 20 44 49 53 43 4f 4e 4e ..+PPPD: DISCONN D (3094624) SIMCOM rx: 45 43 54 45 44 0d 0a 16 f9 f9 0d ff 2f 0d 0a 2b ECTED......./..+ D (3094624) SIMCOM rx: 50 50 50 44 3a 20 44 49 53 43 4f 4e 4e 45 43 54 PPPD: DISCONNECT D (3094624) SIMCOM rx: 45 44 0d 0a d4 f9 f9 11 ff 2f 0d 0a 2b 50 50 50 ED......./..+PPP D (3094624) SIMCOM rx: 44 3a 20 44 49 53 43 4f 4e 4e 45 43 54 45 44 0d D: DISCONNECTED. D (3094624) SIMCOM rx: 0a d9 f9 ... I (3098474) simcom: State timeout, transition to 5 I (3098474) simcom: State: Enter NetWait state D (3098474) gsm-nmea: GPS disabled I (3098644) ovms-server-v2: Status: Waiting for network connectivity I (3102474) simcom: State: Enter NetStart state It tried to reconnect a few times, failing each time. Then, after a couple of minutes, the connection succeeded. Regards, Mark
On 24 Dec 2017, at 2:53 PM, Mark Webb-Johnson <mark@webb-johnson.net> wrote:
I found this patch from Espressif:
https://github.com/espressif/esp-idf/pull/1100/commits/6dd48547adbdaf89e43b6... <https://github.com/espressif/esp-idf/pull/1100/commits/6dd48547adbdaf89e43b680dc027e5aa786d9c0e>
They had only applied it to ‘master’, and not the ‘2.1’ branch we use. It seems to resolve the problem.
I also made some changes to the ovms_server_v2 to try to tear down the connection _before_ the ppp link goes down (but I now think these are unnecessary, although probably beneficial).
Can you guys try updating both your ESP IDF (based on open vehicles 2.1 repo) and ovms v3 firmware. See if it is more reliable? I will leave mine running now, to see if there is any improvement for long-lived connections.
Regards, Mark.
On 19 Dec 2017, at 5:14 AM, Greg D. <gregd2350@gmail.com <mailto:gregd2350@gmail.com>> wrote:
Hi folks,
I left my module running with the modem connected (WiFi client off) for a couple of days. V2 server configured and connected, but the phone client was not running. The module was sitting on my desk (not in a car), powered from the high-power USB port on my laptop. It was blinking happily last night when I went to bed, but dark this morning. Apparently had crashed and rebooted during the night.
Here's the trace-back from the screen. Looks like a link drop was the trigger, or perhaps the result of something else.
Hope this helps,
Greg
I (129194054) ovms-server-v2: Send MP-0 S47,K,0,0,stopped,standard,0,0,0,0,0,0,0,21,0,0,0,0,0.00,0,0,0,0,-1,0,0,0,0,0,0,0,0.00,0.00,0 I (129194064) ovms-server-v2: Send MP-0 D0,0,5,0,0,0,0,0,0,129191,0,0,0,0,0,0,0,0,0,0 I (129795064) ovms-server-v2: Send MP-0 S47,K,0,0,stopped,standard,0,0,0,0,0,0,0,21,0,0,0,0,0.00,0,0,0,0,-1,0,0,0,0,0,0,0,0.00,0.00,0 I (129795074) ovms-server-v2: Send MP-0 D0,0,5,0,0,0,0,0,0,129792,0,0,0,0,0,0,0,0,0,0 I (130030624) simcom: CREG Network Registration: Searching I (130031414) simcom: Lost network connection (NetworkRegistration in NetMode) I (130031414) simcom: State: Enter NetLosGuru Meditation Error of type LoadProhibited occurred on core 0. Exception was unhandled. Register dump:
PC : 0x4018f959 PS : 0x00060830 A0 : 0x8018a5d8 A1 : 0x3ffd80f0
0x4018f959: ip4_route at /home/greg/esp/esp-idf/components/lwip/core/ipv4/ip4.c:223 (discriminator 2)
A2 : 0x0000f01d A3 : 0x00000000 A4 : 0x00000000 A5 : 0xfffffffc A6 : 0x3fff2c8c A7 : 0x00000014 A8 : 0x00000000 A9 : 0x00000001 A10 : 0x502b34ca A11 : 0x00000001 A12 : 0x3f42ea90 A13 : 0x3f42eaa4 A14 : 0x3ffda120 A15 : 0x00000000 SAR : 0x0000000b EXCCAUSE: 0x0000001c EXCVADDR: 0x0000f0d2 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0xffffffff
Backtrace: 0x4018f959:0x3ffd80f0 0x4018a5d5:0x3ffd8110 0x4018d3eb:0x3ffd8150 0x4018d40d:0x3ffd8180 0x4018d4ae:0x3ffd81a0 0x4018d90c:0x3ffd81c0 0x4018e46a:0x3ffd81e0 0x4018e4ab:0x3ffd8200 0x40196261:0x3ffd8220 0x4019882d:0x3ffd8240 0x40198874:0x3ffd8260 0x40199e9d:0x3ffd8280 0x40198764:0x3ffd82a0 0x4019a8f2:0x3ffd82c0 0x4019a92e:0x3ffd82e0 0x40196f25:0x3ffd8300 0x40199e9d:0x3ffd8320 0x40197e68:0x3ffd8340 0x40196149:0x3ffd8360 0x401b470c:0x3ffd8380 0x401825ad:0x3ffd83a0 0x4018f959: ip4_route at /home/greg/esp/esp-idf/components/lwip/core/ipv4/ip4.c:223 (discriminator 2)
0x4018a5d5: tcp_rst at /home/greg/esp/esp-idf/components/lwip/core/tcp_out.c:1336 (discriminator 4)
0x4018d3eb: tcp_abandon at /home/greg/esp/esp-idf/components/lwip/core/tcp.c:1630
0x4018d40d: tcp_abort at /home/greg/esp/esp-idf/components/lwip/core/tcp.c:1630
0x4018d4ae: tcp_netif_ipv4_addr_changed_pcblist at /home/greg/esp/esp-idf/components/lwip/core/tcp.c:1630
0x4018d90c: tcp_netif_ipv4_addr_changed at /home/greg/esp/esp-idf/components/lwip/core/tcp.c:1947
0x4018e46a: netif_set_ipaddr at /home/greg/esp/esp-idf/components/lwip/core/netif.c:452
0x4018e4ab: netif_set_addr at /home/greg/esp/esp-idf/components/lwip/core/netif.c:330
0x40196261: cifaddr at /home/greg/esp/esp-idf/components/lwip/netif/ppp/ppp.c:704
0x4019882d: ipcp_clear_addrs at /home/greg/esp/esp-idf/components/lwip/netif/ppp/ipcp.c:2192
0x40198874: ipcp_down at /home/greg/esp/esp-idf/components/lwip/netif/ppp/ipcp.c:2156
0x40199e9d: fsm_lowerdown at /home/greg/esp/esp-idf/components/lwip/netif/ppp/fsm.c:146
0x40198764: ipcp_lowerdown at /home/greg/esp/esp-idf/components/lwip/netif/ppp/ipcp.c:687
0x4019a8f2: upper_layers_down at /home/greg/esp/esp-idf/components/lwip/netif/ppp/auth.c:715
0x4019a92e: link_down at /home/greg/esp/esp-idf/components/lwip/netif/ppp/auth.c:701
0x40196f25: lcp_down at /home/greg/esp/esp-idf/components/lwip/netif/ppp/lcp.c:2341
0x40199e9d: fsm_lowerdown at /home/greg/esp/esp-idf/components/lwip/netif/ppp/fsm.c:146
0x40197e68: lcp_lowerdown at /home/greg/esp/esp-idf/components/lwip/netif/ppp/lcp.c:485
0x40196149: ppp_close at /home/greg/esp/esp-idf/components/lwip/netif/ppp/ppp.c:704
0x401b470c: pppapi_do_ppp_close at /home/greg/esp/esp-idf/components/lwip/api/pppapi.c:355
0x401825ad: tcpip_thread at /home/greg/esp/esp-idf/components/lwip/api/tcpip.c:474
Rebooting...
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk <mailto:OvmsDev@lists.teslaclub.hk> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev