diff options
| -rw-r--r-- | .vscode/settings.json | 4 | ||||
| -rw-r--r-- | README.md | 3 | ||||
| -rw-r--r-- | examples/rpi-pico-w/src/main.rs | 4 |
3 files changed, 7 insertions, 4 deletions
diff --git a/.vscode/settings.json b/.vscode/settings.json index 748816bb9..082b286da 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json | |||
| @@ -12,4 +12,8 @@ | |||
| 12 | "rust-analyzer.linkedProjects": [ | 12 | "rust-analyzer.linkedProjects": [ |
| 13 | "examples/rpi-pico-w/Cargo.toml", | 13 | "examples/rpi-pico-w/Cargo.toml", |
| 14 | ], | 14 | ], |
| 15 | "rust-analyzer.server.extraEnv": { | ||
| 16 | "WIFI_NETWORK": "foo", | ||
| 17 | "WIFI_PASSWORD": "foo", | ||
| 18 | } | ||
| 15 | } \ No newline at end of file | 19 | } \ No newline at end of file |
| @@ -25,8 +25,7 @@ TODO: | |||
| 25 | 25 | ||
| 26 | - `cargo install probe-run` | 26 | - `cargo install probe-run` |
| 27 | - `cd examples/rpi-pico-w` | 27 | - `cd examples/rpi-pico-w` |
| 28 | - Edit `src/main.rs` with your Wifi network's name and password. | 28 | - `WIFI_NETWORK=MyWifiNetwork WIFI_PASSWORD=MyWifiPassword cargo run --release` |
| 29 | - `cargo run --release` | ||
| 30 | 29 | ||
| 31 | After a few seconds, you should see that DHCP picks up an IP address like this | 30 | After a few seconds, you should see that DHCP picks up an IP address like this |
| 32 | 31 | ||
diff --git a/examples/rpi-pico-w/src/main.rs b/examples/rpi-pico-w/src/main.rs index 633c1b2b3..3e966d212 100644 --- a/examples/rpi-pico-w/src/main.rs +++ b/examples/rpi-pico-w/src/main.rs | |||
| @@ -71,8 +71,8 @@ async fn main(spawner: Spawner, p: Peripherals) { | |||
| 71 | 71 | ||
| 72 | let net_device = control.init(clm).await; | 72 | let net_device = control.init(clm).await; |
| 73 | 73 | ||
| 74 | //control.join_open("MikroTik-951589").await; | 74 | //control.join_open(env!("WIFI_NETWORK")).await; |
| 75 | control.join_wpa2("DirbaioWifi", "HelloWorld").await; | 75 | control.join_wpa2(env!("WIFI_NETWORK"), env!("WIFI_PASSWORD")).await; |
| 76 | 76 | ||
| 77 | let config = embassy_net::ConfigStrategy::Dhcp; | 77 | let config = embassy_net::ConfigStrategy::Dhcp; |
| 78 | //let config = embassy_net::ConfigStrategy::Static(embassy_net::Config { | 78 | //let config = embassy_net::ConfigStrategy::Static(embassy_net::Config { |
