Skip to content

I don't understand the uuid parameter used in the service definition of the peripheral sample #28541

You must be logged in to vote

In case anyone else is confused by this, I think I understand now.

&vnd_enc_uuid.uuid is correct.

Even though using .val compiles and runs and allows connection to the service, the service UUID will be wrong.

It appears that UUIDs are defined as an incomplete type in order to allow something like polymorphism across the different UUID types. The type field identifying the concrete type of the structure pointed too.

That is probably very obvious to those with decent experience with c (which I don't have).

The fact the incorrect approach compiles and runs fine didn't help!!

Replies: 1 comment

You must be logged in to vote
0 replies
Answer selected by justinleavesley
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
1 participant