Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Generate UUID with nRF5 SDK 17.1.0 in C

Hi,

I've been browsing the forum here but didn't find an appropriate answer for my issue.

First, my platform & tools:

  • Programming nRF52833 (Laird BL653)
  • nRF5 SDK 17.1.0
  • IAR Embedded Workbench 9.20.2

I'm looking for a way to generate an UUID with nRF5 SDK 17.1.0 on the embedded device in C, so basically on the fly.

We're not planning to use it as a "static" information like for the BLE services, but for marking a specific recording within our BLE network with the UUID. The requirement for the ID is that it is unique for all instances.

There are several approaches with external libraries out there, e.g.:

But I couldn't find any library in the SDK which is doing this directly.

So the question is: Is there any source code / library provided by the nRF5 SDK 17.1.0 which is calculating a UUID on the fly or do I have to implement it with external libraries or by using crypto libraries within the SDK?

Thanks for your help!

Best Regards 

Domi

Parents
  • Hello,

    As far as I know, we don't have any "on the fly" / runtime UUID generator libraries. 

    As far as I can tell, the softdevice requires the UUID to be a const parameter, so I am not sure whether this is actually possible at all. 

    This being said, I guess you can store the UUID somewhere in UICR, So you can make it unique for each device, but it would still need to be determined during compile / programming time, and not runtime.

    Best regards,

    Edvin

Reply
  • Hello,

    As far as I know, we don't have any "on the fly" / runtime UUID generator libraries. 

    As far as I can tell, the softdevice requires the UUID to be a const parameter, so I am not sure whether this is actually possible at all. 

    This being said, I guess you can store the UUID somewhere in UICR, So you can make it unique for each device, but it would still need to be determined during compile / programming time, and not runtime.

    Best regards,

    Edvin

Children
  • Hi Edvin,

    thanks for your reply!

    We don't plan to use it for the SoftDevice or the BLE functionality but for an application specific use case to label recordings.

    Anyway, if there's no possibility to generate the UUID during runtime in C with nRF SDK, that's all i need to know!

    Thanks!

    Best Regards,

    Domi

Related