7 years, 3 months ago.

UART access over BLE

Hi, Regarding the example program "Uart access over BLE", where is the uart TX and RX pins defined? Looking through UARTservice.c and .h, I don't see the serial pins declared.

Thanks, Eric

Edit: Here's the link to the program: https://developer.mbed.org/teams/Bluetooth-Low-Energy/wiki/UART-access-over-BLE

Question relating to:

Bluetooth Low Energy (a.k.a Bluetooth LE, BTLE, Bluetooth Smart)

1 Answer

7 years, 3 months ago.

"Uart access over BLE" shows how to instantiate BLE Service to enable UART over BLE, where all the debug messages can be sent over the BLE connection.

If you are looking for physical TX and RX pin definition then checkout the PinNames.h file for your specific target. For example:

https://github.com/ARMmbed/mbed-os/blob/master/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_NRF51_DK/PinNames.h

Hi Senthil, What I meant is - it looks like this BLE_UARTConsole is trying to replicate the Nordic Uart Service (NUS). When I used the Nordic example NUS code with Nordic Studio, I can redefine which uart pins are used, and I can see where the uart is started at some baud rate.

On the mbed version of the BLEuart service, I don't see where it defines the serial pins and baud rate. For the heck of it, I tried connecting a FTDI to the mbed board definition for uart (p30 and p7 for the nRF51822), and I don't get any output if I write to the RX characteristic on the BLE side.

https://developer.mbed.org/teams/Bluetooth-Low-Energy/wiki/UART-access-over-BLE

Even if using default serial pins, I would expect the library to at least instantiate the serial port in the code. Am I just not seeing it?

posted by Eric Tsai 14 Sep 2017