Commit graph

125 commits

Author SHA1 Message Date
Dan Halbert
1ff3dff298 add wifi.radio.power_management et al 2025-04-19 21:06:19 -04:00
Dan Halbert
97d037b3c4 wip 2025-04-14 20:27:53 -04:00
Scott Shawcroft
e277540f7a
Switch to ruff like MicroPython 2025-02-05 11:09:15 -08:00
Dan Halbert
fb9a16d4f1 shared-bindings/wifi/Radio.c: fix default values for start_dhcp_client args 2024-10-23 09:25:54 -04:00
Daniel Dunn
fc6a34459c Manually fix white space formatting 2024-08-05 18:14:50 -06:00
Daniel Dunn
41246c9162 Suggested changes 2024-08-05 17:52:48 -06:00
Daniel Dunn
61201a3dc4 Try to fix formatting 2024-08-05 17:50:27 -06:00
Daniel Dunn
52374ad738 Use the existing "can't set attribute" string 2024-07-31 20:24:50 -06:00
Daniel Dunn
42da6f9d69 radio.listen_interval unconditional regardless of port 2024-07-31 17:14:18 -06:00
Daniel Dunn
e7b4522d66 Wifi listen interval 2024-07-30 22:12:25 -06:00
21a5c93ada IPv6: improvments based on review notes
* don't enable ipv6 by default due to privacy concerns
 * move list of board support for ipv6 to socketpool documentation
 * removed wifi.supports_ipvx properties
 * throw an exception when start_dhcp_client(ipv6=True) but not supported
2024-07-23 14:18:03 -05:00
aa82a3e733 Radio.start_dhcp: finish documentation. 2024-07-22 16:38:48 -05:00
34bee59920 espressif: actually disable v6 support on select boards 2024-07-22 12:46:56 -05:00
5ffc4b2f4f Tick more boxes on the TODO list
* v6 on by default
 * dhcp can start v4 & v6 separately
 * self documenting property for v4 & v6 support
   * v4 support is always on .. for now
2024-07-22 10:48:47 -05:00
bc2e6b48fd Finish turning dns into a tuple
to accomodate multiple servers some day
2024-07-22 09:50:27 -05:00
86f7a38ff4 Add wifi.radio.addresses, .addresses_ap, .dns 2024-07-17 12:18:29 -05:00
9088488d1c WIP ipv6 works(-ish)
* metro esp32s2 only, because that's what I had handy
 * nothing is started at boot; I hung it on `start_dhcp()` which is dubious
 * I get a stateless address (which doesn't seem to work) and a dhcpv6 address (which does)

```
>>> wifi.radio.ipv6_addresses
('FE80::7EDF:A1FF:FE00:518C', 'FD5F:3F5C:FE50:0:7EDF:A1FF:FE00:518C')
```

 * depending whether a v4 or v6 dns server is configured, DNS resolution breaks

wrong ipv4_dns is first 4 bytes of the v6 dns server address:
```
>>> wifi.radio.ipv4_dns
253.95.63.92
```

 * I can connect to a v4 or v6 SSH server on the local network and read its banner

>>> s.close(); s = socket.socket(socket.AF_INET6, socket.SOCK_STREAM); s.connect(("fd5f:3f5c:fe50:0:6d9:f5ff:fe1f:ce10", 22))
*** len[0]=28
*** len=28 family=10 port=5632
>>> s.recv_into(buf)
40
>>> bytes(buf)
b'SSH-2.0-OpenSSH_9.2p1 Debian-2+deb12u3\r\n\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
2024-07-17 12:18:29 -05:00
Dan Halbert
a004c1685e espressif ping: reduce wait time on failure^ 2024-06-18 15:53:21 -04:00
Dan Halbert
3f4d9310ff CircuitPython files: replace STATIC with static 2024-05-20 11:02:17 -04:00
Dan Halbert
747b7619ea update headers of most CircuitPython-only files 2024-05-17 14:56:28 -04:00
John Romkey
d1a10a8f42 removed max_stations call - difficult to do properly on Espressif and no one asked for it 2024-02-20 10:02:43 -08:00
John Romkey
b0800eeee8 updated doc string on stations_ap 2024-02-18 21:57:31 -08:00
John Romkey
608c01a4d3 stations_ap now returns None instead of throwing an exception if not in AP mode
return value is now a list of named tuples with three elements

IP address is now None instead of 0.0.0.0 if there's no lease information
2024-02-18 21:47:52 -08:00
774f6ac6ab
Switch to using MP_ERROR_TEXT instead of translate, globally 2023-10-30 09:49:06 +01:00
Scott Shawcroft
e62db5adcd
Fix native property setting from subclass 2023-10-24 16:20:51 -07:00
Scott Shawcroft
9633c4e78f
Merge remote-tracking branch 'adafruit/main' into v1.20-merge 2023-10-11 11:21:57 -07:00
Dan Halbert
4d175ab41a convert to MP_DEFINED_CONST_OBJ_TYPE() 2023-09-19 21:09:29 -04:00
Bill Sideris
e3314ef7a6
Add new picow doc notes 2023-08-23 22:12:19 +03:00
Scott Shawcroft
a2002e364c
Merge pull request #8165 from anecdata/wifi_docs
Networking docs updates: Access Point, MDNS
2023-07-17 14:58:28 -07:00
anecdata
8289722679
docs: wifi.radio.ipv4_address_ap is read-only 2023-07-16 20:35:49 -05:00
anecdata
69d2f5ec2a
formatting fix 2023-07-12 23:53:52 -05:00
anecdata
d4ac8e75e8
raspberrypi: start AP before set IPv4 2023-07-12 23:41:14 -05:00
anecdata
efd4fffea6
start_ap max_connections ignored 2023-07-12 22:49:39 -05:00
Dan Halbert
540bf58102 improve start_ap() doc; make "authmode" use consistent internally 2023-06-22 16:24:18 -04:00
anecdata
b0e0b4adce ap channel validation 2023-06-15 20:20:17 -05:00
anecdata
82c173e8cf assuming the answer to that is 'yes' 2023-05-08 14:26:01 -05:00
anecdata
d78e5bd64c fix accidental indent 2023-05-08 14:18:06 -05:00
anecdata
7581d3d0b0 Fix docstring 2023-05-08 13:30:32 -05:00
anecdata
2f2a9e7e28 Allow Access Point static IPv4 on the espressif port. 2023-05-08 13:25:52 -05:00
Dan Halbert
df41bd9ead change hex radio password validation; add password length doc 2023-04-20 09:47:25 -04:00
Richard Ellis
ec78a23a56 Code changes to allow 64 character hex WiFi passwords to be used with
wifi.radio.connect.

Fixes adafruit/circuitpython#7677.
2023-04-15 22:54:57 -04:00
Dan Halbert
5c429320a8 Add wifi.radio.connected, wifi.radio.ap_active 2023-03-31 17:57:53 -04:00
Dan Halbert
a974402542 Improve type validation errors messages, especially for pins 2023-01-10 15:02:55 -05:00
Dan Halbert
03b43b7b3f complete rework for microcontroller.cpu.frequency and wifi.radio MAC addresses 2023-01-02 11:45:58 -05:00
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
Dan Halbert
17be447c4b correct Radio.connect() and .start_ap() signatures; clean up some code 2022-11-22 17:11:03 -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
Dan Halbert
21c0c4c1a6 update esp-idf; allow start/stop channels in wifi scanning 2022-10-07 15:29:09 -04:00
907c5d387f
Tweak black_bindings
Originally, black_bindings found each contiguous "//|" block and sent
it to black independently. This was slower than it needed to be.

Instead, swap the comment prefix: when running black, take off
"//|" prefixes and put "##|" prefixes on all un-prefixed lines.
Then, after black is run, do the opposite operation

This more than doubles the overall speed of "pre-commit run --all",
from 3m20s to 55s CPU time on my local machine (32.5s to under 10s
"elapsed" time)

It also causes a small amount of churn in the bindings, because
black now sees enough context to know whether one 'def' follows another
or ends the 'def's in a 'class'. In the latter case, it adds an extra
newline, which becomes a "//|" line.

I'm less sure why a trailing comma was omitted before down in
rp2pio/StateMachine.c but let's roll with it.
2022-09-30 11:18:13 -05:00
Dan Halbert
db065a299f
Merge pull request #6933 from jepler/🥧🐮
Implement a useful subset of `wifi` and `socketpool` modules on 🥧🐮
2022-09-28 18:09:24 -04:00