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.

Remote TI BLE - Send data



Hi,

Currently I use the HIDAdvRemote firmware of TI. No problem for connect the remote with the dongle and use mouse and keyboard profiles.

Now I try to create a new profile raw_data with a particular payload frame format.

My format is 15 bytes with sensors and other data.

My question : is-it possible to send theses 15 bytes with a frequency of 100Hz by BLE ? If yes, how is possible ? And otherwise how can I do this ?

Thank you in advance for your help.

Alex

  • Hi Alex,

    Yes, if you are using a connection interval less than 10ms (minimum allowed is 7.5ms). Maximum payload in a packet is 20 Bytes. 

    Create a GATT characteristic that stores and updates the value when it's sent/read. Look at the simpleBLEPeripheral, which is an application that is really useful when you want to understand GATT architecture.

    Best Regards

    Joakim

  • Thank you very much for your answer.

    Best regards,

    Alex

  • Hi Joakim,

    I have an other question for you.

    When I create my new profile and use the function hidDevSendReport() for send my data, I have a problem with this line : value  = GATTServApp_ReadCharCfg( gapConnHandle, (gattCharCfg_t *) pAttr->pValue );

    The code is following :

    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 value returns id false and so impossible for me to send my data.

    I initialize my new profite with the others (mouse and keyboard).

    So : what could be this issue ?

    Thanks for your answer.

    Best regards,

    Alex

  • Hi Joakim,

    From the first paragraph of your reply to Alex, I take it that the maximum payload in a packet could be greater than 20 bytes for longer connection intervals?

    We have an application where a payload of 60 bytes would be advantageous and short connection intervals are not needed.

    Thanks,

    Leo