Skip to main content
aj.sk
Associate III
Question

Automatic update interval for BlueNRG characteristics.

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?

This topic has been closed for replies.

7 replies

aj.sk
aj.skAuthor
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
aj.skAuthor
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
aj.skAuthor
Associate III

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

Winfred LU
ST Employee

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.

aj.sk
aj.skAuthor
Associate III

Okay, thanks for confirmation!