Go Premium for a chance to win a PS4. Enter to Win


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

Posted on 2008-06-10
Medium Priority
Last Modified: 2013-12-06
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,

Question by:andywiese
  • 5
  • 5

Author Comment

ID: 21756772
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.
LVL 62

Expert Comment

ID: 21780461
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"
LVL 62

Expert Comment

ID: 21780470
Link you found provides device identification information for FreeBSD with description what is this device under that ID
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.


Author Comment

ID: 21780922
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?
LVL 62

Expert Comment

ID: 21784321
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.

Author Comment

ID: 21812798
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
LVL 62

Accepted Solution

gheist earned 2000 total points
ID: 21812963
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.

Author Comment

ID: 21816314
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 andy@bluestem.net if you're interested in FreeBSD consulting for our company.

Author Closing Comment

ID: 31465956
see my comment. contact me at anderson@cortexatechnology.com if you're interested in freebsd consulting for our home automation system company.
LVL 62

Expert Comment

ID: 21816878
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.

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

HOW TO: Install and Configure VMware vSphere Hypervisor 6.5 (ESXi 6.5), Step by Step Tutorial with screenshots. From Download, Checking Media, to Completed Installation.
In this article we will learn how to backup a VMware farm using Nakivo Backup & Replication. In this tutorial we will install the software on a Windows 2012 R2 Server.
Teach the user how to configure vSphere Replication and how to protect and recover VMs Open vSphere Web Client: Verify vsphere Replication is enabled: Enable vSphere Replication for a virtual machine: Verify replicated VM is created: Recover replica…
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
Suggested Courses

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question