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.

BLE Remote TI - Add new profile gatt

Hi everybody,

I try to create a new "hidDevSendReport" to use with my remote TI BLE. I use firmware given by TI !

I would like the same that "mouse profile" but with an other ID :

static void hidDevSendReport( uint8 id, uint8 type, uint8 len, uint8 *pData )

--> id : MY_ID

--> type : HID_REPORT_TYPE_INPUT

--> len : 4

--> buf 

I can send my data in this function but after I can not send in GATT_NOTIFICATION function.

Function is as follows :

static void hidDevSendReport( uint8 id, uint8 type, uint8 len, uint8 *pData )
{
   hidRptMap_t *pRpt;
   gattAttribute_t *pAttr;
   uint16 retHandle;

   // get att handle for report
   if ( (pRpt = hidDevRptById(id, type)) != NULL )
   {
      // if notifications are enabled
      if ( (pAttr = GATT_FindHandle(pRpt->cccdHandle, &retHandle)) != NULL )
      {
         uint16 value;

         value = GATTServApp_ReadCharCfg( gapConnHandle, (gattCharCfg_t *) pAttr->pValue );

         if ( value & GATT_CLIENT_CFG_NOTIFY )
         {
            // After service discovery and encryption, the HID Device should request to
            // change to the preferred connection parameters that best suit its use case.
            if ( updateConnParams )
            {
               GAPRole_SetParameter( GAPROLE_PARAM_UPDATE_REQ, sizeof( uint8 ), &updateConnParams );
               updateConnParams = FALSE;
            }

            // send notification
            lastNoti.handle = pRpt->handle;
            lastNoti.len = len;
            osal_memcpy(lastNoti.value, pData, len);

            GATT_Notification( gapConnHandle, &lastNoti, FALSE );

            // start idle timer
            hidDevStartIdleTimer();
         }
      }
   }
}

The problem is the value returned by :

value  = GATTServApp_ReadCharCfg( gapConnHandle, (gattCharCfg_t *) pAttr->pValue );

The value returned is false so impossible to send my data by BLE.

I already initialized the GattServ with GATTServApp_InitCharCfg function.

Someone has an idea of the problem ?

Thank you very much in advance.

Best regards,

Alex