cancel
Showing results for 
Search instead for 
Did you mean: 

Automatic update interval for BlueNRG characteristics.

aj.sk
Associate III

Is it possible to use the BlueNRG API to have a automatic characteric broadcasting? Currently I do this manually by calling the function

aci_gatt_update_char_value()

for the corresponding characteristic but that's kinda cumbersome. Does the stack provide an automatic approach for this problem?

7 REPLIES 7
aj.sk
Associate III

Is this such an irregular use case?

Winfred LU
ST Employee

Could you provide more detail about

what would be the function of "automatic characteric broadcasting"?

aj.sk
Associate III

Hi Winfred

If a client subscribes to a certain characteristic and doesn't want to poll. I'm not that deep into the whole Bluetooth topic so I don't know if that a regular use case, I just have a project with this requirement so currently I use the function described in the question.

Winfred LU
ST Employee

That would be the behavior of attribute notifications.

So, it seems that you were implementing a GATT server.

When periodical notifications are needed, please put the procedure be triggered with a timer.

There is no single API for a GATT server to generate a notification periodically.

aj.sk
Associate III

So my approach of periodically (timer based) calling aci_gatt_update_char_value is correct?

Yes. Because the notification can be sent in any time when needed (characteristic value updated),

the server has to actively notify the client when it means to do that.

Okay, thanks for confirmation!