Tired of the /dev/tty.usbserial-XXXXXXXX address of the Bus Pirate? Piotr developed a utility to edit the EEROM in the FTDI chip on the Bus Pirate, this gives your Bus Pirate a consistent name on MacOSX. Grab the utility here, and follow this how-to submitted by Piotr. Thanks for the tip!
If you have a few FTDI USB devices in your system it might be confusing which /dev/tty.usbserial-XXXXXXXX points to the correct device, as the default isn’t very meaningful. Luckily with MacOSX and the FTDI USB to serial drivers there’s an easy way to change that!
The FT232R uses an internal EEPROM memory to store chip configuration. Programming it lets you change values such as PID, VID, Required Current, CBUS pins config, … and USB device description, which is what we want to change.
By default your Bus Pirate is detected as FTDI, FT232R USB UART with some random serial number like A600blSc. We can change it to anything, up to 46 ASCII characters, and get our device named the way we want. There are Windows tools for this available on FTDI Chip site, but there was none for MacOSX. Since playing with the EEPROM can render your FT232R useless, or at least make you unsolder it, I thought a simple tool which won’t let you break the device would be useful.
That’s why I wrote the Pirate Rename utility. It uses a modified open source library called libftdi-1.0 to talk to the FTDI chip and libusb-1.0.0. They are both embedded in the application bundle so you don’t need to worry about it.
I had to modify libftdi as the default EEPROM routines broke my device! I was lucky to restore it with Linux as neither Windows (BSOD) or MacOSX (Kernel Panic) wanted to talk to it anymore. I wanted to notify libftdi project owner about it, but I gave up when I found out all email addresses are available for spam bots when you sign up for their mailing list. I will try to contact him directly.
Here is a short tutorial how to change your device’s name and description with PirateRename
1. Start the application – As it says in the information box you will need to unload the FTDI kernel extension before you continue. To unload the FTDIUSBSerialDriver.kext open your favourite terminal application and enter “sudo kextunload /System/Library/Extensions/FTDIUSBSerialDriver.kext”. PirateRename will execute “/usr/sbin/kextstat | grep FTDI” to check if the extension was unloaded when you click “Refresh list”.
2. Refresh list will enumerate all FTDI compatible devices and let you choose the one you want to rename. As mentioned above it will also make sure the kernel extension is unloaded.
3. Choose the device if there is more than one and hit ‘Read’ button to read current EEPROM information.
4. You can now either modify the strings yourself or hit the ‘Suggest’ button to insert predefined configuration. If you decide to enter details yourself please remember that the total number of characters for Manufacturer, Description and Serial Number must not exceed 46. It will not let you program the EEPROM if you go above this limit.
5a. When you are ready to program the device please click ‘Write’. When you do that you will be asked if you want to save RAW EEPROM backup. I strongly suggest you do that in case anything should go wrong. This is not likely to happen as I have tested it with multiple devices and no problems were encountered, but still it’s always better to have something to come back to.
5b. Successful write operation is confirmed with the following message box.
6. You can now close the PirateRename application and reconnect your device. When you do that, please go to System Profiler -» Hardware -» USB and you should see a similar entry.
7. You can now load the kernel extension back with “sudo kextload /System/Library/Extensions/FTDIUSBSerialDriver.kext” and start using your Bus Pirate with your new serial device “/dev/tty.usbserial-PirateV3” or any other name you picked!