Question: The Client is the Slave? Or is it the Master? And what about the Server? What do these names mean?
Answer: Many users may be confused by these designations. First of all, let us begin with the simple facts, and then explain why it is so:
The reason for this: The SERVER quietly sits where it is. It is easily accessible, and simply waits to be called upon, to provide information. It is passive – the information it contains is accessible, but someone must ask for it, and only then, the server will reply and provide it. Hence – it is the SLAVE in this relationship.
The CLIENT, on the other hand, is the active side. It initiates the connection. It connects to the server and sends it a command to do something, or to send it a piece of information. It controls and commands the server (as much as it is allowed). Hence, it is the MASTER in this context.
In the beginning, the terminology of “Master” and “Slave” was most common, and this was the terminology used in Tibbo products as well. However, more recently, some have started regarding this notation as offensive (or potentialy offensive), and the Client/Server naming scheme gained much wider adoption.
* If your serial device WAITS for a connection to be established, and only answers once another device (such as a PC) has opened a communication session with it, it should be SERVER.
ABSOLUTELY NOT. Once a connection is established, both sides exchange data freely!
Think of it as a phone call: You can call another person, but once you've made the call, both of you can talk and hear each other freely. The only difference is that you're the one who initiated the call. Keep this in mind.
This is because your DS is Server/Slave. When the DS is Server, it awaits for the other side to establish a connection. When the other side sends it a TCP or UDP packet, the DS now has to reply. Indeed, to reply, the DS must have the gateway and subnet mask. However, it obtains this data _dynamically and automatically_, based on the packet it has received from the other party (who initiated the connection).
Thus, when the DS is Slave, there is no need (or possibility) to specify a subnet mask and a gateway. You only need to specify these values if the DS has to initiate a connection on its own – and once setting the DS as Client/Master you will be able to specify them.
A magnetic stripe reader sends data to the PC on its own. Right? You swipe a card, and then the magstripe reader _sends_ the data to the PC. The PC doesn't have to ask every second, “did someone swipe a card?”.
So, a magstripe reader is a master in this context – it initiates the connection.
A time recorder (time and attendance terminal) sits quietly on the wall, and accumulates data as employees swipe their cards. It does not immediately send the data to the computer – it aggragates it and waits for the computer to poll it for the data.
Every once in a while, the computer polls the clock. It opens the port, sends the clock a command, and the clock replies with all the data it has accumulated so far. Thus, the clock is slave in this context – it is passive, and waits for a connection to be initiated. (Note that even that it is slave, it still sends out lots of data once the connection has been established – see above about this.)
With a modem, either side can initiate a connection. The computer using the modem can decide it wants to call out (using the modem), or the modem can pick up an incoming call and route it to the computer.
Thus, a device like a modem should be configured as Client OR Server.