Skip to content

Explicit CCC added descriptor does not send notification/indication to client #10316

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cy-kishore opened this issue Apr 4, 2019 · 2 comments

Comments

@cy-kishore
Copy link

When the CCC descriptor is added explicitly from application then the indication or notification packets are not sent out from server device.

We found this issue is in attsProcWrite () function in atts_write.c file.
We had to move out the cccCback from else if condition. Below is our changes for your reference.

--- a/features/FEATURE_BLE/targets/TARGET_CORDIO/stack/ble-host/sources/stack/att/atts_write.c
+++ b/features/FEATURE_BLE/targets/TARGET_CORDIO/stack/ble-host/sources/stack/att/atts_write.c
@@ -157,6 +157,11 @@ void attsProcWrite(attCcb_t *pCcb, uint16_t len, uint8_t *pPacket)
}
else
{

  •  /* else check if CCC */                                                                                                                                                      
    
  •  if ((pAttr->settings & ATTS_SET_CCC) && (attsCb.cccCback != NULL))                                                                                                           
    
  •  {                                                                                                                                                                            
    
  •    err = (*attsCb.cccCback)(pCcb->connId, ATT_METHOD_WRITE, handle, pPacket);                                                                                                 
    
  •  }                                                                                                                                                                            
     /* if write callback is desired */                                                                                                                                           
     if ((pAttr->settings & ATTS_SET_WRITE_CBACK) &&                                                                                                                              
         (pGroup->writeCback != NULL))                                                                                                                                            
    

@@ -164,11 +169,6 @@ void attsProcWrite(attCcb_t *pCcb, uint16_t len, uint8_t *pPacket)
err = (*pGroup->writeCback)(pCcb->connId, handle, opcode, 0, writeLen,
pPacket, pAttr);
}

  •  /* else check if CCC */                                                                                                                                                      
    
  •  else if ((pAttr->settings & ATTS_SET_CCC) && (attsCb.cccCback != NULL))                                                                                                      
    
  •  {                                                                                                                                                                            
    
  •    err = (*attsCb.cccCback)(pCcb->connId, ATT_METHOD_WRITE, handle, pPacket);                                                                                                 
    
  •  }                                                                                                                                                                            
     else                                                                                                                                                                         
     {                                                                                                                                                                            
       /* write attribute value */
    

Because of cccCback callback is not called, the attsCccCb.pCccTbl value is not getting updated. Because of this the stack is not sending out the notification which the application is sending.

Issue request type

[ ] Question
[ ] Enhancement
[ ] Bug
@ciarmcom
Copy link
Member

ciarmcom commented Apr 4, 2019

Internal Jira reference: https://jira.arm.com/browse/MBOCUSTRIA-1113

@0xc0170
Copy link
Contributor

0xc0170 commented Oct 24, 2019

I believe this was fixed via #10575

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants