Hi ,
I wanna keep my existing mobile application which talks to nRF5340 over the BLE NUS service. I am using the default BT_UUID_NUS_VAL as my primary mode of communication, with a custom byte protocol over it.
Now I want to add BLE Logging as a backend, and the issue is LOGGER_BACKEND_BLE_ADV_UUID_DATA is the same as BT_UUID_NUS_VAL .
I am wondering what is the easy way to change the BLE Logging backend ADV_UUID and SERVICE_UUID's, as they overlap with NUS service.
And can I just change them by one letter to create my own? For example
#define NUS_SERVICE_UUID \
BT_UUID_DECLARE_128(BT_UUID_128_ENCODE(0x6E400001, 0xB5A3, 0xF393, 0xE0A9, 0xE50E24DCCA9E))
#define LOGGER_TX_SERVICE_UUID \
BT_UUID_DECLARE_128(BT_UUID_128_ENCODE(0x6E400003, 0xB5A3, 0xF393, 0xE0A9, 0xE50E24DCCA9E))
#define LOGGER_RX_SERVICE_UUID \
BT_UUID_DECLARE_128(BT_UUID_128_ENCODE(0x6E400002, 0xB5A3, 0xF393, 0xE0A9, 0xE50E24DCCA9E))
Chnages to
#define NUS_SERVICE_UUID \
BT_UUID_DECLARE_128(BT_UUID_128_ENCODE(0x6E400004, 0xB5A3, 0xF393, 0xE0A9, 0xE50E24DCCA9E))
#define LOGGER_TX_SERVICE_UUID \
BT_UUID_DECLARE_128(BT_UUID_128_ENCODE(0x6E400005, 0xB5A3, 0xF393, 0xE0A9, 0xE50E24DCCA9E))
#define LOGGER_RX_SERVICE_UUID \
BT_UUID_DECLARE_128(BT_UUID_128_ENCODE(0x6E400006, 0xB5A3, 0xF393, 0xE0A9, 0xE50E24DCCA9E))
Would this work? I am assuming I can make a copy of the log_backend_ble.c & log_backend_ble.h, and use my own? Would that be the recommended way to keep logs seperate from the Application NUS.