Hi all,
I am using the Adafruit Feather nRF52840 as my central device. My peripheral is a nRF52832 with a 9DoF IMU. (SDK17.02)
I need to stream 26 Bytes of IMU data at 100 Hz from the peripheral to the central and then pass this to a PC via the USB HID. I will ultimately increase the number of peripheral devices and also increase the data length to 100 bytes.
My peripheral is working great with a custom service with 6 characteristics. It is setup to use 2MBPS PHY. However, when testing with my Win10 pc is connects over 1MBPS PHY (understandable). The data is also timestamped.
For my central, I have merged the usbd_hid_generic example with the ble_app_multilink_central example. I have also tailored the multilink_central to support my custom service and characteristics.
The central connects to my peripheral and is able to receive the data successfully. I am also able to send this to my PC via the USB HID.
The speed issue:
My C# HID app is receiving data, however, I only receive around 60 packets per second (not consistent either). This is all accurately timestamped on the peripheral. I have confirmed that i am sending 26 bytes at 100 Hz from the peripheral and receiving it at the central, so the bottleneck is in the HID part.
below is my Report descriptor. I am using an OUT endpoint and IN endpoint with a HID_REP_SIZE 64.
Can anyone suggest a reason why i am unable to receive the data at 100 Hz on the Windows end?
thanks
#define USBD_GENERIC_REPORT_DESCRIPTOR(HID_INPUT_REPORT_BYTES) { \ 0x06, 0x00, 0xFF, /* Usage Page = 0xFF00 (Vendor Defined Page 1) */\ 0x09, 0x01, /* Usage (Vendor Usage 1) */\ 0xA1, 0x01, /* Collection (Application) */\ /* Input report */\ 0x19, 0x01, /* Usage Minimum */\ 0x29, 0x40, /* Usage Maximum */\ 0x15, 0x00, /* Logical Minimum (data bytes in the report may have minimum value = 0x00) */\ 0x26, 0xFF, 0x00, /* Logical Maximum (data bytes in the report may have maximum value = 0x00FF = unsigned 255) */\ 0x75, 0x08, /* Report Size: 8-bit field size */\ 0x95, HID_INPUT_REPORT_BYTES,/* Report Count */\ 0x81, 0x02, /* Input (Data, Array, Abs) */\ /* Output report */\ 0x19, 0x01, /* Usage Minimum */\ 0x29, 0x40, /* Usage Maximum */\ 0x75, 0x08, /* Report Size: 8-bit field size */\ 0x95, HID_INPUT_REPORT_BYTES,/* Report Count */\ 0x91, 0x02, /* Output (Data, Array, Abs) */\ 0xC0, /* End Collection */\ }