USB Toolbox


Since I’ve gotten into USB design using Cypress’ FX2LP chip, I’ve mainly been using command line tools to do control/bulk transfers. That gets old after a while, so I wrote this application. I’m not application developer, nor have any desire to be one. I only write one if it’ll help with some physical device I’m working on. So, USB Toolbox isn’t finished, and probably never will be. I’m only writing a post about it to target the very small audience of people who google some variation of “libusb & Cocoa”.




I post more details when add a couple features.


I put the source on github. Be warned, I’m new to git, and as of this post I think I may have messed up the repository. The source may be behind. If you have git skills, and need some pointers on getting started with USB, lets trade lessons:)


lsusb on OS X

I’ve starting down the long dark path of embedded USB design. It’s been tough, but there are some good examples out there.

But back to the subject of this post. I find it annoying to have to go to About This Mac every time I want to see what USB devices are connected. I would like an equivelent of the Linux command line tool lsusb. Then I read somewhere the OS X command system_profiler SPUSBDataType gives you the same data that you will find in About This Mac. To make it easy to remember, I added this line to my bash profile (~/.profile):

alias lsusb='system_profiler SPUSBDataType'

Now, all I have to do is type lsusb in the terminal to list all the USB devices connected to my computer. I’m sure it is possible to install the actual lsusb command on my computer, but this works fine for me.


Raspberry Pi Use Case: Subversion & Airplay

I bought a Raspberry Pi this past weekend at Maker Faire NYC. I didn’t really know what to do with it, but at $40 I figured I wouldn’t have much to lose.

The next day I received an email from my Subversion service that my payment didn’t go through. So first use, I set up a subversion server on the Pi. In time I will transfer my repositories from the web to the Pi and cancel my commercial Subversion account.

Next, I had run out of ethernet ports on my router. So, in order to use the Pi I had to disconnect something. Well, my AirPort Express was using a port. Since I already have an AirPort Extreme, the Express is only being used for Airplay, a service that lets you select where to play your music from your Mac or iDevice. I discovered that there’s an opensource project called Shairtunes (Airplay used to be named AirTunes) which mimics an Airplay device. So I followed these steps and had a replacement for my AirPort express. I did run into one problem, Shairtunes wouln’t run and gave this error: Can't locate Net/ in @inc. You need to install the missing code. I don’t even know what it’s for, but the solution is:

# for some reason the fix doesn't work 
# unless you run as the superuser, plain sudo din't work
sudo su               
cpan install Net::SDP # just say yes to everything

I won’t repeat all the install steps since there are so many Raspberry Pi tutorials out there. But, if run into a snag leave a comment.

Overall, I’m very happy I picked up the Raspberry Pi, even if one of my use cases for the Pi is a solution to a problem it created.