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.

CC2640R2F: missing notify

Part Number: CC2640R2F

Hi everyone,

I'm encountering an issue concern central doesn't receive notify when the central writes on a peripheral's characteristic. The notify is sent by peripheral (seen by blepacketsniffer), but the central doesn't receive it. (See attached psd file  pairing_sniff_complete.psd pkt n. 618)

If we delay the peripheral's notify of a time major than connection interval, the central receive notify (see attached psd file log_pairing.psd pkt n. 125).
Can you help me to solve this issue?
Thanks in advance.
  • Hi Roberto,

    I'll try reproducing your issue and get back to you.
  • Thanks for the Help.
  • Hi Roberto,

    I’m not able to reproduce the issue: I can receive a write rsp and notification in the same connection event. (Also for small connection intervals.)

    Can you set a breakpoint inside else if(pMsg->method == ATT_HANDLE_VALUE_NOTI) and see if they reach the breakpoint

    How are you generating the notification?
  • Hi Marie,

    below a code snippet:

    in the setParameter function

    bStatus_t SimpleProfile_SetParameter( uint8 param, uint8 len, void *value ){
    attHandleValueNoti_t noti;
    bStatus_t status;
    noti.handle = 0x1E;
    noti.len = 2;
    ...

    switch(param){
    ...

    case SIMPLEPROFILE_CHAR6:
    if ( len == SIMPLEPROFILE_CHAR6_LEN )
    {
    VOID memcpy( simpleProfileChar6, value, SIMPLEPROFILE_CHAR6_LEN );

    noti.pValue = (uint8 *)GATT_bm_alloc( 0, ATT_HANDLE_VALUE_NOTI, GATT_MAX_MTU, &len );
    if ( noti.pValue != NULL ) //if allocated
    {
    //place index
    memcpy(noti.pValue, value, sizeof(uint8_t));
    memcpy(noti.pValue+(1*sizeof(uint8_t)), value+(1*sizeof(uint8_t)), sizeof(uint8_t));
    noti.pValue[0] = (uint8_t) *value;
    noti.pValue[1] = (uint8_t) *(value+(1*sizeof(uint8_t)));
    status = GATT_Notification( 0, &noti, 0 ); //attempt to send
    if ( status != SUCCESS ) //if noti not sent
    {
    GATT_bm_free( (gattMsg_t *)&noti, ATT_HANDLE_VALUE_NOTI );
    DebugPush("Errore nell'invio della notifica %d", status);
    }
    else{
    DebugPush("Notifica inviata con successo");

    }
    }
    }
    else
    {
    ret = bleInvalidRange;
    }
    break;
    ...
    }
    }
    The strange behaviour is that if i delay the notification, the central receive correctly it.
  • Hi Roberto,

    Can you try sending the notification from multi_role_processCharValueChangeEvt() in multi_role.c?

  • Hi Roberto,

    Can you please try this:

    In multi_role.c, change line 858 from if to while:

     while (ICall_fetchServiceMsg(&src, &dest,
    
                                   (void **)&pMsg) == ICALL_ERRNO_SUCCESS)
    
         {
    
           uint8_t safeToDealloc = TRUE;
    
           if ((src == ICALL_SERVICE_CLASS_BLE) && (dest == selfEntity))
    
           {

  • Hi Marie,

    thanks for reply.
    I've tried your suggestion and it seems work fine.
    Thanks a lot