Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Help with modem AT command set

Status
Not open for further replies.

neazoi

Advanced Member level 6
Joined
Jan 5, 2008
Messages
4,119
Helped
13
Reputation
26
Reaction score
15
Trophy points
1,318
Location
Greece
Activity points
36,918
Hi, suppose I would like to connect a 56k old dial up serial modem on a dial up ISP, but by issuing only AT commands.
The modem is 56k but the serial connection to the terminal that is connected to the modem is only 2400bps.

What would be a typical AT sequence in that case?

I have figured out two commands:

ATX0 (do not wait for dial tone, issue only once not at every dial you do, unless you reboot the modem)
ATDT <thenumber> (dial <thenumber> with DTMF)

But how can I tell the modem to communicate on 2400bps on it's serial and also dial on 2400bps to the ISP?


I am sorry if this sounds a bit complicated.
 

I guess you're familiar with the Hayes AT command set:

www.computerhope.com/atcom.htm

I worked with external and internal modems. Whenever I tried something new, it usually took an hour or more to get communication to the other end, and back.

Can you tell the other end to select a particular baud rate?
Normally a modem opens communication at its highest baud rate, then drops to slower rates it gets clear response from the other side without errors.

Have you (successfully) tried 300 baud at both ends? 1200 baud? It is possible that your chosen baud rate (2400) is prone to errors. Any number of things could cause a glitch.

By the way, to be technical about it, bps is not the same as baud rate, although they usually are numerically equal.
 
  • Like
Reactions: neazoi

    neazoi

    Points: 2
    Helpful Answer Positive Rating
Even 2400 Bauds (= symbol rate rather than bit rate) might be difficult to achieve over a normal phone line. The reason is simple, there are only two wires and both ends try to use the same tone spectrum simultaneously. When you go faster than 1200 Bauds, the modulation scheme changes from FSK to phase methods and the signals become quite difficult to keep apart. This is why in the 'old days' the preferred speed was 1200 in one direction and 75 in the other, they could squeeze two FSK channels in the available bandwidth.

Start by getting a reliable 'OK' back when you send 'AT' - from then on it gets easier. The speed may be programmable using one of the 'S' registers (ATSx=y) but as I said, you may have problems connecting modem to modem at higher speeds. If you do get it working there is usually a command "ATW" that writes the settings into NV memory so they become the default but some modems allow more than one configuration to be stored so you might have an extra digit after the "W" to tell it which configuration slot to use.

Brian.
 
  • Like
Reactions: neazoi

    neazoi

    Points: 2
    Helpful Answer Positive Rating
A reasonable method could be to let the modem select the protocol itself based on the peer capabilities and line quality. Otherwise you'll use the - device specific - commands to restrict the protocol selection and remote data speed.

A standard V90 ("56k") modem should have no problems to connect to any peer using the default protocol settings.
 
  • Like
Reactions: neazoi

    neazoi

    Points: 2
    Helpful Answer Positive Rating
Even 2400 Bauds (= symbol rate rather than bit rate) might be difficult to achieve over a normal phone line. The reason is simple, there are only two wires and both ends try to use the same tone spectrum simultaneously. When you go faster than 1200 Bauds, the modulation scheme changes from FSK to phase methods and the signals become quite difficult to keep apart. This is why in the 'old days' the preferred speed was 1200 in one direction and 75 in the other, they could squeeze two FSK channels in the available bandwidth.

Start by getting a reliable 'OK' back when you send 'AT' - from then on it gets easier. The speed may be programmable using one of the 'S' registers (ATSx=y) but as I said, you may have problems connecting modem to modem at higher speeds. If you do get it working there is usually a command "ATW" that writes the settings into NV memory so they become the default but some modems allow more than one configuration to be stored so you might have an extra digit after the "W" to tell it which configuration slot to use.

Brian.



ATSx=y
Ok that was the exact answer I was looking for. I saw the AT command set list but I did not know how to syntax the command.
So for 1200, this will be:
What the values of the command be (just to make sure)?
ATS=1200 ?
 

No that's wrong AT syntax and useless. Register commands are setting a specific register value. However, there's no standard register to set remote speed. You'll refer to the modem documentation. Often, there are AT&G or AT&H commands to set protocol and speed. What's the modem brand and type?
 
  • Like
Reactions: neazoi

    neazoi

    Points: 2
    Helpful Answer Positive Rating
No that's wrong AT syntax and useless. Register commands are setting a specific register value. However, there's no standard register to set remote speed. You'll refer to the modem documentation. Often, there are AT&G or AT&H commands to set protocol and speed. What's the modem brand and type?

I thought so...
The modem is the diamond supra express 56e pro.I was hoping that the command is more general.
Where is the S parameter in the commands you have shown?
I am sorry I've put you in trouble with this old tech
 

According to the modem doc, everything can be set with AT+MS command. The command is in fact common to many 56k modems, e.g. the Elsa/Devolo modems I have been using in older days.
 

According to the modem doc, everything can be set with AT+MS command. The command is in fact common to many 56k modems, e.g. the Elsa/Devolo modems I have been using in older days.

Thanks! It would really save me time from trials and errors if you could write me down the command to set the modem speed to 1.2k
 

you please try first with a simple program like minicom and see the speed at which you can get it working reliably. Most modem manufacturers use different S registrar convention and that may be different for your modem.

If your modem has a speaker, turn it on. You can hear then the modem trying (some garbled noise will come out from the speaker).

My suggestion is to start setting the serial port with slowest speed; 600 or 1200 and odd parity, 1 stop and 8 data bits.

This is going to be a trial and error exercise. Some modems can auto-negotiate. If yours can, use that.

Your modem is likely to connect to a serial port and you can set the serial port parameters outside the modem.

It is not difficult but rather messy. You also can try to dial the number directly and see how it responds (some tones you will hear and then disconnect)
 

You should really read the documentation and understand what's appropriate according to the application and peer capabilities. Particularly I don't understand why you want to limit the remote data rate. I would expect that default settings cause the modem to negotiate a suitable protocol. Flow control prevents the peer from sending more data than you can receive at the local data rate.

Anyway, if you want a legacy protocol without automatic rate negotiation, you can try AT+MS=V22 or AT+MS=B212.
 

You should really read the documentation and understand what's appropriate according to the application and peer capabilities. Particularly I don't understand why you want to limit the remote data rate. I would expect that default settings cause the modem to negotiate a suitable protocol. Flow control prevents the peer from sending more data than you can receive at the local data rate.

Anyway, if you want a legacy protocol without automatic rate negotiation, you can try AT+MS=V22 or AT+MS=B212.

Thanks a lot that is a good way to start.
My local platform (an MCU running a terminal emulator) serial port has only tx/rx/gnd pins. I am not sure that it can instruct the modem to limit the LOCAL (communication between them) data rate. Maybe the modem can, if it senses automatically the data rate which is sent from the platform to the modem.
On the other hand if the modem connects to another modem at say 56k and the local modem-to-platform rate is only 1.2k, it may not be able to cope. That is why I consider limiting the line data rate.
 

See if XON/XOFF protocol is supported. It drops special commands for 'stop' and 'start' into the data stream itself so you don't have to rely on hardware handshaking.

Brian.
 

If you use low local data rate (e.g. 1.2K) and allow the modem to negotiate an "intelligent" protocol with error correction and data compression, no RX overflow should ever happen. The only requirement is that the peer computer uses flow control to prevent sending more data than the link accepts.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top