How to know send notification(sl_bt_gatt_server_send_characteristic_notification()) finished?
01/14/2021 | 05:11 PM
Hi:
After call sl_bt_gatt_server_send_characteristic_notification() to send notification, this API is not blocking.
So which sl_bt_msg_t msg could be used to adjust this notification is sent successfully, like BLE_EVT_TX_COMPLETE event in Nordic sdk? thanks.
BTW, in SDK3.x, if customer want to use user event or message to notify some event handler, how could I implement this function?
Bluetooth Low Energy
Discussion Forums
Unanswered
Hi!
The sl_bt_gatt_server_send_notification() function returns SL_STATUS_OK if successful, error code otherwise. If an error occur during execution in the stack, an sl_bt_evt_system_error event occur with a specific error code.
In your second question do you mean the Bluetooth event handler? You can use the sl_bt_external_signal() to report status change from interrupt context or from other threads to application. Signals are bits that are automatically cleared after application has been notified.
0
The sl_bt_gatt_server_send_notification() function returns SL_STATUS_OK if successful, error code otherwise. If an error occur during execution in the stack, an sl_bt_evt_system_error event occur with a specific error code.
The question was how to know that the notification has finished. The OK return code just means that the BLE stack in the transmitting side has queued the notification, but it does not mean it has been sent successfully to the remote device. As OP pointed out, the Nordic BLE stack has an event that is raised when notification is complete. The user application can use this for example to keep track of how many notifications are queued at the moment.
0
Yes, actually I have not find any exampe and event_id report previous notification is sent out.
I have many data planned to send out ASAP, I plan to queue them out after receiving TX completed event, because I don't know how many internal notification queue are available.
Now I have to send out all queued data in app_process_action
0
The notification is an unacknowledged operation. You can probably use an indication to notify the client and then receive a confirmation from the client that acknowledges the reception of the indication.
How to know send notification(sl_bt_gatt_server_send_characteristic_notification()) finished?
Hi:
After call sl_bt_gatt_server_send_characteristic_notification() to send notification, this API is not blocking.
So which sl_bt_msg_t msg could be used to adjust this notification is sent successfully, like BLE_EVT_TX_COMPLETE event in Nordic sdk? thanks.
BTW, in SDK3.x, if customer want to use user event or message to notify some event handler, how could I implement this function?
Hi!
The sl_bt_gatt_server_send_notification() function returns SL_STATUS_OK if successful, error code otherwise. If an error occur during execution in the stack, an sl_bt_evt_system_error event occur with a specific error code.
In your second question do you mean the Bluetooth event handler? You can use the sl_bt_external_signal() to report status change from interrupt context or from other threads to application. Signals are bits that are automatically cleared after application has been notified.
The question was how to know that the notification has finished. The OK return code just means that the BLE stack in the transmitting side has queued the notification, but it does not mean it has been sent successfully to the remote device. As OP pointed out, the Nordic BLE stack has an event that is raised when notification is complete. The user application can use this for example to keep track of how many notifications are queued at the moment.
Yes, actually I have not find any exampe and event_id report previous notification is sent out.
I have many data planned to send out ASAP, I plan to queue them out after receiving TX completed event, because I don't know how many internal notification queue are available.
Now I have to send out all queued data in app_process_action
The notification is an unacknowledged operation. You can probably use an indication to notify the client and then receive a confirmation from the client that acknowledges the reception of the indication.
https://docs.silabs.com/bluetooth/3.1/group-sl-bt-gatt-server#gabbea29a7fcf973421c4e8e8b64f8ccbe