Linux Kernel supported usb packet analysis

August 5, 2009

Host :

1) usbmon

2) usb-snooping

Reference’s:

1) Snooping USB data stream -  GK-H


Gadget:
?

Libusb Examples

July 13, 2009

Refenerce’s :

Jan Axelson’s WinUSB example under Linux with libusb

Tutorial on USB with Linux

Developing Linux driver using Libusb

USB 3.0

July 7, 2009

News:

µPD720200 is the world’s first USB host controller compliant with the USB 3.0 and xHCI

NEC Electronics

USB Ethernet Testing

July 7, 2009

Host:

As a Device(Gadget):

1) using ipref

* download iperf from http://sourceforge.net/projects/iperf/files/

* cd to iperf-2.0.4

* assuming toolchain at /opt/arm-2007q3,    export PATH=/opt/arm-2007q3/bin:$PATH

*  ./configure –host=arm-none-linux-gnueabi –build=i686-pc-linux-gnu AR=/opt/arm-2007q3/bin/arm-none-linux-gnueabi-ar CC=/opt/arm-2007q3/bin/arm-none-linux-gnueabi-gcc LD=/opt/arm-2007q3/bin/arm-none-linux-gnueabi-ld CXX=/opt/arm-2007q3/bin/arm-none-linux-gnueabi-g++ –prefix=/opt/ipref

* make

[ Note: if similar error came as rpc_alloc, disable following line from config.h

/* Define to rpl_malloc if the replacement function should be used. */

//#define malloc rpl_malloc

Ref. to discussion at linux forum

* make install

* copy /opt/iperf/bin/iperf to /usr/local/bin of BeagleBoard(ARM platform) RFS.

On linux host

shivdas@shivdas-laptop:~$ iperf -s

------------------------------------------------------------

Server listening on TCP port 5001

TCP window size: 85.3 KByte (default)

------------------------------------------------------------

[  4] local 192.168.0.200 port 5001 connected with 192.168.0.202 port 51887

connect failed: Connection refused

[ ID] Interval       Transfer     Bandwidth

[  4]  0.0-10.0 sec    222 MBytes    186 Mbits/sec

On BeagleBoard

root@beagleboard:~# iperf -c 192.168.0.200 -d

————————————————————

Client connecting to 192.168.0.200, TCP port 5001

TCP window size: 35.2 KByte (default)

————————————————————

[  3] local 192.168.0.202 port 51887 connected with 192.168.0.200 port 5001

————————————————————

Server listening on TCP port 5001

TCP window size: 85.3 KByte (default)

————————————————————

Waiting for server threads to complete. Interrupt again to force quit.

[ ID] Interval       Transfer     Bandwidth

[  3]  0.0-10.0 sec    222 MBytes    186 Mbits/sec

root@beagleboard:~#

Reference’s:

http://dominion.thruhere.net/koen/cms/measuring-network-throughput-with-iperf

http://openmaniak.com/iperf.php

http://unixfoo.blogspot.com/2009/02/iperf-network-throughput-measurement.html

Good USB videos and gadgets

June 29, 2009

Gadgets:

1) Mini USB Monitor: A single USB connection from your computer gets you an instant high-resolution secondary display.

Videos:
1) Cool video showing different usb gadgets

Mass storage’s and Pen drives -

1)  How’s a USB flash drive made ? – From Kingston production plant

2) Magnum 128 GB pen drive

Power management and USB -

1) USB Portable Power supply

2) USB Cell – Rechargable AA size battery

Windows USB tools for testing and monitoring

June 27, 2009

USB Analyzers

USB monitors

1)  View, monitor and control connected USB devices

http://www.nirsoft.net/utils/usb_devices_view.html

Tools for Performance testing and Benchmarking

Wireless USB

June 1, 2009

Wireless USB :

Reference’s:

White Paper from NEC Electronice

qusbmon – usb-sniffer using QT [GPLv2]

June 1, 2009

1) download from

svn checkout http://qusbmon.googlecode.com/svn/trunk/ qusbmon-read-only

2) sudo apt-get install qt4-qmake

3)  sudo qmake

4) sudo apt-get install qt4-dev-tools

5) sudo apt-get install libsqlite3-dev

6) sudo make

7) mount debugfs for usbmon

mount -t debugfs none_debugs /sys/kernel/debug

8 ) goto  bin and run “sudo ./qusbmon”

Thanks to :

http://code.google.com/p/qusbmon/

USB and Boot-loaders

May 30, 2009

Following post tries to gather some information regarding usb bootloaders.

Linux Kernel and USB

May 30, 2009

How usb subsystem is implemented in linux kernel, as of kernel.org kernel v2.6.30-rc7

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=shortlog;h=v2.6.30-rc7

Directory Structure:

.
|– Kconfig
|– Makefile
|– README
|– atm
|   |–
|   `–
|– c67x00
|   |–
|   `–
|– class
|   |–
|   `–
|– core
|   |–
|   `–
|– gadget
|   |–
|   `–
|– host
|   |–
|   `– whci
|       |–
|       `–
|– image
|   |–
|   `–
|– misc
|   |–
|   |– sisusbvga
|   |   |–
|   |   `–
|   |–
|   `–
|– mon
|   |–
|   `–
|– musb
|   |–
|   `–
|– otg
|   |–
|   `–
|– serial
|   |–
|   `–
|– storage
|   |–
|   `–
|– usb-skeleton.c
`– wusbcore
|   |–
|   `–
16 directories, 415 files

==============================================================================

How “String Descriptor’s” are manupulated and handled in kernel?

Spec reference:

Host Side:

Device Side:

What is Language Id, where is it in spec, and kernel?
URL reference:

http://www.usb.org/developers/docs/

http://www.usb.org/developers/docs/USB_LANGIDs.pdf

Language Identifiers: They are composed of a 10-bit (9-0) Primary Language Identifier and a 6-bit (15-10) Sublanguage Identifier.

Lets take a most famous example of language Id ox0409 English US. For this Primary language identifier is 0×09 (LANG_ENGLISH – English) and Sub-language Identifier is 0×01(SUBLANG_ENGLISH_US – English(US)), So

Language Identifier (0×0409)= Sublanguage Identifier(00 0001b)+Primary Language Identifier(00 0000 1001b)


Follow

Get every new post delivered to your Inbox.