Skip to main content
BStic.1
Associate II
June 9, 2021
Question

aci_gatt_update_char_value never returns

  • June 9, 2021
  • 1 reply
  • 837 views

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

This topic has been closed for replies.

1 reply

BStic.1
BStic.1Author
Associate II
June 10, 2021

Whoops, calling from critical section, dont do that....