Custom Bluetooth Service with Flags

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
DaPi_1514011
Level 3
Level 3
First like received

Hi,

   

I have AN91162_Creating_a_BLE_Custom_Profile which is a great start to getting a custom service running. Thanks.

   

However the built in services like the Heart Rate monitor use a Flags section in the characteristic definition to enable variable sized data transmission.  Is there a good example of how to do this?  The + button in the characteristic editor doesn't appear to allow adding Flags.

   

Thanks, Dave

0 Likes
1 Solution
Anonymous
Not applicable

Hi Dave,

   

The heart rate service follow a definite specification and the size cannot be varied. You can only do this in a custom profile, or you can implement a service similar to HRS using custom profile.

   

Regards,

   

- Madhu Sudhan

View solution in original post

0 Likes
2 Replies
Anonymous
Not applicable

Hi Dave,

   

The heart rate service follow a definite specification and the size cannot be varied. You can only do this in a custom profile, or you can implement a service similar to HRS using custom profile.

   

Regards,

   

- Madhu Sudhan

0 Likes

Hi Madhu,

   

The first byte of the HRS indicates the payload configuration.  So the transmission size actually varies from 5 bytes to say 17 (guess).   So it is a variable size and optimizes power.

   

The service definition has a nice display of that functionality but doesn't permit users to create a similar service in the custom profile.  I wondered if there were any nice examples of something using flags in a custom service.  Having software Patterns through examples always help users, hence the request for an example.  I'll try the custom flags in our service at some point and raise any questions if I have issues then.

   

Thanks, Dave

0 Likes