This contraption arrived today; it seems that the firmware paint isn't quite dry. For a start, if I connect with
Code: Select all
import network
sta_if = network.WLAN(network.STA_IF)
ap = network.WLAN(network.AP_IF) # create access-point interface
ap.active(False) # deactivate the interface
if not sta_if.isconnected():
print('connecting to network...')
sta_if.active(True)
sta_if.connect('network_name', 'password')
while not sta_if.isconnected():
pass
print('network config:', sta_if.ifconfig())
a = sta_if.config('mac')
print('MAC {:02x}:{:02x}:{:02x}:{:02x}:{:02x}'.format(a[0],a[1],a[2],a[3],a[4]))
I get
Code: Select all
network config: ('0.0.0.0', '75.255.1.0', '1.0.0.0', '113.154.0.16')
which is nonsense. I get different nonsense a few seconds later:
Code: Select all
>>> sta_if.ifconfig()
('0.0.0.0', '3.82.0.16', '0.0.0.0', '0.0.0.0')
Compare with a valid config e.g. ESP32:
Code: Select all
network config: ('192.168.0.36', '255.255.255.0', '192.168.0.1', '208.67.220.220')
Regarding
mqtt_as the nonblocking socket produces OSError -110 on occasion. If I modify the code to ignore these errors,
mqtt_as runs for about 20s when the WiFi gets dropped. It recovers and resumes operation, but
sta_if.isconnected() suddenly returns
False after another 20s for no apparent reason. The RSSI is good and an ESP32 in the same room runs fine. The WiFi stays up if I don't actually use it...
I'll see if I can produce a simple test case to raise an issue. Has anyone else observed WiFi issues with this board?
I've moved this thread to the Raspberry Pi subforum where it is more likely to be seen by other users.