This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Creating a custom UART connection over BLE

I would like to use the ble_app_uart_c example, found here, to connect to a custom peripheral. What values should I change in the central device code in order to connect to a device, service, and characteristic of my choice?

I am guessing I need to change the UUID of the service I am searching for. Also, I assume should be able to change the UUID's for the RX and TX characteristics of the service I want to read from and write to.

Do I need to change how the handles for these characteristics are retrieved? Are there any another changes I need to make in order to get the nRF52 to establish a serial connection with my device?

I am using IAR, and the nRF52832 with softdevice 132 loaded onto it.

  • Thanks! Do you also have any resources for someone looking to connect to a peripheral that is not a nordic chip, but instead any bluetooth device (i.e. A pair of bluetooth headphones)?

  • BT protocols are vendor independent so in general there is no difference what chip is implementing it on "the other side". Actually it's pretty easy to develop device where you won't recognize what ship it is (without dissecting it physically). So without more details your question doesn't make much sense, all examples in Nordic SDK should work the same whatever devices is implementing the counter-part (remember that except some latest development all Bluetooth protocols are always peer-to-peer and BLE is always asymmetric so you need to have "matching pair" of devices to make it work).

Related