kopia lustrzana https://github.com/raspberrypi/pico-playground
Improve wifi_settings_connect documentation
rodzic
841fabc56f
commit
b65568972d
|
@ -71,11 +71,8 @@ Name|Description
|
|||
|
||||
## WiFi
|
||||
|
||||
Example using the wifi\_settings\_connect library to connect to
|
||||
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`.
|
||||
Example using the wifi\_settings\_connect library from pico\_extras.
|
||||
|
||||
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
|
||||
|
|
|
@ -1,18 +1,21 @@
|
|||
# wifi\_settings\_connect example
|
||||
|
||||
Example using the wifi\_settings\_connect library to connect to
|
||||
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`.
|
||||
Example using the wifi\_settings\_connect library to connect to a WiFi hotspot.
|
||||
|
||||
The Flash storage location for hotspot details is specified in
|
||||
`include/wifi_settings/wifi_settings_configuration.h`. It is at
|
||||
`0x101ff000` (for Pico W) and `0x103fe000` (for Pico 2 W). To add your
|
||||
WiFi details at this location, please [see these
|
||||
instructions](https://github.com/jwhitham/pico-wifi-settings/blob/master/doc/SETTINGS_FILE.md).
|
||||
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)
|
||||
to add or update WiFi details.
|
||||
`0x101fc000` (for Pico W) and `0x103fc000` (for Pico 2 W). This
|
||||
"wifi-settings file" is a text file which can be edited with any text editor.
|
||||
Here is an example of typical contents:
|
||||
```
|
||||
ssid1=MyHomeWiFi
|
||||
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
|
||||
`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
|
||||
in `build/wifi_settings_connect/example`.
|
||||
|
||||
The wifi\_settings\_connect library in `pico-extras` is a subset of a larger
|
||||
library, [wifi\_settings](https://github.com/jwhitham/pico-wifi-settings/),
|
||||
which adds remote update functions for both the WiFi settings
|
||||
and (optionally) your Pico application too.
|
||||
The example program will search for WiFi hotspots. If it finds a hotspot which
|
||||
matches those configured in Flash, then it will automatically
|
||||
connect to it and begin a UDP broadcast. The example program prints
|
||||
its status to the USB serial port; connect with a terminal program
|
||||
to see what it is doing.
|
||||
|
|
Ładowanie…
Reference in New Issue