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

Characteristic UUID auestion

I am trying to do spp communication between central and peripheral with BLE.

First, the peripheral uses microchip RN4871.

The BLE setting is
Service UUID: 49535343FE7D4AE58FA99FAFD205E455
TX characteristic UUID: 495353431E4D4BD9BA6123C647249616
RX characteristic UUID: 49535343884143F4A8D4ECBE34729BB3
is.

I'm going to implement this central device for spp communication by searching this peripheral with Nordic nrf52840 DK board.

#define NUS_BASE_UUID {{0x9E, 0xCA, 0xDC, 0x24, 0x0E, 0xE5, 0xA9, 0xE0, 0x93, 0xF3, 0xA3, 0xB5, 0x00, 0x00, 0x40, 0x6E}}
#define BLE_UUID_NUS_SERVICE 0x0001 / ** <The UUID of the Nordic UART Service. * /
#define BLE_UUID_NUS_RX_CHARACTERISTIC 0x0002 / ** <The UUID of the RX Characteristic. * /
#define BLE_UUID_NUS_TX_CHARACTERISTIC 0x0003 / ** <The UUID of the TX Characteristic. * /

As different.
I don't know whether it is necessary to register on the central device, either "Service UUID" or "TX RX characteristic UUID".

microchips are all different except 49535343
nordic is only 16bits different.

I'm also curious how to fix the different parts.

thank you.

Parents
  • Hi Kangtae, 
    The microchip peripheral uses quite a strange service and characteristic UUID. They have different bases. 
    In that case you would need to define 3 different UUID bases. Note that the UUID base has byte 13 and 14 set to 0. and these 2 bytes is formed by the service /characteristic 2 bytes UUIDs.

    For example the NUS service UUID is 0x9E, 0xCA, 0xDC, 0x24, 0x0E, 0xE5, 0xA9, 0xE0, 0x93, 0xF3, 0xA3, 0xB5, 0x01, 0x00, 0x40, 0x6E

    And NUS RX characteristic UUID is: 0x9E, 0xCA, 0xDC, 0x24, 0x0E, 0xE5, 0xA9, 0xE0, 0x93, 0xF3, 0xA3, 0xB5, 0x02, 0x00, 0x40, 0x6E

    In your case the first UUID base will be 49530000FE7D4AE58FA99FAFD205E455 and the service UUID will be 0x5343 

    Then UUID base for characteristic is 495300001E4D4BD9BA6123C647249616 and the characteristic UUID will be 0x5343 

    Take note of the uuid_type when you call sd_ble_uuid_vs_add()

  • Hung Bui, Reply Thank you very much.
    After searching, it seems that it is possible to connect by device name without knowing the UUID.
    Using the example "ble_app_hrs_c" seems to be possible, right?
    The final goal is to search and select the peripheral devices of the microchip above by name.
    If this is possible with the "ble_app_hrs_c" example, can I combine and use "ble_app_uart_c" in this example?
    I would appreciate it if you could tell me the main points that need to be changed, such as a function that outputs the searched device name.

Reply
  • Hung Bui, Reply Thank you very much.
    After searching, it seems that it is possible to connect by device name without knowing the UUID.
    Using the example "ble_app_hrs_c" seems to be possible, right?
    The final goal is to search and select the peripheral devices of the microchip above by name.
    If this is possible with the "ble_app_hrs_c" example, can I combine and use "ble_app_uart_c" in this example?
    I would appreciate it if you could tell me the main points that need to be changed, such as a function that outputs the searched device name.

Children
No Data
Related