Benefits of Modem Commands

Top  Previous  Next

 

There are several good reasons for using modem commands, if you can do so:

 

Establishing a Connection

 

Using modem commands, you could allow the user to initiate a connection directly from the device, at his will. You could also dynamically change the IP address to which the connection is established. This is good when working with a primary and secondary server (if the primary server does not reply, you fall back to the secondary server). It's also good for WAN scenarios -- the serial device 'dials in' and doesn't have to be connected at all times.

 

Terminating a Connection

 

Modem commands can also be used to terminate the data connection from the serial side. This can lead to all sorts of interesting options: For instance, a serial device can send data to five (or more) different destinations, in rotation, again and again. It will establish the connection (using the Establish Connection (CE) instruction), send the data, disconnect (using the Close Connection (CC) instruction), and will establish a new connection with a new host, again.

 

Not Writing to EEPROM

 

The EEPROM memory the DS uses to store settings has a finite (although large) number of write cycles. Thus, every time you write the EEPROM, you somewhat shorten the operational life of the DS. While this is not felt under normal use (like writing to the EEPROM once or twice per day), if you perform several EEPROM write actions every hour, this may shorten the lifespan of the DS more noticeably.

 

When you issue a modem command, it is not written to the EEPROM of the DS. It takes effect immediately after the programming session, and stays in effect until the DS is turned off, or until it receives another command contradicting the first one. Thus, using modem commands translates into a longer lifespan for the DS.

 

Also, since modem commands take effect after a programming session without the DS needing to be reset (powered off and back on), this means they can be applied very quickly. For instance, it takes less than 2 seconds to enter a programming session, change the routing mode of the DS, give it a new destination address and port, order it to connect, and end the programming session. Fast.

 

In Summary

 

Modem commands allow for much tighter integration of the serial device with the DS. Above are just several examples. The rest of the text contains technical details -- once you read them, you might come up with several ideas of your own.