Bus pirate

From ArchWiki
Revision as of 22:08, 24 February 2011 by Jonas Ferry (Talk | contribs) (Added category)

Jump to: navigation, search

General

The Bus Pirate is a versatile tool for communicating with various hardware. All scripts will assume that there is a 'Template:Filename'.

Installation

The drivers for the FTDI chip is included in the kernel, so it should be detected as soon as it's plugged in, and assigned to device Template:Filename. To check where it got assigned, run:

# dmesg | tail

The output will contain a line that looks something like this:

# usb 1-4.4: FTDI USB Serial Device converter now attached to ttyUSB0

udev

It can be annoying to have to look up what Template:Filename the device gets assigned, so it's a good idea to add a simple udev rule that creates the symlink 'Template:Filename -> Template:Filename' when it is plugged in.

First of all, you will need to find out the serial number of FTDI chip on the bus pirate. This can be achieved by running the following, assuming your device is plugged in and was assigned to Template:Filename:

# udevadm info --attribute-walk -n /dev/ttyUSB0  | sed -n '/FTDI/,/serial/p'

Now add/create the following file:

Template:File


Change 'ATTRS{serial}=="XXXXXXXX"' to the serial on your device and force udev to load the new rule:

# udevadm control --reload-rules

At this point, whenever you plug in the device, the symlink should be created.

Communication

To communicate with the device, you can use any of the following, to name a few:

# minicom -b 115200 -8 -D /dev/buspirate
# screen /dev/buspirate 115200 8N1
# picocom -b 115200 -p n -d 8 /dev/buspirate

Type '?' and press enter and the device should reply with a list of possible commands.