Difference between revisions of "BeagleBoard/GSoC/2010 Projects/USBSniffer"

From eLinux.org
Jump to: navigation, search
(Implementation)
(Implementation)
Line 32: Line 32:
 
* Device emulation: Emulate the sniffed device itself: That is, pretend that we are the device itself, and forward packets back and forth between the device and the host.
 
* Device emulation: Emulate the sniffed device itself: That is, pretend that we are the device itself, and forward packets back and forth between the device and the host.
 
* Hub emulation: Emulate a USB hub. That is, act as if we were a USB hub, while several ports. One (or more) of these ports would be connected to the device to be analysed. Other ports would still be available for other USB gadget (e.g., Ethernet, serial gadgets).
 
* Hub emulation: Emulate a USB hub. That is, act as if we were a USB hub, while several ports. One (or more) of these ports would be connected to the device to be analysed. Other ports would still be available for other USB gadget (e.g., Ethernet, serial gadgets).
 +
[[Category:BeagleBoard]]

Revision as of 21:06, 13 May 2010

Google Summer of Code 2010 Project

  • Student: Nicolas Boichat
  • Mentor: Hunyue Yau

BeagleBoard project: usbsniffer

Project at gitorious.org: http://gitorious.org/beagleboard-usbsniffer

Blog: http://beagleboard-usbsniffer.blogspot.com/ (RSS)

Abstract

The goal of this project is to use the BeagleBoard as an USB sniffer. The host computer would be connected to the slave USB port of the BeagleBoard, and the device to be sniffed on the host USB port.

The BeagleBoard would then forward USB data, while logging it.

This presents the following advantages over a software-based solution: No software modification is required; support of proprietary OSes; allows debugging of new USB stacks; and possibly lower-level debugging of USB frames...

Description

The goal is to have some hardware USB sniffer on the Beagle Board. The host PC is connected on the slave USB port of the Beagle Board, and the device to be analysed on the host port of the Beagle Board. The goal is to have a completely transparent solution to forward USB packets from the host PC to the device (and back), while logging the data: that is, neither the host PC nor the device must be able to realise that there is a sniffer in the middle, intercepting packets. Software solutions to capture packets already exist (e.g., USB Snoopy on Windows, USB monitor on Linux), but a hardware solution would have the advantage of:

  • Not requiring any software modification
  • Supporting proprietary OSes, where you may not have access to the software
  • Allowing debugging of a new USB stack: If, let's say, you are developing a new USB stack for your preferred operating system, any software logging solution would obviously be as reliable as the stack you are currently developing, hence the usefulness of a hardware solution.
  • Depending on the capabilities of the OTG and EHCI chips, being able to capture USB frames at a lower level, and maybe monitor for transmission errors for example.

Implementation

There are 2 main alternatives to implement such a USB sniffer:

  • Device emulation: Emulate the sniffed device itself: That is, pretend that we are the device itself, and forward packets back and forth between the device and the host.
  • Hub emulation: Emulate a USB hub. That is, act as if we were a USB hub, while several ports. One (or more) of these ports would be connected to the device to be analysed. Other ports would still be available for other USB gadget (e.g., Ethernet, serial gadgets).