Serial Parameters (Modem Commands)

Top  Previous  Next

 

Modem commands are used to control the DS from the serial side. If your serial device is 'smart', it could change the destination address or port, or establish a connection, etc, from the serial side.

 

To Test Modem Commands Using HyperTerminal

 

Run DS Manager and open the settings dialog for the DS to which you wish to connect, and switch to the 'Serial Port' tab:

 

an008_ds_se

 

Take note of the following settings:

 

RTS/CTS flow control: Set it to Disabled or Remote. (A complete explanation can be found here.)

 

Baud rate, Parity, Data bits: Can be anything, but note down what they are.

 

Soft entry into Serial programming: That's the whole point of this section. Should not be 0 (Disabled). Can be set to Option 1 or Option 2 -- we later have a seperate step for each of these options.

 

Escape character (ASCII code): Should be set to '1'.

 

Click OK to close the DS settings dialog.

 

Perform the instructions under Establishing a Serial Connection with a Device Server. Select the serial settings you've previously set for the DS.

 

Perform the instructions under Setting Optional Parameters so you could see what you type (important in this case).

 

If you selected Option 1 for Soft entry into serial programming: Hit Ctrl-A 3 times in a row, with spaces larger than 100ms (i.e, not very very fast).

 

If you selected Option 2 for Soft entry into serial programming: Hit Ctrl-A just once and then type a random character (e.g, hit the r key).

 

The LEDs should start alternately blinking (green and red). The DS is now in programming mode!

 

You can now do one of two things:

 

Program the DS Using Regular Commands

 

For this, switch to the Programming Exercise and perform the steps described. Here is the complete programming session of the exercise, performed using Soft Entry mode 2:

 

an008_se_2

 

Program the DS Using Modem Commands

 

Modem commands are different than the commands in the example session in several respects:

 

They override the default values for the settings.

 

They can be sent only from the serial side.

 

They allow you to perform important changes without rebooting the device -- thus, they are fast.

 

They are temporary. On the next reboot, the previous settings are restored.

 

Read more about Modem Commands under Serial Programming and Modem (Serial-Side) Parameters & Instructions.

 

Below is a complete programming session using modem commands, performed using Soft Entry mode 1:

 

an008_se_1

 

In short, what this session does:

 

Changes the Routing Mode (RM) parameter to 2 (Client).

 

Changes the Destination IP-address (DI) parameter to 192.168.2.109

 

Changes the Destination Port Number (DP) parameter to 1001.

 

Establishes a connection using the Establish Connection (CE) instruction.

 

Logs out of the session (not rebooting the DS) using the Logout (O) command.

 

To try the programming session yourself, remember that the white smileys represent ASCII 001 chars and are produced using Ctrl+A, and the black smileys represent ASCII 002 (STX) chars and are produced using Ctrl+B.