Home / USB to Serial / USB-Serial Port adapter (RS-232) in Ubuntu Linux

USB-Serial Port adapter (RS-232) in Ubuntu Linux

USB DriverThere are two other articles on a serial port adapter for Windows. Below is the instructions for Linux and how to connect your serial adapter while using Linux. This should work for most people using Linux and a serial adapter or usb to rs232 driver which is being discussed.

USB-Serial Port adapter (RS-232) in Ubuntu LinuxUSB to RS 232 driver Linux

1.  Log into Linux under the root account;

2.  Plug the USB-Serial adapter into the computer;

3. Give it a minute to discover the USB-Serial adpater;

4. Type in this command dmesg

5. The dmesg command will echo back the most recent few lines of the system message console, and you should see something like this:

  • usb 2.0: new full speed USB device using uhci and address 2
  • usb 2.0: configuration #1 chosen from 1 choice

6. Unplug the USB-Serial adapter to see a list of USB devices without it being plugged in.

7. Type this command to list the USB devices: lsusb

8. You should see a list of USB devices that looks like this:

  • Bus 001 Device 001: ID 0000:0000
  • Bus 002 Device 007: ID 03f0:4f11 Hewlett-Packard
  • Bus 002 Device 006: ID 05e3:1205 Genesys Logic, Inc. Afilias Optical Mouse H3003
  • Bus 002 Device 004: ID 15d9:0a33  Logitec-mouse

9. Then plug the USB into our device Then use the lsusb command again and observe the changes

  • Bus 001 Device 001: ID 0000:0000
  • Bus 002 Device 007: ID 03f0:4f11 Hewlett-Packard
  • Bus 002 Device 003: ID 018a:3754 Unknown device
  • Bus 002 Device 006: ID 05e3:1205 Genesys Logic, Inc. Afilias Optical Mouse H3003
  • Bus 002 Device 004: ID 15d9:0a33  Logitec-mouse

10. Determine the vendor ID and the product ID by inspecting this additional line. In this example they are 018a and 3754. For a Trip•Lite USB-Serial adapter, they are 2303 and 067B. In this example it is a Minicom USB-Serial device. The first numbers identifies the vendor and the second numbers identifies the product.

11. Now use the following command to load the kernel module called usb serial and pass the vendor and product ID values to it. The driver can then associate itself with the correct hardware device on the USB bus.

  • sudo modprobe usbserial vendor=018a product=3754

12. Now check whether the new Serial Port device is available

  • sudo dmesg | grep ttyUSB

13. You should now see something  like this

  • usbserial_generic 1-1:1.0: generic converter detected
  • usb 1-1: generic converter now attached to ttyUSB0
  • usbcore: registered new interface driver usbserial_generic

14. This tells you that the serial device has now been mapped to the /dev/ttyUSBO serial port

15. Now we want to list the devices under the /dev/ path to see if the interface is visible with this command:

  • ls /dev/

18. Instruct Ubuntu to load this module automatically by including the following line in the /etc/modules file. Substitute your own vendor and product ID if they are different.

  • usbserial vendor=018a product=3754

That should be about it however if you have not installed the driver then you would have to install it now. If you are installing a Minicom serial device then you would do the following:

  • sudo  apt-get install minicom
  • sudo minicom -s

Press A and then edit to / dev / ttyUSB 0  ( this value, see dmesg | grep ttyUSB )

Press E  and then edit to 9600 8N1

Press F and the value will change from Yes   to   No

Once set up and finish off mode serial port setup.

Save setup as df1 finished off. Settings by Exit from Minicom

Other Issues:

This is for Ubuntu Linux for Red Hat the drivers should be in your OS however TrippLite does have Red Hat drivers on their website if you do not have them on your system.

 

If you are trying to connect a Zigbee through this serial port you can do the following:

Make a symbolic link between ttyUSB0 and com2 by typing in terminal: (assuming you are using com2)

  • ln -s /dev/ttyUSB0 /home/your_home/.wine/dosdevices/com2

Then Add com2 port to X-CTU

 

VN:F [1.9.22_1171]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.22_1171]
Rating: +1 (from 1 vote)
USB-Serial Port adapter (RS-232) in Ubuntu Linux, 10.0 out of 10 based on 1 rating

About Tracey Brown

I develop websites and content for websites related to high tech from around the world. See more pages and content about technology such as USB and other IT developments around the world. You can follow the other websites as well and search this website for more information on mobile phones and other USB components.