Improve wifi_settings_connect documentation

pull/55/head
Jack Whitham 2025-05-07 00:32:06 +01:00
rodzic 841fabc56f
commit b65568972d
2 zmienionych plików z 20 dodań i 19 usunięć

Wyświetl plik

@ -71,11 +71,8 @@ Name|Description
## WiFi ## WiFi
Example using the wifi\_settings\_connect library to connect to Example using the wifi\_settings\_connect library from pico\_extras.
a WiFi hotspot. The library provides a way to store WiFi hotspot
details in Flash and connect automatically, avoiding the need to
specify build-time flags such as `WIFI_SSID` and `WIFI_PASSWORD`.
Name|Description Name|Description
---|--- ---|---
[wifi\_settings\_connect\_example](wifi_settings_connect/example)| Demonstrates connecting to a hotspot and sending UDP broadcasts [wifi\_settings\_connect\_example](wifi_settings_connect/example)| Demonstrates connecting to WiFi hotspots and sending UDP broadcasts

Wyświetl plik

@ -1,18 +1,21 @@
# wifi\_settings\_connect example # wifi\_settings\_connect example
Example using the wifi\_settings\_connect library to connect to Example using the wifi\_settings\_connect library to connect to a WiFi hotspot.
a WiFi hotspot. The library provides a way to store WiFi hotspot
details in Flash and connect automatically, avoiding the need to
specify build-time flags such as `WIFI_SSID` and `WIFI_PASSWORD`.
The Flash storage location for hotspot details is specified in The Flash storage location for hotspot details is specified in
`include/wifi_settings/wifi_settings_configuration.h`. It is at `include/wifi_settings/wifi_settings_configuration.h`. It is at
`0x101ff000` (for Pico W) and `0x103fe000` (for Pico 2 W). To add your `0x101fc000` (for Pico W) and `0x103fc000` (for Pico 2 W). This
WiFi details at this location, please [see these "wifi-settings file" is a text file which can be edited with any text editor.
instructions](https://github.com/jwhitham/pico-wifi-settings/blob/master/doc/SETTINGS_FILE.md). Here is an example of typical contents:
You can edit the settings as a text file and transfer it with `picotool`, ```
or install a [setup application](https://github.com/jwhitham/pico-wifi-settings/blob/master/doc/SETUP_APP.md) ssid1=MyHomeWiFi
to add or update WiFi details. pass1=mypassword1234
ssid2=MyPhoneHotspot
pass2=secretpassword
country=GB
```
To add your WiFi details at this location, please [see the setup instructions in the pico-extras
repo](https://github.com/raspberrypi/pico-extras/tree/master/src/rp2_common/wifi_settings_connect/doc/SETTINGS_FILE.md).
To build this example, first run `cmake` at the top level of the To build this example, first run `cmake` at the top level of the
`pico-playground` repository, specifying the locations for `pico-playground` repository, specifying the locations for
@ -34,7 +37,8 @@ directory, e.g.
This will create the UF2 file to be downloaded to the Pico This will create the UF2 file to be downloaded to the Pico
in `build/wifi_settings_connect/example`. in `build/wifi_settings_connect/example`.
The wifi\_settings\_connect library in `pico-extras` is a subset of a larger The example program will search for WiFi hotspots. If it finds a hotspot which
library, [wifi\_settings](https://github.com/jwhitham/pico-wifi-settings/), matches those configured in Flash, then it will automatically
which adds remote update functions for both the WiFi settings connect to it and begin a UDP broadcast. The example program prints
and (optionally) your Pico application too. its status to the USB serial port; connect with a terminal program
to see what it is doing.