Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

jgotberg

Member Since 02 Apr 2013
Offline Last Active Aug 10 2013 09:44 PM
-----

Topics I've Started

HID Keyboard and Mouse: N1 to N2+ Update

30 July 2013 - 08:27 PM

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:

HID on 4.1.x

USBClient CDC question

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).

 

Symptoms:

4.1.1.0.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.

 

4.2.2.2 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.

 

Thanks!


home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.