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.

GATT_Notification()

Other Parts Discussed in Thread: CC2541, CC2540

Hi,

I have my CC2541 device with BLE_STACK 1.4.

I send data with GATT_Notification (20 bytes *4 ) to cc2540 dongle and with btool it is recognized and printed to screen (UART)

Why on iOS i cannot receive this data ?

please help me.

What i am not doing well?

  • Hi,

    You need to enable CCCD of the characteristic from iOS, otherwise iOS will ignore the data.

    Best regards,
    Aslak

  • Hi, 

    I enabled it like at sensor tag:

     if ([self sensorEnabled:@"EFM32 active"]) {

            CBUUID *sUUID = [CBUUID UUIDWithString:[d.setupData valueForKey:@"EFM32 service UUID"]];

            CBUUID *cUUID = [CBUUID UUIDWithString:[d.setupData valueForKey:@"EFM32 config RX UUID"]];

            uint8_t data = 0xAB;

            [BLEUtility writeCharacteristic:d.p sCBUUID:sUUID cCBUUID:cUUID data:[NSData dataWithBytes:&data length:1]];

            

            cUUID = [CBUUID UUIDWithString:[d.setupData valueForKey:@"EFM32 notif UUID"]];

            [BLEUtility setNotificationForCharacteristic:d.p sCBUUID:sUUID cCBUUID:cUUID enable:YES];

            cUUID = [CBUUID UUIDWithString:[d.setupData valueForKey:@"EFM32 config TX UUID"]];

            [BLEUtility setNotificationForCharacteristic:d.p sCBUUID:sUUID cCBUUID:cUUID enable:YES];

            cUUID = [CBUUID UUIDWithString:[d.setupData valueForKey:@"EFM32 Data TX UUID"]];

            [BLEUtility setNotificationForCharacteristic:d.p sCBUUID:sUUID cCBUUID:cUUID enable:YES];

            cUUID = [CBUUID UUIDWithString:[d.setupData valueForKey:@"EFM32 Data RX UUID"]];

            [BLEUtility setNotificationForCharacteristic:d.p sCBUUID:sUUID cCBUUID:cUUID enable:YES];

                }

            

        

    This what you means?

    if yes it is still does not working 

  • Tell us more pls

  • This is helpful information, but it would be nice for CCCD to not be an acronym so that I can search for the solution easier. What do these letters stand for?

  • CCCD stands for client characteristic configuration descriptor. Characteristics with the notify property need to be enabled and that's what the CCCD does. If using iOS, you should use the method setNotifyValue to do this. Setting it manually is asking for trouble.

  • Thanks for the info!