[Ovmsdev] Wifi: Support APCLIENT mode (for Access-Point + Client)

Michael Balzer dexter at expeedo.de
Fri Mar 16 07:12:08 HKT 2018


Very cool indeed, thanks! :)

And everything perfect on the web UI & auto init.

Regards,
Michael


Am 14.03.2018 um 04:29 schrieb Mark Webb-Johnson:
>
> I’ve added support for a new wifi mode ‘apclient’. This takes AP and STA mode SSIDs, and sets up as both an access point and a client.
>
> Some caveats:
>
>  1. There seems to be a problem coming out of the mode (wifi mode off, etc). The network interfaces are not torn down correctly every time. Symptom is the
>     client comes up, wifi shows an IP address on it, but the address is not set correctly on the ’st’ network interface. Reproducibility is random (maybe
>     interface order related?). Not sure if this is my fault, or a bug in the framework. A 'module reset’ works around the problem ;-)
>
>  2. I updated Michael’s webserver, and the auto framework, to support this, but I’m not too familiar with that so might have got it wrong.
>
>  3. Wifi sclient style mode (scanning for known SSIDs to join without knowing the _exact_ SSID) is not currently supported. I’m not sure if this can ever be
>     supported properly. The apclient mode works by locking the channel for both the AP and STA to be the same - if we are locked like that, how can we scan
>     across channels?
>
>  4. I’m guessing that ‘wifi scan’ will be similarly restricted, when in ap or apclient modes.
>
>  5. This is not a router. Setting the gateway on the ’st’ interface would be trivial, but I don’t think packets can travel AP -> STA. Doing that would require
>     source-nat, plus packet routing, etc. Routing would be easy, SNAT very nasty.
>
>
> It does look pretty cool, and seems to work well:
>
>     OVMS > network
>     Interface#2: ap
>       IPv4: 192.168.4.1/255.255.255.0 gateway 192.168.4.1
>
>     Interface#1: st
>       IPv4: 10.x.x.x/255.255.255.0 gateway 10.x.x.x
>
>     Interface#0: lo
>       IPv4: 127.0.0.1/255.0.0.0 gateway 127.0.0.1
>
>     DNS: 8.8.8.8 8.8.4.4
>
>     OVMS > wifi
>     WiFi
>       Power: on
>       Mode: Access-Point + Client mode
>
>       STA SSID: MY-STA-SSID
>         MAC: re:da:ct:ed:da:ta
>         IP: 10.x.x.x/255.255.255.0
>         GW: 10.x.x.x
>
>       AP SSID: MY-AP-SSID
>         MAC: da:ta:re:da:ct:ed
>         IP: 10.x.x.x
>         AP Stations: 1
>           1: MAC: da:ta:re:da:ct:ed, IP: 192.168.4.2
>
>
> Enjoy, Mark.
>
>> Begin forwarded message:
>>
>> *Subject: **[openvehicles/Open-Vehicle-Monitoring-System-3] ee023a: Wifi: Support APCLIENT mode (for Access-Point + Cl...*
>> *Date: *14 March 2018 at 11:09:21 AM HKT
>>
>>  Branch: refs/heads/master
>>  Home:   https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3
>>  Commit: ee023a5c8383901da2b190e3a42e94ad49724b07
>>      https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/commit/ee023a5c8383901da2b190e3a42e94ad49724b07
>>  Author: Mark Webb-Johnson <mark at webb-johnson.net <mailto:mark at webb-johnson.net>>
>>  Date:   2018-03-14 (Wed, 14 Mar 2018)
>>
>>  Changed paths:
>>    M vehicle/OVMS.V3/changes.txt
>>    M vehicle/OVMS.V3/components/esp32wifi/src/esp32wifi.cpp
>>    M vehicle/OVMS.V3/components/esp32wifi/src/esp32wifi.h
>>    M vehicle/OVMS.V3/components/ovms_webserver/src/web_cfg.cpp
>>
>>  Log Message:
>>  -----------
>>  Wifi: Support APCLIENT mode (for Access-Point + Client)
>>
>>
>
>
>
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.teslaclub.hk
> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev

-- 
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.teslaclub.hk/pipermail/ovmsdev/attachments/20180316/97f70f98/attachment.html>


More information about the OvmsDev mailing list