Open anecdata opened 2 years ago
This please! I don't always have a network I can connect to, so being able to do this would be really handy for working from anywhere away from home.
For precedence, maybe have it try to connect to the outside network first, and if that fails make AP mode the fallback? For my uses, that would be ideal. When I'm at home, it could just connect to my home network, and when I'm out it would go to AP mode, making it so that I don't have to change settings.toml to get the correct behavior wherever I am. (Also, this would give anyone using these devices an easy to way to get in and change settings.toml if they suddenly can no longer use the wireless network they have it set for.)
More discussion along those lines in 8405.
Like #6473, but for Access Point: allow Wi-Fi AP SSID and password to be defined in
settings.toml
(optionally: channel, authmode, and max_connections), and if present, start up a Wi-Fi AP automatically. If web workflow is enabled, allow web workflow to operate via the AP.Some discussion of the motivations is here. Particularly useful when the device is away from its "home" network as specified in the
settings.toml
file and a general-purpose computer with serial isn't readily available (especially with non-native-USB CircuitPython devices that have no USB MSC to allow copying asettings.toml
file).Note that both Station and AP parameters could be in
settings.toml
, so some convention is needed for which takes precedence for web workflow (both can be running simultaneously for any other reason). My thought would be AP takes precedence for web workflow, since that works whether the user is within range of their "home" wifi or not (see motivations above). Serial Terminal could presumably get mirrored to both Station and AP web workflows much like the mirroring to serial, web workflow, and BLE workflow. But File Browser could be much more challenging to mirror.Addendum: I noticed in a brief test that if more than one web client connects to the Serial Terminal, only the most recent works. There is a note in the docs that "Only one WebSocket at a time is supported.". Multiple modes of Terminal also seem to slow things down. So it may not make sense to mirror Serial Terminal across Station web workflow and AP web workflow, and the precedence convention becomes more important.