# How to use ble_app_uart_c for custom UUID service?

Hello!

We're using the SDK 12.1 ble_app_uart_c as an example for a nRF52 DK as Central application. Instead of using ble_app_uart example for peripheral device, we created a new custom service based on ble_app_template example for our peripheral device.

Our question is which portion of ble_app_uart_cexample code, should we need to change to make it available to connect the Central device to peripheral device using the custom service and display the data that sent from peripheral to PC's serial monitor?

Thanks for help.

edit retag close delete

Sort by » oldest newest most voted

@Wecare: You need to update the NUS_BASE_UUID defined in ble_nus_c.h.

I would suggest you to have a look at the code inside ble_nus_c_init.c and ble_nus.c to fully understand how things work. For example function is_uuid_present() in main.c to check if the UUID is match or not.

Basically we have a base UUID that we need to add to the Stack's UUID database. After that we have an uuid_type match to that base in the UUID database. We use that uuid_type to represent that base. On top of the base, we have the service UUID (0x0001) and the characteristic UUID (0x0002, 0x0003).

more

[hide preview]

## Recent blog posts

• ### Introducing nRF5 SDK for Mesh

Posted 2017-07-20 09:42:44 by Pär H

Posted 2017-07-19 06:53:42 by Mohammad Afaneh
• ### Unique Thread/Bluetooth multiprotocol solution with nRF5 SDK for Thread and nRF52840 SoC by Nordic

Posted 2017-07-14 10:31:56 by Krzysztof Loska
• ### nRF Connect macros (currently Android only)

Posted 2017-07-14 13:29:14 by Aleksander Nowakowski
• ### Power Optimization — From 3 to 7 Months on a Single Charge

Posted 2017-07-10 14:34:39 by Yaniv Nis

## Recent questions

• ### Real UART TX transmit depth?

Posted 2017-07-22 01:21:21 by samsonc

Posted 2017-07-21 19:11:52 by TravisFS
• ### app_timer_freertos.c/app_timer_stop bug?

Posted 2017-07-21 19:11:15 by loquat
• ### Are there any particular practices or instructions should i follow if I want to write a custom library

Posted 2017-07-21 18:13:10 by binhnguyens
• ### fstorage in chosen area

Posted 2017-07-21 18:02:00 by cedric