The Bus Pirate1 seems to be a fun device, but as with anything which is being developed rapidly sometimes the documentation on the web is patchy or relates to an older version.
These notes are to remind me what's what when using the Bus Pirate on MacOS.
Talking to the device
Oddly screen is your friend:
screen /dev/tty.usbXXXX 115200
Note: I found that unplugging the Bus Pirate without first quitting screen crashed the Mac, so it's best to avoid that!
Firmware Upgrades
Old (version 2) firmware
As of April 2010 Bus Pirates came with quite old firmware (though I think this may have changed now). Accordingly updating the firmware is a two-step process:
- The basic process is documented2
- The Python script which does the upgrade needs a serial library which isn't installed by default. The no-brainer solution is to use MacPorts' py26-serial module.
New firmware
Again the process is documented,3 but here's my crib sheet:
- Download the software and unpack it.
- Put a link between PGC and PGD on the five-pin header, the connect the Bus Pirate.
- Run the uploader:
./pirate-loader_mac --dev=/dev/tty.usbXXX --hex=BPv3\&v2go/BPv3-Firmware-v4.2.hex
- Unplug the Bus Pirate, remove the link, plug it in again.
- Test it:
screen /dev/tty.usbXXXX 115200
Nice device names
You can tweak the device name which appears in /dev by tweaking the EEPROM in the Bus Pirate's FTDI chip: here's how.4
References
- 1. http://dangerousprototypes.com/bus-pirate-manual/
- 2. http://dangerousprototypes.com/2009/08/06/bus-pirate-firmware-upgrades-on-linux-osx/
- 3. http://dangerousprototypes.com/2010/01/22/how-to-firmware-upgrades-with-the-linux-mac-windows-console/
- 4. http://dangerousprototypes.com/2010/01/27/pirate-rename-get-a-nicely-named-serial-device/