Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
Programming Software Technology Hardware

USB Development Tools for Embedded Devices? 31

engywook asks: "I am thinking about putting a USB interface onto a real-time (home-brew kernel) embedded device, (naturally) with the intent that it talk to another device. I am thinking that it would be very useful to be able to monitor the USB traffic between my device and the other device, and between that other device and (say) a PC that already knows how to talk to it. Looking around, it seems that this capability is available, but at prices in the US$10K and up realm, which is a lot more than I can afford. I am looking for pointers to tools that would accomplish this for much less money. Any ideas would be appreciated! Thanks!"
This discussion has been archived. No new comments can be posted.

USB Development Tools for Embedded Devices?

Comments Filter:
  • Linux Journal #7605 (Score:5, Informative)

    by eburrows ( 543942 ) on Monday August 23, 2004 @11:50AM (#10046366) Homepage
    Last month's Linux Journal has an article titled "Snooping the USB Data Stream", where the author talks about exactly what you want. He talks about using Linux to monitor the data, but you can still use this method to monitor Windows talking to your device by running Windows in VMware.
  • Cypress USB Kit (Score:5, Insightful)

    by codexus ( 538087 ) on Monday August 23, 2004 @12:07PM (#10046573)
    I bought a Cypress USB kit a few years ago, it's quite cool. Is that company still in business? Their website seems to be gone.
  • by torpor ( 458 ) <ibisum@@@gmail...com> on Monday August 23, 2004 @12:12PM (#10046624) Homepage Journal

    there are tons out there, cheap. ARM, even ... google is your friend (so is linuxdevices...) they can be had for $99 or so, or free, in some cases, if you know your vendors ...

    that, and the linux kernel, is all you need to debug USB.
  • Terrible. F (Score:5, Informative)

    by johnjones ( 14274 ) on Monday August 23, 2004 @12:30PM (#10046821) Homepage Journal
    your using a custom kernel so
    look at netbsd USB stack and see howto put that into your src

    you can dump out the usb traffic under netbsd look at the src

    if you want to reverse engineer a windows driver you can use VMware on linux and dump the traffic
    http://www.linuxjournal.com/article.php?s id=7582

    or

    insert a windows driver (that dumps usb traffic) and look at the dumps but this could taint the results see http://usbsnoop.sourceforge.net/

    or

    buy a hardware that sits inbetween the cables for $1000 see http://www.usbdeveloper.com/USBViewer/usbview.htm

    really I would look at http://www.fsmlabs.com/ as you can run real time tasks and use the linux drivers for usb because that part sure as hell is not going to be real time...

    it you have failed to do ANY RESEARCH at all

    Terrible. F

    regards

    john jones
  • FPGA (Score:5, Informative)

    by psyconaut ( 228947 ) on Monday August 23, 2004 @12:32PM (#10046848)
    Assuming that you're happy with USB1.1 and below, one approach is to use a low-cost FPGA (Altera Cyclones are great for this, and a suitable one is $20).

    Zip over to opencores.org, grab the USB 1.x MAC and PHY as a starting point....and you can start to build your own hardware USB sniffer.

    The beauty of this approach is that you can do *proper* sniffing type activities such as microsecond time stamping of samples, which gets (*ahem*) tricky doing things in the software domain under Linux or Windows.

    If you just want to see a vague picture of the wire, you can stick to operating system level sniffing as others have pointed out.

    -psy
    • And this is modded funny because??? Sounds like a good idea to me, you could do some really flexable analysis of the signals with an FPGA, and even integrate it in to the rest of your system.
    • $20! Where do you get your prices? True, an FPGA chip by itself costs around $20 from someplace like DigiKey. Yet, an FPGA is completely useless by itself. As a hobbyist, he'll need some sort of PCB to plug in the FPGA, power it (they lose their bitstream once power is removed), and a cable to program it. More like $150 from my experience.

      I'm not too familiar with Altera, but www.xess.com [xess.com] makes terrific Xilinx-based dev boards starting at $150. They have an on-board i2c-usb chip, 8 MB DRAM, VGA, a
  • PC tools... (Score:5, Informative)

    by brianjcain ( 622084 ) on Monday August 23, 2004 @12:44PM (#10047012) Journal
    Seek out USB Snoop [papillault.free.fr]. You can monitor the goings-on between Windows and the USB device's driver. This probably won't replace a hardware USB debugger, but it's a good start.

    Your usage description seems to advocate a more node-to-node based relationship between devices on the bus. An interface like firewire seems much better suited to your application than USB (master/slave). Though I suppose it could be considerably more complex to implement?

    If you still need a hardware analyzer, this one [usbdeveloper.com] looks more affordable [usbdeveloper.com].
    • Re:PC tools... (Score:3, Insightful)

      by engywook ( 802813 )
      Yes, I'd also found USB Snoop. I think that it also may be of use in the early stages.

      You are right that there is a node=to-node relationship. In fact, I expect that my device and the other will be the only two connected at any given time. Unfortunately, I don't get to pick the interface. The other device already exists, at it is already USB.

      BTW, the only reason it is USB instead of RS-232 is that "someone" convinced (nearly) all the PC hardware manufacturers that RS-232 was Evil and USB was Good. So, PCs

      • I've had success with USB to serial converters. I bought a bunch of them for $12.00 apiece from Belkin, for example. Email me if you want more info.
        • From my reading of the question, it looks like the "other device" is a USB slave device, and the author wants to make a USB host to connect to it. If you can find me a USB host device that lets me speak RS232 to a USB-only slave, please, speak up!

          On a somewhat related note, Delkin and Macally have USB bridges [everythingusb.com] which play host to two devices simultaneously, shuffling files back and forth.
          • He said he would like to get rid of USB completely, and only use RS-232. This was a comment he posted to the story.
            • Continuing from above: New computers have no serial ports, so he could use a USB to RS-232 adapter to support RS-232.
              • I'm not trying to get rid of USB. I'm forced to use USB. I need to make my device talk to an already existing device that talks USB and that expects to be plugged into a PC. I am not making a PC or anthing to do with a PC (mostly). I am making a small real-time device that needs to talk to this other device with no PC anywhere nearby.

                Now, if my device could also look like a USB/RS-232 adapter to a PC, that would be extra cool, as it would let me do some parameter setting, diagnostics, etc. from a PC.

  • FTDI transceiver (Score:4, Informative)

    by oojah ( 113006 ) on Monday August 23, 2004 @12:48PM (#10047059) Homepage
    Use one of the FTDI USB tranceivers instead of trying to reinvent the wheel.

    http://www.ftdichip.com

    They make usb chips with serial interface (drop in replacement for an RS232 transceiver) or an 8-bit parallel interface. Comes with drivers for windows and there are drivers in the kernel already.

    Only does up to 12Mbit/s though.

    Cheers,

    Roger
  • Do you need it? (Score:3, Informative)

    by Solder Fumes ( 797270 ) on Monday August 23, 2004 @12:52PM (#10047118)
    If all you want to do is get your USB device working, I'm not so sure you really need this capability. USB analyzers are primarily useful for testing the device for compliance with USB signal standards. That way, you only have to get your device compliance-tested once.

    I've developed a few USB devices, and frankly I haven't needed an analyzer just to get the device to work. If something's happening you don't understand, set breakpoints or toggle some status LEDs to see where you are in the firmware. That, and software-based sniffing for the occasional sanity check, has been all I really needed.

    Learn the standard USB device types, and if you try to reverse-engineer a proprietary device, stock up on Advil.
  • Another angle (Score:3, Insightful)

    by xenocide2 ( 231786 ) on Monday August 23, 2004 @12:59PM (#10047204) Homepage
    I've seen a lot of USB snoop suggestions, which are a fine solution. But if you don't find that acceptable, I'd suggest looking into a Controller Area Network(CAN) module instead. You can find PC adaptors for this very cheaply, sometimes as little as 20 dollars. It's specifically designed for systems where you know exactly the kind of communications that will go on, and who's more important than who. It's used in a lot of automotive situations, though there's a growing group that doesn't think it's safe enough.
    • CAN is very cool. I'd actually rather implement CAN for this, as my device already has CAN hardware on it and we've used CAN in the past. Thus, we already have software and experience in the CAN world.

      Unfortunately, the device I need to talk to already exists, is from another vendor (actually, potentially multiple other vendors), and has USB and no CAN.

      It's a real shame that they don't talk IDB (ITS Data Bus, SAE J2366). That would be too cool.
  • by raider_red ( 156642 ) on Monday August 23, 2004 @01:05PM (#10047290) Journal
    First, get a copy of USB Complete. This book provides a good reference to the USB interface, and is oriented to hardware design. It also gives a lot of useful advice on picking a USB controller.

    Second, visit the Silicon labs web site. They sell a development board for their USB enabled Microcontroller which includes all cables, an assembler, and a bunch of utilities and examples. They also include a development kit for implementing the Windows drivers for your new device.

    Finally, there's a utility available on the web called Snoopy which will let you capture USB packets.

  • can you not just echo it somehow?
  • Circuit Cellar (Score:5, Informative)

    by FrankSchwab ( 675585 ) on Monday August 23, 2004 @01:13PM (#10047388) Journal
    CircuitCellar just happens to have one part of a multi-part article on implementing a USB device up on their website here [circuitcellar.com] (Page 7, with other references). You'll probably have to check out your local university library or order backissues to get all the parts. They've had 3 or 4 similar articles over the last 5 years.

    /frank

  • The Ellisys Tracker 110 (http://www.ellisys.com/) is usually regarded as the least expensive yet functional hardware USB analyzer. It's about $900. I have one and it seems to work well. It feels overpriced but, when you need it, you need it. Lots of other resources at http://www.usb.org. One of the Ellisys developers hangs out there as well.
    • The Ellisys units look very promising, much less expensive than some of the others I'd found. I'm thinking that I may need OTG capability in my unit, if I want to both talk to the existing device and to be able to plug mine into a PC (for parameter setting and such). So, I may need to get the more expensive model that has the 2.0 and OTG support, even though I don't expect to need (or be able to support, with my cheap micro) the high speed USB.

      We'll have to see whether I can swing the higher price.

      Thank

This is now. Later is later.

Working...