Merge branch 'features/uart_host_only_tut_v5.1' into 'release/v5.1'

docs(nimble): Improved documentation for uart host only example (v5.1)

See merge request espressif/esp-idf!29491
This commit is contained in:
Rahul Tank 2024-03-11 12:51:09 +08:00
commit 13141a060b

View File

@ -7,11 +7,18 @@ The tutorial is focused on how to implement the custom transport in the applicat
Note: This walkthrough only covers the transport used by the application, for detailed explanation see the [bleprph_walkthrough](../../bleprph/tutorial/bleprph_walkthrough.md)
## Hardware Setup
This example uses esp32 chip to run the example `bleprph_host_only` that runs the nimble-host and sends and receives the commands and events using uart. The another chip used is esp32c6 that runs the esp-hosted `esp-hosted/esp_hosted_fg/esp/esp_driver/network_adapter` example that runs the controller and receives commands and sends events using UART. Below is the setup of esp32 and esp32c6.
This example uses esp32 chip to run the example `bleprph_host_only` that runs the nimble-host and sends and receives the commands and events using uart. The another chip used is esp32c6 that runs the controller `esp-idf/examples/bluetooth/nimble/hci` example that runs the controller and receives commands and sends events using UART. Below is the setup of esp32 and esp32c6.
![Hardware Setup](hardware_setup.png)
Note that the esp32s gpio pins tx=4 and rx=5 are defined in [uart_driver.c](../main/uart_driver.c) file. The tx pin of one chip connectes to the rx pin of the other and vice versa.
Note that the esp32 gpio pins tx=4 and rx=5 are configurable using idf.py menuconfig -> example config -> Uart Configuration. The tx pin of one chip connectes to the rx pin of the other and vice versa.
Below is the pin connection chart for Esp32 and esp32c6.
| Esp32 (Signal) | Esp32 (GPIO Pin) | C6 (Signal) | C6 (GPIO Pin) |
|----------------|-------------------|-------------|---------------|
| Rx | 5 | Tx | 5 |
| Tx | 4 | Rx | 12 |
```c
#define UART_TX_PIN (4)