Propeller as a Windows Human Interface Device?
Ron Czapala
Posts: 2,418
I saw something about a version of the Arduino called the Leonardo which
More details are here
Looks interesting, I wonder how we could make a Propeller board enumerate as a Window HID device.
has built-in USB communication, eliminating the need for a secondary processor. This allows the Leonardo to appear to a connected computer as a mouse and keyboard, in addition to a virtual (CDC) serial / COM port
More details are here
Looks interesting, I wonder how we could make a Propeller board enumerate as a Window HID device.
Comments
On the other hand, the Propeller has always been able to support a PS2 keyboard and mouse directly or connect to your PC via USB port or RS232 to take input from the keyboard or mouse. Plus the Propeller can include color TV or VGA video at the same time. And the Propeller can provide additional serial ports separate from the USB.
I am not up to speed on the HID keyboard and mouse deployment. But I suspect the Propeller can do the same. What exactly are you hoping to create as "Human Interface Device"? A touch screen? A joystick?
+++++++
It is a bit embarrassing to say this, but it seems like a bit of promotional hype on someone's part. Of course the idea with Arduino is to get you to buy one of each, whereas the Propeller can morph into new uses by firmware changes. That is what the OBEX is all about.
What interested me was the ability to plug it into a Windows PC and have it automatically detected as a HID device (using the installed driver of course) rather than just a USB Serial Port like the FTDI chips.
Maybe most of the magic is in creating the driver but the Leonardo is doing some tricky stuff as well:
Taking control of cursor movement and the mouse buttons is all on the Windows side. Feeding keyboard serial through is even easier. But having to read Microsoft or Arduino documentation with an eye towards conversion to generic code for the Propeller takes some effort.
The Propeller does have an evolve USB object that might allow you to provide an identifying code that would mate with the Windows HID to call up the right driver. But I am a Linux guy... this stuff is poison to my mind.
Do you have a particular application in mind or did you just find this new feature interesting? Microchip has had microcontrollers with a built in USB interface for years.
I still remember an engineer gripeing about USB because it requires extra code while straight serial is easy to implement.
Why do you even need a PC, because as the Propeller Demo Board demonstrates, you can make your own mini PC.
I was thinking along the lines of using a propeller to provide keystrokes or mouse movements to a Windows application.
For example, a propeller could directly input data values to a PC program by simulating a keyboard or draw using a PC graphics program with the propeller sending mouse movements....
See time 1:20 in this video
I've always found the Leonardo very finicky. Maybe they've improved the firmware, but it's not just an Arduino Uno that can also act as a mouse or keyboard. Great idea, but lacking implementation. I'd be happy to hear they've made it better. I threw away the one I got.
Yeah, there are a lot of negative comments on the product page on Sparkfun - including troubles uploading a sketch.
Like you said, good idea though. I'd like to see a Propeller approach (without the associated problems of the Leonardo).
I'd think getting the Propeller to act as a HID would be easier than getting it to act as a USB host. Scanlime showed the Propeller can act as an USB host. Three of the last four links in post #14 of my index are to USB host on Propeller pages.
I'm pretty sure Micah overclocked the Propeller with a 6MHz crystal to get the USB host code to work.
It would be great if the Prop could act as a HID device but the USB stuff intimidates me. I'm interested in any microcontroller which would make it easy for a device to appear as a normal USB mouse to Windows. I'm hoping to create a custom mouse which can be plugged into a Windows PC without requiring the PC to install special drivers.
You might be able to get the computer to accept the Propeller as a Microsoft mouse by using the serial data packet format.
http://www.kryslix.com/nsfaq/Q.12.html
I'll a longshot, but it's probably more realistic than trying to get the Propeller to work as a USB HID device.
Jeff
Needing an inf file gets off into that side of their business and may actually be only possible if MS licenses you developer software that will let you do this. I am pretty sure this gets you all tangled up in fitting somewhere into the Windows Registry scheme. MS is big on justifying this all as better security. So I don't expect them to provide an open HID device INF just for hobbyist to explore their software. They are trying to make things more secure, not less so.
On the other hand, there is no Registry in Linux; so this is easily done with a Propeller, Arduino, or many other microcontrollers. Or you can even set aside a Propeller and just use an IR Remote control as a HID-like device. Generic USB is not a problem.
Here is an example of what you can easily do......
My Cubieboard is a LInux OS device and has the IR reciever already provided. So I am fooling around with getting it to work as a music server that is controlled from IR Remote and will allow me to select from radio stations over the world wide web, or play loaded MP3 files. There are repositories for a complete digital jukebox that will handle input from the IR remote, but I am working one something more basic. I'd also like to be able to play CDs via the remote as well.
Unless Microsoft changed things completely just for Windows 8, an .inf file is just a simple text file that anyone can make. They are more of a security problem than a fix. I believe they are actually blocked by default on Windows 7.
That seems easy enough. But if the Windows Registry tracks the number of INF files that are created properly in an install process and you add one by some other route, you just may find yourself shut out of your computer with some cryptic message about file corruption. MS does this to assure that the OS doesn't get further corrupted if a hostel hack has inserted something. Of course a repair software application would just dump the INF you inserted and you are back to square one.
I have no idea what Windows 8 is doing and barely use the Windows 7 that I have.
Are you thinking of Micah's work (mentioned in post #9)?
As far as I know she wrote USB host code. I don't know how applicable the code is towards making a HID device.
Here are some links to Micah's work.
OBEX
Forum Thread
Scanlime's Website
Both AVR and PIC have USB internal to micro-controllers, but I have completely avoided the use of any of these as it adds a whole additional dimension to the creation of what is a rather simple serial interface. These tend to be available for the consumer electronics that desire to have everything in one chip and a USB device that will generate its own special identity code.
I somewhat dislike the USB port. It often can be completely set aside. I much prefer a straight RS232, RS485 or RS422 connection into my PC.
Micah has writen Host code, and maybe some slave code. It is a good place to start if you really want to learn all and everything about USB.
I've been for a walk on a winter's day. ....
http://forums.parallax.com/showthread.php/97328-USB-toys-to-play-with?p=675656#post675656
Thank you jazzed. Brad's thread didn't turn up when I did a search about a week ago. His code looks like it might do the trick.
I also found that thread a couple of days ago but my initial search attempts did not reveal it. I wish the search feature was more robust!
Hmmm, I didn't think it was host drivers. But with my memory these days anything is possible. I would have thought if it was host drivers I would have related it to the Vinculum where there's a hardware solution already. To be honest I don't remember and I could not locate the old ZIP archive I thought I had.
A USB object that makes a PC think the Propeller is a generic HID device would open up all kinds of potential.