-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Connecting to open Wi-Fi networks broken in 8.0, buggy in 7.3.3 #6897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This sounds very similar to the behavior I’m getting on my Adafruit feather esp32-s2 except I’m not even using WiFi in my code, I’m using lora. adafruit/Adafruit_CircuitPython_RFM9x#81 Every other save seems to be a common issue. I was getting double outputs to repl on my rp2040 feather too. Things happening in sets of 2 all over the place lately. I’ve written in some error handling that’s preventing the program from crashing the script but I’m not getting hard faults on the S2. I was getting hard faults on my UM feather S3 though, to the point I stopped using the S3 and switched to the S2. |
|
As soon as I submitted this I realized the 7.3.3 bug is going to be harder to test because I'm not sure what the issue with that network is. I can probably run Wireshark at the coffee shop and see exactly what the exchange is with the network. It's worth noting that my MacOS system also can't connect to the network, but times out rather than freezing. I'm pretty sure this is a captive portal AP used for setting up IoT devices and doesn't provide real internet. For security research, having the connect() freeze forever with no way of timing out is very limiting. It wasn't clear to me what the "timeout" flag does because it seems to have no effect on this freezing. My concept simply won't work if connecting to a new open Wi-Fi network will sometime cause a freeze with no error. Would it be helpful to confirm what's going on with the network that's causing the issue? If the network isn't providing an IP address, it's worth deciding how CircuitPython should behave in this circumstance to provide the developer with some flexibility in handling a frozen connection. |
Not sure if this is still relevant but I believe a password is required, the field cannot be blank. Unsure if that was ever resolved but it was an issue that prevented many people from joining open wifi networks. I haven't tested it recently though and no idea about its status. |
I don't think that's correct. I am able to join open Wi-Fi networks with no passwords on 7.3.3 with connect() and no password, except for when it's a captive portal type access point that doesn't have internet access. |
@skickar Nice, last I checked on that one was 7.3.2 |
Wi-Fi promiscuous mode also seems to be broken, I can't get this code to output anything in 8.0 after the first run even after reboots:
This also produces no output:
I've replicated this on an Adafruit Metro Express esp32s2 beta. Once I revert to 7.3.3 all commands work fine. The problems I'm seeing with 8.0:
|
@skickar can you file a separate issue for P.S. I just tried a brief run of |
@skickar To avoid an error:
because when the result of the call to wifi.radio.ping() is 'None' (which happens) your code is trying to multiply 1000 with None. Also is good practice to have the call wifi.radio.connect("Virus") be followed by a check if the result of the connect was successful or not. In the case of a successfull connect an IP-address should have been assigned. That could be checked as follows:
|
@skickar please try an 8.0 nightly build (S3 bucket repo) on or after Oct 11, 2022. A lot of bugs were fixed for WiFi on multiple S2 & S3 boards. Please report back. |
I tried this on the tip of I am going to close this for now. Please reopen or resubmit if you still see this problem with the latest 8.0.0. I did not test with 7.3.x. |
CircuitPython version
Code/REPL
Behavior
Using an S2 mini board and CP 8.0:
Attempting to connect to an "OPEN" Wi-Fi network may sometimes succeed the first time, but every other attempt will yield a "ConnectionError: No network with that ssid" error. Tested on multiple types of open networks. Attempting to reconnect can cause a hard crash and reboot to safe mode.
Using an S2 Mini Board and CP 7.3:
Certain types of open Wi-Fi networks (like setup networks for IoT devices) which don't provide internet can cause the "wifi.radio.connect()" command to hang forever. There is no way to detect this kind of network, so if a CP device running 7.3 tries to connect to it, it will freeze without crashing or giving output. Adding a timeout has no effect.
Description
I'm writing code to locate open Wi-Fi networks and attempt to connect to them. This is broken by bugs in CircuitPython 7.3 and 8.0.
In 8.0, attempting to join any open network will cause "ConnectionError: No network with that ssid". Sometimes it will work once, then not again. This can also cause a hard crash.
In 7.3, certain types of open networks (without a real internet connection) will cause "wifi.radio.connect(SSID)" to hang forever while trying to connect. Adding a timeout has no effect, and there is no error thrown.
Additional information

Here is a hard crash in CP 8.0 when trying to connect to open Wi-FiHere is an example of a network that will freeze CP 7.3.3 if it tries to connect
The text was updated successfully, but these errors were encountered: