As expected, the report ID is not part of the data, but why does it seem to repeat the previous report whenever a new one comes in?
I have tested my program sending RAW HID reports with an Atmega32U4 and it only gets these once (it is also a very simple program only calling write with an incrementing first byte whenever I press enter)
//EDIT: In case this is relevant, I am using Windows 10 and tried both node-hid in NodeJS and C#'s HID support, both with the exact same results.
I have also tried both flashing the raw FW using an ST-Link (clone) as well as using the stm32duino bootloader. Same results.
My board is one of these: https://stm32-base.org/boards/STM32F103RET6-Generic-Board
It seems that incoming reports to my STM32 (STM32F1RET6) are doubling up in a weird way.
Lines with // are comments and not actually sent over USBSerial
As you can see, whenever a new report comes in, it seems it reads the previous report...again somehow?
Output of program ([>] = sent this, [<] = received this)
As expected, the report ID is not part of the data, but why does it seem to repeat the previous report whenever a new one comes in? I have tested my program sending RAW HID reports with an Atmega32U4 and it only gets these once (it is also a very simple program only calling write with an incrementing first byte whenever I press enter)
The sketch I used is a basic echo-back program. I have also tried an example without USBCompositeSerial to see if that is the cause and it still got the reports doubled reading them ( https://github.com/arpruss/USBComposite_stm32f1/blob/master/examples/rawhid/rawhid.ino ).
Below is a gist of my sketch. Am I (and the example I found) using the library wrong maybe? https://gist.github.com/Doridian/d0cef69ecff14b3f3401a30297636e32
//EDIT: In case this is relevant, I am using Windows 10 and tried both node-hid in NodeJS and C#'s HID support, both with the exact same results. I have also tried both flashing the raw FW using an ST-Link (clone) as well as using the stm32duino bootloader. Same results. My board is one of these: https://stm32-base.org/boards/STM32F103RET6-Generic-Board