about // doc

Use Bus Pirate on Linux

Last modified: Mar, 2015

This tutorial works for Bus Pirate V3 on LinuxMint 13, but should also work for other Linux distributions with or without minor modifications.

Set UDev Rules

UDev can make Bus Pirate show up with a consistent device file under /dev. First find the device information associated with the Bus Pirate device (more details can be found in udev quick reference). Run


and find the related information such as

Bus 002 Device 009: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC

It means the device is at “/dev/bus/usb/002/009”. And run

udevadm info -a -p $(udevadm info -q path -n /dev/bus/usb/002/009)

Create a udev rule with some information in the output above, such as

SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", \
    ATTRS{serial}=="A9015CAY", MODE:="0666", \

Here the serial number attribute is added to the udev rule in case there are other FTDI chips interfacing with the host computer. Save this to “/etc/udev/rules.d/61-buspirate1.rules”, and restart the udev daemon

sudo restart udev

Reconnect the Bus Pirate to the computer, and it should be associated with “/dev/BusPirate1”, and writable to all.

Interface with Bus Pirate with PySerial

update, Mar 2015: I found miniterm may send extra characters to Bus Pirate. Using minicom or screen is recommended for now.

Bus Pirate interfaces with host computer with text-based commands via UART link.

It is natural for a Python fan like myself to resort to Python-based tools for almost everything. Here a command-line based Python script called “miniterm.py”, which is a part of pySerial package, is used to interface with Bus Pirate. First install the pySerial package as follows

# updated in Mar, 2015, for LinuxMint 17
# used to be sudo apt-get install python-pyserial 
sudo apt-get install python-serial  

The usage of miniterm can be found here. According to this post, the UART parameters for Bus Pirate are

  • Baud rate: 115200
  • Data bits: 8
  • Parity bit: none
  • Stop bit: 1
  • Flow control: none

Now run

miniterm.py -b 115200  /dev/BusPirate1

After an “Enter”, the CLI should be very similar to that in this tutorial.

A self-test described in this post is recommended before the first use to see if the Bus Pirate board is in good condition.

In the end, enter “Ctrl+]” to exit.

Interface with Bus Pirate with Minicom

Another popular UART tool is minicom:

minicom -b 115200 -D /dev/BusPirate1

But this is not done yet. I find that one has to disable hardware and software flow control to avoid sending extra characters to Bus Pirate in the UART communication. In this case, the windows may just hang there after the above command. Now press “Ctrl+A” and then “Z” (for help), and then “O” (configure minicom), select “serial port setup”, press “F” (disable hardware flow control), and exit. Or, you can just do

minicom -s

to set up the serial port interactively.

Now you should be able to talk to the Bus Pirate normally.

Interface with Bus Pirate with Screen

sudo screen /dev/BusPirate1 115200

and you are good to go.

Use Bus Pirate

Tutorials are readily available. Here are just a few:

comments powered by Disqus