Improve company productivity with a Business Account.Sign Up

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2840
  • Last Modified:

How do I mount a USB to Serial adapter in FreeBSD 5.5?

I need a serial port for development of an embedded system in FreeBSD 5.5. I'm currently running FreeBSD 5.5 in VMware Fusion on OS-X. I have a Keyspan USA-19HS USB to Serial adapter, but if some other USB to Serial device would work more easily, I would happily purchase a different device as part of the solution.

I can mount the serial device on the OS-X host, but sadly, VMware Fusion will not allow me to share the serial device on the host with the FreeBSD system. However, I believe I can mount the raw USB device just fine on FreeBSD--when I plug in the device I see this message in /var/log/messages:

Jun 10 16:43:53 development kernel: ugen0: Keyspan, a division of InnoSys Inc. Keyspan USA-19H, rev 1.10/1.00, addr 2

and when I look in /dev:

crw-r--r--   1 root  operator  228,   1 Jun 10 13:41 ugen0.1
crw-r--r--   1 root  operator  228,   2 Jun 10 13:41 ugen0.2
crw-r--r--   1 root  operator  228,   3 Jun 10 13:41 ugen0.3

If someone can help me to mount this USB device as a serial port, I think I'd be in great shape. Any help will be greatly appreciated,

  • 5
  • 5
1 Solution
andywieseAuthor Commented:
The problem may be more difficult than I thought. I found this maillist post on a similar topic:
Which mentions the need to load new firmware onto the Keyspan (and I can't find that firmware). As said above, any other USB to Serial adapter which would work more easily would be fine as a solution.
There is no "mount" involved.

Please post what "usbdevs -d -v" say.
Try "kldload ucom" and kldload anything else you find on "man ucom"

They say "contact support departament"
Link you found provides device identification information for FreeBSD with description what is this device under that ID
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

andywieseAuthor Commented:
Thank you! I feel like this gets me closer. It looks like the keyspan is recognized by usbcontroller, and I see

# usbdevs -d -v
Controller /dev/usb0:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00
 port 1 addr 2: full speed, power 100 mA, config 1, Keyspan USA-19H(0x0121), Keyspan, a division of InnoSys Inc.(0x06cd), rev 1.00
 port 2 addr 3: full speed, self powered, config 1, VMware Virtual USB Hub(0x0002), vendor 0x0e0f(0x0e0f), rev 1.00
  port 1 powered
  port 2 powered
  port 3 powered
  port 4 powered
  port 5 powered
  port 6 powered
  port 7 powered

Next, kldload seems to say that ucom is loaded:

# kldload -v ucom
kldload: can't load ucom: File exists

man ucom says (iiuc) that device should appear as /dev/ucom*, but I don't see any of those in /dev

I did not understand your comments about "contact support department" or your last comment about device identification information. Can you explain a bit more what you meant there?
I wanted you to look into manual page for other usb serial chipsets. uvisor is obvious miss, but others may do.
Maybe you can install driver into OS-X and use it as normal serial port? I doubt there is FreeBSD firmware loader available. Maybe it is just as easy as copying firmware file to usb config space - who knows - it takes lots of time looking into linux driver to write FreeBSD one.
Reference to support because I was dropped into 404 when looking for them Solaris driver.
andywieseAuthor Commented:
I was traveling and couldn't get back to you for a few days, sorry.

I tried to load the serial port in os-x and share that with the vm, but vmware does not allow this on os-x (unlike other platforms). Too bad! I want to be able to use a usb-to-serial in a native freebsd anyway, and I think your help has gotten me close.

I think understand the serial-adapter drivers now better now. Please tell me if this is not correct:
- the ucom driver is the general usb-to-serial driver that provides the /dev/ucom.* device.
- the ucom driver uses one of the hardware-specific drivers such as (on my 5.5 system) uftdi(4), umct(4), uplcom(4),  uvscom(4).
- If I plug in a usb-to-serial device that is recognized by one of those drivers, it should just appear as a ucom.* device.

My problem appears to be that I don't have a supported usb-to-serial. The uplcom driver supports IOGear UC-232A. I have ordered an IOGear GUC-232A from amazon with arrives today. I will see if that is close enough to work.

 If I understand right, the serial port should appear as a /dev/ucom.* if I use a usb-to-serial that is supported by one of these drivers. (if I have the ucom and
1) Yes - you are right
2) no - ucom is generic device class driver (as defined by USB-SIG) others are hardware-specific for hw makers that does not support usb communications class (BTW most mobile phones work with standard ucom driver)
3) Yes.

You will have to insert device identifications from usbdevs into driver file and recompile kernel (and submit patch to FreeBSD)
driver file is here:

static const struct uplcom_product {
// blah blah
} uplcom_products [] = {
//add it here in array.

Otherwise you will get ugen again.
andywieseAuthor Commented:
Got it!
While waiting for the IOGear adapter to arrive, I tried adding the Keyspan adapter to the uplcom.c driver as you described, because I read somewhere that the Keyspan is Prolific based. I think that almost worked... but dmesg reported an error when trying to load keyspan.

When the IOGear adapter arrived, I found that the vendor and product id reported in usbdevs was already in the uplcom_products array. When I plug in that adapter, I get a /dev/ucom0, and dmesg reports: ucom0: Prolific Technology Inc. USB-Serial Controller D, rev 1.10/3.00, addr 2

I learned a lot from this experience. Thank you!

Contact me at if you're interested in FreeBSD consulting for our company.
andywieseAuthor Commented:
see my comment. contact me at if you're interested in freebsd consulting for our home automation system company.
Cool! It is almost same with PCI devices if you ever need to fix something there.
Maybe try puc.c for keyspan device id if you need some computer excersizes.
IOgear device names looked similar to supported one. Keyspan makes about 20 different USB serial adaptors and maybe one of them is prolific based and another supports USB comm class.

Thanks for offer, I am on the other side of globe, so Ill better stay with this website along with my jobs.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 5
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now