-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Tested on Metro ESP32-S2 and MagTag. This was also present in a debug firmware for MagTag provided by @tannewt on 17 Nov 2020.
On CircuitPython-6.1.0-beta.0, the wifi
module will sometimes hard-reset on wifi.radio.connect()
, using a small connect script (*) This seems to only occur on Ctrl-D and save-on-reload restarts. When starting from hardware reset / power-on, the script works.
Also on CP-6.1.0-beta.0, it seems the ESP32-S2 WiFi cannot connect to APs that are not DHCP servers (but instead use a DHCP server over LAN). I have two APs on my network: one is the router and DHCP server, another is secondary AP (with different SSID) on the same LAN as the DHCP server. The ESP32-S2 CP can connect to the primary AP that's the DHCP server, but will error out with Connection Error: Unknown failure
on the secondary AP. This almost feels like the ESP32-S2 is timing out early for a DHCP response.
*e.g. a script such as:
import wifi
for network in wifi.radio.start_scanning_networks():
print("\t'%s'\t\tRSSI: %d\tChannel: %d" % (network.ssid, network.rssi, network.channel))
wifi.radio.stop_scanning_networks()
print("connecting...")
wifi.radio.connect(ssid="mysssid", password="supersecret")
print("connected.")