Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Hardware
User Name
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?


  Search this Thread
Old 10-31-2012, 06:47 AM   #1
Registered: Aug 2005
Distribution: Fedora 13, RHEL 5.3, Ubuntu 10.04, Debian Lenny
Posts: 128

Rep: Reputation: 16
"Talking" RS232 via USB


I have a cellular modem module with a RS232 serial interface.
I bought an Exsys USB to RS232 adapter cable in order to connect the modem to my computer.
I tried using minicom to initiate the connection. (The USB adapter is recognized correctly and comes up as /dev/ttyUSB0)
I double-checked all the settings like baud rate, parity, stopbits etc. but it seems as the connection between modem and computer couldn't be established.
I cannot type any command (like "AT") - or at least no keystroke is echoed and neither do I get any character(s) in return.

Any ideas?

Old 10-31-2012, 09:39 AM   #2
Senior Member
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 13.1
Posts: 1,330

Rep: Reputation: 254Reputation: 254Reputation: 254
Does the celluar modem echo it at all? AFAIR this could be configured in many devices accessed by RS232. If it’s not echoed: some software can be set to halfdulpex for this purpose like cu --halfduplex … to get a local echo.
Old 10-31-2012, 10:02 AM   #3
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 8,866

Rep: Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913
I had a Digital Transmission Systems Module in first half of 2012

It transpires that RS-232 goes up the wire in reverse order (LSB first) with + and - voltage levels, which levels seem reversed. USB does none of that, but uses bit stuffing - i.e when 6 zeroes are sent in a row, the format interjects with a 1 for various sensible reasons.

It will be clear that translation is necessary. Translation = lag, or time delay.
Also, rs232 stuff is comfortable with an echo, from the days of dumb terminals. USB is not. You won't get one without work.
Old 10-31-2012, 11:08 AM   #4
Registered: Nov 2004
Location: SE England
Distribution: Debian, SUSE, Ubuntu, Slackware
Posts: 147

Rep: Reputation: 15
@business_kid - i don't mean to devalue what you've said but he's using a usb -> rs232 adapter - that does the translation for you and rs232 is much slower than usb so you'd never notice the lag anyway.

Having used rs232 for a bunch of things, one thing that caught me out at the beginning was whether or not the device needed to use a straight through serial cable or a null modem serial cable.

if you use the wrong type of cable you don't get any output at all from the device as i found out and had me stumped for a couple of days when i first started experimenting with rs232

i suspect in your case if the device you are connecting to is a modem of sorts then you would need a straight through cable and not a null modem cable
Old 10-31-2012, 01:01 PM   #5
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 8,866

Rep: Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913
Your standard cable goes
2 <--> 3
3 <--> 2
5 <--> 5
in the 9 pin plug. That usually gets you going, unless there's handshakes all round (involving 6 & 9).

My point was time lag. Also, rs232 can be 7/8 bit, 0/1/2 stop bits 0/1 parity bits, and must be at the correct frequency. Despite pc ports, the spec was 9600 baud max.
Old 10-31-2012, 06:52 PM   #6
LQ Newbie
Registered: Dec 2005
Posts: 4

Rep: Reputation: 1
To check if you are sending anything from PC, at the 9-pin USB-RS232 connector, connects pins 2 and 3 and whatever key you press on the keboard should be received and displayed on your terminal emulation window (minicom). This is a simple loop back to verify that the problem is not on the PC side.
Another thing to check is the compatibility of your celluar phone with RS-232 standard voltage level. Many devices support RS-232 protocol but at logic level voltages. The transmit signal from the phone will not have large enough voltage to be recognized by the PC. In that case you also need a voltage level translator to convert the RS-232 level from USB-RS232 to celluar phone level.
Old 10-31-2012, 09:01 PM   #7
LQ Newbie
Registered: Nov 2008
Posts: 25

Rep: Reputation: 0
Aside from the issues with RS232 mentioned by the other users there is a problem with some of the manufactured USB to RS232 comnvertors which has been plagueing amateur radio operators for some time and would affect things like an external modem. There are many inexpensive convertors that do not use the FTDI chip to convert USB to RS232 and back. If you have one of these convertors, it may not work properly or at all for a modem connection. Look through the paper work that came with your convertor to see if it uses the FTDI RS232RQ (or similar number- the important part is the FTDI prefix).... if it does not, you may have problems from the convertor. One chinese manufacturer uses a 2920 (I believe that is the correct number) chip that I do not recommended for use with any modem operation. (Disclaimer: I do not work for FTDI or have any affiliation....I have just found that their chip works for me)
Update:I believe that Belkin is one manufacturer that uses the FTDI chip.
Update:I checked under Google for Exsys and all of the links I saw say that they use the FTDI chip so you may not have any thing to worry about with your convertor.

Last edited by kc4mts; 10-31-2012 at 09:07 PM. Reason: Added information. And updating.
Old 10-31-2012, 10:02 PM   #8
LQ Newbie
Registered: Jan 2011
Posts: 14

Rep: Reputation: 0
I've fiddled around with a few USB<->RS-232 adaptors. Some are easier to use than others.

I'm currently using a TrendNET TU-S9 to drive a fax modem from a headless server running Ubuntu 10.04LTS Server. It appears as /dev/ttyUSB0. IIRC, the modem I was connecting to didn't echo, but gave the standard "\nOK\n" response to an AT command. It interfaced directly with asterisk with very little fiddling.

That said, the whole process took rather a long, frustrating time, mostly because I tried a couple of serial adaptors and USB modems that simply did not work.

Old 11-01-2012, 03:09 AM   #9
Registered: Jan 2012
Posts: 42

Rep: Reputation: 2
Haha, yes, glad modems are a thing of the past. Mostly.
They always gave me plenty of headaches.

To the point: Most modems do not echo anything by default; you have to enable it.
Type the following in minicom (followed by enter):

If that doesn't work, experiment with what <enter> sends: CR, CRLF or LF
If that doesnt work try again using 9600,8,n,1
Get a standard RS232 cable, dont try to solder one yourself, you will only shoot yourself in the foot.
Get a null-modem converter plug while you are at it, just in case.
Buy a Sweex USB-to-serial converter.

If all this doesn't work, get the drivers from
and get the 32 or 64 bit version.


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
evdev/xorg help? USB mouse/kbd: 2.6.24="just works">2.6.25="unplug/replug to work". GrapefruiTgirl Linux - Hardware 4 12-13-2012 02:23 PM
"Installing non-distro Linux on USB key" or "Using syslinux to boot a jffs2" lymae Linux - Newbie 6 12-31-2006 10:00 PM
Controlling "modem" via RS232 Fin7PL Linux - Software 1 11-11-2005 08:47 AM
"Unable to open USB device "usb://hp/LaserJet%201000": No such device" lordshipmayhem Mandriva 2 08-08-2004 04:56 PM
Writing to "/dev/usb/hiddev*" and to "/proc/bus/usb/00B/00S" throw an arror EI stpg Programming 0 07-14-2004 05:44 AM > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 03:54 PM.

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