veraVita
Posts: 4
Joined: Mon Nov 18, 2013 7:21 am

Is it possible to get my RPi to tell Windows it is a device?

Mon Nov 18, 2013 7:37 am

I would like my Raspi to identify to Windows 7+ (xp too if able, if not that's fine) as a screen-cam, keyboard and mouse. I imagine I will need to plug both usb ports in with a crossover cable of some kind, I imagine having to make this.

The pi needs to be able to send keyboard/mouse clicks, and also record the screen somehow. My objective here is to have a situation where my rpi can watch data visually on the screen (decode it with OCR if able) and interact with keyboard/mouse. If I can transfer data to/from the sdcard like this too that would be incredible, I'd even sacrifice the mouse for that.

I'd imagine this will take a fair bit of programming on my end, I just want to see if some of the pieces already exist or if this sounds highly implausible.

karlkiste
Posts: 184
Joined: Tue Jan 22, 2013 8:50 am
Location: berlin, germany

Re: Is it possible to get my RPi to tell Windows it is a dev

Mon Nov 18, 2013 10:51 am

Act as a USB device: Impossible. The USB hardware cannot be set to client mode.

Use the Pi as a "remote Windows workstation" via network: easy. Just install rdesktop and connect to the windows machine.

User avatar
piglet
Posts: 909
Joined: Sat Aug 27, 2011 1:16 pm

Re: Is it possible to get my RPi to tell Windows it is a dev

Mon Nov 18, 2013 11:04 am

karlkiste wrote:Act as a USB device: Impossible. The USB hardware cannot be set to client mode.
*Cough* http://www.raspberrypi.org/phpBB3/viewt ... 96#p159641

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23682
Joined: Sat Jul 30, 2011 7:41 pm

Re: Is it possible to get my RPi to tell Windows it is a dev

Mon Nov 18, 2013 11:20 am

But has anyone ever got it working?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

karlkiste
Posts: 184
Joined: Tue Jan 22, 2013 8:50 am
Location: berlin, germany

Re: Is it possible to get my RPi to tell Windows it is a dev

Mon Nov 18, 2013 12:01 pm

piglet wrote:
karlkiste wrote:Act as a USB device: Impossible. The USB hardware cannot be set to client mode.
*Cough* http://www.raspberrypi.org/phpBB3/viewt ... 96#p159641
From that link: "Yes, Model-A should be able to work in slave mode."

We're talking here about a model B, I think. On a model A, it is not easy to connect to another computer via USB while still having a mouse and keyboard connected.

But, OK, to be precise: The broadcom USB hardware might be able to act as a USB device (instead of the usual "host" configuration). But the ethernet chip on model B will prevent any use of such a mode.

veraVita
Posts: 4
Joined: Mon Nov 18, 2013 7:21 am

Re: Is it possible to get my RPi to tell Windows it is a dev

Mon Nov 18, 2013 6:12 pm

I was talking about a Model B, but I'd be happy to get a model A for this project if necessary.

That link is a great resource, but I don't see anything in there about actual code to get this working just a lot of theoretical "yes's".

I did see this:
Yes, The model A will come with a HOST port. So you need a Host to Host cable, which is non standard.
As part of that you must make sure there is no power going over the cable so either (or both) host power wires need to be not connected.
Which is the "crossover cable" I imagined having to create. With such a cable can the model B accomplish this task since it wouldn't need to go into client mode?
I don't necessarily need to be able to use a keyboard/mouse with my pi, I just want it to identify as a keyboard/mouse/something to monitor screen. My concept is using ssh to get in and look at it this way. And if I can find OCR and screen watching that can be paired I eventually want to make a "smart" technician that will identify the layout of a Windows program, identify it by icon/title, recognize when certain pre-programmed events happen, and rattle off a command as each window pops up.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12233
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Is it possible to get my RPi to tell Windows it is a dev

Mon Nov 18, 2013 6:30 pm

There is no software to make the PI act as an USB slave device, and there probably never will be.

veraVita
Posts: 4
Joined: Mon Nov 18, 2013 7:21 am

Re: Is it possible to get my RPi to tell Windows it is a dev

Mon Nov 18, 2013 6:33 pm

mahjongg wrote:There is no software to make the PI act as an USB slave device, and there probably never will be.
Welp, that answers my questions pretty definitively. I will just have to wait for something to evolve that will suit my needs.

Thanks so much!

karlkiste
Posts: 184
Joined: Tue Jan 22, 2013 8:50 am
Location: berlin, germany

Re: Is it possible to get my RPi to tell Windows it is a dev

Mon Nov 18, 2013 6:34 pm

Those cables do exist (e.g. http://www.datapro.net/products/usb-2-0 ... cable.html ), but you can't simulate keyboard and/or mouse using them afaik.

Why don't you want to use rdesktop via network? It does all you're asking for.

veraVita
Posts: 4
Joined: Mon Nov 18, 2013 7:21 am

Re: Is it possible to get my RPi to tell Windows it is a dev

Mon Nov 18, 2013 6:37 pm

karlkiste wrote:Those cables do exist (e.g. http://www.datapro.net/products/usb-2-0 ... cable.html ), but you can't simulate keyboard and/or mouse using them afaik.

Why don't you want to use rdesktop via network? It does all you're asking for.
I'm not really trying to get a situation where I can connect to Windows myself via my pi, I'm trying to get a situation where my pi can operate a windows computer based on optically recognizing patterns on the screen. I wanted to essentially build a Windows technician in my pocket.

User avatar
FLYFISH TECHNOLOGIES
Posts: 1750
Joined: Thu Oct 03, 2013 7:48 am
Location: Ljubljana, Slovenia
Contact: Website

Re: Is it possible to get my RPi to tell Windows it is a dev

Mon Nov 18, 2013 6:56 pm

Hi,
veraVita wrote:My objective here is to have a situation where my rpi can watch data visually on the screen (decode it with OCR if able) and interact with keyboard/mouse.
I think you can split this into (at least) two separate tasks. One would be to capture/recognize PC screen, the other to control this PC over mouse/keyboard data. Third is SD content sharing. These are very separate things, so you could investigate each of them independently.
veraVita wrote:I'd even sacrifice the mouse for that.
You don't need to sacrifice mouse or anything. On the PC side you can have attached both mouse and keyboard next to this USB "thing". Also on the RasPi side, you could use GPIO, so both USB ports also remain available...

You might want to take a look to a movie of one similar usage case. Visit the the web page listed below, in my signature.


Best wishes, Ivan Zilic.
Running out of GPIO pins and/or need to read analog values?
Solution: http://www.flyfish-tech.com/FF32

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12233
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Is it possible to get my RPi to tell Windows it is a dev

Mon Nov 18, 2013 10:09 pm

keyboards contain a simple micro controller that has hardware and software build in to do USB, and to scan the keyboard matrix.
Such a micro controller can also be used in other ways, including interfacing to other microcontrollers helping them to become an "USB slave device". Here is an example http://dangerousprototypes.com/2013/01/ ... -keyboard/

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: Is it possible to get my RPi to tell Windows it is a dev

Mon Nov 18, 2013 11:23 pm

Wouldn't one of these work - http://www.ebay.com/itm/151109607661 ??

Richard S.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12233
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Is it possible to get my RPi to tell Windows it is a dev

Thu Nov 21, 2013 9:52 pm

no!
Jumper selectable UART, parallel FIFO or SPI MCU interfaces
means that the software in the device is written to do three kinds of "UB endpoint devices", namely "Legacy serial", (UART) "legacy printer port" (parallel FIFO) or it can emulate the SPI port as used in a micro controller. It doesn't have the ability to act like a keyboard, although you can use it to send a serial data stream, and that could be ASCII (or key code) data, or even mouse data. (just like the older mice that connect to a serial port). Without special software to accept those data as keyboard input its not really useful.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12233
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Is it possible to get my RPi to tell Windows it is a dev

Thu Nov 21, 2013 9:58 pm

a chip like this http://www.radovan.org/EasyInput/ is more suitable.

User avatar
Douglas6
Posts: 4765
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Is it possible to get my RPi to tell Windows it is a dev

Thu Nov 21, 2013 11:24 pm

1. A microcontroller add-on with V-USB?

2. A Bluetooth HID device, like this? http://www.adafruit.com/blog/2013/09/27 ... ontroller/

User avatar
Mortimer
Posts: 923
Joined: Sun Jun 10, 2012 3:57 pm

Re: Is it possible to get my RPi to tell Windows it is a dev

Thu Nov 21, 2013 11:38 pm

Have a look at the specs for an Arduino Leonardo. This can be used as an HID device, simulating keyboard and mouse devices. It has other ways to communicate too like SPI and I2C. So it could act as an intermediary between the Raspberry Pi and the PC. Acting as keyboard/mouse to the PC and receiving instruction on what to do from the Raspberry via one of the other serial interfaces.
--------------
The purpose of a little toe is to ensure you keep your furniture in the right place.

User avatar
Douglas6
Posts: 4765
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Is it possible to get my RPi to tell Windows it is a dev

Thu Nov 21, 2013 11:50 pm

3. Can the Pi be programmed to act as a HID over a bluetooth dongle?

User avatar
Mortimer
Posts: 923
Joined: Sun Jun 10, 2012 3:57 pm

Re: Is it possible to get my RPi to tell Windows it is a dev

Thu Nov 21, 2013 11:58 pm

--------------
The purpose of a little toe is to ensure you keep your furniture in the right place.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12233
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Is it possible to get my RPi to tell Windows it is a dev

Fri Nov 22, 2013 8:53 pm

It seems there is (almost) nothing a PI cannot do. :lol:

Return to “Other projects”