Scott Shawcroft
c13ca95da1
Add MDNS support to Pico W
...
This adds both cpy-MAC.local and circuitpython.local support.
Fixes #7214
2022-11-28 16:15:28 -08:00
Scott Shawcroft
ad2d190507
Merge pull request #7247 from tannewt/picow_web_workflow
...
Enable* web workflow for Pico W
2022-11-28 14:19:42 -08:00
Dan Halbert
17be447c4b
correct Radio.connect() and .start_ap() signatures; clean up some code
2022-11-22 17:11:03 -05:00
Scott Shawcroft
c3a96a63c0
Enable* web workflow for Pico W
...
* Except for circuitpython.local which depends on MDNS and will be
done in a follow up PR.
Progress on #7214
2022-11-21 16:24:05 -08:00
Bill Sideris
6954e569b7
since it ain't leaving..
2022-11-15 00:05:01 +02:00
Bill Sideris
6ad61a3fd1
Radio.c work
2022-11-14 19:31:18 +02:00
Bill Sideris
2e6dd1bf1f
Radio.c no longer needs ping.h
2022-11-14 18:36:42 +02:00
Bill Sideris
e6a4e2982f
Update ports/raspberrypi/common-hal/wifi/Radio.c
...
u32_t -> uint32_t
Co-authored-by: MicroDev <70126934+MicroDev1@users.noreply.github.com>
2022-11-11 14:40:47 +02:00
Bill Sideris
0bf9df232a
fix debug
2022-11-11 14:17:57 +02:00
Jeff Epler
8bef4282c0
pico w: implement static configuration methods in wifi.Radio
2022-10-19 20:54:53 -05:00
Dan Halbert
08e1cdb282
Merge pull request #7079 from jepler/picow-2xmss
...
Pico W grab bag
2022-10-19 15:03:00 -04:00
Jeff Epler
6e350a65cf
Merge pull request #7076 from bill88t/early-wifi
...
Implement async wifi connection on picow
2022-10-17 19:54:58 -05:00
Jeff Epler
3b7feccd9b
picow: Implement stop_station
...
Weirdly we have to stop the AP too (which we never started),
or cyw43_tcpip_link_status still reports that STA is connected.
As long as AP mode isn't implemented, this doesn't matter and
we can just do it.
2022-10-17 19:42:10 -05:00
Bill Sideris
47c373e67e
Use cyw43_tcpip_link_status
instead
2022-10-17 18:33:32 +03:00
Bill Sideris
bce024f59e
Implement async wifi connection on picow
2022-10-17 18:17:14 +03:00
Jeff Epler
47541afc7c
picow: ask at a lower level if the interface is up
...
Closes : #7072
```
Adafruit CircuitPython 8.0.0-beta.2-9-g5192082e64-dirty on 2022-10-17; Raspberry Pi Pico W with rp2040
>>> import wifi
>>> print(wifi.radio.ipv4_address)
None
>>> import os
>>> wifi.radio.connect(os.getenv('WIFI_SSID'), os.getenv('WIFI_PASSWORD'))
>>> print(wifi.radio.ipv4_address)
10.0.2.94
```
2022-10-17 10:08:50 -05:00
Dan Halbert
747dc7746d
handle scan channel bounds but note they do nothing for RP2040 CYW43
2022-10-07 16:22:17 -04:00
Jeff Epler
d3e85d165e
Set cyw43 power management as needed, default to disabled
...
.. the value actually needs to be enforced each time the STA or AP
is enabled, because internally there's a call to cyw43_wifi_pm with the
library's defaut power management value, not ours.
Add a getter, though it only returns our idea of what the power
management register is set to, it doesn't read out from the actual
hardware, sadly.
2022-10-01 08:20:34 -05:00
Jeff Epler
afc1c0e3bb
Fix unused variable diagnostics, make it a fatal error
2022-09-30 11:19:22 -05:00
Jeff Epler
37620d4eb0
Fix several classes of compiler diagnostic & make fatal
...
* -Wno-nested-externs
* -Wno-strict-prototypes
* -Wno-double-promotion
* -Wno-sign-compare
2022-09-30 11:19:22 -05:00
Jeff Epler
2c9c6fc80e
Remove unused static functions
2022-09-30 11:19:21 -05:00
Jeff Epler
0912889106
raspberrypi: statically allocate storage for hostname
2022-09-30 10:05:11 -05:00
Jeff Epler
56f9f0d136
add tx power get/set
2022-09-29 10:02:19 -05:00
Jeff Epler
71a00157ba
Add hostname setting
2022-09-29 10:02:19 -05:00
Jeff Epler
6189156a0b
Add missing NotImplementedErrors
2022-09-28 14:38:12 -05:00
Jeff Epler
4380292848
comment why not actually reset wifi
2022-09-28 14:38:11 -05:00
Jeff Epler
a7a1bd7880
Implement DNS resolution
...
```
>>> s = socketpool.SocketPool(wifi.radio)
>>> s.getaddrinfo("google.com", 80)
[(0, 0, 0, '', ('142.250.81.206', 80))]
```
2022-09-28 10:06:33 -05:00
Jeff Epler
6c3cdceb45
Implement scan, connect, ping
...
My pings go out, and then they come back
```py
import os
import wifi
import ipaddress
wifi.radio.connect(os.getenv('WIFI_SSID'), os.getenv('WIFI_PASSWORD'))
ipv4 = ipaddress.ip_address("8.8.4.4")
print("Ping google.com: %f ms" % (wifi.radio.ping(ipv4)*1000))
```
2022-09-28 10:06:33 -05:00