diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/rpi-pico-w/src/bin/tcp_server.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/examples/rpi-pico-w/src/bin/tcp_server.rs b/examples/rpi-pico-w/src/bin/tcp_server.rs index 036f79308..9581602a7 100644 --- a/examples/rpi-pico-w/src/bin/tcp_server.rs +++ b/examples/rpi-pico-w/src/bin/tcp_server.rs | |||
| @@ -94,8 +94,15 @@ async fn main(spawner: Spawner) { | |||
| 94 | 94 | ||
| 95 | unwrap!(spawner.spawn(net_task(stack))); | 95 | unwrap!(spawner.spawn(net_task(stack))); |
| 96 | 96 | ||
| 97 | //control.join_open(env!("WIFI_NETWORK")).await; | 97 | loop { |
| 98 | control.join_wpa2(env!("WIFI_NETWORK"), env!("WIFI_PASSWORD")).await; | 98 | //control.join_open(env!("WIFI_NETWORK")).await; |
| 99 | match control.join_wpa2(env!("WIFI_NETWORK"), env!("WIFI_PASSWORD")).await { | ||
| 100 | Ok(_) => break, | ||
| 101 | Err(err) => { | ||
| 102 | info!("join failed with status={}", err.status); | ||
| 103 | } | ||
| 104 | } | ||
| 105 | } | ||
| 99 | 106 | ||
| 100 | // And now we can use it! | 107 | // And now we can use it! |
| 101 | 108 | ||
