"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.
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.
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.
@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
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.
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.
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.
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.
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 http://www.ftdichip.com/Drivers/VCP.htm
and get the 32 or 64 bit version.
|All times are GMT -5. The time now is 11:08 AM.|