<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi Mark,<br>
<br>
Yes, all understood (I spent 14 years in wireless network R&D
before retiring last year). Hidden networks have their advantages,
disadvantages, and costs, and some find them useful for avoiding
casual observers from seeing too much. Not everyone is an expert in
InSSIDer and Wireshark, and those that are don't care a lot about
whether the SSID is hidden or not, unless there's another network
that isn't hidden nearby (since it's an easier target). That my
laptop leaks "gregnet" while I'm sitting at the airport 50+ miles
away from home isn't really a problem. <br>
<br>
Regardless, hidden networks are a fact of life; my question was
whether they could be supported in a manner such as phones and
laptops do. If the Expressif APIs don't allow such without a big
drain on resources, or a significant re-coding effort, then I guess
that answers my question. I looked at the docs you referenced
(thanks!), and I don't see a way to cause a probe either. Bummer.<br>
<br>
As I said, it's not a showstopper for me, but I think it will be an
annoyance for some. Could you explain a bit more how one would
implement a geo-triggered script? I can't find the list of
triggers, other than the "Icing" ones you added on 11/8.<br>
<br>
Thanks,<br>
<br>
Greg<br>
<br>
<br>
<div class="moz-cite-prefix">Mark Webb-Johnson wrote:<br>
</div>
<blockquote type="cite"
cite="mid:9419F325-4D3A-4926-97AD-D645D5941196@webb-johnson.net">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Forgot to mention that I found this article on hidden SSIDs that
provides some technical details on how some clients do/don’t
handle them:
<div class=""><br class="">
</div>
<blockquote style="margin: 0 0 0 40px; border: none; padding:
0px;" class="">
<div class=""><a
href="https://lifehacker.com/5636856/is-hiding-your-wireless-ssid-really-more-secure"
class="" moz-do-not-send="true">https://lifehacker.com/5636856/is-hiding-your-wireless-ssid-really-more-secure</a></div>
</blockquote>
<div class=""><br class="">
</div>
<div class="">I’ve always felt this it was a bit of this:</div>
<div class=""><br class="">
</div>
<blockquote style="margin: 0 0 0 40px; border: none; padding:
0px;" class="">
<div class=""><img apple-inline="no"
id="50A81F01-1B63-49E5-A898-4CECF1757388"
src="cid:4A3B90A3-D589-468B-9E1F-6DF9753D8257" class=""
moz-do-not-send="true"></div>
</blockquote>
<div class="">
<div><br class="">
</div>
<div>and never used them myself.</div>
<div><br class="">
</div>
<div>Regards, Mark.</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 4 Dec 2017, at 10:13 AM, Mark Webb-Johnson
<<a href="mailto:mark@webb-johnson.net" class=""
moz-do-not-send="true">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="">
<div class=""><br class="">
</div>
Attached message from 9th November gives more detail on
the way the promiscuous mode wifi client currently
works.
<div class=""><br class="">
</div>
<div class="">That scan approach won’t work for hidden
SSIDs, but it will handle other SSIDs elegantly and
won’t connect to any SSIDs not explicitly configured.</div>
<div class=""><br class="">
</div>
<div class="">I’m really not sure how phones do it, or
how that can be applied to the Espressif ESP-32 wifi
libraries. I don’t think they round-robin connect to
all configured SSIDs, one after the other - imagine
you have dozens of SSIDs (I do); the power consumption
would be horrendous. As you mention, maybe an active
probe, but I can’t find that in the Espressif API:</div>
<div class=""><br class="">
</div>
<blockquote style="margin: 0 0 0 40px; border: none;
padding: 0px;" class="">
<div class=""><a
href="http://esp-idf.readthedocs.io/en/v2.1.1/api-reference/wifi/esp_wifi.html"
class="" moz-do-not-send="true">http://esp-idf.readthedocs.io/en/v2.1.1/api-reference/wifi/esp_wifi.html</a></div>
</blockquote>
<div class=""><br class="">
</div>
<div class="">I don’t see anything in that API other
than the (expensive) connect-to-an-AP in station mode.</div>
<div class=""><br class="">
</div>
<div class="">I’m not overly worried about this at the
moment, as it is relatively simple to switch to a
specific SSID in a one-line script triggered by
geolocation. Most likely users will be controlling
wifi by geolocation / car state anyway. But, if you
have time to look into any better way of doing it,
please have a go.</div>
<div class=""><br class="">
</div>
<div class="">Regards, Mark.</div>
<div class=""><br class="">
</div>
</div>
<span id="cid:53ED4C35-F6DA-4C03-8103-FBD370F12DD9"><[Ovmsdev]
A promiscous wifi client.eml></span>
<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="">
<div class="">
<div class=""><br class="">
<blockquote type="cite" class="">
<div class="">On 3 Dec 2017, at 1:10 PM, Greg D.
<<a href="mailto:gregd2350@gmail.com"
class="" moz-do-not-send="true">gregd2350@gmail.com</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<meta http-equiv="Content-Type"
content="text/html; charset=UTF-8" class="">
<div text="#000000" bgcolor="#FFFFFF" class="">
Hi Mark,<br class="">
<br class="">
Yes, specifying the AP works fine (ignoring
the crash I got when changing APs on the
fly). I certainly don't expect a scan to pick
up a hidden AP, but I do think that connecting
to a hidden one which has been configured
should work the same as a configured one that
is in full peacock mode with its beacons.
Both phones and laptops can; that's what probe
frames are for. <br class="">
<br class="">
Conversely (haven't checked this), we should
not be connecting promiscuously to an AP that
has not been configured. Way too likely to
hit a Hotspot that requires a login / EULA
Acceptance button, and thus breaking a
perfectly good, if slow, LTE connection in
favor of a hot WiFi connection that goes no
where. Not to mention the security angle.<br
class="">
<br class="">
Is the promiscuous connect loop driven from
the results of the scan, or by walking /
probing the list of configured SSIDs? It
should be the later.<br class="">
<br class="">
Greg<br class="">
<br class="">
<br class="">
<div class="moz-cite-prefix">Mark Webb-Johnson
wrote:<br class="">
</div>
<blockquote type="cite"
cite="mid:3CB0CD01-2D8E-4D6C-9FA9-B4F625664894@webb-johnson.net"
class="">
<meta http-equiv="content-type"
content="text/html; charset=UTF-8"
class="">
<div class="">Connecting to a hidden AP
should be just specify the AP ssid:</div>
<div class=""><br class="">
</div>
<div class=""> WiFi mode client
<ssid></div>
<div class=""><br class="">
</div>
<div class="">You won’t be able to see it in
the scan, and won’t be able to
promiscuously connect to it, but you
should be able to directly specify it.</div>
<div class=""><br class="">
</div>
<div class="">So long as you are running
latest firmware and diff sdkconfig and
sdkconfig.defaults is not too far off (pay
attention to Bluetooth), it should work.</div>
<div class=""><br class="">
</div>
<div class="">Regards, Mark</div>
<div class=""><br class="">
On 3 Dec 2017, at 12:11 PM, Greg D. <<a
href="mailto:gregd2350@gmail.com"
moz-do-not-send="true" class="">gregd2350@gmail.com</a>>
wrote:<br class="">
</div>
<blockquote type="cite" class="">
<div class="">
<meta http-equiv="Content-Type"
content="text/html; charset=UTF-8"
class="">
Ah, the proverbial "heap of trouble"...
{ahem} Sorry. Perhaps something to tune
later, or do we need to adjust things
now? <br class="">
<br class="">
So, the original issue - automatically
connecting to a hidden AP- is not
related. It's not a showstopper for me
since I have the dongle, but could be
important for some (e.g. WiFi at home
hidden, work is open). It appears that
the wifi scan code is somewhere in the
ELF library set. Is it worth trying to
dig into it?<br class="">
<br class="">
Greg<br class="">
<br class="">
<br class="">
<br class="">
<div class="moz-cite-prefix">Stephen
Casner wrote:<br class="">
</div>
<blockquote type="cite"
cite="mid:alpine.OSX.2.21.1712021605060.22554@auge.attlocal.net"
class="">
<pre class="" wrap="">Greg,
The crash was in the "new" operation because you ran out of heap
space.
-- Steve
On Sat, 2 Dec 2017, Greg D. wrote:
</pre>
<blockquote type="cite" class="">
<pre class="" wrap="">Hi all,
Is there an easy way to enable the wifi code to connect to an SSID that's known
(configured) but hidden, without directly telling it to? i.e., using 'wifi mode
client' by itself (no SSID specified)?
Some of the places I want to connect to are visible (seen in a scan), but the home
network is hidden. If it helps, running a scan within earshot of the home network
only burps up an error 'wifi: incorrect scan type: 1073583304'.
Greg
p.s. Possibly related, I have the module in my Roadster, connected to the V2 server
via WiFi through a SyncUp Drive OBDII dongle that's being driven by the OBD2ECU
engine. The SyncUp's WiFi hotspot is visible, and I have a startup script that gets
everything going, and the OVMS module auto connects through it. I just tried forcing
the connection over to the home network (wifi mode client gregnet) and after switching
networks and reconnecting to the V2 server, crashed and rebooted (whereupon it
reconnected through the dongle's network). Any ideas?
OVMS > wifi mode client gregnet
Starting WIFI as a client to gregnet...
I (1519905) wifi: ap_loss
I (1519905) wifi: state: run -> init (0)
I (1519905) wifi: pm stop, total sleep time: 0/1415162800
I (1519905) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:1
I (1519915) ovms-server-v2: Disconnected from OVMS Server V2
I (1520415) webserver: Stopping Web Server
I (1520415) telnet: Stopping Telnet Server
I (1520415) ssh: Stopping SSH Server
I (1523025) wifi: n:6 0, o:1 0, ap:255 255, sta:6 0, prof:1
I (1523685) wifi: state: init -> auth (b0)
I (1523685) wifi: state: auth -> assoc (0)
I (1523685) wifi: state: assoc -> run (10)
I (1523715) wifi: connected with gregnet, channel 6
OVMS > I (1524725) event: ip: 10.30.1.102, mask: 255.255.255.0, gw: 10.30.1.1
I (1524725) ovms-mdns: Launching MDNS service
WiFi UP with SSID: gregnet, IP: 10.30.1.102, mask: 255.255.255.0, gw: 10.30.1.1
I (1524735) webserver: Launching Web Server
I (1524745) telnet: Launching Telnet Server
I (1524755) ssh: Launching SSH Server
I (1529915) ovms-server-v2: Connection is <a href="http://tmc.openvehicles.com:6867/" moz-do-not-send="true" class="">tmc.openvehicles.com:6867</a>
ROADSTER_834/Gdbkt2017server
I (1530115) ovms-server-v2: Connected to OVMS Server V2 at <a href="http://tmc.openvehicles.com/" moz-do-not-send="true" class="">tmc.openvehicles.com</a>
I (1530115) ovms-server-v2: Sending server login: MP-C 0 1zyHGC+OXD1EofY2dlH19v
sy8L79oHSah2+yDqliMKTA== ROADSTER_834
I (1530305) ovms-server-v2: Received welcome response MP-S 0 N9H5zlASBHMxtzteFD9WpG
ZoNMc8491dJNxl/x6XSIxg==
I (1530305) ovms-server-v2: Got server response: MP-S 0 N9H5zlASBHMxtzteFD9WpG
ZoNMc8491dJNxl/x6XSIxg==
I (1530315) ovms-server-v2: Server token is N9H5zlASBHMxtzteFD9WpG and digest is
ZoNMc8491dJNxl/x6XSIxg==
I (1530315) ovms-server-v2: Server authentication is successful. Prime the crypto...
I (1530315) ovms-server-v2: Shared secret key is
N9H5zlASBHMxtzteFD9WpG1zyHGC+OXD1EofY2dlH19v (44 bytes)
I (1530315) ovms-server-v2: OVMS V2 login successful, and crypto channel
establishedbort() was called at PC 0x40121ad6 on core 1
0x40121ad6: _Znwj at
/home/ivan/e/crosstool-NG/.build/src/gcc-5.2.0/libstdc++-v3/libsupc++/<a href="http://new_op.cc:54/" moz-do-not-send="true" class="">new_op.cc:54</a>
Backtrace: 0x400886e0:0x3fff8140 0x400887df:0x3fff8160 0x40121ad6:0x3fff8180
0x40121ab5:0x3fff81a0 0x40120200:0x3fff81c0 0x400f998e:0x3fff81f0
0x400f3d3e:0x3fff8290
0x400886e0: invoke_abort at /home/greg/esp/esp-idf/components/esp32/./panic.c:519
0x400887df: abort at /home/greg/esp/esp-idf/components/esp32/./panic.c:519
0x40121ad6: _Znwj at
/home/ivan/e/crosstool-NG/.build/src/gcc-5.2.0/libstdc++-v3/libsupc++/<a href="http://new_op.cc:54/" moz-do-not-send="true" class="">new_op.cc:54</a>
0x40121ab5: _Znaj at
/home/ivan/e/crosstool-NG/.build/src/gcc-5.2.0/libstdc++-v3/libsupc++/<a href="http://new_opv.cc:32/" moz-do-not-send="true" class="">new_opv.cc:32</a>
0x40120200: _ZN10OvmsBuffer10PollSocketEil at/home/greg/greg/ovms/Open-Vehicle-Monitoring-System-3-master/Open-Vehicle-Monitoring-
System-3/vehicle/OVMS.V3/main/./ovms_buffer.cpp:145
0x400f998e: _ZN12OvmsServerV210ServerTaskEv at/home/greg/greg/ovms/Open-Vehicle-Monitoring-System-3-master/Open-Vehicle-Monitoring-
System-3/vehicle/OVMS.V3/components/ovms_server_v2/src/ovms_server_v2.cpp:247
0x400f3d3e: _ZL15OvmsServer_taskPv at/home/greg/greg/ovms/Open-Vehicle-Monitoring-System-3-master/Open-Vehicle-Monitoring-
System-3/vehicle/OVMS.V3/components/ovms_server/./ovms_server.cpp:55
Rebooting...</pre>
<br class="">
<fieldset
class="mimeAttachmentHeader"></fieldset>
<br class="">
<pre class="" wrap="">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.teslaclub.hk" moz-do-not-send="true">OvmsDev@lists.teslaclub.hk</a>
<a class="moz-txt-link-freetext" href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev" moz-do-not-send="true">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a>
</pre>
</blockquote>
</blockquote>
<br class="">
</div>
</blockquote>
<blockquote type="cite" class="">
<div class=""><span class="">_______________________________________________</span><br
class="">
<span class="">OvmsDev mailing list</span><br
class="">
<span class=""><a
href="mailto:OvmsDev@lists.teslaclub.hk"
moz-do-not-send="true" class="">OvmsDev@lists.teslaclub.hk</a></span><br
class="">
<span class=""><a
href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev"
moz-do-not-send="true" class="">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a></span><br
class="">
</div>
</blockquote>
<br class="">
<fieldset class="mimeAttachmentHeader"></fieldset>
<br class="">
<pre class="" wrap="">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.teslaclub.hk" moz-do-not-send="true">OvmsDev@lists.teslaclub.hk</a>
<a class="moz-txt-link-freetext" href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev" moz-do-not-send="true">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a>
</pre>
</blockquote>
<br class="">
</div>
_______________________________________________<br
class="">
OvmsDev mailing list<br class="">
<a href="mailto:OvmsDev@lists.teslaclub.hk"
class="" moz-do-not-send="true">OvmsDev@lists.teslaclub.hk</a><br
class="">
<a
href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev"
class="" moz-do-not-send="true">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a><br
class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a>
<a class="moz-txt-link-freetext" href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a>
</pre>
</blockquote>
<br>
</body>
</html>