Today I wanted to use my Keyspan USB-to-Serial adapter on my Ubuntu (gutsy) box. Unfortunately, Ubuntu doesn’t ship with a driver for this because of some licensing restrictions. So after trying a few things the hard way, I found out an easy way to build the drivers.
Follow these steps.
Note: Wherever I use “amd64” in the below examples you’ll need to replace with your architecture if you’re not on 64-bit Intel or AMD.
Grab the kernel source package:
# Use whatever path you like
cd ~/debian-src/kernel
apt-get source linux-image-2.6.22-14-generic
cd linux-source-2.6.22-2.6.22/
If you don’t already have the Ubuntu tools for building packages, you’ll need to run:
sudo apt-get build-dep linux-image-2.6.22-14-generic
Now edit the following file:
vi debian/config/amd64/config
Add the following under the line that reads CONFIG_USB_SERIAL_KEYSPAN_PDA=m:
CONFIG_USB_SERIAL_KEYSPAN=m
CONFIG_USB_SERIAL_KEYSPAN_MPR=y
CONFIG_USB_SERIAL_KEYSPAN_USA28=y
CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
CONFIG_USB_SERIAL_KEYSPAN_USA19=y
CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
Rebuild the kernel like so:
fakeroot debian/rules binary-generic
And now install it:
cd ..
sudo dpkg -i linux-image-2.6.22-14-generic_2.6.22-14.52_amd64.deb linux-headers-2.6.22-14-generic_2.6.22-14.52_amd64.deb linux-image-debug-2.6.22-14-generic_2.6.22-14.52_amd64.deb
You should now be able to insert a Keyspan USB-to-Serial adapter into the USB port and it’ll be recognized as
/dev/ttyUSB0. Check dmesg for any errors.

Thanks for the hints. I try to use your information on my Eee Pc on which I have mounted the 7.10 version of xubuntu, but I was stopped after the first line of your listing with an error message “E: You must put some ‘source’ URIs in your sources.list” – anyway, I will wish to introduce you my case. I will wish to use my HP 320 Deskwriter Portable Printer that on my Mac with System 9.2 and the Keyspan adapter to adapting the priter serial port with the Mac usb port. All this was fantastic until I will try to use the printer with the Mac System 10.2.9 – HP did not have build any driver for that system , having read about your experienced about Keyspan driver for Linux I will hope to use again my almost new HP 320, starting to teach the system to read usb adapter. What is your idea about this? Have you any idea to use this kind of printers?. thank you in advance for the helpand looking forward to hear from you soon, I will wish you all the best.