|
TinyWifiDongle 0.1.0
Header-only USB WiFi dongle for Arduino
|
Raw Ethernet access to the WiFi network through the CYW43 chip of the Pico W / Pico 2 W. More...
#include <Rp2040WifiFrameLink.h>


Public Member Functions | |
| bool | begin (const char *ssid, const char *password) override |
| Start joining the network; returns at once, see connected(). | |
| bool | connected () override |
| True while the station's link is up. | |
| bool | sendFrame (const uint8_t *frame, uint16_t len) override |
| Sends a frame to the uplink network; false if it was dropped. | |
| void | setFrameReceiver (FrameReceiver *receiver) override |
| Frames coming from the uplink network are passed to receiver. | |
| const uint8_t * | macAddress () override |
| The station MAC of the chip; starts the chip on the first call. The result is cached. | |
| Public Member Functions inherited from twd::Uplink | |
| virtual | ~Uplink ()=default |
| Public Member Functions inherited from twd::FrameLink | |
| virtual | ~FrameLink ()=default |
Static Public Attributes | |
| static constexpr uint32_t | kNotJoinedReportMs = 10000 |
| While the station is not associated, a warning is logged this often. | |
Raw Ethernet access to the WiFi network through the CYW43 chip of the Pico W / Pico 2 W.
Joins the network with the core's WiFi class (which keeps its connect and retry logic) and then takes over the station's lwIP interface: its input function is replaced, so every frame the chip receives goes to the FrameReceiver instead of the IP stack, and its DHCP client is stopped. Frames are sent with cyw43_send_ethernet(). The board has no IP address of its own; the host behind the bridge uses the station's MAC address and asks the network itself.
A worker in the core's lwIP async context re-applies these changes twice a second, because the core may restart DHCP or reset the interface after a reconnect.
Also an Uplink, so the composition can report the association state.
Definition at line 36 of file Rp2040WifiFrameLink.h.
|
inlineoverridevirtual |
Start joining the network; returns at once, see connected().
Implements twd::Uplink.
Definition at line 41 of file Rp2040WifiFrameLink.h.
|
inlineoverridevirtual |
True while the station's link is up.
Implements twd::Uplink.
Definition at line 63 of file Rp2040WifiFrameLink.h.
|
inlineoverridevirtual |
The station MAC of the chip; starts the chip on the first call. The result is cached.
Implements twd::FrameLink.
Definition at line 73 of file Rp2040WifiFrameLink.h.
|
inlineoverridevirtual |
Sends a frame to the uplink network; false if it was dropped.
Implements twd::FrameLink.
Definition at line 65 of file Rp2040WifiFrameLink.h.
|
inlineoverridevirtual |
Frames coming from the uplink network are passed to receiver.
Implements twd::FrameLink.
Definition at line 70 of file Rp2040WifiFrameLink.h.
|
staticconstexpr |
While the station is not associated, a warning is logged this often.
Definition at line 39 of file Rp2040WifiFrameLink.h.