This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL-CC2650: Unable to implement GATT_PROP_NOTIFY in SimpleLink Academy ProjectZero

Part Number: LAUNCHXL-CC2650


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

Error changing notify state for <CBCharacteristic: 0x1700be420, UUID = F0001111-0451-4000-B000-000000000000, properties = 0xE, value = <7c553720 957b0000 20050020 dd380020 d4380020>, notifying = NO> : The request is not supported.

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?
Thanks,
Dale
  • Hi,

    Please see the button_service for an example of how to add the notify property. The changes you will have to make are under the Profile Attributes - variables sections.

    -Nathan
  • Nathan,
    Thanks, I tested out the button_service and indeed my ios app saw that it would notify, yeah.

    I then saw how much needed to change to add notify so I then decided to not even use the led and data service in my modified ProjectZero but I had to add one more characteristic to button service.

    Thanks,
    Dale