nerves-project-attic / nerves_interim_wifi

**Deprecated** Connect to WiFi networks on Nerves platforms
Apache License 2.0
21 stars 7 forks source link

CTRL-EVENT-NETWORK-NOT-FOUND for hidden networks #17

Open drobakowski opened 7 years ago

drobakowski commented 7 years ago

Trying to connect to a hidden network results in a CTRL-EVENT-NETWORK-NOT-FOUND errors. After reconfiguring the network to not hide its SSID my RPi can successfully connect to it: 00:14:50.965 [info] WiFiManager(wlan0, associate_wifi) got event :wifi_connected.

I'm running Erlang 19.3 / Elixir 1.4.4 & target=rpi / 8192cu with the following configuration:

deps in mix.exs:

{:nerves_runtime, "~> 0.1.0"},
{:nerves_system_rpi, "~> 0.12.0", runtime: false},
{:nerves_interim_wifi, "~> 0.2.0"},
{:nerves_firmware_http, "~> 0.4"},
{:poison, "~> 3.1"}

mix.lock:

...
nerves: 0.5.2
nerves_system_br: 0.10.1
...

config.exs:

config :test_app, :wlan0,
    ssid: "<some SSID>",
    key_mgmt: :"WPA-PSK",
    psk: "<some secret>"

config :nerves_interim_wifi,
    regulatory_domain: "DE"
GregMefford commented 7 years ago

Thanks for reporting this problem! 🎈 My guess is that we're not properly handling the case where the SSID is hidden and we expect it to be present in one of the data structures.

We have recently been working on consolidating and improving the Nerves networking code into a different library found here: https://github.com/nerves-project/nerves_network

Would you be willing to try that out instead of InterimWiFi and see if you have the same problem? The code is somewhat significantly different than InterimWiFi, so I'd prefer to focus our efforts there.

hefanbo commented 6 years ago

I have no idea what this project is about but Google brought me here when I was trying to deal with CTRL-EVENT-NETWORK-NOT-FOUND errors. Finally, this link solved my problem. The key point is scan_ssid=1.

GregMefford commented 6 years ago

Thank you for taking the time to report this, @hefanbo! Now that we have the clue, we can pretty easily test that this is working on nerves_network and make the adjustment as needed.