Commit Graph

25 Commits

Author SHA1 Message Date
Bill Sideris b8cd6c093f
picow-ap progress 2022-11-17 21:47:39 +02:00
Bill Sideris a234b74e87
Merge branch 'adafruit:main' into picow-ap 2022-11-16 21:32:46 +02: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
paul-1 851c2cd8cb
picow: Add channel setting when starting AP 2022-11-10 17:23:59 +02:00
Bill Sideris 7a50beb67e
PicoW more ap work 2022-10-22 11:58:44 +03:00
Bill Sideris 8cc536bb7f
PicoW start_ap() 2022-10-21 13:20:16 +03: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 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 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