BLE Input/Output Maximum HID Report Size

Hi, I'm trying to send 64-byte reports for INPUT and OUTPUT: 1 byte for report ID and 63 bytes of data. However, the HID service code doesn't seem to handle incoming OUTPUT reports or send out outbound INPUT reports when attempting 64-byte reports (or larger). On the other hand, 63-byte reports (and smaller) do work. Any ideas why this may be and if there's a fix?

Parents
  • Hi,

    For HID over Bluetooth, the maximum length of an attribute value should be 512 octets (bytes), see this post.

    I tried building the peripheral_hids_keyboard sample, and it seems that the default MTU length is set around the size where you stop receiving the packets.

    CONFIG_BT_L2CAP_TX_MTU=65
    CONFIG_BT_BUF_ACL_TX_SIZE=27
    CONFIG_BT_BUF_ACL_RX_SIZE=69
    CONFIG_BT_CTLR_DATA_LENGTH_MAX=69

    Can you try to increase CONFIG_BT_L2CAP_TX_MTU and CONFIG_BT_BUF_ACL_RX_SIZE in your prj.conf file? Increasing CONFIG_BT_CTLR_DATA_LENGTH_MAX will also enable you to send more data in one packet (Increasing MTU will split data into multiple packets if data length cannot fit the full payload in one packet).

    Best regards,
    Jørgen

Reply
  • Hi,

    For HID over Bluetooth, the maximum length of an attribute value should be 512 octets (bytes), see this post.

    I tried building the peripheral_hids_keyboard sample, and it seems that the default MTU length is set around the size where you stop receiving the packets.

    CONFIG_BT_L2CAP_TX_MTU=65
    CONFIG_BT_BUF_ACL_TX_SIZE=27
    CONFIG_BT_BUF_ACL_RX_SIZE=69
    CONFIG_BT_CTLR_DATA_LENGTH_MAX=69

    Can you try to increase CONFIG_BT_L2CAP_TX_MTU and CONFIG_BT_BUF_ACL_RX_SIZE in your prj.conf file? Increasing CONFIG_BT_CTLR_DATA_LENGTH_MAX will also enable you to send more data in one packet (Increasing MTU will split data into multiple packets if data length cannot fit the full payload in one packet).

    Best regards,
    Jørgen

Children
Related