Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

How to broadcast a 128-bit SIG-defined UUID

Hi!

Due to product requirements, I need to make the broadcast package contain 128-bit UUID so that the APP of our company can identify the device. The chips of other manufacturers were used to realize this function, but the following problems occurred after replacing Nordic:

SDK: NRF5_SDK_17.1.0_DDDE560, routines: examples\ ble_Peripheral \ble_app_uart.

1.In the routine change NUS_BASE_UUID to the base UUID defined by SIG: 0x0000XXXX-0000-1000-8000-00805F9b34Fb

The change procedure is as follows:

Error parameters are returned during advertising_init initialization

I had to change the broadcast UUID type to 16 bits for proper initialization, both from BLE_UUID_TYPE_VENDOR_BEGIN to BLE_UUID_TYPE_BLE

Using NRF Connect to scan only 16-bit UUID,

This makes it impossible to scan connections using our company's APP, which only recognizes 128-bit UUID. Below is the UUID broadcast by chips from other manufacturers, which needs to be 128 bits to connect with our APP.

How can I set up the broadcast package to include the 128-bit base UUID defined by the SIG so that my APP can connect.

Looking forward to your reply.

Parents
  • Hi,

    There are several types of UUIDs. Two of them are 16 bit UUIDs and 128 bit UUIDs. For the 16 bit UUIDs, the "base UUID" from Bluetooth SIG is used for the remaining 112 bits, in order to make it into a full 128 bit UUID, but in advertising fields etc. only the 16 bits are used. This saves space for over-the-air packets, and/or simplifies the view for end users (by displaying or entering 16 bits instead of full 128 bits UUIDs.)

    When using the base UUID from Bluetooth SIG for a 128 bit UUID, what you do in reality is to make a 16 bit UUID. This UUID should not be treated as a 128 UUID, but rather as a 16 bit UUID, which is what it really is.

    If you want to work with 128 bit UUIDs, then you must choose a different base UUID than the base UUID used for 16 bit UUIDs as defined by Bluetooth SIG. You then can use the APIs for working with 128 bit UUIDs.

    If you want to use proper 16 bit UUIDs, as defined by Bluetooth SIG, then you should use the APIs for 16 bit UUIDs.

    Regards,
    Terje

Reply
  • Hi,

    There are several types of UUIDs. Two of them are 16 bit UUIDs and 128 bit UUIDs. For the 16 bit UUIDs, the "base UUID" from Bluetooth SIG is used for the remaining 112 bits, in order to make it into a full 128 bit UUID, but in advertising fields etc. only the 16 bits are used. This saves space for over-the-air packets, and/or simplifies the view for end users (by displaying or entering 16 bits instead of full 128 bits UUIDs.)

    When using the base UUID from Bluetooth SIG for a 128 bit UUID, what you do in reality is to make a 16 bit UUID. This UUID should not be treated as a 128 UUID, but rather as a 16 bit UUID, which is what it really is.

    If you want to work with 128 bit UUIDs, then you must choose a different base UUID than the base UUID used for 16 bit UUIDs as defined by Bluetooth SIG. You then can use the APIs for working with 128 bit UUIDs.

    If you want to use proper 16 bit UUIDs, as defined by Bluetooth SIG, then you should use the APIs for 16 bit UUIDs.

    Regards,
    Terje

Children
  • Hi,

    Thank you for your reply. I have understood your answer. In this way, the space of broadcast package can be saved by using 16-bit UUID. However, I wonder if there is any way to broadcast the basic UUID of 128-bit SIG in Nordic SDK. Since the mobile APP only identifies this UUID for connection, and many products (using non-Nordic master chips) are already in use, the Settings of mobile APP cannot be changed.

    As you said, UUID needs to be processed through API. Could you change the API for processing UUID to realize the function I want (broadcast the basic UUID defined by 128-bit SIG)? This is very important for our project.

    Greetings,

Related