If a service has two or more characteristics that server uses to indicate/notify a client and this is done from different tasks, is it necessary to create some kind of transmission control - mutex, semaphore etc., or the Bluedroid stack will take care of this and serialize the transmission? In other words, are functions like esp_ble_gattc_write_char_descr() or esp_ble_gatts_send_indicate() thread safe?
Thanks.
BLE notifications
Re: BLE notifications
You dont have to worry as long as 2 tasks wont try to notify from the same characteristic, i am 95% sure about that.
Re: BLE notifications
Thanks you very much.
There is only one task doing the notification - sending just a keep-alive signal to the client every 2-3 seconds. That's all.
There is only one task doing the notification - sending just a keep-alive signal to the client every 2-3 seconds. That's all.
Re: BLE notifications
Maybe thats stupid question, but why are you sending keep alive notifications? This is all done by BLE low level driver and you even can control the timeout after which client will be disconnected.
Re: BLE notifications
Thank you very much, and my apologies for not seeing your post earlier.
The answer is simple - I didn't know about this BLE feature. I knew that BLE keep-alive exists at same level as it is able to recognize if a peer got disconnected, but I didn't know that it could be used by the application. I have to read more about it to understand how to use it.
Thank you very much for this useful info.
The answer is simple - I didn't know about this BLE feature. I knew that BLE keep-alive exists at same level as it is able to recognize if a peer got disconnected, but I didn't know that it could be used by the application. I have to read more about it to understand how to use it.
Thank you very much for this useful info.
Who is online
Users browsing this forum: Baidu [Spider] and 109 guests