In short, I need to know if the USBClient code on a Netduino2+ will work as an HID like the old (4.1.x) firmware on Netduino1 did and if so, how.
See these threads for reference:
USBClient "we are working on it" - see the last 2 posts
Now for the full report:
I have followed the excellent work of [Omar (OZ)] to create what I call an HID Keyboard and Mouse Emulator (KME) with a Netduino1. I took his original code which worked great as an HID Keyboard and then added a relative mouse and an absolute mouse to it. I then built a custom shield with an FTDI UART to USB module to allow me to deploy on serial COM2, command the KME on serial COM1, and have the Netduino send HID outputs through the USB. I've been meaning to upload my additions to Omar's work, but I've been trying to get permission from my employer (who will remain nameless) since I wrote the code on their dime.
Now I'm upgrading to Netduino2+ and I'm struggling to get the USBClient and USB Controller code to work on the newer firmware (4.2.x).
220.127.116.11.Beta1 firmware: I have switched the deployment protocol over to COM2 and deployed the code to the N1. Then I power up the N1 and wait a second for the code to load before I plug it in. The computer detects the device as an HID Keyboard and 2 HID Mice. I send pre-defined serial commands to the N1 on COM1 and it converts those commands to USB and forwards them along to the computer. Works great.
18.104.22.168 firmware: I have switched the deployment protocol over to COM2, changed the target framework in VS to 4.2, corrected the couple of references that changed, rebuilt and deployed to my N2+. Then I followed the same power up and wait as the N1 but when I plug it into a computer it is recognized as an Netduino instead of as an HID Keyboard and Mice. Commands sent via serial COM1 are not forwarded to the computer. Fail.
I stepped through the code via the debugger and the USBController reports that it is setup properly and that none of the HID report data fails. I get no exceptions or errors of any kind on the USB/HID code then it jumps into the loop to wait for serial commands to convert to HID. Just like the N1 code ran.
So what is going wrong? Did we lose USBClient/HID support in 4.2? or am I flubbing on the upgrade. Is there a way to downgrade the N2+ firmware back to 4.1 and still use the microSD reader and Ethernet port?
I'll keep trying to get permission to post my code in the meantime.