LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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

Reply
 
Search this Thread
Old 07-06-2012, 09:43 AM   #1
The_Realist
LQ Newbie
 
Registered: Jun 2012
Posts: 6

Rep: Reputation: Disabled
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.
 
Old 07-06-2012, 09:45 AM   #2
suicidaleggroll
Senior Member
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 2,673

Rep: Reputation: 956Reputation: 956Reputation: 956Reputation: 956Reputation: 956Reputation: 956Reputation: 956Reputation: 956
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.
 
Old 07-06-2012, 10:56 AM   #3
The_Realist
LQ Newbie
 
Registered: Jun 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
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.
 
Old 07-06-2012, 01:21 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,819

Rep: Reputation: 727Reputation: 727Reputation: 727Reputation: 727Reputation: 727Reputation: 727Reputation: 727
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.
 
Old 07-06-2012, 01:25 PM   #5
The_Realist
LQ Newbie
 
Registered: Jun 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
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.
 
Old 07-06-2012, 01:28 PM   #6
The_Realist
LQ Newbie
 
Registered: Jun 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
^^ 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.
 
Old 07-06-2012, 02:03 PM   #7
suicidaleggroll
Senior Member
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 2,673

Rep: Reputation: 956Reputation: 956Reputation: 956Reputation: 956Reputation: 956Reputation: 956Reputation: 956Reputation: 956
Quote:
Originally Posted by The_Realist View Post
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 View Post
^^ 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.
???
 
Old 07-06-2012, 05:41 PM   #8
The_Realist
LQ Newbie
 
Registered: Jun 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
^^ 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.
 
Old 07-06-2012, 05:43 PM   #9
suicidaleggroll
Senior Member
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 2,673

Rep: Reputation: 956Reputation: 956Reputation: 956Reputation: 956Reputation: 956Reputation: 956Reputation: 956Reputation: 956
Usually it's /dev/ttyUSB0, at least that's where it's always placed by default when I use one.
 
  


Reply

Tags
adapter, serial port


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
USB to serial converter for linux golden_boy615 Linux - Hardware 6 02-23-2010 10:12 AM
USB to Serial Converter on Serial Modem bongski55 Linux - General 3 08-29-2005 10:04 AM
Serial to USB Port Converter for Laptop and CDMA Phone useth Linux - Hardware 2 08-30-2004 08:18 AM


All times are GMT -5. The time now is 11:14 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration