Usb to rs232 driver linux

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

There 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 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 c heck 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:

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

Источник

Читайте также:  Как настроить мультимедийные клавиши windows 10

Treiber

Wählen Sie bitte den passenden Treiber für Ihr Betriebssystem und PC-Interface aus. Beachten Sie auch die Information unten.

Windows

Linux

Zusatzinformation

  • Gerätetreiber-Setup:
    Installationspaket von PEAK-System für Gerätetreiber und Tools für Windows ® 10, 8.1 (32/64-bit) für unsere PC-Interfaces.
    Enthaltene Tools: PEAK-CPL, PCAN-View, PLIN-View Pro und Virtual PCAN-Gateway

Befehlszeilen-Dokumentation für PEAK-Treiber-Installation (Englisch)
Dokumentation für die Steuerung der Setup-Anwendung PEAK-Drivers zur Installation von Gerätetreibern und anderen PEAK-System-Komponenten per Befehlszeile mit Windows ® .

Legacy-Gerätetreiber-Setup:
Installationspaket von PEAK-System für 32-Bit Non-Plug-and-Play Windows-Treiber für PCAN-PC/104, PCAN-ISA und PCAN-Dongle (Parallel-Port) sowie den 32/64-Bit Plug-and-Play Windows-Treiber für PCAN-PC Card.

Gerätetreiber für RS-232 (PCAN-USB Hub):
Installationspaket für den Gerätetreiber des RS-232-Teils vom PCAN-USB Hub (für Windows ® und Linux).

Veraltet

Hier sind Treiber für veraltete Betriebssysteme aufgeführt. Beachten Sie, dass wir für diese Treiber keinen Support mehr anbieten.

  • Paket für Windows ® 7: Gerätetreiber für Windows ® 7 und CAN-Monitor PCAN-View.
  • Paket für Windows ® XP: Gerätetreiber für Windows ® XP und CAN-Monitor PCAN-View.
  • Paket für Windows ® 2000: Gerätetreiber für Windows ® 2000 und CAN-Monitor PCAN-View.
  • Paket für Windows ® CE6: PCAN-CE-Paket für Microsoft Windows ® CE 6.x.

Источник

Thread: USB-Serial Port driver

Thread Tools
Display

USB-Serial Port driver

Hi, I am new to Linux (Ubuntu) and finding it difficult to get used to. My computer doesn’t have a serial port, which I need to attached a radio to. I have a cheap USB — PL-2303X/H adapter that I imported from China. The instructions say it will work with Redhat and they assume I already have a PL-2303X/H driver. Where can I find one of these? Any already on the system somewhere? I presume I am not the first user to try one of these adapters.

Re: USB-Serial Port driver

Power up your Ubuntu machine WITHOUT the USB to Serial Adapter
inserted into a USB Port. Then Open a Terminal (Consolde) and
Copy & Paste the following to the Terminal Window:

You should see a difference as your device should be detected.

This will return a Manufactuer & Product Number, so use it to get more information. example. 0a5c:2101. )

If you don’t have a serial port, or want to use a USB port check out
the following:

The USB to Serial Converter is from www.newegg.com and is a N82E16812156008
SABRENT 1 ft. USB to Serial db9 Male RS-232 (9-pin) Converter Model SBT-USC1M — Retail @ $10.99.

These work wonderful with wvdial, etc.

Re: USB-Serial Port driver

Hi, I am new to Linux (Ubuntu) and finding it difficult to get used to. My computer doesn’t have a serial port, which I need to attached a radio to. I have a cheap USB — PL-2303X/H adapter that I imported from China. The instructions say it will work with Redhat and they assume I already have a PL-2303X/H driver. Where can I find one of these? Any already on the system somewhere? I presume I am not the first user to try one of these adapters.

Many thanks
Grant

Have you tried the adapter? I only have a handful of different USB-serial adapters, but they work out of the box.

Источник

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

Though some might argue that Serial port are things in the past, it is still the most popular port for those who are into electronic DIY. Building electronic device with serial port interface is cheaper than buiding one that uses USB. That is the reason why people still sell USB-Serial adapter to those electronic DIY enthusiast.

Here’s how to enable USB-Serial port adapter in Ubuntu Linux (with credit to Freeman from RepRap forum)

First plug in the USB-Serial Port adaptor to one of your USB port. Wait for a couple of second, then run “dmesg”. You should see these message at the end of dmesg output.

After that, unplug the device and type “lsusb”. You will see a list of output similar to this.

Plug in the USB-Serial Port converter back, and run “lsusb” again, and you shall see an additional line, like this.

Now we know the vendor id and the product id of the USB-Serial Port converter, this will enable us to load the linux kernel module “usbserial” to activate the device, like this :

Run “dmesg” again and you shall see lines similar like this :

As you can see, the new serial port device is mapped to /dev/ttyUSB0. You can instruct Ubuntu to load this module automatically by include the line : “usbserial vendor=0x4348 product=0x5523” inside “/etc/modules” file.

Читайте также:  Mac keyboard and windows keyboard

Bonus: What application benefits from usb-serial port adaptor?
For starters, there are modems which uses RS-232 serial port. Some home-made devices includes Infrared remote control which uses LIRC which also depends on the serial port.

I use the adaptor to hook up my morse keyer in order to send morse code through the internet using Xchat CWIRC plugin. The site has an excellent circuit diagram to build such interface.

You can see my home-made morse code oscillator here : My Homemade Morse Code Practice Oscillator

Where can I get USB to Serial port converter?
You can get it from your local computer stores or order it online !

36 Replies to “How to enable USB-Serial Port adapter (RS-232) in Ubuntu Linux”

Hello to anyone:

Trying to communicate to my Microchip dev board with REDHAT LINUX via USB to RS232 port.

Wrote C code to open port, read, and write. Having issues with writing to the USB port.

Can someone help with an email to jberry@geifuelcells.com if you have a link to some other code that has worked with REDHAT linux to just open USB port for serial text communcations. It so simple, it should work.

Thank you so very much…

Hola MyPapit,
I am trying to interface an Icom AIS receiver with my Ubuntu 12.04 controlled plotter. The plotter program is OpenCPN.

Your instructions are helpful and clear, but am still having problem. Apparently Ubuntu is recognizing the USB to RS232 converter. Using your suggested command lsusb, I see the device. I’m just not getting a data stream from the Icom. So I still don’t know if the problem is in the hardware or the software.

Can you offer any suggestions?

I am N7NST and still have active license but inactive for years now. Writing to you from Puerto Armuelles, Panama and headed for Ecuador.
73 Jim

Great instructions! It helped me a lot. Thanks

Scratch that last question. I figured it out. I had to do it through the vmware.

Any help is greatly appreciate on my situation. I’m running RHEL open source and I have to use two usb 2 seral adapters. The first one I was able to configure but the second I can’t. I’m running a virtual machine of windows XP, certain software requirements only run on XP, and everytime I plug in the second adapter I get this message:

USB redirection error: Could not auto-redirect USB Device at 3-16: usbredirhost error: resetting device: -5

Thanks to you Mypapit, I can run my RS232 serial microchip picstart programmer under linux using mplabx and usb.
My old Windows ME laptop finally died and I am resisting the wine solution.
Cheers Lester

Wow! Thank you so much for the sharing this info. I’m just a linux layman but I use it exclusively and sometimes have trouble with other people’s explanations of commands via the terminal.

Your’s got my serial apt up and running within minutes!
Kudos my friend. Thanks again!

Thank you so much .

i need driver of this serial port converter.

I haven’t tested it yet but hopefully this will allow me to program my HP 48GX calculator from Ubuntu. The calculator was made long before USB and many modern computers like my netbook are no longer equipped with serial ports. For those of us who use Linux, instructions like these are invaluable! Thanks for taking the time to write up this novice-friendly guide.

Thank you so much .

Great. It worked with me.

I ran dmesg | grep usb to get the usb portion of the listing making it easier to determine if the adapter was connected. The usb portion of the dmesg listing was not at the end but stuck somewhere in the middle of the output. I am running Ubuntu 8.04. Got the adapter connected. Thanks.

Hi, I’m a newcomer and my eeepc doesn’t recognize when I plug my etrex (garmin gps) to the pc via a serial usb converter. So I followed the instructions but I do not know the meaning of the last command:

As you can see, the new serial port device is mapped to /dev/ttyUSB0. You can instruct Ubuntu to load this module automatically by include the line : “usbserial vendor=0×4348 product=0×5523? inside “/etc/modules” file.

Читайте также:  Долго не начинается установка windows

what should I exactly type? Sorry if the question may sound silly, but I’m really a newcomer and don’t know how to get it work. Thank you very much for any answer!

If you’d like to take your videos along with you anywhere, make sure you first convert them to 3GP format so that they can be read on handheld devices including Mp3 players, iPhone and other cellphones

Plato Video to 3GP Converter is software enabling you to convert your avi, mpeg, flv 3gp, rm, divx, xvid, wmv, asf, mov, qt, swf to 3GP format. It supports batch conversion and likewise provides the possible ways to convert merely a element of your video by setting a start point and a breakpoint around the source file.

You can even customize the output quality of your 3GP file. Observe that the chosen parameters might be unspent in an account for future use.

Look at this spot:

4 – Make a symbolic link between ttyUSB0 and com2

type in terminal: ln -s /dev/ttyUSB0 /home/your_home/.wine/dosdevices/com2

5 – Add com2 port to X-CTU

Many thanks! It worked right off! Also with libelium’s help to add X-CTU com port. I have been trying to get X-CTU to see my USB com to configure XBee mod for days. Now I finally can get back to work. Nice!

I sometimes need to run 2 USB serial coms. Both being from the same manufacturer, they both show the same address. Even though they are USB0 and USB1 they both have the same numbers so get the same address. Any way to change address of one so both work simultaneously?

Hello guys ,
the information here is indeed really useful and i wouldnt have wasted a day looking for drivers , had i known it would work so easily .. However my question is that , I am trying to connect a zigbee through this serial port , so can i directly write /dev/ttyUSB0 instead of the file for the Serial (i.e. /dev/ttyS0
or do i need to convert it somehow ?

i am a beginner to Linux too so please forgive me if my questions are stupid.

Looking forward for some help !!

I’m having trouble configuring arduinoBT
I tried to do the same steps that this site but I had no success.
obs: I’m using Ubuntu 4.10 LTS 32bits
and the following error appears:
ubuntu32bits@ubuntu32bits-laptop:

$ lsusb
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 003: ID 03eb:2104 Atmel Corp. AVR ISP mkII
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 003: ID 03f0:3d17 Hewlett-Packard LaserJet P1005
Bus 002 Device 002: ID 5986:0137 Acer, Inc
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

command:sudo modprobe usbserial Atmel = 0x03eb RS232= 0x2104
FATAL: Error inserting usbserial (/lib/modules/2.6.32-24-generic/kernel/drivers/usb/serial/usbserial.ko): Unknown symbol in module, or unknown parameter (see dmesg)
dmesg
17308] usb 4-2: config 1 interface 0 altsetting 0 endpoint 0x82 is Bulk; changing to Interrupt
[ 297.317317] usb 4-2: config 1 interface 0 altsetting 0 endpoint 0x2 is Bulk; changing to Interrupt
[ 297.344460] usb 4-2: configuration #1 chosen from 1 choice
[ 1332.091589] usbserial: Unknown parameter `Atmel’
[ 1492.323389] usbserial: Unknown parameter `Atmel’
[ 1511.087014] usbserial: Unknown parameter `Atmel’
[ 1726.664078] usbserial: Unknown parameter `Atmel’
[ 1745.794821] usbserial: Unknown parameter `Atmel’
[ 1789.904073] usb 2-1: new high speed USB device using ehci_hcd and address 3
[ 1790.056180] usb 2-1: configuration #1 chosen from 1 choice

hope someone can help me – how can one statically assign usb serial so they map to the ttyUSBX everytime. i have 4 of these usb serial dongles and I have configured ser2net for specific tcp port to ttyUSBX (so i can telnet to the console of switches)… but once i restart PC; for eg usb serial dongle 1 which is ttyUSB0 may on next reboot may become ttyUSB1 and thus when i telnet to that port actually have consoled to another unit (as ser2net config file maps specific TCP port to ttyUSB). thanks for your help in advance.

Источник

Оцените статью