diff options
| author | rafael <rafael> | 2024-06-24 22:08:59 +0200 |
|---|---|---|
| committer | rafael <rafael> | 2024-06-24 22:08:59 +0200 |
| commit | 6dae3c02c02ae25cd2fdb46673948a1c90b14944 (patch) | |
| tree | bac1dda0b7b90c517b66cd98f76bebcc362f0fd3 | |
| parent | d05817f89d1d5c0e663cda1710d2eaed4cc8fa53 (diff) | |
comment the comments
| -rw-r--r-- | examples/rp/src/bin/wifi_webrequest.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/rp/src/bin/wifi_webrequest.rs b/examples/rp/src/bin/wifi_webrequest.rs index 65b1af055..50136da32 100644 --- a/examples/rp/src/bin/wifi_webrequest.rs +++ b/examples/rp/src/bin/wifi_webrequest.rs | |||
| @@ -72,6 +72,7 @@ async fn main(spawner: Spawner) { | |||
| 72 | .await; | 72 | .await; |
| 73 | 73 | ||
| 74 | let config = Config::dhcpv4(Default::default()); | 74 | let config = Config::dhcpv4(Default::default()); |
| 75 | // Use static IP configuration instead of DHCP | ||
| 75 | //let config = embassy_net::Config::ipv4_static(embassy_net::StaticConfigV4 { | 76 | //let config = embassy_net::Config::ipv4_static(embassy_net::StaticConfigV4 { |
| 76 | // address: Ipv4Cidr::new(Ipv4Address::new(192, 168, 69, 2), 24), | 77 | // address: Ipv4Cidr::new(Ipv4Address::new(192, 168, 69, 2), 24), |
| 77 | // dns_servers: Vec::new(), | 78 | // dns_servers: Vec::new(), |
| @@ -94,7 +95,7 @@ async fn main(spawner: Spawner) { | |||
| 94 | unwrap!(spawner.spawn(net_task(stack))); | 95 | unwrap!(spawner.spawn(net_task(stack))); |
| 95 | 96 | ||
| 96 | loop { | 97 | loop { |
| 97 | //control.join_open(WIFI_NETWORK).await; | 98 | //match control.join_open(WIFI_NETWORK).await { // for open networks |
| 98 | match control.join_wpa2(WIFI_NETWORK, WIFI_PASSWORD).await { | 99 | match control.join_wpa2(WIFI_NETWORK, WIFI_PASSWORD).await { |
| 99 | Ok(_) => break, | 100 | Ok(_) => break, |
| 100 | Err(err) => { | 101 | Err(err) => { |
| @@ -134,7 +135,8 @@ async fn main(spawner: Spawner) { | |||
| 134 | 135 | ||
| 135 | let mut http_client = HttpClient::new_with_tls(&tcp_client, &dns_client, tls_config); | 136 | let mut http_client = HttpClient::new_with_tls(&tcp_client, &dns_client, tls_config); |
| 136 | let url = "https://worldtimeapi.org/api/timezone/Europe/Berlin"; | 137 | let url = "https://worldtimeapi.org/api/timezone/Europe/Berlin"; |
| 137 | // let mut http_client = HttpClient::new(&tcp_client, &dns_client); // for non-TLS requests | 138 | // for non-TLS requests, use this instead: |
| 139 | // let mut http_client = HttpClient::new(&tcp_client, &dns_client); | ||
| 138 | // let url = "http://worldtimeapi.org/api/timezone/Europe/Berlin"; | 140 | // let url = "http://worldtimeapi.org/api/timezone/Europe/Berlin"; |
| 139 | 141 | ||
| 140 | info!("connecting to {}", &url); | 142 | info!("connecting to {}", &url); |
