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.

  • 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

  • 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,

  • Hi,

    I am afraid the SoftDevice API doesn't allow for listing 16 bit UUIDs as if they were 128 bit UUIDs, and we have currently no known workarounds for this.

    I do understand that you have legacy products breaking with the expectations for BLE advertising data, and that you have central side tools relying on erroneously listing 16 bit UUIDs as 128 bit UUIDs in order to connect.

    It should be perfectly fine to change mobile APP from connecting to a given 128 bit UUID, to connecting to either a given 128 bit UUID or a given 16 bit UUID. I.e. connect both to devices advertising the 128 bit version and to devices advertising the 16 bit version. I suggest that as workaround.

    Please note if this is a new project, nRF Connect SDK is our recommended SDK instead of nRF5 SDK which is now in maintenance mode. See our nRF Connect SDK and nRF5 SDK statement. While not possible to advertise 16 bit UUIDs in a list of 128 bit UUIDs in nRF5 SDK, I am not sure about the status in nRF Connect SDK where it may or may not be possible.

    Regards,
    Terje

  • Hi,

    There might be a workaround in nRF5 SDK after all: You could try to add the 128 bit UUID directly to the advertising data yourself, manually, without going through the specific macros/APIs for UUID lists.

    Regards,
    Terje

  • Hi Terje,

    Thank you very much for your reply. It should not be possible to send broadcast data in SDK. The good news is that the 128-bit iSIG base UUID can be broadcast in NCS, which I changed and tested successfully.

    Regards,
    Stars
Related