<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><br class=""></div>Fix for this has been committed. Version will show as v3.0.990.<div class=""><br class=""></div><div class="">Most of the work was in setting up the counters in gsmmux. The simcom implementation was pretty simple - logic I have is that if we haven’t received a good mux frame in 3 minutes then we assume the mux is down and power cycle everything.</div><div class=""><br class=""></div><div class="">I’ve also updated the ‘simcom status’ command to show some more information.</div><div class=""><br class=""></div><div class="">I’ve tested it as far as I can on the bench. It needs to go in a car now to see if things are more stable.</div><div class=""><br class=""></div><div class="">Regards, Mark</div><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 20 Feb 2018, at 4:08 PM, Mark Webb-Johnson <<a href="mailto:mark@webb-johnson.net" class="">mark@webb-johnson.net</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Tom,<div class=""><br class=""></div><div class="">I haven’t forgotten about this. Grateful for all the testing you are doing.</div><div class=""><br class=""></div><div class="">Gory details:</div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><a href="http://www.qtc.jp/3GPP/GSM/SMG_24/tdocs/P-97-1031.pdf" class="">http://www.qtc.jp/3GPP/GSM/SMG_24/tdocs/P-97-1031.pdf</a></div></blockquote><div class=""><br class=""></div><div class="">I found that we can pickup GSM MUX framing errors, as this data coming back from the modem (when in mux mode) is not framed correctly so will be treated as inter-frame errors. We can count those in the mux and if they exceed a limit then shutdown the mux. There doesn’t seem to be a ping frame, but we can set a timer after the last frame was received, and if we don’t get another within a reasonable time, then shutdown the mux.</div><div class=""><br class=""></div><div class="">Then, we add code in the higher layer to check the mux is up when it should be. If not, we’ll go through a power cycle of the simcom.</div><div class=""><br class=""></div><div class="">I will make these changes. Not too hard to do, but I need to do at least minimal testing. Mired in pre-production hell at the moment, but I’ll try to get it done this week.</div><div class=""><br class=""></div><div class="">Regards, Mark.<br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On 14 Feb 2018, at 1:57 PM, Mark Webb-Johnson <<a href="mailto:mark@webb-johnson.net" class="">mark@webb-johnson.net</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">It seems that around 4045393 in the logs the simcom driver thinks it is in mux mode, but the modem is not. The modem is just transmitting raw AT commands, not framed in gsm-mux.<div class=""><br class=""></div><div class="">The gsm-mux framing starts with a f9 and ends with a checksum then f9 again. Like this:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (119553) gsm-ppp: tx: 7e 21 45 00 00 7a 00 34 00 00 ff 06 08 58 64 66 | ~!E..z.4.....Xdf</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (119553) gsm-ppp: tx: 46 1c bc 8a 4b e5 fa 3c 1a d3 00 00 2f 84 b9 bc | F...K..<..../...</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (119553) gsm-ppp: tx: 8d 1c 50 18 16 2a 31 ce 00 00 31 78 4b 44 45 79 | ..P..*1...1xKDEy</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (119553) gsm-ppp: tx: 35 5a 35 6e 4b 35 66 35 2b 62 70 56 6a 52 2b 34 | 5Z5nK5f5+bpVjR+4</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (119553) gsm-ppp: tx: 59 49 44 62 44 68 6c 63 66 72 47 54 50 44 45 56 | YIDbDhlcfrGTPDEV</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (119553) gsm-ppp: tx: 2b 65 42 59 78 4d 49 41 31 4c 42 77 4d 52 45 7a | +eBYxMIA1LBwMREz</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (119553) gsm-ppp: tx: 79 36 44 74 76 2b 58 56 41 36 61 51 58 51 36 46 | y6Dtv+XVA6aQXQ6F</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (119553) gsm-ppp: tx: 73 49 42 4e 4c 59 48 41 3d 3d 0d 0a bd aa 7e | sIBNLYHA==....~</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (119553) simcom: tx: f9 09 ff ff 7e 21 45 00 00 7a 00 34 00 00 ff 06 | ....~!E..z.4....</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (119553) simcom: tx: 08 58 64 66 46 1c bc 8a 4b e5 fa 3c 1a d3 00 00 | .XdfF...K..<....</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (119553) simcom: tx: 2f 84 b9 bc 8d 1c 50 18 16 2a 31 ce 00 00 31 78 | /.....P..*1...1x</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (119553) simcom: tx: 4b 44 45 79 35 5a 35 6e 4b 35 66 35 2b 62 70 56 | KDEy5Z5nK5f5+bpV</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (119553) simcom: tx: 6a 52 2b 34 59 49 44 62 44 68 6c 63 66 72 47 54 | jR+4YIDbDhlcfrGT</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (119553) simcom: tx: 50 44 45 56 2b 65 42 59 78 4d 49 41 31 4c 42 77 | PDEV+eBYxMIA1LBw</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (119553) simcom: tx: 4d 52 45 7a 79 36 44 74 76 2b 58 56 41 36 61 51 | MREzy6Dtv+XVA6aQ</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (119553) simcom: tx: 58 51 36 46 73 49 42 4e 4c 59 48 41 3d 3d 0d 0a | XQ6FsIBNLYHA==..</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (119553) simcom: tx: bd aa 7e 9a f9 | ..~..</span></font></div></div></blockquote><div class=""><div class=""><br class=""></div><div class="">There was a network disconnection around 552393, recovered well. Another at 2080493, also recovered well.</div><div class=""><br class=""></div><div class="">But then around 2666343 we lose gms mux framing.</div><div class=""><br class=""></div></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><div class=""><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2666333) simcom: rx: 14 f9 f9 11 ff 19 0d 0a 2b 43 52 45 47 3a 20 32 | ........+CREG: 2</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2666333) gsm-mux: ProcessFrame(CHAN=3, ADDR=0d, CTRL=ff, FCS=14, LEN=18)</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2666333) gsm-mux: ChanProcessFrame(CHAN=3, ADDR=0d, CTRL=ff, LEN=15, IFP=3)</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">D (2666333) simcom: rx line ch=3 len=8 : +CREG: 2</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">I (2666343) simcom: CREG Network Registration: Searching</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2666343) simcom: rx: 0d 0a 19 f9 | ....</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2666343) gsm-mux: ProcessFrame(CHAN=4, ADDR=11, CTRL=ff, FCS=19, LEN=18)</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2666343) gsm-mux: ChanProcessFrame(CHAN=4, ADDR=11, CTRL=ff, LEN=15, IFP=3)</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">D (2666343) simcom: rx line ch=4 len=8 : +CREG: 2</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">I (2666393) simcom: Lost network connection (NetworkRegistration in NetMode)</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">I (2666393) simcom: State: Enter NetLoss state</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2666393) simcom: tx: f9 0d ff 19 41 54 2b 43 47 41 54 54 3d 30 0d 0a | ....AT+CGATT=0..</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2666393) simcom: tx: 14 f9 | ..</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">I (2666393) gsm-ppp: Shutting down (hard)...</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">I (2666393) ovms-server-v2: Network is reconfigured, so disconnect network connection</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">E (2666393) ovms-server-v2: Status: Error: Disconnected from OVMS Server V2</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">I (2666403) gsm-ppp: StatusCallBack: User Interrupt</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">I (2666403) gsm-ppp: PPP connection has been closed</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2666493) simcom: rx: f9 0d ff 0d 0d 0a 4f 4b 0d 0a 0f f9 | ......OK....</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2666503) simcom: rx: f9 0d ff 1f 0d 0a 2b 43 53 51 3a 20 33 31 2c 39 | ......+CSQ: 31,9</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2666503) simcom: rx: 39 0d 0a f0 f9 f9 11 ff 1f 0d 0a 2b 43 53 51 3a | 9..........+CSQ:</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2666503) simcom: rx: 20 33 31 2c 39 39 0d 0a fd f9 f9 0d ff 19 0d 0a | 31,99..........</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2666503) simcom: rx: 2b 43 52 45 47 3a 20 31 0d 0a 14 f9 f9 11 ff 19 | +CREG: 1........</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2666503) simcom: rx: 0d 0a 2b 43 52 45 47 3a 20 31 0d 0a 19 f9 | ..+CREG: 1....</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2666513) simcom: rx: f9 09 ff 23 7e ff 7d 23 c0 21 7d 25 7d 32 7d 20 | ...#~.}#.!}%}2}</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2666513) simcom: rx: 7d 24 cc ad 7e 1f f9 f9 0d ff 2f 0d 0a 2b 50 50 | }$..~...../..+PP</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2666513) simcom: rx: 50 44 3a 20 44 49 53 43 4f 4e 4e 45 43 54 45 44 | PD: DISCONNECTED</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2666513) simcom: rx: 0d 0a d4 f9 f9 11 ff 2f 0d 0a 2b 50 50 50 44 3a | ......./..+PPPD:</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2666513) simcom: rx: 20 44 49 53 43 4f 4e 4e 45 43 54 45 44 0d 0a d9 | DISCONNECTED...</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2666513) simcom: rx: f9 | .</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2666703) mongoose: mg_close_conn 44002356 0x3ffe8230 2048 8201</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2666703) mongoose: mg_socket_if_destroy 1754 nc=0x3ffe8230 sock=8201 flags=800</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2666703) mongoose: mg_call 3806 0x3ffe8230 user ev=5 ev_data=0x0 flags=2048 rmbl=0 smbl=0</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2666703) ovms-server-v2: OvmsServerV2MongooseCallback(MG_EV_CLOSE)</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2666713) mongoose: mg_call 4587 0x3ffe8230 after user flags=2048 rmbl=0 smbl=0</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2666723) mongoose: mg_mgr_free 12130 0x3ffb71f8</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">OVMS > gytdercvghnjm=k',.=uigyryr6 ,kjbuhygb vg bV (2667003) simcom: rx: f9 0d ff 1d 0d 0a 2b 43 53 51 3a 20 30 2c 39 39 | ......+CSQ: 0,99</span></font></div><div class=""><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2667003) simcom: rx: 0d 0a 13 f9 f9 11 ff 1d 0d 0a 2b 43 53 51 3a 20 | ..........+CSQ:</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2667013) simcom: rx: 30 2c 39 39 0d 0a 1e f9 | 0,99....</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">OVMS > gytdercvghnjm=k',.=uigyryr6 ,kjbuhygb vg bV (2669253) simcom: rx: f9 0d ff 1f 0d 0a 2b 43 53 51 3a 20 31 35 2c 39 | ......+CSQ: 15,9</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2669263) simcom: rx: 39 0d 0a f0 f9 f9 11 ff 1f 0d 0a 2b 43 53 51 3a | 9..........+CSQ:</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2669263) simcom: rx: 20 31 35 2c 39 39 0d 0a fd f9 f9 0d ff 19 0d 0a | 15,99..........</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2669263) simcom: rx: 2b 43 52 45 47 3a 20 32 0d 0a 14 f9 f9 11 ff 19 | +CREG: 2........</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2669263) simcom: rx: 0d 0a 2b 43 52 45 47 3a 20 32 0d 0a 19 f9 | ..+CREG: 2....</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">OVMS > gytdercvghnjm=k',.=uigyryr6 ,kjbuhygb vg bV (2669503) simcom: rx: f9 09 ff 25 7e ff 7d 23 c0 21 7d 25 7d 33 7d 20 | ...%~.}#.!}%}3}</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2669503) simcom: rx: 7d 24 7d 30 f7 7e fb f9 | }$}0.~..</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">OVMS > gytdercvghnjm=k',.=uigyryr6 ,kjbuhygb vg bV (2670013) simcom: rx: f9 0d ff 1f 0d 0a 2b 43 53 51 3a 20 31 32 2c 39 | ......+CSQ: 12,9</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2670013) simcom: rx: 39 0d 0a f0 f9 f9 11 ff 1f 0d 0a 2b 43 53 51 3a | 9..........+CSQ:</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2670013) simcom: rx: 20 31 32 2c 39 39 0d 0a fd f9 | 12,99....</span></font></div></div></div></div></blockquote><div class=""><div class=""><br class=""></div><div class="">The gsm-mux seems no longer able to decode the incoming frames. It seems to recover for a while, but then the mux fails completely around 2705413:</div><div class=""><br class=""></div></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><div class=""><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2695413) simcom: rx: f9 0d ff 9f 0d 0a 2b 43 52 45 47 3a 20 31 2c 32 | ......+CREG: 1,2</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2695423) simcom: rx: 0d 0a 0d 0a 2b 43 43 4c 4b 3a 20 22 31 38 2f 30 | ....+CCLK: "18/0</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2695423) simcom: rx: 32 2f 30 39 2c 31 37 3a 34 39 3a 34 39 2b 35 32 | 2/09,17:49:49+52</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2695423) simcom: rx: 22 0d 0a 0d 0a 2b 43 53 51 3a 20 30 2c 39 39 0d | "....+CSQ: 0,99.</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2695423) simcom: rx: 0a 0d 0a 2b 43 4f 50 53 3a 20 30 0d 0a 0d 0a 4f | ...+COPS: 0....O</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2695423) simcom: rx: 4b 0d 0a 10 f9 | K....</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2695423) gsm-mux: ProcessFrame(CHAN=3, ADDR=0d, CTRL=ff, FCS=10, LEN=85)</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2695423) gsm-mux: ChanProcessFrame(CHAN=3, ADDR=0d, CTRL=ff, LEN=82, IFP=3)</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">D (2695423) simcom: rx line ch=3 len=10 : +CREG: 1,2</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">D (2695423) simcom: rx line ch=3 len=29 : +CCLK: "18/02/09,17:49:49+52"</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">D (2695423) simcom: rx line ch=3 len=10 : +CSQ: 0,99</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">D (2695423) simcom: rx line ch=3 len=8 : +COPS: 0</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">D (2695423) simcom: rx line ch=3 len=2 : OK</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">OVMS > gytdercvghnjm=k',.=uigyryr6 ,kjbuhygb vg bV (2703403) simcom: rx: 0d 0a 53 54 41 52 54 0d 0a | ..START..</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">OVMS > gytdercvghnjm=k',.=uigyryr6 ,kjbuhygb vg bV (2705393) simcom: tx: f9 0d ff 3b 41 54 2b 43 52 45 47 3f 3b 2b 43 43 | ...;AT+CREG?;+CC</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2705393) simcom: tx: 4c 4b 3f 3b 2b 43 53 51 3b 2b 43 4f 50 53 3f 0d | LK?;+CSQ;+COPS?.</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2705393) simcom: tx: 0a cf f9 | ...</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2705403) simcom: rx: 41 54 2b 43 52 45 47 3f 3b 2b 43 43 4c 4b 3f 3b | AT+CREG?;+CCLK?;</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2705403) simcom: rx: 2b 43 53 51 3b 2b 43 4f 50 53 3f 0d | +CSQ;+COPS?.</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2705413) simcom: rx: 0d 0a 2b 43 52 45 47 3a 20 30 2c 32 0d 0a 0d 0a | ..+CREG: 0,2....</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2705413) simcom: rx: 2b 43 43 4c 4b 3a 20 22 31 38 2f 30 32 2f 30 39 | +CCLK: "18/02/09</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2705413) simcom: rx: 2c 31 37 3a 34 39 3a 35 39 2b 35 32 22 0d 0a 0d | ,17:49:59+52"...</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2705413) simcom: rx: 0a 2b 43 53 51 3a 20 30 2c 39 39 0d 0a 0d 0a 45 | .+CSQ: 0,99....E</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2705413) simcom: rx: 52 52 4f 52 0d 0a | RROR..</span></font></div><div class=""><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">OVMS > gytdercvghnjm=k',.=uigyryr6 ,kjbuhygb vg bV (2706283) simcom: rx: 0d 0a 2b 43 50 49 4e 3a 20 52 45 41 44 59 0d 0a | ..+CPIN: READY..</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2706283) simcom: rx: 0d 0a 4f 50 4c 20 55 50 44 41 54 49 4e 47 0d 0a | ..OPL UPDATING..</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2706293) simcom: rx: 0d 0a 50 4e 4e 20 55 50 44 41 54 49 4e 47 0d 0a | ..PNN UPDATING..</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">OVMS > gytdercvghnjm=k',.=uigyryr6 ,kjbuhygb vg bV (2707863) simcom: rx: 0d 0a 53 4d 53 20 44 4f 4e 45 0d 0a | ..SMS DONE..</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">OVMS > gytdercvghnjm=k',.=uigyryr6 ,kjbuhygb vg bV (2711073) simcom: rx: 0d 0a 43 41 4c 4c 20 52 45 41 44 59 0d 0a 0d 0a | ..CALL READY....</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2711073) simcom: rx: 50 42 20 44 4f 4e 45 0d 0a | PB DONE..</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">OVMS > gytdercvghnjm=k',.=uigyryr6 ,kjbuhygb vg bV (2715393) simcom: tx: f9 0d ff 3b 41 54 2b 43 52 45 47 3f 3b 2b 43 43 | ...;AT+CREG?;+CC</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2715393) simcom: tx: 4c 4b 3f 3b 2b 43 53 51 3b 2b 43 4f 50 53 3f 0d | LK?;+CSQ;+COPS?.</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2715393) simcom: tx: 0a cf f9 | ...</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2715403) simcom: rx: 41 54 2b 43 52 45 47 3f 3b 2b 43 43 4c 4b 3f 3b | AT+CREG?;+CCLK?;</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2715403) simcom: rx: 2b 43 53 51 3b 2b 43 4f 50 53 3f 0d | +CSQ;+COPS?.</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2715413) simcom: rx: 0d 0a 2b 43 52 45 47 3a 20 30 2c 31 0d 0a 0d 0a | ..+CREG: 0,1....</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2715423) simcom: rx: 2b 43 43 4c 4b 3a 20 22 31 38 2f 30 32 2f 30 39 | +CCLK: "18/02/09</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2715423) simcom: rx: 2c 31 37 3a 35 30 3a 31 30 2b 35 32 22 0d 0a 0d | ,17:50:10+52"...</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2715423) simcom: rx: 0a 2b 43 53 51 3a 20 35 2c 39 39 0d 0a 0d 0a 2b | .+CSQ: 5,99....+</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2715423) simcom: rx: 43 4f 50 53 3a 20 30 2c 30 2c 22 32 64 65 67 72 | COPS: 0,0,"2degr</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2715423) simcom: rx: 65 65 73 22 2c 32 0d 0a 0d 0a 4f 4b 0d 0a | ees",2....OK..</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">OVMS > gytdercvghnjm=k',.=uigyryr6 ,kjbuhygb vg bV (2725393) simcom: tx: f9 0d ff 3b 41 54 2b 43 52 45 47 3f 3b 2b 43 43 | ...;AT+CREG?;+CC</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2725393) simcom: tx: 4c 4b 3f 3b 2b 43 53 51 3b 2b 43 4f 50 53 3f 0d | LK?;+CSQ;+COPS?.</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2725393) simcom: tx: 0a cf f9 | ...</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2725413) simcom: rx: 41 54 2b 43 52 45 47 3f 3b 2b 43 43 4c 4b 3f 3b | AT+CREG?;+CCLK?;</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2725413) simcom: rx: 2b 43 53 51 3b 2b 43 4f 50 53 3f 0d | +CSQ;+COPS?.</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2725463) simcom: rx: 0d 0a 2b 43 52 45 47 3a 20 30 2c 31 0d 0a 0d 0a | ..+CREG: 0,1....</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2725473) simcom: rx: 2b 43 43 4c 4b 3a 20 22 31 38 2f 30 32 2f 30 39 | +CCLK: "18/02/09</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2725473) simcom: rx: 2c 31 37 3a 35 30 3a 32 30 2b 35 32 22 0d 0a 0d | ,17:50:20+52"...</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2725473) simcom: rx: 0a 2b 43 53 51 3a 20 35 2c 39 39 0d 0a 0d 0a 2b | .+CSQ: 5,99....+</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2725473) simcom: rx: 43 4f 50 53 3a 20 30 2c 30 2c 22 32 64 65 67 72 | COPS: 0,0,"2degr</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">V (2725473) simcom: rx: 65 65 73 22 2c 32 0d 0a 0d 0a 4f 4b 0d 0a | ees",2....OK..</span></font></div></div></div></div></blockquote><div class=""><div class=""><br class=""></div><div class="">That looks like a reboot of the modem (around the time ERROR is received from the modem).</div><div class=""><br class=""></div><div class="">From that point on, we think we are in mux mode, and the modem doesn’t. Not surprised that nothing works. A modem power on/off would probably fix it, but nothing in the current software detects that situation.</div><div class=""><br class=""></div><div class="">I think what I’ll do is add a timeout in mux mode. Or a ping style frame (I’ll have to see what the spec allows). Then we can detect that mux has failed, and go through a reset cycle if that happens.</div><div class=""><br class=""></div><div class="">Regards, Mark.</div><div class=""><br class=""><blockquote type="cite" class=""><div class="">On 12 Feb 2018, at 6:35 PM, Tom Parker <<a href="mailto:tom@carrott.org" class="">tom@carrott.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On 06/02/18 12:42, Tom Parker wrote:<br class=""><br class=""><blockquote type="cite" class="">It feels like the simcom state machine has a bug where it thinks that it is connected but actually it isn't, so it never reconnects. This bug appears to persist over simcom power cycles. I've now got verbose logging turned on and I've removed modemmanager on my data logging laptop so hopefully I'll have some more information about the cause.<br class=""></blockquote><br class="">Attached is another log file. Here the server v2 code and the simcom noticed that it was disconnected which I haven't seen before, but the simcom never reconnected.<br class=""><br class="">See the attached file for the earlier and later messages, the AT+CREG?... loop quoted below went on for about 15 minutes without reconnecting, and doing a power simcom off followed by on did not make it reconnect. Pressing the button made it connect straight away. I believe I was stationary when power cycling and then resetting the whole module.<br class=""><br class="">Why is "simcom: rx line" not always sometimes printed? If you look further back and forward in the log you'll see it decoding most of the AT command responses. Is this the simcom response parser? It looks like the AT+CREG?... are being sent but sometimes the results aren't be interpreted, so the simcom code doesn't know it is connected?<br class=""><br class="">+CSQ: 1,99 suggests there is very low signal? That might explain the disconnections. My antenna is poor (a wifi rubber ducky with an RP-SMA adapter, I could switch to a proper antenna too but then my problem might go away and we wouldn't be able to collect debug information). After the reboot the signal quality was only +CSQ: 2,99 and it reconnected fine.<br class=""><br class="">OVMS > V (4235393) simcom: tx: f9 0d ff 3b 41 54 2b 43 52 45 47 3f 3b 2b 43 43 | ...;AT+CREG?;+CC<br class="">V (4235393) simcom: tx: 4c 4b 3f 3b 2b 43 53 51 3b 2b 43 4f 50 53 3f 0d | LK?;+CSQ;+COPS?.<br class="">V (4235393) simcom: tx: 0a cf f9 | ...<br class="">V (4235403) simcom: rx: 41 54 2b 43 52 45 47 3f 3b 2b 43 43 4c 4b 3f 3b | AT+CREG?;+CCLK?;<br class="">V (4235403) simcom: rx: 2b 43 53 51 3b 2b 43 4f 50 53 3f 0d | +CSQ;+COPS?.<br class="">V (4235413) simcom: rx: 0d 0a 2b 43 52 45 47 3a 20 30 2c 31 0d 0a 0d 0a | ..+CREG: 0,1....<br class="">V (4235413) simcom: rx: 2b 43 43 4c 4b 3a 20 22 31 38 2f 30 32 2f 30 39 | +CCLK: "18/02/09<br class="">V (4235413) simcom: rx: 2c 31 38 3a 31 35 3a 33 30 2b 35 32 22 0d 0a 0d | ,18:15:30+52"...<br class="">V (4235413) simcom: rx: 0a 2b 43 53 51 3a 20 30 2c 39 39 0d 0a 0d 0a 2b | .+CSQ: 0,99....+<br class="">V (4235413) simcom: rx: 43 4f 50 53 3a 20 30 2c 30 2c 22 32 64 65 67 72 | COPS: 0,0,"2degr<br class="">V (4235413) simcom: rx: 65 65 73 22 2c 32 0d 0a 0d 0a 4f 4b 0d 0a | ees",2....OK..<br class="">OVMS > simcom statusV (4245393) simcom: tx: f9 0d ff 3b 41 54 2b 43 52 45 47 3f 3b 2b 43 43 | ...;AT+CREG?;+CC<br class="">V (4245393) simcom: tx: 4c 4b 3f 3b 2b 43 53 51 3b 2b 43 4f 50 53 3f 0d | LK?;+CSQ;+COPS?.<br class="">V (4245393) simcom: tx: 0a cf f9 | ...<br class="">V (4245423) simcom: rx: 41 54 2b 43 52 45 47 3f 3b 2b 43 43 4c 4b 3f 3b | AT+CREG?;+CCLK?;<br class="">V (4245423) simcom: rx: 2b 43 53 51 3b 2b 43 4f 50 53 3f 0d | +CSQ;+COPS?.<br class="">V (4245463) simcom: rx: 0d 0a 2b 43 52 45 47 3a 20 30 2c 31 0d 0a 0d 0a | ..+CREG: 0,1....<br class="">V (4245463) simcom: rx: 2b 43 43 4c 4b 3a 20 22 31 38 2f 30 32 2f 30 39 | +CCLK: "18/02/09<br class="">V (4245463) simcom: rx: 2c 31 38 3a 31 35 3a 34 30 2b 35 32 22 0d 0a 0d | ,18:15:40+52"...<br class="">V (4245473) simcom: rx: 0a 2b 43 53 51 3a 20 31 2c 39 39 0d 0a 0d 0a 2b | .+CSQ: 1,99....+<br class="">V (4245473) simcom: rx: 43 4f 50 53 3a 20 30 2c 30 2c 22 32 64 65 67 72 | COPS: 0,0,"2degr<br class="">V (4245473) simcom: rx: 65 65 73 22 2c 32 0d 0a 0d 0a 4f 4b 0d 0a | ees",2....OK..<br class="">OVMS > simcom status<br class="">SIMCOM<br class=""> Network Registration: Searching<br class=""> State: NetWait<br class=""> Ticker: 1570<br class=""> User Data: 0<br class=""> Mux Open Channels: 4<br class=""> PPP Not Connected<br class=""> PPP Last Error: User Interrupt<br class=""> GPS: disabled<br class=""> GPS time: disabled<br class=""> NMEA (GPS/GLONASS) Not Connected<br class="">OVMS > server v2 status<br class="">Error: Disconnected from OVMS Server V2<br class=""><br class=""><span id="cid:88DFD2EE-B85E-4549-97C2-F4F640901A34" class=""><ovms_2018-02-09T03_56_08+0000.log.bz2></span>_______________________________________________<br class="">OvmsDev mailing list<br class=""><a href="mailto:OvmsDev@lists.teslaclub.hk" class="">OvmsDev@lists.teslaclub.hk</a><br class=""><a href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev" class="">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a><br class=""></div></div></blockquote></div><br class=""></div></div>_______________________________________________<br class="">OvmsDev mailing list<br class=""><a href="mailto:OvmsDev@lists.teslaclub.hk" class="">OvmsDev@lists.teslaclub.hk</a><br class=""><a href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev" class="">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a><br class=""></div></blockquote></div><br class=""></div></div>_______________________________________________<br class="">OvmsDev mailing list<br class=""><a href="mailto:OvmsDev@lists.teslaclub.hk" class="">OvmsDev@lists.teslaclub.hk</a><br class="">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev<br class=""></div></blockquote></div><br class=""></div></body></html>