How the Wizard Decides Who Opens Connections
|Top Previous Next|
When you click Next on the netmask and gateway step the Wizard has enough information to decide which side of the application-to-DS connection will be responsible for establishing data connections with the other side.
In doing this, the Wizard decides on the future values of the Routing Mode (RM) and Connection Mode (CM) settings of the DS. With VSP-to-DS connections, the Wizard would also be able to set the routingand connection modes on the VSP side. For the application-to-DS connection, the Wizard can only setup the DS side. It is your responsibility to set the application side as expected by the Wizard. For the discussion below we will assume that the application also has "imaginary" routing and connection options, similar in function to the ones found in VSP. Here is what this means:
In general, the Wizard tries to follow the natural flow of data between the application and the serial device. In the initiator of the data exchange step you have already specified which side sends the data first, so the Wizard will have this side open a data connection to the other side as soon as the first data needs to be sent from this side of the connection.
For example, if you are dealing with the "scanner" type of serial device, then the first data is always sent by the serial device. Therefore, the Wizard will program the Routing Mode (RM) setting of the DS to "client". Consequently, the DS will be opening the data connections to the PC application so the application needs to be ready to accept those connections (in VSP terms this is the server routing mode).
Lines 1-3 of the following table illustrate what's just been said. Notice that the Connection Mode (CM) setting is always set to "on data". As the first data is received (by one side of the link) it triggers an attempt to open a data connection with the other side of the link:
The situation becomes more complicated when only one side of the connection can "see" the other side. Consider the case in line 7 of the table. The application has to send the data first, but it cannot "see" the DS. Therefore, even when the application needs to transmit the data it will be unable to establish a connection to the DS!
The way out is to have the DS connect to the PC (application) as soon as the DS is powered (so, the Connection Mode (CM) setting is 0 (immediately)). This way, by the time the application needs to send the first data to the DS the connection is already established. This kind of connections are called "reverse".
A special comment should be made on line 2 of the table, where the Routing Mode on the DS is designated to be either "client" or "server/client". The Wizard chooses "client" if DS programming is effected using out-of-band access method (you have selected this on the target DS step of the Wizard). If inband access method was selected the Wizard will set the mode to "server/client". This is because choosing "client" would cause it DS to reject all incoming connections in the future and this means that you wouldn't be able to program the DS using inband access in the future!
* This is the case when you have specified that "the Device Server is not accessible from this PC" on the target DS step, or that "the PC is not accessible from this Device Server" on the netmask and gateway for the DS step of the Wizard.
** "Imaginary" options of the PC application.