Dewesoft NET interface

What is the Dewesoft NET interface?

The Dewesoft NET interface uses standard TCP/IP sockets for communication between a measurement unit and a client. A Dewesoft measurement unit needs to pre-configured before a client can connect to it.

Measurement unit configuration

When a Dewesoft measurement unit is defined as a »Slave measurement unit«, it starts listenening to incoming connections on the TCP port number 8999. This property needs to be set only once as Dewesoft will remember it afterwards.

If a firewall is active on the measurement unit it is important to either open the port number 8999 for incoming connections or simply disable the firewall. If the client software communicates with the measurement unit through a router then the firewall on the router also needs to be properly configured.

Client configuration

The thinnest possible client is a simple telnet software which comes with most Operating systems (Windows, Linux, etc…).

To connect to Dewesoft running on a measurement unit in MS Windows simply enter »telnet computername 8999« in the command prompt. »Computername« is either the DNS name or the IP address. In Windows, you can also use NETBIOS computer names, since NETBIOS names are resolved to DNS/IP names (only inside LAN).

If the connection is successful, Dewesoft will respond with a welcome message.

A client application can check if it is really connected to Dewesoft if a welcome message starts with »+CONNECTED«. After that, the client software can send requests to Dewesoft, which will respond to most requests with either a »+OK message«, meaning the request was accepted, or a »+ERR message«, meaning the request was denied.

Dewesoft NET clients have two possible modes of operation: CONTROL or VIEW mode. When a client connects to a measurement unit, it is automatically set to the VIEW mode. When operating in the view mode, a client can only issue request which do not alter the state of Dewesoft on measurement units, e.g., it cannot start or stop acquisition, load a setup, etc. However, a client can issue requests which only return the state of Dewesoft and it can also capture live data from the measurement unit (only if acquisition is already running).

![Starting Dewesoft acquisiton on measurement unit. When in view mode it is not possible to start acquisition. Client needs to switch to CONTROL mode first.](img/data cycle.PNG)

If the client software needs full control of Dewesoft, then it needs to switch to the CONTROL mode. This can be done by sending a »SETMODE 1« request. Only one client at a time can operate in the CONTROL mode. If another client is already connected to the Dewesoft in CONTROL mode then the »SETMODE 1« request will fail. A client can switch to the VIEW mode with the »SETMODE 0« command. An unlimited number of clients can be connected in the VIEW mode.

Capturing live data from a measurement unit

The first thing to do is to send a list channels to Dewesoft which will be transferred over network. The client can get the list of all available channels with the »LISTUSEDCHS« command. A multiline response from Dewesoft is always enclosed inside »+STX« and »+ETX« tags.

When capturing data from a unit, an additional TCP data port is needed. It is the client’s responsibility to open the data port. Before the live capture starts, a client should open one data port which will be used for data transfer. After that the client sends the »STARTTRANSFER portnumber« request and the Dewesoft measurement unit will try connecting to the data port on the client computer. If the connection is successful and Dewesoft is in acquisition mode, it will burst data to the client through the binary data port. The format of binary data is described in the Channel information chapter.

The client should send the request »PREPARETRANSFER« with a list of channels it wants to capture. Multiline inputs should be enclos!ed in »/STX« and »/ETX« tags.

After this Dewesoft will start to send binary data.