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 Reply Children
  • Yeah, I was able to send 20 bytes. Changed the value of INPUT_REPORT_KEYS_MAX_LEN.

  • I changed

    #define INPUT_REPORT_KEYS_MAX_LEN           20

    STATIC_ASSERT((INPUT_REPORT_KEYS_MAX_LEN - 2) == 18);

    ble_hids_inp_rep_send(&m_hids, 0, INPUT_REPORT_KEYS_MAX_LEN, (unsigned char*)&arr_data, m_conn_handle);

    I see 20 bytes in nrfConnect but how can it receive 20 bytes without making changes to report descriptor for input report???

    After I make changes to input report in descriptor

    0x75, 0x08,				// REPORT_SIZE(8)
    0x95, 0x14,				// REPORT_COUNT(20)

    and in SimpleHIDWrite, I get

    Why only 2 bytes are received? 

    What needs to be done to increase no. of bytes for output report?

    What is the maximum size possible for output reports for Windows & MAC OS?

    Is IN/OUT endpoint configured to send/receive data on receiving an IN/OUT token packet?

  • bscdb said:
    I see 20 bytes in nrfConnect but how can it receive 20 bytes without making changes to report descriptor for input report???

     As far as I know it's impossible without changes to the report descriptor.

     

    bscdb said:
    Why only 2 bytes are received? 

     Do you get this with other applications too, or is it just the SimpleHIDWrite that is able to receive two bytes?

     

    bscdb said:
    What needs to be done to increase no. of bytes for output report?

     I think you need to change this in the report descriptor.

     

    bscdb said:
    Is IN/OUT endpoint configured to send/receive data on receiving an IN/OUT token packet?

     I'm not sure. This has little to do with BLE and more to do with low level USB implementation.

     

    bscdb said:
    What is the maximum size possible for output reports for Windows & MAC OS?

     I believe it's 64 bytes.

  • I see 20 bytes in nrfConnect even if I dont make changes to report_map_data[].

    In applications other than SimpleHIDWrite, I am able to read only 2 bytes.

    What is missing?

    I observed that if I use 

    err_code = ble_hids_inp_rep_send(&m_hids, 0, 8, (unsigned char*)&BTN_data, m_conn_handle);

    then I see 3 bytes 

    but if I use 

    err_code = ble_hids_inp_rep_send(&m_hids, 0, INPUT_REPORT_KEYS_MAX_LEN, (unsigned char*)&BTN_data, m_conn_handle);

    where INPUT_REPORT_KEYS_MAX_LEN = 20

    then either I dont see any data or just see 2 bytes!!

    This is inside send_BTN_values() function in my code.

    I also tried with gamepad report descriptor and tried increasing no. of bytes on report id 2 but I get driver error while connecting Bluetooth.

    Please reply at the earliest.

Related