forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Milestone
Description
CircuitPython version
Adafruit CircuitPython 9.2.0-beta.1 on 2024-10-11; Raspberry Pi Pico W with rp2040
Code/REPL
#import helpers
#helpers.connect() connect to AP with wifi.radio.connect
import wifi
wifi.radio.dns
wifi.radio.dns = ('8.8.8.8',)
Behavior
>>> import helpers
>>> helpers.connect()
connecting to AP wlan-xxx ...
connected: False
Unbekannter Fehler 205
connected: True
>>> import wifi
>>> wifi.radio.dns
('10.1.2.1',)
>>> wifi.radio.dns = ('8.8.8.8',)
[16:30:07.695] Disconnected
[16:30:08.697] Warning: Could not open tty device (No such file or directory)
[16:30:08.697] Waiting for tty device..
[16:30:10.699] Warning: Could not open tty device (Permission denied)
[16:30:10.699] Waiting for tty device..
[16:30:11.703] Connected
Automatisches Neuladen ist deaktiviert.
Sicherheitsmodus aktiv! Gespeicherter Code wird nicht ausgeführt
Sie befinden sich im abgesicherten Modus, weil:
Der CircuitPython-Kerncode ist hart abgestürzt. Hoppla!
Hard fault: memory access or instruction error.
Reiche bitte ein Problem mit deinem Programm bei github.com/adafruit/circuitpython/issues ein.
Drücke Reset, um den Sicherheitsmodus zu beenden.
Drücke eine beliebige Taste um REPL zu betreten. Drücke STRG-D zum neuladen.
Adafruit CircuitPython 9.2.0-beta.1 on 2024-10-11; Raspberry Pi Pico W with rp2040
>>>
Description
When setting wifi.radio.dns
the device goes into safe-mode.
BTW: setting with wifi.radio.dns = ["8.8.8.8"]
is even worse, the system does not even boot and reconnect again.
As a side note: the documentation of wifi.radio.dns
could be more explicit about the argument: it is currently documented as Sequence[str]
, but in fact it must be currently a sequence of length zero or one. Also, think about the consistency of the API: all other methods of wifi.radio
that take an IP as argument expect an instance of ipaddress.IPv4Address
.
Additional information
No response