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