aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2023-05-24 11:41:03 +0000
committerGitHub <[email protected]>2023-05-24 11:41:03 +0000
commit3cc0ec654a1e46fe7b8fa168942452303343cd84 (patch)
tree1dccb7003ed2de7e11c1000f60bedddb64f2fa97
parenta3d6aa5d7d5dfeaeed4162cbdac35494bbdc1486 (diff)
parenta19f8c32ffe085fdb68d349599dac360721b7786 (diff)
Merge pull request #83 from papyDoctor/master
Update examples in README.md
-rw-r--r--README.md13
1 files changed, 7 insertions, 6 deletions
diff --git a/README.md b/README.md
index fe8d5d93b..defea489f 100644
--- a/README.md
+++ b/README.md
@@ -21,27 +21,28 @@ TODO:
21- Setting a custom MAC address. 21- Setting a custom MAC address.
22- Bus sleep (unclear what the benefit is. Is it needed for IRQs? or is it just power consumption optimization?) 22- Bus sleep (unclear what the benefit is. Is it needed for IRQs? or is it just power consumption optimization?)
23 23
24## Running the example 24## Running the examples
25 25
26- `cargo install probe-rs-cli` 26- `cargo install probe-rs-cli`
27- `cd examples/rpi-pico-w` 27- `cd examples/rpi-pico-w`
28### Example 1: Scan the wifi stations
29- `cargo run --release --bin wifi_scan`
30### Example 2: Create an access point (IP and credentials in the code)
31- `cargo run --release --bin tcp_server_ap`
32### Example 3: Connect to an existing network and create a server
28- `WIFI_NETWORK=MyWifiNetwork WIFI_PASSWORD=MyWifiPassword cargo run --release` 33- `WIFI_NETWORK=MyWifiNetwork WIFI_PASSWORD=MyWifiPassword cargo run --release`
29 34
30After a few seconds, you should see that DHCP picks up an IP address like this 35After a few seconds, you should see that DHCP picks up an IP address like this
31
32``` 36```
3311.944489 DEBUG Acquired IP configuration: 3711.944489 DEBUG Acquired IP configuration:
3411.944517 DEBUG IP address: 192.168.0.250/24 3811.944517 DEBUG IP address: 192.168.0.250/24
3511.944620 DEBUG Default gateway: 192.168.0.33 3911.944620 DEBUG Default gateway: 192.168.0.33
3611.944722 DEBUG DNS server 0: 192.168.0.33 4011.944722 DEBUG DNS server 0: 192.168.0.33
37``` 41```
38 42This example implements a TCP echo server on port 1234. You can try connecting to it with:
39The example implements a TCP echo server on port 1234. You can try connecting to it with:
40
41``` 43```
42nc 192.168.0.250 1234 44nc 192.168.0.250 1234
43``` 45```
44
45Send it some data, you should see it echoed back and printed in the firmware's logs. 46Send it some data, you should see it echoed back and printed in the firmware's logs.
46 47
47## License 48## License