<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Re:
<a class="moz-txt-link-freetext" href="https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/issues/127">https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/issues/127</a><br>
<br>
I've pushed my solution in commit
d1f466d9a7fac6afbb4b768425164c9b367aca1a.<br>
<br>
Please check how this works for your setups.<br>
<br>
It normally doesn't need any manual control, the shell commands were
a by-product, but may be useful. Example:<br>
<blockquote><tt>OVMS# net list</tt><br>
<tt>ID Flags Handler Local Remote</tt><br>
<tt>3f81ddf0 00000000 3f821380 192.168.2.101:80
192.168.2.107:48840</tt><br>
<tt>3f81ce3c 00000100 3f81b708 192.168.4.1:80
192.168.4.2:45516</tt><br>
<tt>3f81d1e8 00000100 3f81def8 192.168.2.101:80
192.168.2.107:48814</tt><br>
<tt>3f81b538 00000000 00000000 192.168.2.101:54799
188.138.75.229:6867</tt><br>
<tt>3f81b098 00000000 3f81bfb8 192.168.2.101:22
192.168.2.107:55362</tt><br>
<br>
<tt>OVMS# net close 3f81b098</tt><br>
<tt>Close signal sent to 1 connection(s)</tt><br>
<br>
<tt>OVMS# net list</tt><br>
<tt>ID Flags Handler Local Remote</tt><br>
<tt>3f81bb84 00000000 3f81e3ac 192.168.2.101:80
192.168.2.107:48844</tt><br>
<tt>3f81ce3c 00000100 3f81b708 192.168.4.1:80
192.168.4.2:45516</tt><br>
<tt>3f81d1e8 00000100 3f81def8 192.168.2.101:80
192.168.2.107:48814</tt><br>
<tt>3f81b538 00000000 00000000 192.168.2.101:54799
188.138.75.229:6867</tt><br>
</blockquote>
Issuing "net close 0" closes all connections.<br>
<br>
An automatic cleanup log looks like this for an AP station
disconnect:<br>
<blockquote><tt>I (143741) wifi: station: 30:75:12:f5:71:c7 leave,
AID = 1</tt><br>
<tt>I (143791) wifi: n:11 0, o:11 0, ap:11 2, sta:11 0, prof:11</tt><br>
<tt>I (143791) events: Signal(system.event)</tt><br>
<tt>I (143881) events: Signal(system.wifi.ap.sta.disconnected)</tt><br>
<tt>I (143931) netmanager: WIFI access point station disconnected</tt><br>
<tt>D (143981) netmanager: send cmd 3 from 0x0</tt><br>
<tt>D (144041) netmanager: done cmd 3 from 0x0</tt><br>
<tt>I (144091) esp32wifi: AP station disconnected: id: 1, MAC:
30:75:12:f5:71:c7</tt><br>
<tt>D (144351) netmanager: MongooseTask: got cmd 3 from 0x0</tt><br>
<tt>D (144391) netmanager: CleanupConnections: conn 3f81e010 ->
iface ap2</tt><br>
<tt>I (144441) netmanager: CleanupConnections: closing conn
3f81e010: AP peer disconnected</tt><br>
<tt>D (144491) netmanager: CleanupConnections: conn 3f81bb2c ->
iface ap2</tt><br>
<tt>I (144531) netmanager: CleanupConnections: closing conn
3f81bb2c: AP peer disconnected</tt><br>
<tt>D (144591) netmanager: CleanupConnections: conn 3f81bd08 ->
iface ap2</tt><br>
<tt>I (144641) netmanager: CleanupConnections: closing conn
3f81bd08: AP peer disconnected</tt><br>
<tt>D (144681) netmanager: CleanupConnections: conn 3f81d1e8 ->
iface st1</tt><br>
<tt>D (144731) netmanager: CleanupConnections: conn 3f81baa0 ->
iface st1</tt><br>
<tt>D (144771) netmanager: CleanupConnections: conn 3f81b538 ->
iface st1</tt><br>
<tt>D (144821) netmanager: CleanupConnections: conn 3f81b098 ->
iface st1</tt><br>
<tt>D (144871) netmanager: MongooseTask: done cmd 3 from 0x0</tt><br>
<tt>D (145191) websocket: WebSocket connection 0x3f81ce3c closed;
1 clients active</tt><br>
</blockquote>
<br>
…and like this for a client network disconnect:<br>
<blockquote><tt>I (535888) wifi: bcn_timout,ap_probe_send_start</tt><tt><br>
</tt><tt>I (538398) wifi: ap_probe_send over, resett wifi status
to disassoc</tt><tt><br>
</tt><tt>I (538398) wifi: state: run -> init (1)</tt><tt><br>
</tt><tt>I (538398) wifi: pm stop, total sleep time: 196172381 us
/ 249569092 us</tt><tt><br>
</tt><tt>I (538398) wifi: n:11 0, o:11 2, ap:11 2, sta:11 2,
prof:11</tt><tt><br>
</tt><tt>I (538408) netmanager: Interface priority is pp3
(10.170.195.13/255.255.255.255 gateway 10.64.64.64)</tt><tt><br>
</tt><tt>I (538408) netmanager: Set DNS#0 212.9.0.135</tt><tt><br>
</tt><tt>I (538408) netmanager: Set DNS#1 212.9.0.136</tt><tt><br>
</tt><tt>I (538408) netmanager: Set DNS#2 0.0.0.0</tt><tt><br>
</tt><tt>I (538408) netmanager: WIFI client down (with MODEM up):
reconfigured for MODEM priority</tt><tt><br>
</tt><tt>D (538408) netmanager: send cmd 3 from 0x0</tt><tt><br>
</tt><tt>D (538408) netmanager: done cmd 3 from 0x0</tt><tt><br>
</tt><tt>I (538408) esp32wifi: STA disconnected with reason 200</tt><tt><br>
</tt><tt>I (538408) time: Network was reconfigured: restarting
SNTP client</tt><tt><br>
</tt><tt>I (538418) ovms-server-v2: Network was reconfigured:
disconnect, and reconnect in 10 seconds</tt><tt><br>
</tt><tt>I (538418) ovms-server-v2: Status: Network was
reconfigured: disconnect, and reconnect in 10 seconds</tt><tt><br>
</tt><tt>I (538558) ovms-server-v2: Status: Disconnected</tt><tt><br>
</tt><tt>D (538558) netmanager: MongooseTask: got cmd 3 from 0x0</tt><tt><br>
</tt><tt>D (538558) netmanager: CleanupConnections: conn 3fff2854
-> no iface</tt><tt><br>
</tt><tt>I (538568) netmanager: CleanupConnections: closing conn
3fff2854: interface/link down</tt><tt><br>
</tt><tt>D (538578) netmanager: CleanupConnections: conn 3fff514c
-> no iface</tt><tt><br>
</tt><tt>I (538578) netmanager: CleanupConnections: closing conn
3fff514c: interface/link down</tt><tt><br>
</tt><tt>D (538588) netmanager: CleanupConnections: conn 3fff5054
-> no iface</tt><tt><br>
</tt><tt>I (538588) netmanager: CleanupConnections: closing conn
3fff5054: interface/link down</tt><tt><br>
</tt><tt>D (538588) netmanager: MongooseTask: done cmd 3 from 0x0</tt><tt><br>
</tt><tt>D (538598) websocket: WebSocket[0x3fff2854] handler
0x3ffdff20 closed; 0 clients active</tt><br>
</blockquote>
<br>
Regards,<br>
Michael<br>
<br>
<pre class="moz-signature" cols="160">--
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
</pre>
</body>
</html>