On-the-fly commands are used to change the serial port configuration of the DS as needed (i.e. "on the fly"). Serial port configuration made through the on-the-fly commands overrides the permanent one, defined by the serial port settings of the DS. The difference between the changes made using on-the-fly commands and changes made through altering DS settings is that, unlike serial settings, on-the-fly commands have immediate effect and do not require the DS to be rebooted in order for the new values to be recognized.
With on-the-fly commands enabled, the serial port of the DS is always setup as required by the PC application that communicates with this DS through the VSP . When the PC application opens the VSP (or some communications parameters are changed) the application informs the VSP about required changes* and the VSP relates this information to the DS by sending on-the-fly commands.
Additionally, on-the-fly commands are used by the VSP to control the RTS and DTR outputs of the DS serial port. The status of the CTS and DSR input of the DS serial port can be passed to the VSP too- this is done using so-called "notification messages". For more information see handling of RTS, CTS, DTR, and DSR signals .
On-the-fly commands drop-down box provides four choices:
|Disabled||On-the-fly commands are not sent at all, so the serial port of the DS will use "permanent" serial port configuration defined by the serial port settings. In this mode it doesn't matter what serial port parameters are set in the PC software application- the DS will not be aware of them!|
|Out-of-band||On-the-fly commands are enabled and sent in the form of out-of-band (UDP) commands. On-the-fly commands (RC) setting of the DS must be programmed to 1 (enabled) for the out-of-band on-the-fly commands to be accepted.|
|Inband||On-the-fly commands are enabled and sent in the form of inband (TCP) commands. On-the-fly commands (RC) setting of the DS must be programmed to 1 (enabled) for the on-the-fly commands to be accepted. Additionally, there are some other programming steps that must be performed before the DS will recognize inband commands- see preparing the DS for inband access.|
|Disabled (w FF esc.)||On-the-fly commands are not sent, but the VSP treats all incoming and outgoing data as if inband mode was used (i.e. it doubles all "escape" characters (ASCII code 255) in the data sent by the application and expects all escape characters to be doubled in the data stream sent by the DS). See disabled (with FF escape) mode of the VSP for details.|
In general, we recommend you to keep on-the-fly commands enabled (unless there are some special reasons preventing you from doing so). Enabling on-the-fly commands keeps the serial port setup of the DS "in sync" with the requirements of the software application using the VSP .
As for choosing between out-of-band and inband modes, follow these recommendations:
Out-of-band commands work most of the time, especially when the PC (running VSP ) and the DS are located on the same network segment. Out-of-band commands may not work very well or not work at all for the remote Device Servers located behind the routers, firewalls, etc*. This is because:
|•||Routers are known to "drop" UDP datagrams (on which out-of-band on-the-fly commands are based) under heavy network traffic.|
|•||UDP traffic is banned by the firewalls of many networks (hence, out-of-band on-the-fly commands cannot be used at all). If you want out-of-band on-the-fly commands to work then your network must allow UDP traffic to port 65535!|
If you encounter one of the above situations then you should use inband on-the-fly commands or not use on-the-fly commands at all!
There is one other reason why out-of-band commands may not be suitable- this is when on-the-fly commands must be synchronized with the data sent by the VSP . For more information see synchronization issues .
On-the-fly command-related activity of the VSP is best observed using the Port Monitor , as all on-the-fly commands as well as the result of their execution are logged- see next section for details.
* This is standard for Windows COM ports.
** The definition of the network segment implies that there are only network hubs (and no routers, bridges, firewalls, etc.) between the PC and all other devices on the segment.
*** Here we touch on a very complicated subject. Modern routers offer a bewildering array of setup options. We will attempt to cover this in details in our upcoming white papers.