<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>I’m a little worried by 30KB RAM free. That is tight, and it doesn’t take much temporary buffers for output to cause it to run out of ram. I did try it just now in my car, and it seemed ok for me - but I was accessing it via AP from my iPhone.<div class=""><div class=""><br class=""></div><div class="">Anyway, Michael knows the webserver, so best to let him try it now.</div><div class=""><br class=""></div><div class="">Framing errors would be indicative of a mux issue, not really RF signal. Are you sure the modem is not browning out from lack of power? Are you seeing any ..START.. messages in the log (which is a modem restart)? I was getting a lot of these until I switched to a powered USB hub. How are you powering this - 5v usb or 12v?</div><div class=""><br class=""></div><div class="">Don’t worry about the net manager interface priority messages. Those are there because the wifi stack keeps screwing with the default interface, so I work around it by re-setting the default interface pretty much every time there is wifi ap/sta event. For example:</div><div class=""><br class=""></div><div class=""><ol class="MailOutline"><li class="">Start and Access Point + Station</li><li class="">Start a modem</li><li class="">Wait for everything to connect. Netmanager priority will be Station.</li><li class="">Shutdown access point and station. Netmanager will switch to modem.</li><li class="">Start a Station. Netmanager will switch to station.</li><li class="">(at this point, everything is fine - but network status shows a ‘dead’ AP interface left lying around unused)</li><li class="">Stop the station. Netmanager will switch to modem.</li><li class="">A second or so later, the wifi stack will shutdown the station interface, and say ‘oh look, there is an AP interface, let’s switch to that’. Server v2 can’t connect any more.</li><li class="">Now, with my new code, Netmanager will pick up on this and switch to modem.</li></ol><div><br class=""></div><div>If I have time, I might change the Netmanager code to only output the priority message if it actually has to change the interface.</div><div><br class=""></div><div>I don’t have any plans for changes in the next few hours. At work now, lunch time over, and day job beckons.</div><div><br class=""></div><div>Regards, Mark.</div><div><br class=""><blockquote type="cite" class=""><div class="">On 20 Mar 2018, at 1:47 PM, Greg D. <<a href="mailto:gregd2350@gmail.com" class="">gregd2350@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Ok, interesting.  Am I seeing an out-of-memory crash?  I can't tell...<br class=""><br class="">It seems like the webserver status button is the worst offender,<br class="">probably because it's doing a lot of work and building a big payload. <br class="">Very often hangs for a while before responding, and if so, usually<br class="">results in the job queue overflow.  If I catch it quick enough and hit<br class="">home or some other shorter task, the overflow will drain and I'll get<br class="">the new screen; otherwise a crash.  Sometimes there will be a timeout<br class="">mixed in.  I'm wondering if our little squirrel in the ESP32 just can't<br class="">pedal hard enough...<br class=""><br class="">I did some tests going between wifi and modem, and it seems to be better<br class="">than yesterday.  I am still having a lot of trouble with modem framing<br class="">errors.  I get only an update or two (25-35 frames), if that, before<br class="">they start mounting, eventually relying on the 3 minute timer to reset<br class="">things.  Thought last night that perhaps it was electrical interference,<br class="">since there's a 2.4 ghz transmitter screaming right under the modem<br class="">board.  But turning off wifi altogether (mode and power) didn't change<br class="">the framing errors, so that can't be it.  Perhaps I'm just in a bad (RF)<br class="">neighborhood.  The webserver status page (when I can get it) is<br class="">reporting -95 to -97 dBm for the signal.  Seems a bit low, but I don't<br class="">have a lot of experience in that department.  I'm just using an antenna<br class="">off my portable ham radio.  Supposed to be good to over a ghz, but not<br class="">ideal, to be sure.<br class=""><br class="">There are a lot of "netmanager: interface priority is pp3" messages when<br class="">running the modem.  Is that netmanager offering encouragement to the<br class="">modem, or an indication of some status that might be bad?<br class=""><br class="">I've switched over to the home wifi, and will let it run for the night,<br class="">but can load another build before heading to bed in an hour or so, if<br class="">there is one.<br class=""><br class="">Greg<br class=""><br class=""><br class="">Mark Webb-Johnson wrote:<br class=""><blockquote type="cite" class="">Seems to be ok for me. But I have 48KB RAM free (OVMS v3.0) which gives a bit more breathing room.<br class=""><br class="">I’ve been doing a lot of bringing up and down wifi and modem links, and switching between ap, apclient, client, and off wifi modes. It seems that the network manager is behaving better now (at least on my desk). That bug of taking down mongoose would have caused unpredictable behaviour and weird errors everywhere.<br class=""><br class="">I’m going to put it in my car now, and leave it running this afternoon (and for my drive home).<br class=""><br class="">Regards, Mark.<br class=""><br class=""><blockquote type="cite" class="">On 20 Mar 2018, at 12:53 PM, Greg D. <<a href="mailto:gregd2350@gmail.com" class="">gregd2350@gmail.com</a>> wrote:<br class=""><br class="">Hi folks,<br class=""><br class="">Ok, so the new code seems to be working half-way decently.  But I think<br class="">there's a memory issue with the webserver.  After poking at home and<br class="">status a couple of times, my browser (chrome or Firefox) drop from a<br class="">nicely formatted screen to something very text-like.  Links and words,<br class="">no buttons.  Then another poke or two and the module crashed.  I've done<br class="">it a few times, and the crash usually seem to be with the Status button,<br class="">which, looking at the console, seems to have an auto-repeat on it.  I<br class="">managed to get the repeated "job queue overflow" once, followed after<br class="">hitting home a few times, a similar crash as below.<br class=""><br class="">This was one of the quicker crashes (browser didn't get to the text-mode<br class="">state), using AP mode wifi.  Browser in this case was Chrome.  I have a<br class="">suspicion that the issue with the text-mode stuff is a leak somewhere<br class="">triggered by Firefox, with its CSS fetches.<br class=""><br class="">Greg<br class=""><br class="">OVMS><br class="">OVMS><br class="">I (12641) housekeeping: System considered stable (free: 35212 bytes)<br class="">I (17331) simcom: State: Enter PoweredOn state<br class="">I (30481) wifi: n:1 0, o:1 1, ap:1 1, sta:1 0, prof:1<br class="">I (30491) wifi: station: 40:4e:36:8a:44:c0 join, AID=1, g, 20<br class="">I (30491) esp32wifi: AP station connected: id: 1, MAC: 40:4e:36:8a:44:c0<br class="">I (37121) webserver: HTTP GET /home<br class="">I (37371) simcom: State: Enter MuxStart state<br class="">I (37371) gsm-mux: Start MUX<br class="">I (40411) webserver: HTTP GET /status<br class="">I (47611) webserver: HTTP GET /shell<br class="">I (51031) webserver: HTTP GET /home<br class="">I (53891) webserver: HTTP GET /status<br class="">I (59031) webserver: HTTP GET /home<br class="">I (61581) webserver: HTTP GET /<br class="">I (61661) webserver: HTTP GET /home<br class="">I (63511) webserver: HTTP GET /home<br class="">I (65971) webserver: HTTP GET /status<br class="">OVMS> abort() was called at PC 0x400db927 on core 1<br class=""><br class="">Backtrace: 0x4008f0b8:0x3ffeb8b0 0x4008f28f:0x3ffeb8d0<br class="">0x400db927:0x3ffeb8f0 0x4014880c:0x3ffeb910 0x40154899:0x3ffeb930<br class="">0x40154a9f:0x3ffeb950 0x40126564:0x3ffeb980 0x401267c7:0x3ffeb9e0<br class="">0x40126846:0x3ffeba00 0x4012841f:0x3ffeba50 0x400f6aff:0x3ffebb10<br class="">0x400f7262:0x3ffebb40 0x400f6aff:0x3ffebb60 0x400f7c8e:0x3ffebb90<br class="">0x400f7d3f:0x3ffebbc0 0x400f80eb:0x3ffebbf0 0x400f834d:0x3ffebc30<br class="">0x400f4b2d:0x3ffebc80 0x400e749a:0x3ffebca0 0x400e74d9:0x3ffebcf0<br class=""><br class="">Rebooting...<br class="">ets Jun  8 2016 00:22:57<br class=""><br class="">rst:0xc (SW_CPU_RESET),boot:0x1f (SPI_FAST_FLASH_BOOT)<br class="">configsip: 156795334, SPIWP:0xee<br class="">clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00<br class="">mode:DIO, clock div:2<br class="">load:0x3fff0018,len:4<br class="">load:0x3fff001c,len:4560<br class="">ho 0 tail 12 room 4<br class="">load:0x40078000,len:0<br class="">load:0x40078000,len:13176<br class="">entry 0x40078d38<br class="">I (647) cpu_start: Pro cpu up.<br class="">I (648) cpu_start: Starting app cpu, entry point is 0x40081300<br class="">I (632) cpu_start: App cpu up.<br class="">I (651) heap_init: Initializing. RAM available for dynamic allocation:<br class="">I (658) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM<br class="">I (664) heap_init: At 3FFBBAC0 len 00024540 (145 KiB): DRAM<br class="">I (670) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM<br class="">I (676) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM<br class="">I (684) heap_init: At 40091FDC len 0000E024 (56 KiB): IRAM<br class="">I (689) cpu_start: Pro cpu start user code<br class="">I (35) ovms_main: Set default logging level for * to INFO<br class="">I (36) command: Initialising COMMAND (1000)<br class="">I (36) boot: Initialising BOOT (1100)<br class="">I (40) boot: Boot #4 reasons for CPU0=12 and CPU1=12<br class="">E (46) boot: Crash #4 detected<br class="">I (49) events: Initialising EVENTS (1200)<br class="">I (54) config: Initialising CONFIG (1400)<br class="">I (59) time: Initialising TIME (1500)<br class="">I (64) script: Initialising SCRIPTS (1600)<br class="">I (68) script: Using DUKTAPE javascript engine<br class="">I (74) metrics: Initialising METRICS (1810)<br class="">I (78) metrics: Expanding DUKTAPE javascript engine<br class="">I (88) notify: Initialising NOTIFICATIONS (1820)<br class="">I (89) notify: Registered notification type info<br class="">I (94) notify: Registered notification type error<br class="">I (99) notify: Registered notification type alert<br class="">I (105) notify: Registered notification type data<br class="">I (110) location: Initialising LOCATIONS (1900)<br class="">I (116) location: Expanding DUKTAPE javascript engine<br class="">I (121) vehicle: Initialising VEHICLE Factory (2000)<br class="">I (127) pcp: Initialising POWER (4000)<br class="">I (131) max7317: Initialising MAX7317 EGPIO (4200)<br class="">I (137) sdcard: Initialising SD CARD (4400)<br class="">I (142) ota: Initialising OTA (4400)<br class="">I (146) can: Initialising CAN (4500)<br class="">I (151) simcom: Initialising SIMCOM (4600)<br class="">I (155) test: Initialising TEST (5000)<br class="">I (159) ovms-module: Initialising MODULE (5100)<br class="">I (165) vfs: Initialising VFS (5200)<br class="">I (169) ovms-server: Initialising OVMS Server (6000)<br class="">I (174) ovms-server-v2: Initialising OVMS V2 Server (6100)<br class="">I (181) ovms-server-v3: Initialising OVMS V3 Server (6200)<br class="">I (187) obd2ecu: Initialising OBD2ECU (7000)<br class="">I (192) canopen: Initialising CANopen (7000)<br class="">I (197) esp32wifi: Initialising ESP32WIFI (8000)<br class="">I (202) ovms-mdns: Initialising MDNS (8100)<br class="">I (207) webserver: Initialising WEBSERVER (8200)<br class="">I (213) telnet: Initialising Telnet (8300)<br class="">I (217) ssh: Initialising SSH (8300)<br class="">I (221) re: Initialising RE Tools (8800)<br class="">I (226) netmanager: Initialising NETMANAGER (8999)<br class="">I (233) v-track: Registering Vehicle: TRACK (9000)<br class="">I (237) v-teslaroadster: Registering Vehicle: Tesla Roadster (9000)<br class="">I (243) v-teslamodels: Registering Vehicle: Tesla Model S (9000)<br class="">I (250) v-obdii: Registering Vehicle: OBDII (9000)<br class="">I (256) v-none: Registering Vehicle: NONE (9000)<br class="">I (261) v-demo: Registering Vehicle: DEMO (9000)<br class="">I (266) version: Initialising Versioning (9900)<br class="">I (275) cpu_start: Starting scheduler on PRO CPU.<br class="">I (0) cpu_start: Starting scheduler on APP CPU.<br class="">I (321) ovms_main: Executing on CPU core 0<br class="">I (321) ovms_main: Mounting CONFIG...<br class="">W (371) webserver: UpdateGlobalAuthFile: no password set => no auth for<br class="">web console<br class="">I (381) ovms_main: Registering default configs...<br class="">I (381) ovms_main: Starting HOUSEKEEPING...<br class="">I (381) housekeeping: Initialising HOUSEKEEPING Framework...<br class="">I (441) housekeeping: Executing on CPU core 1<br class="">I (441) housekeeping: reset_reason: cpu0=12, cpu1=12<br class="">I (441) housekeeping: Starting PERIPHERALS...<br class="">I (451) peripherals: Initialising OVMS Peripherals...<br class="">I (451) peripherals:   TCP/IP Adaptor<br class="">I (461) peripherals:   ESP32 system<br class="">I (461) peripherals:   SPI bus<br class="">I (461) peripherals:   MAX7317 I/O Expander<br class="">I (471) peripherals:   ESP32 CAN<br class="">I (471) peripherals:   ESP32 WIFI<br class="">I (481) peripherals:   ESP32 BLUETOOTH<br class="">I (481) peripherals:   ESP32 ADC<br class="">I (481) peripherals:   MCP2515 CAN 1/2<br class="">I (501) peripherals:   MCP2515 CAN 2/2<br class="">I (511) peripherals:   SD CARD<br class="">I (511) peripherals:   SIMCOM MODEM<br class="">I (511) gpio: GPIO[16]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup:<br class="">1| Pulldown: 0| Intr:0<br class="">I (521) gpio: GPIO[17]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup:<br class="">1| Pulldown: 0| Intr:0<br class="">I (531) uart: queue free spaces: 10<br class="">I (531) ext12v: Powering off external 12V devices<br class="">I (541) housekeeping: Auto init ext12v (free: 112712 bytes)<br class="">I (541) ext12v: Powering on external 12V devices<br class="">I (551) housekeeping: Auto init wifi (free: 112712 bytes)<br class="">I (551) wifi: wifi firmware version: ebd3e5d<br class="">I (561) wifi: config NVS flash: enabled<br class="">I (561) wifi: config nano formating: disabled<br class="">I (561) system_api: Base MAC address is not set, read default base MAC<br class="">address from BLK0 of EFUSE<br class="">I (571) system_api: Base MAC address is not set, read default base MAC<br class="">address from BLK0 of EFUSE<br class="">I (601) wifi: Init dynamic tx buffer num: 16<br class="">I (601) wifi: Init data frame dynamic rx buffer num: 16<br class="">I (601) wifi: Init management frame dynamic rx buffer num: 16<br class="">I (601) wifi: wifi driver task: 3ffe60f0, prio:23, stack:4096<br class="">I (611) wifi: Init static rx buffer num: 4<br class="">I (611) wifi: Init dynamic rx buffer num: 16<br class="">I (611) wifi: wifi power manager task: 0x3ffe8888 prio: 21 stack: 2560<br class="">I (1341) phy: phy_version: 383.0, 79a622c, Jan 30 2018, 15:38:06, 0, 0<br class="">I (1341) wifi: mode : sta (30:ae:a4:37:1b:64) + softAP (30:ae:a4:37:1b:65)<br class="">I (1351) housekeeping: Auto init modem (free: 90568 bytes)<br class="">I (1351) simcom: State: Enter PoweringOn state<br class="">I (1351) simcom: Power Cycle<br class="">I (1361) netmanager: WIFI access point is up<br class="">I (1361) webserver: Launching Web Server<br class="">I (1371) esp32wifi: AP started with SSID: ovms, MAC: 30:ae:a4:37:1b:65,<br class="">IP: 192.168.4.1<br class="">I (1371) telnet: Launching Telnet Server<br class="">I (1381) ssh: Launching SSH Server<br class="">I (1441) simcom: State: Enter PoweredOn state<br class="">I (2361) housekeeping: Auto init vehicle (free: 78820 bytes)<br class="">I (2361) v-teslaroadster: Tesla Roadster v1.x, v2.x and v3.0 vehicle module<br class="">I (2371) housekeeping: Auto init obd2ecu (free: 73088 bytes)<br class="">I (2571) housekeeping: Auto init server v2 (free: 64432 bytes)<br class="">I (2571) ovms-server-v2: OVMS Server V2 registered metric modifier is #1<br class="">I (2581) ovms-server-v2: Status: Starting<br class="">I (2581) ovms-server-v2: OVMS Server v2 running<br class="">I (2591) housekeeping: Auto init server v3 (free: 60120 bytes)<br class="">I (2591) housekeeping: Auto init done (free: 60120 bytes)<br class="">I (2601) housekeeping: Starting USB console...<br class="">I (2601) uart: queue free spaces: 30<br class="">I (2611) ovms-mdns: Starting MDNS<br class=""><br class="">Welcome to the Open Vehicle Monitoring System (OVMS) - Async Console<br class="">I (2651) version: Set version<br class="">I (4181) wifi: n:1 1, o:1 0, ap:1 1, sta:1 0, prof:1<br class="">I (4841) wifi: state: init -> auth (b0)<br class="">I (4841) wifi: state: auth -> auth (4a0)<br class="">OVMS><br class=""><br class="">_______________________________________________<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=""></blockquote>_______________________________________________<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=""></blockquote><br class="">_______________________________________________<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></div></blockquote></div><br class=""></div></div></body></html>