Warning: count(): Parameter must be an array or an object that implements Countable in /usr/local/www/wordpress/wp-includes/post-template.php on line 284

Keyspan USA-19HS on Gutsy Gibbon

Ubuntu 7.10 (Gutsy Gibbon) was released yesterday. Overall the improvements are huge. Amongst other things driver support for my aging four year old laptop is nearing perfection.

The only thing that did not work out of the box is my trusty Keyspan USA-19HS USB to DB9 serial adapter. Primarily my laptop is used as a portable tool for on-site network administration. This work often involves configuring various enterprise grade hardware via a serial console. Needless to say, this is functionality I depend on.

A quick visit to Keyspan’s web site provided some initial clarification regarding this issue:

However, certain Linux distros (primarily Ubuntu and Debian) choose to not include a complete install of our drivers and firmware due to philosophical issues with our license text. Although the majority of the Linux community is fine with our license, Ubuntu and Debian require you to install the Keyspan drivers manually.

I’m not sure what it is about the license for the Keyspan USB drivers that is out of line with Debian or Ubuntu’s philosophy. The driver does require closed firmware to be loaded, but the same can be said for the Intel WiFi drivers which are included by default in the base system.

Either way, building the missing kernel model from source is a rather daunting exercise for Linux beginners. For that reason, I decided to build a Debian package of the missing driver.

Once the package is downloaded it can be installed via:

dpkg -i keyspan-ubuntu-2.6.22.deb

After the package is installed the Keyspan should be accessible via /dev/ttyUSB0.

All that being said, this packages comes with a few caveats:

  • This is my first attempt at a Debian package, I’m sure it’s far from perfect.
  • The driver can be built with different firmware for different Keyspan devices, this one is only built with the USA-19 firmware.
  • This package is probably married to the kernel version it was built for and will not likely work next time the Ubuntu kernel image package is updated.

Hopefully whomever with Ubuntu responsible for packaging the kernel and modules either includes this driver in the future or at least makes it into an optional package in the restricted repository. Failing that, if there is enough interest I may continue to maintain and improve this package to ease the installation for other Ubuntu users.

45 Responses to “Keyspan USA-19HS on Gutsy Gibbon”

  1. Tony B Says:

    Hey thanks for setting this up. You saved me a lot of time, either for downgrading my kernel, or building this driver myself. Cheers!

  2. Alan Claunch Says:

    Thanks,
    The module works fine and saved me several hours of work.

    Alan

  3. Don Clark Says:

    Thank you very much. I was disappointed that this driver was in feisty but not gusty. Also found that tftp-hpa will not install and function as a server. My USB Keyspan and tftp are used every day for me and finding this driver saved me a ton of time.
    Many Thanks,
    DC

  4. A Nonny Mouse Says:

    Thanks for that Denis, you saved me some bother. I can’t see the reason for the exclusion either, to be honest, perhaps it’s just not sufficiently high profile to have got in there (cf the Intel wireless drivers).

  5. Bryon U Says:

    Good job Dennis.

    You saved me much pain.

  6. Super_maçon Says:

    Great ! Thanks you so much !

    You have clean up 2 days of depressing state !
    Thank you !

  7. Teknyk Says:

    I bought the Keyspan USA-19HS before switching to Ubuntu so I had been dual booting. This was the ONLY reason I had to keep my 20 GB windows partition.
    Guess who just got 20 GB of his HDD back?
    I can’t thank you enough.

  8. Dylan Says:

    Thanks. I’d started recompiling a kernel, etc, etc. Your deb saved me time and effort!

  9. Michael Says:

    Wonderful!

    After upgrading from Feisty, I forgot to retest the unit. Today, was the first time I had to use my external modem (to fax) and was in a bit of a panic when I discovered that I had no /dev/ttyUSB0. Of course, the fax was urgent. Your module saved me lots of time and, maybe, a client.

    Thanks for your contribution to the community.

  10. JZ Says:

    Thank you so much.

  11. Rolled Up Sleeves » A Shiny New Toy Says:

    […] Since the Eee PC doesn’t have a serial port, you’ll probably need a USB to serial adapter. If you have a Keyspan adapter, you’ll need to re-compile the kernel to use it with Ubuntu. If you have a USA-19HS, get a pre-built kernel here. […]

  12. Dan Says:

    Denis it seems I might be a black sheep. I installed your deb pkg, and still no worky.

    lsusb -v
    Bus 004 Device 003: ID 06cd:0121 Keyspan
    Device Descriptor:
    bLength 18
    bDescriptorType 1
    bcdUSB 1.10
    bDeviceClass 255 Vendor Specific Class
    bDeviceSubClass 255 Vendor Specific Subclass
    bDeviceProtocol 255 Vendor Specific Protocol
    bMaxPacketSize0 8
    idVendor 0x06cd Keyspan
    idProduct 0x0121
    bcdDevice 1.00
    iManufacturer 1 Keyspan, a division of InnoSys Inc.
    iProduct 2 Keyspan USA-19H
    iSerial 0
    bNumConfigurations 2
    Configuration Descriptor:
    bLength 9
    bDescriptorType 2
    wTotalLength 53
    bNumInterfaces 1
    bConfigurationValue 1
    iConfiguration 0
    bmAttributes 0xa0
    (Bus Powered)
    Remote Wakeup
    MaxPower 100mA
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 0
    bAlternateSetting 0
    bNumEndpoints 5
    bInterfaceClass 255 Vendor Specific Class
    bInterfaceSubClass 0
    bInterfaceProtocol 0
    iInterface 0
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x01 EP 1 OUT
    bmAttributes 2
    Transfer Type Bulk
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0040 1x 64 bytes
    bInterval 0
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x02 EP 2 OUT
    bmAttributes 2
    Transfer Type Bulk
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0040 1x 64 bytes
    bInterval 0
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x03 EP 3 OUT
    bmAttributes 2
    Transfer Type Bulk
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0040 1x 64 bytes
    bInterval 0
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x81 EP 1 IN
    bmAttributes 3
    Transfer Type Interrupt
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0040 1x 64 bytes
    bInterval 1
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x82 EP 2 IN
    bmAttributes 3
    Transfer Type Interrupt
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0040 1x 64 bytes
    bInterval 1
    Configuration Descriptor:
    bLength 9
    bDescriptorType 2
    wTotalLength 53
    bNumInterfaces 1
    bConfigurationValue 2
    iConfiguration 0
    bmAttributes 0xa0
    (Bus Powered)
    Remote Wakeup
    MaxPower 100mA
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 0
    bAlternateSetting 0
    bNumEndpoints 5
    bInterfaceClass 255 Vendor Specific Class
    bInterfaceSubClass 0
    bInterfaceProtocol 0
    iInterface 0
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x01 EP 1 OUT
    bmAttributes 2
    Transfer Type Bulk
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0040 1x 64 bytes
    bInterval 0
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x02 EP 2 OUT
    bmAttributes 2
    Transfer Type Bulk
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0040 1x 64 bytes
    bInterval 0
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x03 EP 3 OUT
    bmAttributes 2
    Transfer Type Bulk
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0040 1x 64 bytes
    bInterval 0
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x81 EP 1 IN
    bmAttributes 2
    Transfer Type Bulk
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0040 1x 64 bytes
    bInterval 1
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x82 EP 2 IN
    bmAttributes 2
    Transfer Type Bulk
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0040 1x 64 bytes
    bInterval 1
    Device Status: 0x0000
    (Bus Powered)
    root@shdobxr-desktop:/dev# ls -d /dev/* | grep -i USB
    /dev/usb1
    /dev/usb2
    /dev/usb3
    /dev/usb4
    /dev/usb5
    /dev/usbdev1.1_ep00
    /dev/usbdev1.1_ep81
    /dev/usbdev2.1_ep00
    /dev/usbdev2.1_ep81
    /dev/usbdev3.1_ep00
    /dev/usbdev3.1_ep81
    /dev/usbdev3.2_ep00
    /dev/usbdev3.2_ep81
    /dev/usbdev3.3_ep00
    /dev/usbdev3.3_ep81
    /dev/usbdev4.1_ep00
    /dev/usbdev4.1_ep81
    /dev/usbdev4.2_ep00
    /dev/usbdev4.2_ep81
    /dev/usbdev4.3_ep00
    /dev/usbdev4.3_ep01
    /dev/usbdev4.3_ep02
    /dev/usbdev4.3_ep03
    /dev/usbdev4.3_ep81
    /dev/usbdev4.3_ep82
    /dev/usbdev5.1_ep00
    /dev/usbdev5.1_ep81
    /dev/usbdev5.2_ep00
    /dev/usbdev5.2_ep81
    /dev/usbdev5.7_ep00
    /dev/usbdev5.7_ep81
    /dev/usbdev5.7_ep82

    *sending out an SOS…sending out an SOS*
    any help would be grand
    root@shdobxr-desktop:/dev# cat /etc/lsb-release
    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=7.10
    DISTRIB_CODENAME=gutsy
    DISTRIB_DESCRIPTION=”Ubuntu 7.10″
    root@shdobxr-desktop:/dev# uname -a
    Linux shdobxr-desktop 2.6.22-14-386 #1 Sun Oct 14 22:36:54 GMT 2007 i686 GNU/Linux

  13. Denis Lemire Says:

    Dan,

    Didn’t see your message until today, Your comment was falsely flagged as Spam by the Akismet SPAM filter. Shortly after you insert your Keyspan adapter, is there any output to note if you run dmesg or look in /var/log/messages?

  14. Phil Says:

    Thanks for the package. After installing the package, I was missing the /dev/ttyUSB0 so I added it with:
    # mknod /dev/ttyUSB0 c 188 0
    Everything was working fine for a few days.

    Now I’m having some problems with /dev/ttyUSB0. I booted the computer up one day and found /dev/ttyUSB0 was missing. I added it again and rebooted. It disappeared again.

    Any help is appreicated.

  15. zac Says:

    For those with secondary problems, it appears that on some systems the brltty package takes over for some USB serial drivers and never returns control. Removing this package with `sudo apt-get remove brltty’ and rebooting should work. It was a problem on my laptop.

  16. Phil Says:

    Thanks for the help. Removing the britty package fixed my issue and I’m up and running again.

  17. Jeremy Says:

    I installed the .deb and re-started to no avail:

    # dmesg
    [ 1107.428000] usb 1-1: USB disconnect, address 7
    [ 1110.956000] usb 1-1: new full speed USB device using uhci_hcd and address 8
    [ 1111.156000] usb 1-1: configuration #1 chosen from 2 choices
    # uname -a
    Linux lappy 2.6.22-14-386 #1 Sun Oct 14 22:36:54 GMT 2007 i686 GNU/Linux

    I noticed that the package installs a keyspan.ko file in lib/modules/2.6.22-14-generic/… but not lib/modules/2.6.22-14-386/… Perhaps this has something to do with it?

  18. Adam Says:

    Thanks for doing this. However, many people are running AMD64 kernels, and your module is i386 only. I’d be happy to generate a deb installer for AMD64… but it would be helpful if you would outline the steps you took to make the i386 version, so I don’t have to reinvent the wheel.

    Thanks,
    Adam

  19. Denis Lemire Says:

    Jeremy

    That is most likely what the problem is. Try copying or moving the keyspan.ko file to the alternate location then run depmod -a.

  20. Jean M Thewissen Says:

    Dude, you are amazing…. you really saved me, Like you I depend on the USB-serial converter to do my job.

    I can’t thank you enough.

  21. Labo Says:

    Thank’s a lot for your .deb package, he is really usefull !!

  22. Josh Says:

    Denis- It looks like the recent Kernel upgrade broke the package due to the version dependency on the Kernel,

    How I fixed:

    Use dpkg-deb to extract the package and then control information, change the version in the control file to .47 and place the control files in the package directory in a DEBIAN directory and rebuild.

    I’ve tested everything and it works. I have the rebuilt package Denis – if you want it please send an email to me so I have your email and can send it – then you can post if you’d like. Thanks again for this package!

  23. Ross Says:

    Denis – Thank you!!

    Josh – Thanks to you, too. I followed the steps you listed and got the package to work with the new kernel version.

  24. Bob Says:

    Denis/Josh — thanks, works great.

    I was also getting the dependency error.

    Here are my detailed steps to get it working — all based on the fine work from people above:

    1. Followed Josh’s explanation on how to change the version in the control file (I’ve never done this before but was able to hack my way through using Josh’s description — not sure I did it exactly right… but it works!). For those that need specifics, here’s what I did, again thanks to Josh:

    $ dpkg-deb -x keyspan-ubuntu-2.6.22.deb ./tmp
    $ dpkg-deb -e keyspan-ubuntu-2.6.22.deb ./tmp2
    $ vi ./tmp2/control

    … change the line that starts with ‘Depends:’ to:
    Depends: linux-image-2.6.22-14-generic (= 2.6.22-14.47)

    $ mkdir ./tmp/DEBIAN
    $ mv ./tmp2/* ./tmp/DEBIAN
    $ dpkg-deb -b tmp keyspan-ubuntu-2.6.22.47.deb
    $ sudo dpkg -i keyspan-ubuntu-2.6.22.47.deb

    2. sudo mknod /dev/ttyUSB0 c 188 0 # (re: Phil above)

    3. Unplug/plug Keyspan device

    4. Use GtkTerm: Configuration->Port: /dev/ttyUSB0

    -Bob

  25. Denis Lemire Says:

    Thanks to everyone that have helped work around the dependency issue that has been brought up by the recently updated kernel image. I haven’t had time yet to update my deb package so the extra assistance is much appreciated.

    Just a side note to Bob’s comment, if you prefer working from the shell (as I often do) you can simply use: screen /dev/ttyUSB0 to utilize the USB serial adapter.

    When you are done you can terminate screen via CTRL+A CTRL+\.

  26. Bill, KE1G Says:

    Thanks, Denis, and Bob too. Works great.

    And thanks, Denis, for responding over on the bug at launchpad, to encourage
    me to read the responses here.

    I figure that this will happen again, so I’ve written a shell script to reconstruct
    your .deb with changed dependency. If anyone cares, it’s at:

    http://www.mv.com/ipusers/ke1g/new_version.sh.gz

    (There’s no link to it in the index.html file, so you’ll have to type the
    URL exactly.)

    Denis, you’re welcome to post a copy on your website if that’s interesting.

    It accepts the desired kernel version as its only argument. It must be run
    while the current directory contains your original deb (by its original
    name). There are comments with more info in the script.

    You still have to do the dpkg -i separately.

    Separately, about that device node, and Phil’s noticing it disappearance
    over a reboot: I believe that there’s a management feature that creates
    it when you plug in the interface. That’s the behavior that I see, anyway.
    You may have to reboot first (of find some management process to
    tickle). I would up rebooting as the path of least resistance when the
    device at first claimed to be busy, and that did fix things. As Phil noted
    the node that I made had disappeared across the reboot, but also
    reappeared when I plugged in my USA-19HS. (“dmesg | tail” is a fine
    source of information.)

    And while we’re mentioning terminal programs, picocom is a fine tool
    if you want to run it in a shell window that’s already up, under X, or
    from a text console like one of the virtual terminals or in single user
    mode. It’s lighter weight than minicom. You give the device node on
    the command line.

    Bill

  27. Super_maçon Says:

    Thanks you very much Bill. I don’t understand what i have done with that script, but it worked ^^
    Thanks again 🙂

  28. fred Says:

    sweet!!! thanks both Denis and Bob.

  29. Doug Says:

    I just want to thank all of you! It is such a pleasure to not be dependent on some Windoze support group to work on issues like this. I went Ubuntu over a year ago and I wouldn’t dream of going back.

    Thanks a Bunch!!!

  30. Denis A Says:

    Thank you Denis and Bob!!!!!
    For lazy guys – binary package here: http://rapidshare.com/files/87305639/keyspan-ubuntu-2.6.22.47.deb.html

  31. Kurt Says:

    Hey, Is there any chance of getting instructions how how to build the deb? I’ve got a 7.04 box out in a lighthouse that I can’t seem to get talking to the usb serial.

    If I do a “modprobe keyspan”, it goes in, but I can’t talk to the serial port…

    lsmod | grep -i keyspan
    keyspan 124804 0
    usbserial 32488 1 keyspan
    usbcore 134280 6 keyspan,usbserial,usbhid,ehci_hcd,uhci_hcd

    From var/log/messages/

    drivers/usb/serial/usb-serial.c: USB Serial support registered for Keyspan – (without firmware)

    Can someone point me to more specific details on how to either get this binary keyspan driver in?

    Thanks!

    drivers/usb/serial/usb-serial.c: USB Serial support registered for Keyspan 1 port adapter

  32. scott maher Says:

    So i used the new_version.sh to build a package for my 2.6.22-14.51
    kernel it built and installed fine. The keyspan module loads but complains about firmware image (USA19QI) not available. Any thoughts?
    Thanks much

  33. Anmol Says:

    Hi Denis,

    Thanks a lot – this worked for me in the very first attempt by following the
    two instructions you have given. I am running Ubuntu 7.10 on a Dell
    Inspiron 1420 along with a Keyspan USA-19HS.

    Please continue to support this through Ubuntu releases (hopefully,
    Keyspan will make their licensing acceptable to Ubuntu sometime soon).

    Thanks again – this is a big relief! (I would have ended up returning
    my Keyspan USB -> RS232 Adapter and would have had to begin my
    search for one that works on Ubuntu, all over).

    Best Regards,
    Anmol P. Paralkar

  34. Denis A Says:

    for slakers again binary package for 2.6.22.52 kernel
    http://rapidshare.com/files/95027400/keyspan-ubuntu-2.6.22.52.deb.html

  35. Denis Lemire Says:

    I have posted the package from the previous comment above to my site for hassle free downloads (no captcha’s etc). You may also download it here.

  36. Hank Says:

    Hi Denis

    Thanks but the deb has a dependency problem on my HP 8230us with gusty. I just switched away from XP and need to use the key span adapter to configure a switch. I have a Belkin adapter that works (it’s for a Palm) so I have time to try to make it work. Any hints?

    Hank

  37. Denis Lemire’s Site » Blog Archive » Radeon Mobility Blacklist in Hardy Beta Says:

    […] seems to be working solid. They’ve even included the previously missing Keyspan module. Woo […]

  38. Brady Says:

    Ugh… I updated my kernel and this broke. 🙁

    dpkg: dependency problems prevent configuration of keyspan:
    keyspan depends on linux-image-2.6.22-14-generic (= 2.6.22-14.46); however:
    Version of linux-image-2.6.22-14-generic on system is 2.6.22-14.52.

  39. Jeff Says:

    dpkg -i –force-depends kespanwhatever.deb
    modprobe -f keyspan

    should work

  40. Denis A Says:

    Just upgraded Ubuntu 7.10 to 8.04 and found that Keyspan USA-19HS is supported in the kernel !

  41. Nevel Shute Says:

    Have 2 Keyspan serial devices: 1 Fulls speed and the second High Speed. The Full speed registers with ttyUSB0-3, but the high speed one only registers the usb address and no tty ports!

    I have attached the High Speed unit on its own, but it only gives the same msg:

    May 14 10:06:37 Bugs kernel: [424461.575178] usb 2-4: new high speed USB device using ehci_hcd and address 19
    May 14 10:06:38 Bugs kernel: [424462.320448] usb 2-4: configuration #1 chosen from 4 choices

    Bus 001 Device 005: ID 06cd:012a Keyspan
    Bus 003 Device 002: ID 046d:c310 Logitech, Inc.
    Bus 002 Device 019: ID 06cd:0131 Keyspan (This is the high speed Keyspan)

    Have looked for the PID numbers on the web and not found any references!

    Any comments?

  42. serial to usb adapter Says:

    […] kernel module for Keyspan USA-19HS usb to serial adapters disabled by default in the generic kernel.http://www.denis.lemire.name/2007/10/19/ubuntu-keyspan/USB RS-232 Serial Adapter DB-9 Male works with all Windows and Mac …usb serial adapter from 19.95 […]

  43. Jonathan Solomons Says:

    Hi There

    I am from South Africa.

    I work for nation wide security company and I lately got a reqeusted from customer wanting a USA19-HS Keyspan. USB-Serial Port Converter.

    How and where can I purchase one of these units in my Country.

    I know this might sound a bit silly but I am not comfirtableusing too on line purchasing.

    Maybe you have some contacts I can try.

    I will appreciate if you can help.

    Regards

  44. Lanie Sandhoff Says:

    CD. This allows you to see if Linux is for you without touching your hard disk.

  45. Hans! Says:

    Wonderful!
    The Driver works perfectly.
    I have written a short letter to tripplite.com and tell them about the Driver!

    TNX so many!

Leave a Reply