Connect Serial Devices as Virtual COM Ports using TRB145 and HW VSP3

From Teltonika Networks Wiki
Revision as of 18:47, 23 June 2022 by MartinFaundez (talk | contribs) (Added Firmware Version notice and Advanced Mode indications)

Main Page > General Information > Configuration Examples > RS232/485 > Connect Serial Devices as Virtual COM Ports using TRB145 and HW VSP3

Introduction

This article provides a configuration example to enable communication from a serial device connected to the TRB145 to a virtual COM port on a Windows machine using the software HW VSP3, to enable its usage by applications (such as Putty) as a native device of the computer.

The information in this page is updated in accordance with firmware version TRB1_R_00.07.02.1.


If you're having trouble finding this page or some of the parameters described here on your device's WebUI, you should turn on "Advanced WebUI" mode. You can do that by clicking the "Basic" button under "Mode", which is located at the top-right corner of the WebUI.

Networking trb1 manual webui basic advanced mode.gif

Configuration Overview and Prerequisites

The TRB145 has an RS485 interface which can be used to communicate with serial devices. Combining this, plus the Serial-Over-IP functionality of the device, can enable serial devices to be communicated through LAN or WAN as native COM ports in Windows machines.

This configuration focuses on enabling the Serial-Over-IP functionality of the TRB145 and connecting it through LAN to the HW VSP3 software, which is a Freeware provided by HW Group which allows Windows machines to connect to Serial-over-IP devices as if they were directly connected to the computer.

For example purposes, we will enable a RUT955 in Serial Console mode to be our Serial end device.

Prerequisites

  • A TRB145 device (this configuration also works with a TRB245 or a RUT955).
  • An RS485 serial device, which in this example is a RUT955.
  • A computer running Windows with the HW VSP3 Software.
  • The software Putty installed in this Windows machine.

Configuration Scheme

Configuration

First, we will set up the RS485 functionality of the RUT955 to have it act as a Serial console.

For this, open the WebUI and run th Setup Wizard to finish the basic configurations of the device, and once you are in the main page of the WebUI, head over to Services > RS485 and enable the service, without changing any of the default settings. Enabling RS485 on the RUT955.png


Afterwards, please click on the Save & Apply button to save the changes. This will enable console access through the RS485 port of the RUT955.


Then, we will move onto the TRB145. Please connect the device to the computer through the provided micro USB cable, and enter the WebUI.

Set up the basic configurations of your device by following the Setup Wizard instructions, and then head over to the Services > RS485 menu.

There, set the following configurations:


RS485 Configuration for Serial Over IP.png


The following changes are to be made to this configuration page:

  • Serial type: Over IP
  • Port: 502 (you can use any port, however, 502 is used here as an example)
  • Enabled: ON

Then, hit Save & Apply to save the changes.


The Router will automatically create a Firewall rule to open this port to the Internet, which can be verified in the Network > Firewall > Traffic Rules menu, on the second page of rules.

Firewal Page of the RS485 Over IP Rule.png


Note: If a VPN is being used for this configuration, please edit the rule by clicking on the pen icon, and setting the Source Zone to the corresponding VPN firewall zone. For more information about the Firewall zones, please refer to this article.


Then, we move onto the computer to use the HW VSP3 software, which can be downloaded from this link. Proceed with a normal installation, and once installed, open the software.

In order to generate a serial connection to the Serial device, once you have opened the software and head over to the Virtual Serial Port tab, and set up a name for the Port Name, which in this example is COM3. Then, also select the TRB145 IP address, and the Port we set up in the TRB145.


HW VSP3 Configuration Page.png


Finally, press on the Create COM port to enable the virtual port on the device, which will interface with the Serial Over IP device.


This virtual port can be tested in a software like Putty. To do this, please first select the Serial option for the Connection Type, and then, select the correct Port Name in the Serial Line field, which is COM3 in this case, and the correct Speed, which in this case is 115200.


PuTTY Setup to connect to COM Port.png


Then, you can proceed to click on the Open button to start a console to the Serial device.


Afterwards, as the RUT955 is connected, it will prompt to log into the device just as if this was an SSH connection, however, all of the traffic will go through Serial-Over-IP.


PuTTY Over Serial-Over-IP.png


This configuration can be replicated using a public IP on the SIM card of the TRB145, or using this configuration coupled with a VPN (by also enabling the adequate Firewall rules) to enable the usage of serial devices through the Internet as native COM ports. This setup can also be replicated to work with the RS232 interface by instead making the same configurations over the RS232 configuration page.