[Linux-ham] /dev ports for USB serial adapter

Bryan n3txu at yahoo.com
Sat Mar 1 21:39:14 EST 2014


A real-honest-to-goodness serial port will be /dev/ttySn (ttyS0, etc).

A USB serial adapter will show up as /dev/ttyUSBn.  (starting at 0 and 
going up depending on how many you have)  The model or brand make no 
difference that I've ever noticed.  99% of them are either PL2303 
(Prolific) or FTDI.  If you have a choice, FTDI are the better option.

There is a generic module called usb-serial or something equally 
clever.  Unless you built your own kernel or did some other messing 
around, it should be there and load automatically.

There are modules for specific manufacturers (FTDI, prolific, etc). For 
your purposes, you shouldn't need to modify anything relating to how 
they are loaded.  When you plug in a USB to serial adapter for the first 
time, several modules will be loaded. Looking at my system, I see:

Module                  Size  Used by
ftdi_sio               39699  0
pl2303                 12309  0
usbserial              30693  2 pl2303,ftdi_sio


So, the generic module that is responsible for /dev/ttyUSBxx is 
usbserial.  I have both FTDI and Prolific serial converters, so there is 
a module for each manufacturer.  I didn't do anything more than just 
plug them in.

To verify which device file is created for your adapter.  Plug it in and 
type 'dmesg'.  you'll see output like this:


[639950.114429] usb 6-4.3.2: new full-speed USB device number 10 using 
ehci-pci
[639950.317740] usbcore: registered new interface driver ftdi_sio
[639950.317792] usbserial: USB Serial support registered for FTDI USB 
Serial Device
[639950.318212] ftdi_sio 6-4.3.2:1.0: FTDI USB Serial Device converter 
detected
[639950.318288] usb 6-4.3.2: Detected FT232RL
[639950.318295] usb 6-4.3.2: Number of endpoints 2
[639950.318300] usb 6-4.3.2: Endpoint 1 MaxPacketSize 64
[639950.318306] usb 6-4.3.2: Endpoint 2 MaxPacketSize 64
[639950.318311] usb 6-4.3.2: Setting MaxPacketSize 64
[639950.318813] usb 6-4.3.2: FTDI USB Serial Device converter now 
attached to ttyUSB3
[639951.648565] usb 6-4.3.4: new full-speed USB device number 11 using 
ehci-pci
[639951.758593] ftdi_sio 6-4.3.4:1.0: FTDI USB Serial Device converter 
detected
[639951.758678] usb 6-4.3.4: Detected FT232RL
[639951.758684] usb 6-4.3.4: Number of endpoints 2
[639951.758690] usb 6-4.3.4: Endpoint 1 MaxPacketSize 64
[639951.758696] usb 6-4.3.4: Endpoint 2 MaxPacketSize 64
[639951.758701] usb 6-4.3.4: Setting MaxPacketSize 64
[639951.759084] usb 6-4.3.4: FTDI USB Serial Device converter now 
attached to ttyUSB4


For me, those last two adapters are /dev/ttyUSB3 and /dev/ttyUSB4. You 
can see a bit about what happend when the adapter was plugged in.  
First, usbcore noticed a new thing.  Then it said that's a usbserial 
adapter and saw it is an FTDI adapter and loaded ftdi_sio.  And you can 
also see how far along the USB bus it is (device number 10 and device 
number 11).  By and large, the only thing you care about here is the ttyUSBx

Hope that helps!

-- Bryan





More information about the Linux-ham mailing list