This implements network.ipconfig() and network.WLAN.ipconfig() when the
ninaw10 driver is used for WLAN.
Due to a omission in the ninaw10 driver stack, setting the DNS address has
no effect. But the interface is kept here just in case it's fixed
eventually.
dhcp4 and has_dhcp4 are dummy arguments. Ninaw10 seems to always use DHCP.
Signed-off-by: robert-hh <robert@hammelrath.com>
With these changes IPv6 works on the rp2 port (and possibly others that use
the lwIP socket implementation).
Things that have been tested and work:
- Neighbour solicitation for v6 link local address.
- Ping of v6 link-local address.
- Receiving a SLAAC address via router advertisement.
- Ping a v6 address allocated via SLAAC.
- Perform an outgoing connection to a routed v6-address (via default
gateway).
- Create a listening IPv6 wildcard socked bound to ::, and trying to access
it via link-local, SLAAC, and IPv4 (to ensure the dual-stack binding
works).
Things that could be improved:
- socket.socket().getaddrinfo only returns the v4 address. It could also
return v6 addresses (getaddrinfo is actively programmed to only return a
single address, and this is the v4-address by default, with fallback to
the v6 address if both are enabled).
Signed-off-by: Felix Dörre <felix@dogcraft.de>
The DHCP server broadcasts messages. They are being sent via the default
netif which might be completely the wrong network. We want to send
messages to the netif we got the original message from.
Original author: [Peter Harper](https://github.com/peterharperuk)
Source: https://github.com/raspberrypi/pico-examples/pull/392
Signed-off-by: Samveen <samveen@samveen.in>
Change the default DNS to match the gateway IP of a board running in access
point mode (or otherwise acting as a "server").
This fixes the rather meaningless use of "8.8.8.8" as the default DNS
server address offered up to access point clients via the DHCP server.
Since most devices wont be able to proxy access to the real "8.8.8.8".
It allows for a DNS responder to run and provide a catchall response for
captive portal functionality, or just a quality-of-life response to a
friendly URL for access-point based configuration and other applications.
Signed-off-by: Phil Howard <phil@gadgetoid.com>
This commit moves all first-party code developed for this project from lib/
to shared/, so that lib/ now only contains third-party code.
The following directories are moved as-is from lib to shared:
lib/libc -> shared/libc
lib/memzip -> shared/memzip
lib/netutils -> shared/netutils
lib/timeutils -> shared/timeutils
lib/upytesthelper -> shared/upytesthelper
All files in lib/embed/ have been moved to shared/libc/.
lib/mp-readline has been moved to shared/readline.
lib/utils has been moved to shared/runtime, with the exception of
lib/utils/printf.c which has been moved to shared/libc/printf.c.
Signed-off-by: Damien George <damien@micropython.org>