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

Size of service UUID sdk12.3 (nrf51822) softdevice130

Hi,

Is there a size limit for the vendor specific service UUID? It looks like it should be 16 bits but I can't set more than 4 bits in my code.

I am using the uart central exmaple code sdk12.3 (nrf51822). The ble service UUID (BLE_UUID_NUS_SERVICE) is set at 0x0001. I tried to change it to a different value 0x1485 and now the central device can't connect to peripheral. If I keep the UUID within 4 bits (eg: 0x008) it works. Is there somewhere the UUID size can be set?

Debug log: (no connection, UUID 0x22)

 0> SDH:DEBUG:sd_ble_enable: RAM start at 0x200025e0
 0> APP:INFO: BLE started
 0> :INFO:Fast advertising
 0> :INFO:Connecting to target c651c51bb7ec
 0> :INFO:Connected.
 0> BLE_DB_DISC:INFO:Starting discovery of service with UUID 0x22 for Connection handle 1
 0> BLE_DB_DISC:INFO:Found service UUID 0x22

Debug log: (connected!, UUID 0x08)

 0> SDH:DEBUG:sd_ble_enable: RAM start at 0x200025e0
 0> :INFO:Fast advertising
 0> :INFO:Connecting to target c651c51bb7ec
 0> :INFO:Connected.
 0> BLE_DB_DISC:INFO:Starting discovery of service with UUID 0x8 for Connection handle 1
 0> BLE_DB_DISC:INFO:Found service UUID 0x8
 0> BLE_DB_DISC:INFO:Discovery of service with UUID 0x8 completed with success for Connection handle 1APP:INFO:All Peripheral Services Discovered
Parents
  • Sorry but this doesn't make any sense. Firstly GATT UUID is matter of stack so you should refer SoftDevice version (if you use Nordic Soft Device) and not SDK. Second all Nordic SD API work with 128-bit(16-byte) base (in the form of reference to table provisioned through Soft Device API earlier) and 16-bit (2-byte) "short" UUID. Could you be more precise what SDK example you use and what changes you made to the code? COuld you go back to generic example and verify that (indeed) all works fine?

  • You mean that you are changing the constant on both sides and is stops working depending on how many non-zero bits UUID has? That sounds really strange. Btw. the UUID you talk about has always 16-bits, the fact that some are zeros doesn't make it shorter. Are you sure there isn't some nasty conversion done on top o that constant before you use it as 16-bit unsigned integer in UUID structure? If you are sure that all is correct could you show us radio log from some sniffer/analyzer to see what exactly happens on GATT layer and what is source of the error?

Reply
  • You mean that you are changing the constant on both sides and is stops working depending on how many non-zero bits UUID has? That sounds really strange. Btw. the UUID you talk about has always 16-bits, the fact that some are zeros doesn't make it shorter. Are you sure there isn't some nasty conversion done on top o that constant before you use it as 16-bit unsigned integer in UUID structure? If you are sure that all is correct could you show us radio log from some sniffer/analyzer to see what exactly happens on GATT layer and what is source of the error?

Children
No Data
Related