Main Site Documentation

USB Intercept


#1

I have a windows phone7 device and I want to write an application on my fez domino that will intercept all communications between the phone and the host computer. Since it’s my host pc, fez and phone7 I was wondering what the legal complications will be if I learned about the inner workings of the protocol via this method.

The intent is to develop an interface between applications on the phone and fez devices so that cool and interesting new products can be developed for phone7 (such as a game controller or cnc mill).


#2

So you want to built an USB sniffer? There are some available already (expensive) and I don’t see any legal issues with that,but it is not an easy task. There is one in dev stage on kickstarter


#3

I asked a question on stack over flow and a person pointed me to a list of the known device ids for USB:

http://www.linux-usb.org/usb.ids

This is getting more and more fun.


#4

There would be no legal issues.

For one, nobody would ever be able to catch you, unless you try to use it to do something illegal or tried to sell it without proper licensing.


#5

Kurt, I’m pretty sure USB doesn’t work like that. The host controller and the slave device vary the voltages on the lines at very high speeds together - if you put a FEZ on the lines it will get all screwed up.

There are various windows and linux applications that will sniff the USB host controller data transfer, allowing you to see what comes out. I haven’t found any that play nice with Windows 7 or any 64 bit edition of windows, however if you can dual boot to XP or have an old PC/laptop around you can run xp on, you can use that to sniff the USB port.


#6

I want to make Fez act as a hub in the communications link, and thereby a participant. This way I should be able to perform the necessary “interception” without anything special?


#7

Yeah, this isn’t going to work. USB was never intended to have a device sit into the middle of the bus like that. Besides, USB is far too fast for NETMF to handle just by bitbanging, unless you tried to separate the 2 links such as this…

Device USB client – > FEZ USB host --> (application) --> FEZ USB client —> computer (USB host)

This would not be a trivial application.

What exactly are you trying to do?


#8

Hello Chris,

Trying to let the Fez act as a hub, while recording the data that passes back and forth to an SD card. The fez will play the part of the usb hub in the connection chain.


#9

I don’t think there’s any good way to do this with FEZ, however there are USB sniffers out there…


#10

Idd don’t waste your time on building a sniffer.
I think you’ll have something else in mind to work on, once you have the protocol :slight_smile:


#11

I have not played with the custom USB host/client stuff with FEZ, but this would be my idea:

Plug the phone into the host port of the fez. Enumerate all the endpoints that the phone exposes. Once you have all that info you can create a client interface on the FEZ client port that mimics that interface.

Plug that cpoied client interface into the PC. Now the only question is if you will be able to pass the info from the real endpoint to the copied endpoint (and vice versa) fast enough…

No bit-bang necessary. Use the built in hardware you have available.

If you want to go RLP then you can probably set up DMA channels to copy the data automatically between the endpoints…


#12

@ Errol, That’s exactly the method that I’m thinking. It would be “fast” enough because the Fez can do a transfer rate of about 1MB per second, and it’s the nature of USB to be able to go slow.