With the Google/Cloudflare DNS you can finish the setup?
I was hoping we could omit the DNS question now from the setup, as users likely don't know what that is.
I'll add it to step 2 for now, but with a fixed & labeled selection.
Am 13.05.2018 um 16:36 schrieb Michael Balzer:
My boot without a fixed DNS looks like yours with a fixed one:
I (5066) event: sta ip: 192.168.2.109, mask: 255.255.255.0, gw: 192.168.2.1
I (5066) netmanager: Interface priority is st1 (192.168.2.109/255.255.255.0 gateway 192.168.2.1)
I (5076) netmanager: Set DNS#0 192.168.2.1
I (5076) netmanager: Set DNS#1 192.168.2.1
I (5076) netmanager: Set DNS#2 0.0.0.0
I (5076) netmanager: WIFI client up (with MODEM down): starting network with WIFI client
I (5076) esp32wifi: STA got IP with SSID: WLAN-214677, MAC: 30:ae:a4:37:25:88, IP: 192.168.2.109, mask: 255.255.255.0, gw: 192.168.2.1
I (5076) time: Starting SNTP client
I (5076) ovms-server-v2: Status: Network is up, so attempt network connection
I (6286) ovms-server-v2: Connection is ovms.dexters-web.de:6867 Test1
I (6286) ovms-server-v2: Status: Connecting...
I (6516) ovms-server-v2: Connection successful
I (6516) ovms-server-v2: Status: Logging in...
Is your DNS in the router or behind? The IP and masking looks like it's on another net. If it's on another net, is it possible the first query after the wifi connect is blocked or fails due to some firewall delay?
Regards,
Michael
Am 13.05.2018 um 16:07 schrieb Mark Webb-Johnson:
Definitely something timing related. Even with auto wifi.mode=client, the wifi client comes up on boot, but v2 server can’t connect on first try (but second try works).
This is what I get:
I (7316) event: sta ip: 10.10.41.203, mask: 255.255.248.0, gw: 10.10.40.64I (7326) netmanager: Interface priority is st1 (10.10.41.203/255.255.248.0 gateway 10.10.40.64)I (7326) netmanager: Set DNS#0 10.10.40.64I (7326) netmanager: Set DNS#1 0.0.0.0I (7326) netmanager: Set DNS#2 0.0.0.0I (7326) netmanager: WIFI client up (with MODEM down): starting network with WIFI clientI (7326) esp32wifi: STA got IP with SSID: HIGHWAYS, MAC: 30:ae:a4:43:92:c4, IP: 10.10.41.203, mask: 255.255.248.0, gw: 10.10.40.64I (7326) time: Starting SNTP clientI (7326) ovms-server-v2: Status: Network is up, so attempt network connectionI (7336) webserver: Launching Web ServerI (7376) ssh: Launching SSH ServerI (7386) ovms-server-v2: Status: Network is up, so attempt network connectionI (8396) ovms-server-v2: Connection is api.openvehicles.com:6867 DEVBENCHI (8396) ovms-server-v2: Status: Connecting...I (10396) housekeeping: System considered stable (RAM: 8b=94792-95652 32b=23608)W (25696) ovms-server-v2: Connection failedE (25696) ovms-server-v2: Status: Error: Connection failedI (25696) ovms-server-v2: Status: Disconnected
But, if I config set network dns ‘8.8.8.8 1.1.1.1’, I get:
I (7087) event: sta ip: 10.10.41.203, mask: 255.255.248.0, gw: 10.10.40.64I (7097) netmanager: Interface priority is st1 (10.10.41.203/255.255.248.0 gateway 10.10.40.64)I (7097) netmanager: Set DNS#0 8.8.8.8I (7097) netmanager: Set DNS#1 1.1.1.1I (7107) netmanager: WIFI client up (with MODEM down): starting network with WIFI clientI (7107) esp32wifi: STA got IP with SSID: HIGHWAYS, MAC: 30:ae:a4:43:92:c4, IP: 10.10.41.203, mask: 255.255.248.0, gw: 10.10.40.64I (7107) time: Starting SNTP clientI (7107) ovms-server-v2: Status: Network is up, so attempt network connectionI (7117) webserver: Launching Web ServerI (7137) ssh: Launching SSH ServerI (7157) ovms-server-v2: Status: Network is up, so attempt network connectionI (8387) ovms-server-v2: Connection is api.openvehicles.com:6867 DEVBENCHI (8387) ovms-server-v2: Status: Connecting...I (8617) ovms-server-v2: Connection successfulI (8617) ovms-server-v2: Status: Logging in...
I’m guessing this new ‘stored dns’ is the root of the problem, but really not sure what is going on. The delay is long enough to allow your test to timeout.
Regards, Mark.
On 13 May 2018, at 2:18 AM, Michael Balzer <dexter@expeedo.de> wrote:
_______________________________________________
Am 12.05.2018 um 18:21 schrieb Mark Webb-Johnson:
Did you apply the sdkconfig changes regarding SO_REUSE? I had none such problems after fixing that in my sdkconfig -- I also fixed the defaults in some commit a few days before.
CONFIG_LWIP_SO_REUSE=y
CONFIG_LWIP_SO_REUSE_RXTOALL=yJust double-checked, and yes they are there.
It seems that after connecting to SSID, the attempt to run ‘Ota status’ is immediate, but the wifi client hasn’t settled down yet. I’ve looked in web_cfg_init, but having trouble working out how it works. In the 'if (step == "2.test.connect”)’, it just seems to try to MyOTA.GetStatus as soon as the ssid matches? But it doesn’t check that the wifi client is actually up (the reception of IP address may be a second or two after the SSID is connected, and anyway GetSSID() just returns the configured SSID, not the connected one). Or, maybe I’m missing something?
The state ticker does not check yet if it can abort a scheduled timeout. So it doesn't do the test as soon as GetSSID() returns the network.
The test is done fixed 20 seconds after StartAccessPointClientMode(). That is normally plenty of time for everything to settle. In my runs, the client network was normally fully functional in ~10 seconds.
How long does your APClient switch take? You can try raising the 20 second timeout in line 226.
Regards,
Michael
Regards, Mark
On 12 May 2018, at 11:14 PM, Michael Balzer <dexter@expeedo.de> wrote:
_______________________________________________
Am 12.05.2018 um 15:42 schrieb Mark Webb-Johnson:
Works better, but still causing me issues. I had a couple of times where it took down the whole housekeeping task (with red alerts saying event delivery queue was full so ticker.1 messages couldn’t be delivered). I guess it is doing the wifi connectivity test in the main event task?
Yes, the most time consuming task in there is the OTA.GetStatus() fetching the server version info. But I didn't get any problems from that in all my tests…
The other problem is that the bringing up/down of the APCLIENT vs AP mode doesn’t seem to work properly, so I lose connection to the station. Also, my iPad keeps switching back to home wifi, every time the OVMS reconfigures the network. APCLIENT mode really sucks.
Did you apply the sdkconfig changes regarding SO_REUSE? I had none such problems after fixing that in my sdkconfig -- I also fixed the defaults in some commit a few days before.
CONFIG_LWIP_SO_REUSE=y
CONFIG_LWIP_SO_REUSE_RXTOALL=y
If these are missing, both the webserver and ssh cannot rebind after the switch from AP to APCLIENT.
The switching takes some seconds, but my tablets (all Androids) only switched back to my home network during tests with issues. The normal process is fast enough to keep them on the AP.
Regards,
Michael
I’ll have another look at the wifi driver. Maybe I can improve the API a bit (based on what we have). Perhaps configure a STAtion even in AP mode (which is what I did with my alternative approach before).
Regards, Mark.
On 12 May 2018, at 12:52 AM, Michael Balzer <dexter@expeedo.de> wrote:
Added another fix._______________________________________________
Or more sort of a workaround: I just had an empty server status display on step 4 test after successful connect. I'm not sure how this can happen, I guess it's due to five events being processed at once after the connect (server v2 blocks the mongoose task there) and some race condition in the javascript code in that case.
The three event based status displays now again also do periodic updates every 5 seconds, so if this happens, the status gets updated again after 5 seconds.
Regards,
Michael
Am 11.05.2018 um 18:19 schrieb Michael Balzer:
OK. I really should wait for config.mounted before reading from MyConfig.
Fix is pushed, please try.
Am 11.05.2018 um 17:49 schrieb Mark Webb-Johnson:
I tried a restart. Here is what I get:
Firmware: 3.1.005-72-g8cd4d07/ota_0/mainHardware: OVMS WIFI BLE BT cores=2 rev=ESP32/1
I (1465) webserver: Launching Web ServerI (1465) ssh: Launching SSH ServerI (4185) wifi: ap channel adjust o:1,1 n:6,2I (4185) wifi: n:6 0, o:1 0, ap:6 2, sta:6 0, prof:1I (4945) wifi: state: init -> auth (b0)I (4945) wifi: state: auth -> assoc (0)I (4955) wifi: state: assoc -> run (10)I (5055) wifi: connected with HIGHWAYS, channel 6I (5375) sdcard: SD CARD has been insertedI (5465) sdcard: mount doneI (6025) wpa: PTK has been installed, it may be an attack, ignor it.I (6025) wpa: GTK has been installed, it may be an attack, ignor it.I (8515) wifi: n:6 0, o:6 0, ap:6 2, sta:6 0, prof:6I (8515) wifi: station: cc:44:63:89:b2:f4 join, AID=1, g, 20I (8525) esp32wifi: AP station connected: id: 1, MAC: cc:44:63:89:b2:f4I (9455) event: sta ip: 10.10.41.203, mask: 255.255.248.0, gw: 10.10.40.64I (9455) netmanager: Interface priority is st1 (10.10.41.203/255.255.248.0 gateway 10.10.40.64)I (9455) netmanager: Set DNS#0 10.10.40.64I (9455) netmanager: Set DNS#1 0.0.0.0I (9455) netmanager: Set DNS#2 0.0.0.0I (9455) netmanager: WIFI client up (with MODEM down): starting network with WIFI clientI (9455) esp32wifi: STA got IP with SSID: HIGHWAYS, MAC: 30:ae:a4:43:92:c4, IP: 10.10.41.203, mask: 255.255.248.0, gw: 10.10.40.64I (9455) time: Starting SNTP clientI (10375) housekeeping: System considered stable (RAM: 8b=106112-106940 32b=23608)I (13565) webserver: HTTP GET /I (13575) webserver: HTTP GET /cfg/initI (14825) webserver: HTTP GET /I (15135) webserver: HTTP GET /cfg/initI (15375) simcom: State timeout, transition to 13I (15375) simcom: State: Enter PoweredOff stateI (15375) gsm-mux: Stop MUXI (16695) webserver: HTTP GET /I (16705) webserver: HTTP GET /cfg/initI (16735) webserver: HTTP GET /apple-touch-icon.pngI (16905) webserver: HTTP GET /assets/style.cssI (16905) webserver: HTTP GET /assets/script.jsI (17345) webserver: HTTP GET /cfg/initI (28045) webserver: HTTP POST /cfg/initI (28045) webserver: HandleLogin: 'admin' logged in, sid 98faaa06ed8f1574I (28085) webserver: HTTP GET /cfg/initI (28085) webserver: CfgInit enter 2.test.connectI (28085) webserver: HTTP GET /menuI (40025) webserver: HTTP GET /I (40035) webserver: HTTP GET /cfg/initI (40035) webserver: CfgInit enter 2.test.connectI (40045) webserver: HTTP GET /I (40075) webserver: HTTP GET /apple-touch-icon.pngI (40085) webserver: HTTP GET /assets/style.cssI (40185) webserver: HTTP GET /assets/script.jsI (40355) webserver: HTTP GET /cfg/initI (40355) webserver: CfgInit enter 2.test.connectOVMS> enablePassword:Secure mode
I (50425) webserver: HTTP GET /I (50425) webserver: HTTP GET /cfg/initI (50425) webserver: CfgInit enter 2.test.connectI (50465) webserver: HTTP GET /apple-touch-icon.pngI (50475) webserver: HTTP GET /assets/style.cssI (50555) webserver: HTTP GET /assets/script.jsI (50675) webserver: HTTP GET /cfg/initI (50675) webserver: CfgInit enter 2.test.connectOVMS# ota statusRunning partition: ota_0Boot partition: ota_0Firmware: 3.1.005-72-g8cd4d07/ota_0/main (build idf v3.1-dev-454-gdaef4b5c May 11 2018 20:00:05)Server Available: 3.1.005
OTA release providing minor improvements and fixes.
- Vehicle: 12V battery monitoringvehicle [12v.alert] = 1.6 Voltage drop alert threshold in V vs. reference- OTA: automatic daily firmware updates (wifi only)auto [ota] = yes Enable/disableota [auto.hour] = 2 Hour for daily check- Logging: persistent configuration, file cycling, web config UI:log [file.enable] = no Enable/disable file logginglog [file.maxsize] = 1024 Max log file size in kB, 0 = no cyclinglog [file.path] = "" Log path, if on /sd watches sd.mountedlog [level] Default levellog [level.<tag>] Component levels- Reverse Engineering Tools enhancements- Tesla Roadster CAC support- Miscellaneous bug fixes and enhancements
I (61705) webserver: HTTP GET /I (61715) webserver: HTTP GET /cfg/initI (61715) webserver: CfgInit enter 2.test.connectI (61745) webserver: HTTP GET /apple-touch-icon.pngI (61755) webserver: HTTP GET /assets/style.cssI (61845) webserver: HTTP GET /assets/script.jsI (61965) webserver: HTTP GET /cfg/initI (61965) webserver: CfgInit enter 2.test.connectI (72035) webserver: HTTP GET /I (72045) webserver: HTTP GET /cfg/initI (72045) webserver: CfgInit enter 2.test.connectI (72085) webserver: HTTP GET /apple-touch-icon.pngI (72095) webserver: HTTP GET /assets/style.cssI (72175) webserver: HTTP GET /assets/script.jsI (73485) webserver: HTTP GET /cfg/initI (73495) webserver: CfgInit enter 2.test.connect
OVMS# config list autoauto (readable writeable)wifi.mode: apclientwifi.ssid.ap: DEVBENCHwifi.ssid.client: HIGHWAYS
OVMS# config list modulemodule (readable writeable)init: 2.test.connect
Regards, Mark
On 11 May 2018, at 10:42 PM, Michael Balzer <dexter@expeedo.de> wrote:
Do you have the earlier log, especially of the CfgInit ticker messages?_______________________________________________
Is the auto config correct and matching the "HIGHWAY" network?
Please try a reboot. The ticker should take on step "2.test.connect" and proceed.
Am 11.05.2018 um 16:28 schrieb Mark Webb-Johnson:
Trying the new web setup, but not getting very far…
I (503580) webserver: HTTP GET /I (503590) webserver: HTTP GET /cfg/initI (503590) webserver: CfgInit enter 2.test.connectI (503610) webserver: HTTP GET /apple-touch-icon.pngI (503610) webserver: HTTP GET /assets/style.cssI (503730) webserver: HTTP GET /assets/script.jsI (503880) webserver: HTTP GET /cfg/initI (503880) webserver: CfgInit enter 2.test.connectI (513960) webserver: HTTP GET /cfg/initI (513960) webserver: CfgInit enter 2.test.connectI (513960) webserver: HTTP GET /I (514000) webserver: HTTP GET /apple-touch-icon.pngI (514000) webserver: HTTP GET /assets/style.cssI (514090) webserver: HTTP GET /assets/script.jsI (514220) webserver: HTTP GET /cfg/initI (514220) webserver: CfgInit enter 2.test.connectI (524280) webserver: HTTP GET /I (524290) webserver: HTTP GET /cfg/initI (524290) webserver: CfgInit enter 2.test.connectI (524320) webserver: HTTP GET /apple-touch-icon.pngI (524340) webserver: HTTP GET /assets/style.cssI (524420) webserver: HTTP GET /assets/script.jsI (524590) webserver: HTTP GET /cfg/initI (524590) webserver: CfgInit enter 2.test.connectI (534620) webserver: HTTP GET /I (534630) webserver: HTTP GET /cfg/initI (534630) webserver: CfgInit enter 2.test.connectI (534660) webserver: HTTP GET /apple-touch-icon.pngI (534660) webserver: HTTP GET /assets/style.cssI (534760) webserver: HTTP GET /assets/script.jsI (534890) webserver: HTTP GET /cfg/initI (534890) webserver: CfgInit enter 2.test.connectI (544940) webserver: HTTP GET /I (544950) webserver: HTTP GET /cfg/initI (544950) webserver: CfgInit enter 2.test.connectI (544980) webserver: HTTP GET /assets/style.cssI (544990) webserver: HTTP GET /apple-touch-icon.pngI (545080) webserver: HTTP GET /assets/script.jsI (545250) webserver: HTTP GET /cfg/initI (545250) webserver: CfgInit enter 2.test.connect
OVMS# wifi statusWiFiPower: onMode: Access-Point + Client mode
STA SSID: HIGHWAYSMAC: 30:ae:a4:43:92:c4IP: 10.10.41.203/255.255.248.0GW: 10.10.40.64
AP SSID: DEVBENCHMAC: 30:ae:a4:43:92:c5IP: 192.168.4.1AP Stations: 11: MAC: cc:44:63:89:b2:f4, IP: 192.168.4.2
OVMS# ota statusRunning partition: ota_0Boot partition: ota_0Firmware: 3.1.005-72-g8cd4d07/ota_0/main (build idf v3.1-dev-454-gdaef4b5c May 11 2018 20:00:05)Server Available: 3.1.005
…
I (1141850) webserver: HTTP GET /I (1141860) webserver: HTTP GET /cfg/initI (1141860) webserver: CfgInit enter 2.test.connectI (1141890) webserver: HTTP GET /apple-touch-icon.pngI (1141890) webserver: HTTP GET /assets/style.cssI (1141990) webserver: HTTP GET /assets/script.jsI (1142120) webserver: HTTP GET /cfg/initI (1142120) webserver: CfgInit enter 2.test.connect
Can’t get out of that 2.test.connect.
Any ideas?
Regards, Mark.
_______________________________________________ OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
OvmsDev mailing list
OvmsDev@lists.openvehicles.com
http://lists.openvehicles.com/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
_______________________________________________ OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
OvmsDev mailing list
OvmsDev@lists.openvehicles.com
http://lists.openvehicles.com/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
OvmsDev mailing list
OvmsDev@lists.openvehicles.com
http://lists.openvehicles.com/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
OvmsDev mailing list
OvmsDev@lists.openvehicles.com
http://lists.openvehicles.com/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
_______________________________________________ OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
_______________________________________________ OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26