+ Post New Thread
Results 1 to 14 of 14
  1. #1
    Advanced Member level 5
    Points: 16,343, Level: 30
    Achievements:
    7 years registered
    neazoi's Avatar
    Join Date
    Jan 2008
    Location
    Greece
    Posts
    3,315
    Helped
    12 / 12
    Points
    16,343
    Level
    30

    Help with modem AT command set

    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.
    Professional engineering is the top, but amateur engineering is more fun.
    It is when you cross the barrier between these two, that things become really fascinating!

  2. #2
    Super Moderator
    Points: 51,525, Level: 55

    Join Date
    Apr 2011
    Location
    Minneapolis, Minnesota, USA
    Posts
    12,647
    Helped
    2515 / 2515
    Points
    51,525
    Level
    55

    Re: Help with modem AT command set

    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.


    1 members found this post helpful.

    •   AltAdvertisment

        
       

  3. #3
    Super Moderator
    Points: 78,745, Level: 68
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    12,896
    Helped
    4306 / 4306
    Points
    78,745
    Level
    68

    Re: Help with modem AT command set

    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.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.


    1 members found this post helpful.

  4. #4
    Super Moderator
    Points: 255,114, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    44,445
    Helped
    13540 / 13540
    Points
    255,114
    Level
    100

    Re: Help with modem AT command set

    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.


    1 members found this post helpful.

  5. #5
    Advanced Member level 5
    Points: 16,343, Level: 30
    Achievements:
    7 years registered
    neazoi's Avatar
    Join Date
    Jan 2008
    Location
    Greece
    Posts
    3,315
    Helped
    12 / 12
    Points
    16,343
    Level
    30

    Re: Help with modem AT command set

    Quote Originally Posted by betwixt View Post
    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 ?
    Professional engineering is the top, but amateur engineering is more fun.
    It is when you cross the barrier between these two, that things become really fascinating!



  6. #6
    Super Moderator
    Points: 255,114, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    44,445
    Helped
    13540 / 13540
    Points
    255,114
    Level
    100

    Re: Help with modem AT command set

    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?


    1 members found this post helpful.

    •   AltAdvertisment

        
       

  7. #7
    Advanced Member level 5
    Points: 16,343, Level: 30
    Achievements:
    7 years registered
    neazoi's Avatar
    Join Date
    Jan 2008
    Location
    Greece
    Posts
    3,315
    Helped
    12 / 12
    Points
    16,343
    Level
    30

    Re: Help with modem AT command set

    Quote Originally Posted by FvM View Post
    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
    Professional engineering is the top, but amateur engineering is more fun.
    It is when you cross the barrier between these two, that things become really fascinating!



  8. #8
    Super Moderator
    Points: 255,114, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    44,445
    Helped
    13540 / 13540
    Points
    255,114
    Level
    100

    Re: Help with modem AT command set

    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.



  9. #9
    Advanced Member level 5
    Points: 16,343, Level: 30
    Achievements:
    7 years registered
    neazoi's Avatar
    Join Date
    Jan 2008
    Location
    Greece
    Posts
    3,315
    Helped
    12 / 12
    Points
    16,343
    Level
    30

    Re: Help with modem AT command set

    Quote Originally Posted by FvM View Post
    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
    Professional engineering is the top, but amateur engineering is more fun.
    It is when you cross the barrier between these two, that things become really fascinating!



    •   AltAdvertisment

        
       

  10. #10
    Advanced Member level 5
    Points: 16,113, Level: 30

    Join Date
    Nov 2012
    Posts
    2,959
    Helped
    713 / 713
    Points
    16,113
    Level
    30

    Re: Help with modem AT command set

    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)



  11. #11
    Super Moderator
    Points: 255,114, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    44,445
    Helped
    13540 / 13540
    Points
    255,114
    Level
    100

    Re: Help with modem AT command set

    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.



  12. #12
    Advanced Member level 5
    Points: 16,343, Level: 30
    Achievements:
    7 years registered
    neazoi's Avatar
    Join Date
    Jan 2008
    Location
    Greece
    Posts
    3,315
    Helped
    12 / 12
    Points
    16,343
    Level
    30

    Re: Help with modem AT command set

    Quote Originally Posted by FvM View Post
    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.
    Professional engineering is the top, but amateur engineering is more fun.
    It is when you cross the barrier between these two, that things become really fascinating!



  13. #13
    Super Moderator
    Points: 78,745, Level: 68
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    12,896
    Helped
    4306 / 4306
    Points
    78,745
    Level
    68

    Re: Help with modem AT command set

    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.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



  14. #14
    Super Moderator
    Points: 255,114, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    44,445
    Helped
    13540 / 13540
    Points
    255,114
    Level
    100

    Re: Help with modem AT command set

    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.



--[[ ]]--