Unable to use 16-bit UUID in KW45 Wireless UART Example

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unable to use 16-bit UUID in KW45 Wireless UART Example

296 Views
Abhi1112
Contributor I

Hello NXP Team,

I am working on KW45B41Z-EVK using the Wireless UART FreeRTOS example.

I noticed that macros like PRIMARY_SERVICE_UUID16 are not available,
and the example uses only 128-bit UUIDs.

I want to implement a custom 16-bit UUID service (e.g., 0xFFF0), but I am unsure
how to correctly define it using the existing GATT database macros.

Could you please clarify:
1. How to properly define 16-bit UUID using UUID16 macro?
2. Whether PRIMARY_SERVICE macro supports 16-bit UUID directly?
3. Any recommended approach for custom services in KW45 BLE stack?

Thank you.

0 Kudos
Reply
1 Reply

243 Views
sofiaurueta
NXP Employee
NXP Employee

Hello,
Hope you are doing well.

 

The UUID is a 128-bit value. To reduce the overhead associated with storing and transmitting 128‑bit UUIDs, the Bluetooth SIG has pre‑allocated a range of UUIDs for frequently used, registered purposes. These pre‑allocated UUIDs have 16‑bit aliases, commonly referred to as 16‑bit UUIDs. Although they are represented as 16‑bit values, each actually represents a 128-bit UUID value.

A list of Bluetooth SIG‑defined 16‑bit UUIDs can be found on the Assigned Numbers documentation of the Bluetooth Technology website. If you need a custom service intended for broader or official use, it is also possible to request and purchase an official 16‑bit UUID as a Bluetooth SIG member.

 

When defining a GATT database, the GATT_DB API provides several macros for declaring services. For 16‑bit UUIDs, the following macro is used: PRIMARY_SERVICE(name, uuid16). Both the UUID16 and PRIMARY_SERVICE macros support the Bluetooth SIG‑defined 2‑byte UUIDs. These 16‑bit UUID constants for GATT declarations are provided in the ble_sig_defines.h header file.

For more information on GATT services see Creating GATT database — MCUXpresso SDK Documentation

 

If you are looking is to implement a custom service using the wireless_uart SDK example, the recommended approach is to first define a 128‑bit UUID. In that case, you should use the UUID128 and PRIMARY_SERVICE_UUID128 macros instead. This example implementation might be helpful: KW38 Custom Profile.

 

Best regards,
Ana Sofia.

0 Kudos
Reply