TinyWifiDongle 0.1.0
Header-only USB WiFi dongle for Arduino
Loading...
Searching...
No Matches
TinyWifiDongleConfig Struct Reference

Settings of the dongle; every field has a usable default except the SSID. More...

#include <TinyWifiDongleConfig.h>

Public Attributes

const char * ssid = nullptr
 WiFi network the MCU joins (the "uplink").
const char * password = nullptr
 Password of the network (nullptr for an open network).
const char * productName = "TinyWifiDongle"
 USB product string shown on the host.
bool manageUsb = true
uint32_t statsIntervalMs = 0
uint32_t stallTimeoutMs = 1000
bool pinUsbTask = true
uint8_t framesToHost = 0
uint8_t framesFromHost = 0
uint16_t usbMaxFrame = 1514

Detailed Description

Settings of the dongle; every field has a usable default except the SSID.

Pass it to TinyWifiDongle::begin(). String pointers only have to stay valid during that call.

Definition at line 11 of file TinyWifiDongleConfig.h.

Member Data Documentation

◆ framesFromHost

uint8_t TinyWifiDongleConfig::framesFromHost = 0

Raspberry Pi Pico only: number of frame buffers for frames coming from the host (mostly acknowledgements). 0 = the default of the chip: 16 on the RP2350, 8 on the RP2040. The two directions have separate pools, so a burst towards the host cannot take the buffers that the host's acknowledgements need. Ignored on the ESP32.

Definition at line 53 of file TinyWifiDongleConfig.h.

◆ framesToHost

uint8_t TinyWifiDongleConfig::framesToHost = 0

Raspberry Pi Pico only: number of frame buffers (about 1.5 KB each) for frames on their way to the host. 0 = the default of the chip: 48 on the RP2350 (Pico 2 W), 24 on the RP2040 (Pico W). More buffers absorb bursts of traffic, so fewer frames are dropped (a dropped frame slows a download down), at the price of RAM. Ignored on the ESP32.

Definition at line 46 of file TinyWifiDongleConfig.h.

◆ manageUsb

bool TinyWifiDongleConfig::manageUsb = true

true: the library calls USB.begin() itself. Set to false if the sketch adds other USB interfaces (e.g. CDC for logging) and starts USB later; begin() then only registers the network interface.

Definition at line 23 of file TinyWifiDongleConfig.h.

◆ password

const char* TinyWifiDongleConfig::password = nullptr

Password of the network (nullptr for an open network).

Definition at line 15 of file TinyWifiDongleConfig.h.

◆ pinUsbTask

bool TinyWifiDongleConfig::pinUsbTask = true

Run the TinyUSB device task on the CPU core that runs the USB interrupt. The Arduino core starts that task without a core affinity; the TinyUSB driver of the ESP32-S2/S3 (0.21.0) has cross-core races between task and interrupt that make the send path stall under load. Keep this on unless you start the USB stack yourself (needs manageUsb).

Definition at line 39 of file TinyWifiDongleConfig.h.

◆ productName

const char* TinyWifiDongleConfig::productName = "TinyWifiDongle"

USB product string shown on the host.

Definition at line 18 of file TinyWifiDongleConfig.h.

◆ ssid

const char* TinyWifiDongleConfig::ssid = nullptr

WiFi network the MCU joins (the "uplink").

Definition at line 13 of file TinyWifiDongleConfig.h.

◆ stallTimeoutMs

uint32_t TinyWifiDongleConfig::stallTimeoutMs = 1000

If sending to the host makes no progress for this many milliseconds, the device is disconnected from USB and re-enumerated (the host sees the card being replugged and restarts the connection). 0 = never reset.

Definition at line 32 of file TinyWifiDongleConfig.h.

◆ statsIntervalMs

uint32_t TinyWifiDongleConfig::statsIntervalMs = 0

Interval in milliseconds of the status line on TWD_LOGGER; 0 = never (default). Only useful while debugging.

Definition at line 27 of file TinyWifiDongleConfig.h.

◆ usbMaxFrame

uint16_t TinyWifiDongleConfig::usbMaxFrame = 1514

Largest Ethernet frame the USB adapter announces to the host (the host derives its MTU from it).

Definition at line 57 of file TinyWifiDongleConfig.h.


The documentation for this struct was generated from the following file: