You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am confused about the two functions for between bt_gatt_notify and bt_gatt_notify_cb. I have checked some information, but I still don't understand the difference. Let me talk about my understanding first, If I have something wrong with the description, I hope I can get a correct explanation:
The meaning of the bt_gatt_notify is just to put data in the tx queue of the bluetooth stack. If the queue is full, it will block. Only when the queue is not full, can refill the data to be sent. In other words , the return value of the bt_gatt_notify function does not actually send the data to the air interface through the bluetooth stack controller.
The meaning of the bt_gatt_notify_cb is similar to the above function. For the user, when the callback(bt_gatt_notify_params ---> bt_gatt_complete_func_t) of this function is called, it will indicate us that the data has been sent out in the form of notify via bluetooth stack controller.
Therefore, if want to know whether the data has been sent to the air interface through the bluetooth controller, it is best to use the bt_gatt_notify_cb function and perform subsequent processing in the callback function.
Please correct me if my description is wrong, thank you
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I am confused about the two functions for between
bt_gatt_notify
andbt_gatt_notify_cb
. I have checked some information, but I still don't understand the difference. Let me talk about my understanding first, If I have something wrong with the description, I hope I can get a correct explanation:bt_gatt_notify
is just to put data in the tx queue of the bluetooth stack. If the queue is full, it will block. Only when the queue is not full, can refill the data to be sent. In other words , the return value of thebt_gatt_notify
function does not actually send the data to the air interface through the bluetooth stack controller.bt_gatt_notify_cb
is similar to the above function. For the user, when the callback(bt_gatt_notify_params ---> bt_gatt_complete_func_t) of this function is called, it will indicate us that the data has been sent out in the form of notify via bluetooth stack controller.Therefore, if want to know whether the data has been sent to the air interface through the bluetooth controller, it is best to use the
bt_gatt_notify_cb
function and perform subsequent processing in the callback function.Please correct me if my description is wrong, thank you
Beta Was this translation helpful? Give feedback.
All reactions