Skip to content

Commit

Permalink
Some feature/README-related cleanup (esp-rs#368)
Browse files Browse the repository at this point in the history
* Clean up embedded-svc feature remnants

* Improve serial jtag section

* Improve feature descriptions
  • Loading branch information
bugadani authored and bjoernQ committed May 23, 2024
1 parent 073b7d5 commit f510801
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 26 deletions.
38 changes: 20 additions & 18 deletions esp-wifi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,34 +60,36 @@ Within this crate, `CCOMPARE0` CPU timer is used for timing, ensure that in your

## USB-SERIAL-JTAG

When using USB-SERIAL-JTAG you have to activate the feature `phy-enable-usb`.
When using USB-SERIAL-JTAG (for example by selecting `jtag-serial` in [`esp-println`](https://crates.io/crates/esp-println)) you have to activate the feature `phy-enable-usb`.

Don't use this feature if your are _not_ using USB-SERIAL-JTAG since it might reduce WiFi performance.
Don't use this feature if your are _not_ using USB-SERIAL-JTAG as it might reduce WiFi performance.

## Features

| Feature | Meaning |
| -------------- | ---------------------------------------------------------------------------------------------------- |
| wifi-logs | logs the WiFi logs from the driver at log level info |
| dump-packets | dumps packet info at log level info |
| wifi-logs | logs the WiFi logs from the driver at log level `info` |
| dump-packets | dumps packet info at log level `info` |
| smoltcp | Provide implementations of `smoltcp` traits |
| utils | Provide utilities for smoltcp initialization; adds `smoltcp` dependency |
| utils | Provide utilities for smoltcp initialization. Adds `smoltcp` dependency |
| ble | Enable BLE support |
| wifi | Enable WiFi support |
| esp-now | Enable esp-now support |
| coex | Enable coex support |
| ipv4 | IPv4 support: includes `utils` feature |
| ipv6 | IPv6 support: includes `utils` feature |
| tcp | TCP socket support: includes `ipv4` feature |
| udp | UDP socket support: includes `ipv4` feature |
| igmp | IGMP (multicast) support: includes `ipv4` feature |
| dns | DNS support: includes `udp` feature |
| dhcpv4 | DHCPv4 support, both creating sockets and autoconfiguring network settings: includes `utils` feature |
| phy-enable-usb | See _USB-SERIAL-JTAG_ below |
| ps-min-modem | Enable minimum modem sleep. Only for STA mode |
| ps-max-modem | Enable maximum modem sleep. Only for STA mode |
| esp-now | Enable [esp-now](https://www.espressif.com/en/solutions/low-power-solutions/esp-now) support |
| coex | Enable WiFi-BLE coexistence support |
| ipv4 | IPv4 support. Includes `utils` feature |
| ipv6 | IPv6 support. Includes `utils` feature |
| tcp | TCP socket support. Includes `ipv4` feature |
| udp | UDP socket support. Includes `ipv4` feature |
| igmp | IGMP (multicast) support. Includes `ipv4` feature |
| dns | DNS support. Includes `udp` feature |
| dhcpv4 | DHCPv4 support, both creating sockets and autoconfiguring network settings. Includes `utils` feature |
| phy-enable-usb | See [USB-SERIAL-JTAG](#usb-serial-jtag) above |
| ps-min-modem | Enable minimum modem sleep. Only affects STA mode |
| ps-max-modem | Enable maximum modem sleep. Only affects STA mode |
| log | Route log output to the `log` crate |
| defmt | Add `defmt::Format` implementation |
| defmt | Add `defmt::Format` implementation and output logs via `defmt` |

Note that not all features are available on every MCU. For example, `ble` (and thus, `coex`) is not available on ESP32-S2.

When using the `dump-packets` feature you can use the extcap in `extras/esp-wifishark` to analyze the frames in Wireshark.
For more information see [extras/esp-wifishark/README.md](../extras/esp-wifishark/README.md)
Expand Down
16 changes: 8 additions & 8 deletions esp-wifi/docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ cargo esp32c3 --release ...
- gets an ip address via DHCP
- performs an HTTP get request to some "random" server

`cargo $CHIP --example dhcp --release --features "embedded-svc,wifi"`
`cargo $CHIP --example dhcp --release --features "wifi"`

### static_ip

Expand All @@ -25,7 +25,7 @@ cargo esp32c3 --release ...
- uses the given static IP
- responds with some HTML content when connecting to port 8080

`cargo $CHIP --example static_ip --release --features "embedded-svc,wifi"`
`cargo $CHIP --example static_ip --release --features "wifi"`

### ble

Expand Down Expand Up @@ -54,7 +54,7 @@ cargo esp32c3 --release ...
- does BLE advertising
- coex support is still somewhat flaky

`cargo $CHIP --example coex --release --features "embedded-svc,wifi,ble"`
`cargo $CHIP --example coex --release --features "wifi,ble"`

**NOTE:** Not currently available for the ESP32, ESP32-C2, ESP32-C6 or ESP32-S2

Expand All @@ -80,7 +80,7 @@ cargo esp32c3 --release ...

- Read and Write to sockets over WiFi asyncronously using embassy-executor.

`cargo $CHIP --example embassy_dhcp --release --features "async,embedded-svc,wifi,embassy-net"`
`cargo $CHIP --example embassy_dhcp --release --features "async,wifi,embassy-net"`

### access_point

Expand All @@ -89,7 +89,7 @@ cargo esp32c3 --release ...
- open http://192.168.2.1:8080/ in your browser
- on Android you might need to choose _Keep Accesspoint_ when it tells you the WiFi has no internet connection, Chrome might not want to load the URL - you can use a shell and try `curl` and `ping`

`cargo $CHIP --example access_point --release --features "embedded-svc,wifi"`
`cargo $CHIP --example access_point --release --features "wifi"`

### access_point_with_sta

Expand All @@ -100,7 +100,7 @@ cargo esp32c3 --release ...
- open http://192.168.2.1:8080/ in your browser - the example will perform an HTTP get request to some "random" server
- on Android you might need to choose _Keep Accesspoint_ when it tells you the WiFi has no internet connection, Chrome might not want to load the URL - you can use a shell and try `curl` and `ping`

`cargo $CHIP --example access_point_with_sta --release --features "embedded-svc,wifi"`
`cargo $CHIP --example access_point_with_sta --release --features "wifi"`

### embassy_access_point

Expand All @@ -109,7 +109,7 @@ cargo esp32c3 --release ...
- open http://192.168.2.1:8080/ in your browser
- on Android you might need to choose _Keep Accesspoint_ when it tells you the WiFi has no internet connection, Chrome might not want to load the URL - you can use a shell and try `curl` and `ping`

`cargo $CHIP --example embassy_access_point --release --features "async,embedded-svc,wifi,embassy-net"`
`cargo $CHIP --example embassy_access_point --release --features "async,wifi,embassy-net"`

### embassy_access_point_with_sta

Expand All @@ -120,7 +120,7 @@ cargo esp32c3 --release ...
- open http://192.168.2.1:8080/ in your browser - the example will perform an HTTP get request to some "random" server
- on Android you might need to choose _Keep Accesspoint_ when it tells you the WiFi has no internet connection, Chrome might not want to load the URL - you can use a shell and try `curl` and `ping`

`cargo $CHIP --example embassy_access_point_with_sta --release --features "async,embedded-svc,wifi,embassy-net"`
`cargo $CHIP --example embassy_access_point_with_sta --release --features "async,wifi,embassy-net"`

## Benchmarking

Expand Down

0 comments on commit f510801

Please sign in to comment.