When the VSP Sends On-the-fly Commands

Top  Previous  Next

 

This topic details when and what on-the-fly commands the VSP sends to the DS.

 

At certain times the VSP sends an entire "parameter block" of required communications parameters to the DS:

 

Parameter block is sent when the VSP is just opened, except when the routing mode is "server".

 

Additionally, parameter block is sent each time the data connection is established (no matter whether this was an incoming or outgoing connection).

 

Parameter block includes all communications parameters needed by the serial port, such as the baudrate, parity, etc.

 

In addition to sending parameter blocks the VSP also sends individual commands whenever some parameter is changed within the application. For example, if the User chooses a different baudrate (while the application is already running and the VSP is opened) the VSP won't send out entire parameter block again but will instead send just the on-the-fly command to change the baudrate of the DS.

 

Such individual on-the-fly commands are sent immediately after the serial communications parameters are changed in the software application, except for the case when the routing mode is "server" and no data connection is established at the moment. In this case the VSP will have to wait until it receives an incoming connection, and this will trigger an entire parameter block to be sent, as described above.

 

Here is an example log from the Port Monitor detailing one "cycle" of the VSP operation (out-of-band on-the-fly commands are enabled, routing mode is not "server"):

 

 

--- application is started  ---

12/15/03 14:22:47 - COM3 (INFO): Port opened

--- beginning of parameter block (this block is sent because the VSP has been opened) ---

12/15/03 14:22:47 - COM3 (INFO): "On-the-Fly" command for 192.168.100.92: get DSR pin status...success

12/15/03 14:22:47 - COM3 (INFO): "On-the-Fly" command for 192.168.100.92: get CTS pin status...success

12/15/03 14:22:47 - COM3 (INFO): "On-the-Fly" command for 192.168.100.92: set DTR to high...success

12/15/03 14:22:47 - COM3 (INFO): "On-the-Fly" command for 192.168.100.92: set RTS to high...success

12/15/03 14:22:47 - COM3 (INFO): "On-the-Fly" command for 192.168.100.92: set baud rate to 38400 bps...success

12/15/03 14:22:47 - COM3 (INFO): "On-the-Fly" command for 192.168.100.92: set parity to none...success

12/15/03 14:22:47 - COM3 (INFO): "On-the-Fly" command for 192.168.100.92: set data bits to 8 bits...success

12/15/03 14:22:47 - COM3 (INFO): "On-the-Fly" command for 192.168.100.92: set flowcontrol to RTS/CTS...success

12/15/03 14:22:47 - COM3 (INFO): "On-the-Fly" command for 192.168.100.92: enabling line change notification for DSR...success

--- end of parameter block ---

---

--- connection is established (i.e. because the application sends data) ---

12/15/03 14:22:54 - COM3 (INFO): Established TCP connection with node 192.168.100.92:1001

--- beginning of parameter block (this block is sent because the connection has been established) ---

12/15/03 14:22:54 - COM3 (INFO): "On-the-Fly" command for 192.168.100.92: get DSR pin status...success

12/15/03 14:22:54 - COM3 (INFO): "On-the-Fly" command for 192.168.100.92: get CTS pin status...success

12/15/03 14:22:54 - COM3 (INFO): "On-the-Fly" command for 192.168.100.92: set DTR to high...success

12/15/03 14:22:54 - COM3 (INFO): "On-the-Fly" command for 192.168.100.92: set RTS to high...success

12/15/03 14:22:54 - COM3 (INFO): "On-the-Fly" command for 192.168.100.92: set baud rate to 38400 bps...success

12/15/03 14:22:54 - COM3 (INFO): "On-the-Fly" command for 192.168.100.92: set parity to none...success

12/15/03 14:22:54 - COM3 (INFO): "On-the-Fly" command for 192.168.100.92: set data bits to 8 bits...success

12/15/03 14:22:54 - COM3 (INFO): "On-the-Fly" command for 192.168.100.92: set flow control to RTS/CTS...success

12/15/03 14:22:54 - COM3 (INFO): "On-the-Fly" command for 192.168.100.92: enabling line change notification for DSR...success

--- end of parameter block ---

---

--- the following commands are sent in response to the User changing the baudrate within the application ---

12/15/03 14:22:56 - COM3 (INFO): "On-the-Fly" command for 192.168.100.92: set baud rate to 19200 bps...success

12/15/03 14:22:58 - COM3 (INFO): "On-the-Fly" command for 192.168.100.92: set baud rate to 9600 bps...success

12/15/03 14:22:59 - COM3 (INFO): "On-the-Fly" command for 192.168.100.92: set baud rate to 19200 bps...success

12/15/03 14:23:00 - COM3 (INFO): "On-the-Fly" command for 192.168.100.92: set baud rate to 9600 bps...success

--- application is closed ---

12/15/03 14:23:02 - COM3 (INFO): TCP connection closed

12/15/03 14:23:02 - COM3 (INFO): Port closed

 

A slightly different behavior is observed when the inband mode is selected for on-the-fly commands. Since inband commands are passed within the TCP data connection, the VSP establishes such a connection in case it needs to send on-the-fly command(s) and no connection is established at the moment. Again, this is only done when the routing mode is not "server".

 

Here is another output, this time for inband on-the-fly commands (routing mode is not "server"):

 

--- application is opened ---

12/17/03 09:30:13 - COM3 (INFO): Port opened

--- TCP connection is established because the VSP needs to send a parameter block ---

12/17/03 09:30:13 - COM3 (INFO): Established TCP connection with node 192.168.100.92:1001

--- beginning of parameter block ---

12/17/03 09:30:13 - COM3 (INFO): "On-the-Fly" command for 192.168.100.92: get DSR pin status...success

12/17/03 09:30:13 - COM3 (INFO): "On-the-Fly" command for 192.168.100.92: get CTS pin status...success

12/17/03 09:30:13 - COM3 (INFO): "On-the-Fly" command for 192.168.100.92: set DTR to high...success

12/17/03 09:30:13 - COM3 (INFO): "On-the-Fly" command for 192.168.100.92: set RTS to high...success

12/17/03 09:30:13 - COM3 (INFO): "On-the-Fly" command for 192.168.100.92: set baud rate to 38400 bps...success

12/17/03 09:30:13 - COM3 (INFO): "On-the-Fly" command for 192.168.100.92: set parity to none...success

12/17/03 09:30:13 - COM3 (INFO): "On-the-Fly" command for 192.168.100.92: set data bits to 8 bits...success

12/17/03 09:30:13 - COM3 (INFO): "On-the-Fly" command for 192.168.100.92: set flowcontrol to none...success

12/17/03 09:30:14 - COM3 (INFO): "On-the-Fly" command for 192.168.100.92: (unknown)...success

12/17/03 09:30:14 - COM3 (INFO): Line status change notification: DSR:low CTS:low

--- end of parameter block ---

---

--- connection is aborted because no data is being transmitted across this connection

12/17/03 09:31:14 - COM3 (INFO): TCP connection aborted by remote node

---

--- flow control mode must be changed, and the VSP establishes the TCP connection again

12/17/03 09:34:00 - COM3 (INFO): Established TCP connection with node 192.168.100.92:1001

12/17/03 09:34:00 - COM3 (INFO): "On-the-Fly" command for 192.168.100.92: set flowcontrol to RTS/CTS...success

 

The VSP employs a retry mechanisms that makes up to 3 additional attempts in case no reply is received from the DS. If, after 4 attempts there is still no reply the VSP disables on-the-fly command generation:

 

12/16/03 10:55:58 - COM3 (WARNING): "On-the-Fly" command for 192.168.100.92: set baud rate to 9600 bps...timed out, still trying...

12/16/03 10:56:01 - COM3 (WARNING): "On-the-Fly" command for 192.168.100.92: set baud rate to 9600 bps...timed out, still trying...

12/16/03 10:56:04 - COM3 (WARNING): "On-the-Fly" command for 192.168.100.92: set baud rate to 9600 bps...timed out, still trying...

12/16/03 10:56:04 - COM3 (ERROR): "On-the-Fly" command for 192.168.100.92: set baud rate to 9600 bps...timed out

12/16/03 10:56:05 - COM3 (INFO): "On-the-Fly" commands disabled (until port opened next time)

 

No additional attempts are made if the DS denies or rejects any on-the-fly command:

 

12/16/03 11:03:33 - COM3 (ERROR): "On-the-Fly" command for 192.168.100.92: get DSR pin status...access denied

12/16/03 11:03:34 - COM3 (INFO): "On-the-Fly" commands disabled (until port opened next time)