Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

USB breakout project

Status
Not open for further replies.

Scarr

Member
Hi All,

I want to make a USB breakout circuit, the idea is have a usb lead connected to a PC at one end and a USB device at the other with my circuit in the middle, I want to then monitor or alter USB packets. Now I am not sure how hard / easy this is going to be hence asking on here what you guys think before getting in too deep?

My thought was just having a MCU with two pins "A SIDE USB" and two pins "B SIDE USB", if any pin changes reflect this on the other side, if I want to alter a packet I do this by monitoring the bit stream and changing it as it passed through.

Well please give your comments or thoughts on if you beleive this can be done and if so how easy hard, also if there is an easier way please let me know, thanks.

Steve
 
Most things can be done, but it's not a trivial project by any means - USB is VERY complicated.

I would suggest you try doing it on a PC first, then scale it down to a suitable micro - which is often a good way to go.
 
You may want to give this link a read as it shows a software solution. They do offer a 33 day free trial download of the software. While this solution is not what you are looking for, it will give you some idea of the protocols involved and how USB actually works.

Ron
 
As Nigel rightly pointed out (as he often does!) USB is complicated. Vey complicated. I recently developed a USB device for a PIC18F series - without the pre-written libraries fom microchip, I would have been utterly stumped.

Your idea of a 'pass through' doesn't sound too bad, but you must remember, you can't change packets on the fly, it must be buffered/stored first, looked at, and change accordingly. And because both the host and device are time/latency sensitive, by the time you've stored an entire packet for analysis, the host/device will kick up a fuss that it hasn't recieved anything.

As recommended, by far the best was is to use a software wedge between host software and USB drivers. The 'hardware' solution is actually quite good for things like serial, mouse PS/2, because of the slow speed and tiny packets (literally a byte per packet) but as USB packets are of a minimum of 256bytes, max 4096... it just doesn't seem feasable to me :/

Blueteeth
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top