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

From eLinux.org
Jump to: navigation, search
(Tested devices)
(Tested devices)
Line 36: Line 36:
  
 
{| border="1"
 
{| border="1"
!Device !! USB ID !! Endpoints & types !! Status !! Notes
+
!Device !! USB ID !! Speed !! Endpoints & types !! Status !! Notes
 
|-
 
|-
 
|Logitech, Inc. (M-BJ58/M-BJ69) Optical Wheel Mouse ||<tt>046d:c00e</tt>/<tt>046d:c018</tt>
 
|Logitech, Inc. (M-BJ58/M-BJ69) Optical Wheel Mouse ||<tt>046d:c00e</tt>/<tt>046d:c018</tt>
 +
|align="center"|LS
 
|
 
|
 
* EP1 IN, interrupt
 
* EP1 IN, interrupt
Line 45: Line 46:
 
|-
 
|-
 
|Logitech, Inc. Internet Keyboard ||<tt>046d:c309</tt>
 
|Logitech, Inc. Internet Keyboard ||<tt>046d:c309</tt>
 +
|align="center"|LS
 
|
 
|
 
* EP1 IN, interrupt (keyboard itself)
 
* EP1 IN, interrupt (keyboard itself)

Revision as of 08:29, 18 June 2010

Google Summer of Code 2010 Project

  • Student: Nicolas Boichat
  • Mentors: Hunyue Yau, Laine Walker-Avina, Frans Meulenbroeks

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...

Build and run instructions

To get the proxy driver to work, you need to follow these steps:

  • Clone my kernel git tree. Use the stable-20100618 branch.
  • Compile the kernel with the default beagleboard configuration (see here). You just need to add CONFIG_USB_G_PROXY=m. I also disabled MUSB in host and OTG mode, as well as USB suspend, but this may not be necessary.
  • Install the new kernel on the board.
  • Clone the helper scripts git tree, and copy the content of the arm directory to the BeagleBoard (you need to modify load/setup scripts if you do not have have a copy of musb_hdrc.ko and g_proxy.ko in the same directory).
  • Run ./setup on the BeagleBoard, this will unload the g_ether gadget driver.
  • Plug your device (through a USB hub if it is a low/full-speed device).
  • Plug your PC to the BeagleBoard USB slave port (this can be done earlier as well).
  • Run ./unbind: This will unbind the device from the normal Linux driver.
  • Run ./load: this will (re)load the g_proxy driver.
  • Use the device, it should work.

Tested devices

Device USB ID Speed Endpoints & types Status Notes
Logitech, Inc. (M-BJ58/M-BJ69) Optical Wheel Mouse 046d:c00e/046d:c018 LS
  • EP1 IN, interrupt
OK
Logitech, Inc. Internet Keyboard 046d:c309 LS
  • EP1 IN, interrupt (keyboard itself)
  • EP2 IN, interrupt (wheel on the side, like a mouse)
OK