Advanced US Robotics 56K modem configuration via AT commands
Introduction
The Hayes command set (also known as the AT command set) is a specific command language originally developed by Dale Heatherington and Dennis Hayes for the Hayes Smartmodem 300 baud modem in 1981.
The command set consists of a series of short text strings which can be combined to produce commands for operations such as dialing, hanging up, and changing the parameters of the connection. The vast majority of dial-up modems use the Hayes command set in numerous variations.
DTE vs DCE speed differences
Before continuing with the discussion of advanced dial-up modem configuration, I want to make a point of two different speeds that can be set-up on a dial-up modem.
There are two data transfer rates used to refer to communications, called Data Terminal Equipment (DTE) and Data Communications Equipment (DCE).
The usual DTE for dial-up networking using an external modem, is a serial port (today, an USB port with an DB9 to USB adapter attached). The maximum speed of a standard hi-speed serial port is 115200 bps (bits per second), so this is what normally shows up as DTE. The DCE would be the external modem, with this DCE being mostly 56K (bps) these days.
It is normal to have DTE set to 115200 for a 56k modem, unless it proves to cause problems, like modem lockups. This enables the system (PC) to communicate with the modem at maximum rate, then the modem talks to the line at DCE rate.
As you can see from the screenshots above, the port speed (DTE) can be easily configured at the modem properties or at the COM port properties. It should match on both and should be the highest.
Note that, as stated, this is not the speed over the phone line but the speed of the connection between the serial port on the PC and the attached modem.
I will explain below how to set the DCE speed with AT commands.
US Robotics 56K Faxmodem AT commands
The model used for this lab is an USR5630B. On the official US Robotics support page for this modem model, there is an online version of the printed manual that comes within the modem's box.
On this manual, there is a section called Technical Reference which includes all the AT commands that can be used to further configure the modem via a terminal connection to it.
The full list of commands can be found here: 56K Faxmodem User's Guide and Reference
Sending AT commands to the modem
To be able to send AT commands to the modem I first need to find the COM port where it is connected. I can find this information on the Device Manager:
As you can see, my modem is connected on the COM4 port. I will use PuTTY to connect to this COM4 serial port:
Note how to access the serial line, the speed must match what is configured on the Device Manager as explained on the above section "DTE vs DCE speed differences".
![]() |
The way to send commands, is to write the command and hit Enter. You can test the connection by entering the AT command and hitting Enter. The modem should respond with OK as in the above screenshot.
The OK response is called a result code. Every time you write a command and hit enter, you will be given a result code. Usually, this result code will be OK if the modem accepted and processed the command, and ERROR if an invalid command was issued, or there was an error in the command line.
USR5630B command sets
For this modem model, there are two command sets:
- Basic command set: This commands are entered as a capital character followed by a digit. For example, M1.
- Extended command set: This commands are entered as an "&" (ampersand) and a capital character followed by a digit. This extends the basic command set. For example, &M1. Note that M1 is different from &M1.
- Register commands: This commands are entered as Sr=n where r is the number of the register to be changed, and n is the new value that is assigned.
A register represents a specific physical location in memory. Modems have small amounts of memory on board. This set of commands serves for entering values into a particular register (memory location). For example, S7=60 instructs the modem to "Set register #7 to the value 60". Registers usually control aspects of the modem operation (e.g. transmission strength, modulation parameters) and are usually specific to a particular model.
Using basic commands
Some useful basic commands are:
AT | Use alone to test for OK result code. |
ATI4 | Displays current modem settings |
ATI5 | Display user profiles |
AT$ | Display a basic command list (only basic commands) |
ATL0 | Sets speaker volume to lowest. |
ATL3 | Sets speaker volume to highest. |
ATM0 | Turns off speaker (speaker ALWAYS off) |
ATY0 | Use profile 0 setting in NVRAM |
ATY3 | Use factory configuration 1 (&F1) |
ATZ4 | Resets modem to factory default profile 1 (&F1) |
Using extended commands
Some useful extended commands are:
AT&$ | Displays a list of ampersand (&) commands (extended commands) |
AT&F1 | Loads a read-only (non-programmable) factory configuration. F1 = Hardware flow control template |
AT&W0 | Modifies the NVRAM 0 template (Y0). |
Setting the modem DCE speed with extended commands
When setting the modem DCE speed we can actually define a floor speed and a ceiling speed.
&Nn Sets connect speed, if connection cannot be made at this speed, the modem will hang up. When used in conjunction with &Un and &Un is greater than 0, &Nn sets the ceiling connect speed. &Un sets the floor connect speed.
&Un When set above 0, the value chosen from the table sets the floor connect speed (the lowest acceptable connect speed). If a connection cannot be made at or above this speed, the modem will hang up. This command can also be used in conjunction with &Nn.
By default &N=0 and &U=0
Some examples are:
AT&U16 | Connects at any speed faster than 33,600 bps |
AT&N16 | Attempts a connection at 33,600 bps |
AT&U16&N38 | Connects at any speed between 33,600 bps and 56,000 bps |
Modem initialization string (init string)
Before the modem software dials a phone number, it initializes (inits) the modem by sending it a series (string) of commands (AT commands). These commands configure the modem's options for things like error correction, data compression, flow control, and many other parameters.
The important thing about modem init strings is that having the right one often makes the difference between connecting and not connecting. Init strings are fairly specific to each modem.
By default, the USR5630B modem uses the following settings (remember we can get the modem current settings using the ATI4 basic command):
Current modem settings. Screenshot taken from U.S. Robotics ControlCenter
As we can see from the screenshot above, there are basic and extended commands currently configured. We also get the registry settings.
We can assume those are the default settings because I had reset the modem to its defaults prior to issuing the command.
The initialization string would be:
ATB0E1F1L1M1Q0V1X4Y0&A3&B1&C1&D2&H1&I0&K1&M4&N0&P0&R2&S0&T5&Y1
along with all the registry settings, some of which are initialized as follows:
ATS0=0S7=60S32=2S27=1S33=0
User profiles and multiple configuration settings
The USR5630B modem has two configuration profiles or templates, Y0 and Y1, we can see this by issuing the ATI5 command:
This is useful if you need two different sets of modem settings (for two different environments) and you want to alternate between without reconfiguring the whole set of options every time you change environments. For the average user, just one template should be enough.
The whole point of this template thing brings us to the discussion of the modem factory settings. Suppose we have made a lot of changes and we want to bring the modem to its default configuration. We can use the AT&F1 command (which loads the default hardware flow control template settings) followed by the AT&W0 command.
This last command will save the current configuration to the Y0 template, so we can safely assume that if it is issued right after the AT&F1 command, the modem will load the default hardware flow control template settings (F1) when rebooted.
Of course, it will keep that settings unless we do some modifications with AT commands and save it again with the AT&W0 command.
Extra initialization commands
In addition to the default config loaded when the modem is booted, we can add custom extra commands to the initialization string.
On Windows, this can be done on the Device Manager modem's properties window Advanced submenu:
Extra init string
On the extra init commands above, I am telling the modem to load the default hardware flow control template (&F1) every time it is booted (overriding whatever was configured on the Y0 template).
Also, I am setting the speaker to ON until CONNECT (M1) and the volume of the speaker to low (L1).
We can make an analogy between the modems' templates and settings, and a switch running- and startup-config. Think of the modems' startup-config as the settings loaded with the init string when the modem is booted. Also, think of the modems' running-config as the settings applied after the modem is booted, like the extra init string commands and any AT command manually entered after the modem is booted. To save the running-config to the startup-config you would need to save the settings to the template Y0 as we saw before.
Sources:
USRobotics Support: USR5630B 56K* V.92 External Faxmodem (RS232)
https://www.usr-emea.com/support/s-prod-template.asp?loc=unkg&prod=5630b
USR5630 Technical Reference
https://support.usr.com/support/5630b/5630b-ug/five.html
115200 Kbps from a 56k modem???
https://discussions.virtualdr.com/showthread.php?151548-115200-Kbps-from-a-56k-modem
Modem Commands
https://support.usr.com/support/3cxm756/3cxm756-ug/atcoms.htm