Ser2Net is a very useful service that allows the use of serial ports of mySCADA Box in Server-side Scripts. At first, it is necessary to setup the parameters of serial ports in the COM bookmark of the myScada Box menu. The number of available serial ports depends on the hardware configuration of myScada Box. Clicking on the “edit” icons on the right can change the settings for each port.
After configuring the desired serial ports, you can switch to the SER2NET bookmark and configure the Ser2Net service. The Ser2Net configuration window is shown in the picture below:
By default, the Ser2Net service is stopped and the service auto-start is disabled. To enable auto-start of Ser2Net, you have to check the Start after reboot box and click on the Change button to save the settings. The Start and the Stop buttons can control the Ser2Net service manually. To enable access to the serial port via Ser2Net, you have to set up a new device by clicking on New device. The Add device dialog is shown in the following picture.
Device – list of available serial ports
Timeout – time (in seconds) before the port will be disconnected if there is no activity on it. A zero value disables this function
Allow remote control – allows remote control of the serial port parameters via RFC 2217
TCP Port – number of the TCP/IP port to accept connections
State – specifies operation mode of device:
- Raw – enables the port and transfers all data, as it is between the TCP and the serial port
- Telnet – enables the port and runs the telnet protocol on the port to set up telnet parameters
- Off – disables the port from accepting connecting