Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
07-06-2012, 09:43 AM
|
#1
|
LQ Newbie
Registered: Jun 2012
Posts: 6
Rep: 
|
How to enable usb-serial port converter in linux
Hello,
I'm trying to use cutecom to read data from my serial port device - a fishfinder. I don't have a 9-pin port on my computer, so I am using a usb-serial port adapter. For windows, all I had to do was run a driver that came with the adapter (which doesn't work with Linux). I can successfully output data to Hyperterminal in Windows.
I found an article titled "How to enable USB-serial port adapter (RS-232) in Ubuntu linux."
http://blog.mypapit.net/2008/05/how-...in-ubuntu.html
I followed its instructions exactly - I found the vendor and product id for the adapter and mapped it to /dev/tty/USB0. Unfortunately, cutecom still will not communicate with the serial port device.
Does anybody know what the problem could be, or what I should do? Could it be a hardware compatibility issue?
I can give some more information if you need it. Thanks.
|
|
|
07-06-2012, 09:45 AM
|
#2
|
LQ Guru
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573
|
All of the usb serial ports I've used just "worked". Watch /var/log/messages, plug it in, it should be mapped to something like /dev/ttyUSB0, then use it like normal. This is in Debian, Ubuntu, Knoppix...
It's never been more complicated than that in my experience. What converter are you using?
Last edited by suicidaleggroll; 07-06-2012 at 09:48 AM.
|
|
|
07-06-2012, 10:56 AM
|
#3
|
LQ Newbie
Registered: Jun 2012
Posts: 6
Original Poster
Rep: 
|
I'm using a Dynex usb to serial adapter. It came with a driver disk, which only works with Windows. I'm not exactly sure what that software does. I have a feeling that all it is doing is the steps outlined in the article I posted, but I'm not sure.
The problem can't be with the serial port device itself(Fishfinder) because it works perfectly with Hyperterminal.
|
|
|
07-06-2012, 01:21 PM
|
#4
|
Moderator
Registered: Aug 2002
Posts: 26,761
|
Post the output of the lsusb command and look at the output of the dmesg command. AFAIK it uses the pl2303 chipset and should be automatically recognised and a /dev/ttyUSB0 device created. However depending on what Ubuntu version you are running the module may not recognise the vendor ID. The link does not work for me so what steps did you use to load the module etc.
Did you configure cutecom for the correct device? You can also try minicom.
|
|
|
07-06-2012, 01:25 PM
|
#5
|
LQ Newbie
Registered: Jun 2012
Posts: 6
Original Poster
Rep: 
|
These are the instructions that I followed:
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.
usb 1-1: new full speed USB device using uhci_and address 2
usb 1-1: configuration #1 chosen from 1 choice
After that, unplug the device and type “lsusb”. You will see a list of output similar to this.
Bus 003 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
Plug in the USB-Serial Port converter back, and run “lsusb” again, and you shall see an additional line, like this.
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 007: ID 03f0:4f11 Hewlett-Packard
Bus 001 Device 002: ID 4348:5523 --- --- --- (notice the additional line!)
Bus 002 Device 006: ID 05e3:1205 Genesys Logic, Inc. Afilias Optical Mouse H3003
Bus 002 Device 004: ID 15d9:0a33
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 :
sudo modprobe usbserial vendor=0x4348 product=0x5523
Run “dmesg” again and you shall see lines similar 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
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.
|
|
|
07-06-2012, 01:28 PM
|
#6
|
LQ Newbie
Registered: Jun 2012
Posts: 6
Original Poster
Rep: 
|
^^ I followed the above instructions and the adapter did show up on the lsusb and dmesg command. As for configuring cutecom, all I'm doing is typing /dev/tty/USB0 in the device field. The serial port is still not communicating with cutecom though.
|
|
|
07-06-2012, 02:03 PM
|
#7
|
LQ Guru
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573
|
Quote:
Originally Posted by The_Realist
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.
|
Quote:
Originally Posted by The_Realist
^^ I followed the above instructions and the adapter did show up on the lsusb and dmesg command. As for configuring cutecom, all I'm doing is typing /dev/tty/USB0 in the device field. The serial port is still not communicating with cutecom though.
|
???
|
|
|
07-06-2012, 05:41 PM
|
#8
|
LQ Newbie
Registered: Jun 2012
Posts: 6
Original Poster
Rep: 
|
^^ Nice catch but I already noticed that. I don't think it's the problem because I've tried it with both spellings and it didn't work either time. I think the guy who gave the instructions just made a typo and it is /dev/tty/USB0.
|
|
|
07-06-2012, 05:43 PM
|
#9
|
LQ Guru
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573
|
Usually it's /dev/ttyUSB0, at least that's where it's always placed by default when I use one.
|
|
|
All times are GMT -5. The time now is 05:58 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|