I am trying to have all my ProjectZero characteristics set to GATT_PROP_NOTIFY, so that my ios App can be set up to act only when a characteristic value changes in ios CoreBluetooth function didUpdateValueForCharacteristic.
I believe I should be adding GATT_PROP_NOTIFY to the appropriate services Characteristic declaration in ProjectZero's led_service.c as follows:
/*********************************************************************
* Profile Attributes - Table
*/
static gattAttribute_t LED_ServiceAttrTbl[] =
{
// LED_Service Service Declaration
{
{ ATT_BT_UUID_SIZE, primaryServiceUUID },
GATT_PERMIT_READ | GATT_PROP_NOTIFY,
0,
(uint8_t *)&LedServiceDecl
},
// LED0 Characteristic Declaration
{
{ ATT_BT_UUID_SIZE, characterUUID },
GATT_PERMIT_READ | GATT_PROP_NOTIFY, //dale add notify,
0,
&ls_LED0Props
},
// LED0 Characteristic Value
{
{ ATT_UUID_SIZE, ls_LED0UUID },
GATT_PERMIT_READ | GATT_PERMIT_WRITE | GATT_PERMIT_WRITE,
0,
ls_LED0Val
},
// LED1 Characteristic Declaration
{
{ ATT_BT_UUID_SIZE, characterUUID },
GATT_PERMIT_READ | GATT_PROP_NOTIFY, //dale add notify,
0,
&ls_LED1Props
},
// LED1 Characteristic Value
{
{ ATT_UUID_SIZE, ls_LED1UUID },
GATT_PERMIT_READ | GATT_PERMIT_WRITE | GATT_PERMIT_WRITE,
0,
ls_LED1Val
},
};
NOTE WHERE I HAVE ADDED 'GATT_PROP_NOTIFY'.
BUT, when I do this, the ios app first reports that the characteristic has notifying set to NO when it first discovers it AND when I try to have my ios App ask projectZero to set the notifying value set to YES, I get a 'There request is not supported' error as follows:
Discovered characteristic with properties:<CBCharacteristic: 0x1700be420, UUID = F0001111-0451-4000-B000-000000000000, properties = 0xE, value = <7c553720 957b0000 20050020 dd380020 d4380020>, notifying = NO>
and
Am I not correctly setting the notify property in ProjectZero and why do I get 'This request is not supported' when I have my ios App ask to set the notify value to YES?