A Beagleboard xM-based USB sniffer

I bought a Beagleboard xM more than 2 years ago, as I wanted to make it work as a USB sniffer, based on the work of Nicolas Boichat. But at this time I didn’t manage to make it work, as my knowledge on embedded systems was quite limited.

I have lately been working back on this, and last week during a hacking session in my local hackerspace (Hacknowledge, Rennes, France), I finally managed to make it work 🙂 It produces capture files that can be opened with Wireshark!

The following picture shows my beagleboard xM sniffing USB traffic between my Xbox 360 and a controller:

My beagleboard xM working as a USB sniffer.

Instructions are available in my git repository.

11 Replies to “A Beagleboard xM-based USB sniffer”

  1. I don’t have any experience with USB or Beagleboards, but I’m working on a USB device project and being able to monitor USB traffic would be a big help. I can’t use a software analyzer – the host is a Wii. Will this USB sniffer project work on a BeagleBone Black? Can something like this be done with a Raspberry Pi?

  2. It won’t work as-is on a BeagleBone Black. The Raspberry Pi only has USB host capabilities. It has no USB OTG port, which means it cannot be a USB device.

  3. I am trying to create a USB sniffer out of the Beagleboard XM. I am following the instructions given in this link. http://www.elinux.org/BeagleBoard/GSoC/USBSniffer Unfortunately, I am having problems. When I run the command, this is what i get.

    root@beagleboard:~# ./sniff
    List of devices:
    1-2.1: Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
    1-2.2: Bus 001 Device 004: ID 040b:2013 Weltrend Semiconductor
    ====
    Choose the device to sniff [default:1-2.2]: 1-2.1
    Chosen device: 1-2.1
    Chosen FIFO configuration: ep1in:1024,ep2out:1024,ep3in:32
    Device unbound!
    FATAL: Error inserting musb_hdrc (/lib/modules/2.6.32-usbsniffer/kernel/drivers/usb/musb/musb_hdrc.ko): Unknown symbol in module, or unknown parameter (see dmesg)
    Starting tcpdump
    mv: cannot rename ‘/media/ram/dump’: No such file or directory
    tcpdump: listening on usbmon1, link-type USB_LINUX_MMAPPED (USB with padded Linux header), capture size 65535 bytes
    Loading proxy driver…
    Device should work now…
    Device should work now…
    Device should work now…
    Device should work now…
    Press enter to stop logging.

    6 packets captured
    6 packets received by filter
    0 packets dropped by kernel

    What i cannot understand is why i am getting
    FATAL: Error inserting musb_hdrc … Unknown symbol in module, or unknown parameter (see dmesg)

    and this:
    mv: cannot rename ‘/media/ram/dump’: No such file or directory

  4. Hi Matlo,

    The use of the precompiled image from your GITHUB repository gave me some really unexpected results.
    The SD card has been created successfully, and I can see both the boot and Angstrom partitions just fine, and the files on these as well. However when I attempt to boot from the card I see a pure black screen on the monitor. There is video signal reaching the monitor, but nothing is visible.
    The Beagleboard-XM boots just from another image (XMTester Beta 4-25).
    Tried using a different SD card for the image, no change.
    Tried to adjust the screen resolution in the uEnv.txt but no change either.
    Now I’m down to setup from scratch, but before I do..

    Have you seen this issue before? Any suggestions?

    Thanks!

  5. OK, it is official. I need more coffee to help me think. 🙂
    Connected via serial, and of course I’m seeing an error message:
    ** File not found /boot/uImage
    Booting from nand …

    no devices available
    Wrong image format for bootm command
    ERROR: can’t get kernek image!
    OMAP3 beagleboard.org #

    1. Hi Beigli,

      I’m having issues trying to get the whole system up and running. How did you manage to get the sniffer to work after the SD card was successfully created? I’m having issues connecting to my BeagleBoard via a serial connector to my linux pc.

Leave a Reply

Your email address will not be published. Required fields are marked *