2021-06-09 02:01 PM
I am trying to send a BLE notification after I have connected.
I add the characteristic this way.
retVal = aci_gatt_add_char(serviceHandle,
UUID_TYPE_128,
(const Char_UUID_t *)Uuid,
247,
CHAR_PROP_WRITE_WITHOUT_RESP | CHAR_PROP_WRITE | CHAR_PROP_NOTIFY,
ATTR_PERMISSION_NONE,
GATT_NOTIFY_ATTRIBUTE_WRITE,
MAX_ENCRY_KEY_SIZE,
CHAR_VALUE_LEN_VARIABLE,
&handle);
Then the connected device writes a small amount of data to the characteristic (3 bytes), and I try to send a notification in response.
result = aci_gatt_update_char_value(serviceHandle, valueHandle, 0, length, pData);
The notification is about 80 bytes long. I get the notification data on the other side, but the call to aci_gatt_update_char_value never returns. It gets stuck in hci_send_req waiting for something to happen, and it never happens. This seems like it would be super simple. What am I doing wrong here?
Thanks
2021-06-10 09:19 AM
Whoops, calling from critical section, dont do that....