Hello,
I found there is a type mismatch for the value member of gattCharCfg_t, it was declared as uint8, but treated as uint16 in simpleProfile_WriteCharCfg, and I think uint16 should be the correct type, right? Is there a need to update the binary of the BLE stack library to fix this problem?
typedef struct
{
uint16 connHandle; //!< Client connection handle
uint8 value; //!< Characteristic configuration value for this client
} gattCharCfg_t;
static uint8 simpleProfile_WriteCharCfg( uint16 connHandle, gattCharCfg_t *charCfgTbl,
uint16 value )
{
gattCharCfg_t *pItem;
pItem = simpleProfile_FindCharCfgItem( connHandle, charCfgTbl );
if ( pItem == NULL )
{
pItem = simpleProfile_FindCharCfgItem( INVALID_CONNHANDLE, charCfgTbl );
if ( pItem == NULL )
{
return ( ATT_ERR_INSUFFICIENT_RESOURCES );
}
pItem->connHandle = connHandle;
}
// Write the new value for this client
pItem->value = value;
return ( SUCCESS );
}
Thank you for your attention!
Merry Christmas!
Joseph