This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Increasing number of bytes in HID descriptor

Hi,

I'm working on hid keyboard example. How can I check whether multiple bytes are received & transmitted after I increase the assigned no. of bytes in input/output report? From the code I understood that nrf device can send 64 bytes to host device. So how do I append bytes in one packet of 64 bytes when sending to host? How does it work from host side? Does nrf read 1 byte at a time sent from host?

Parents
  • https://devzone.nordicsemi.com/f/nordic-q-a/42188/increasing-number-of-bytes-in-hid-descriptor

    I hope that I found the solution for BLE hid keyboard example and increase endpoint out len to reach 64 bytes.

    I post here all the diff:


    //#define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 23

    #define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 96

     //       0x95, 0x02,       // Report Count (2)

    0x95, 0x14,       // Report Count (20) //was Report Count (2)

    //uint8_t  report_val;

    uint8_t  report_val[64];

    //STATIC_ASSERT(OUTPUT_REPORT_MAX_LEN == 20); // was == 1)

    //#define OUTPUT_REPORT_MAX_LEN               1 

    #define OUTPUT_REPORT_MAX_LEN               64

    Is this all correct?

    Now is working in linux (ubuntu) with:

    sudo ./hidapitester  --open-path /dev/hidraw3 --length 0 --send-output 0X1C,0X00,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2

    The data reach the Nordic NRF52840 with the softdevice S140.

    Best regards,

    Alberto

Reply
  • https://devzone.nordicsemi.com/f/nordic-q-a/42188/increasing-number-of-bytes-in-hid-descriptor

    I hope that I found the solution for BLE hid keyboard example and increase endpoint out len to reach 64 bytes.

    I post here all the diff:


    //#define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 23

    #define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 96

     //       0x95, 0x02,       // Report Count (2)

    0x95, 0x14,       // Report Count (20) //was Report Count (2)

    //uint8_t  report_val;

    uint8_t  report_val[64];

    //STATIC_ASSERT(OUTPUT_REPORT_MAX_LEN == 20); // was == 1)

    //#define OUTPUT_REPORT_MAX_LEN               1 

    #define OUTPUT_REPORT_MAX_LEN               64

    Is this all correct?

    Now is working in linux (ubuntu) with:

    sudo ./hidapitester  --open-path /dev/hidraw3 --length 0 --send-output 0X1C,0X00,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2

    The data reach the Nordic NRF52840 with the softdevice S140.

    Best regards,

    Alberto

Children
No Data
Related