diff options
| author | Badr Bouslikhin <[email protected]> | 2023-12-05 19:50:11 +0100 |
|---|---|---|
| committer | Badr Bouslikhin <[email protected]> | 2023-12-05 19:50:11 +0100 |
| commit | 0ffb35a2a14c5c033ca4376b329d347df1e3c6bf (patch) | |
| tree | 622a098636b72f5abba65d2217d778b389fef678 /examples/stm32h7/src | |
| parent | d2a73229788c8776f822cfe9c6cac7c96d660cbd (diff) | |
stm32/eth: add host server command example
Diffstat (limited to 'examples/stm32h7/src')
| -rw-r--r-- | examples/stm32h7/src/bin/eth.rs | 1 | ||||
| -rw-r--r-- | examples/stm32h7/src/bin/eth_client.rs | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/examples/stm32h7/src/bin/eth.rs b/examples/stm32h7/src/bin/eth.rs index 030c961eb..dbddfc22f 100644 --- a/examples/stm32h7/src/bin/eth.rs +++ b/examples/stm32h7/src/bin/eth.rs | |||
| @@ -113,6 +113,7 @@ async fn main(spawner: Spawner) -> ! { | |||
| 113 | 113 | ||
| 114 | socket.set_timeout(Some(embassy_time::Duration::from_secs(10))); | 114 | socket.set_timeout(Some(embassy_time::Duration::from_secs(10))); |
| 115 | 115 | ||
| 116 | // You need to start a server on the host machine, for example: `nc -l 8000` | ||
| 116 | let remote_endpoint = (Ipv4Address::new(10, 42, 0, 1), 8000); | 117 | let remote_endpoint = (Ipv4Address::new(10, 42, 0, 1), 8000); |
| 117 | info!("connecting..."); | 118 | info!("connecting..."); |
| 118 | let r = socket.connect(remote_endpoint).await; | 119 | let r = socket.connect(remote_endpoint).await; |
diff --git a/examples/stm32h7/src/bin/eth_client.rs b/examples/stm32h7/src/bin/eth_client.rs index c6b8243e5..17e1d9fb7 100644 --- a/examples/stm32h7/src/bin/eth_client.rs +++ b/examples/stm32h7/src/bin/eth_client.rs | |||
| @@ -109,6 +109,7 @@ async fn main(spawner: Spawner) -> ! { | |||
| 109 | let client = TcpClient::new(&stack, &state); | 109 | let client = TcpClient::new(&stack, &state); |
| 110 | 110 | ||
| 111 | loop { | 111 | loop { |
| 112 | // You need to start a server on the host machine, for example: `nc -l 8000` | ||
| 112 | let addr = SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::new(10, 42, 0, 1), 8000)); | 113 | let addr = SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::new(10, 42, 0, 1), 8000)); |
| 113 | 114 | ||
| 114 | info!("connecting..."); | 115 | info!("connecting..."); |
