TGY Cyber logo

πŸ“˜ WS2C - WiFi to Serial with 2 Channels

Video Tutorial

RS232 Serial to WiFi Converter 2 Channels

WS2C

1. Introduction

The WS2C is a Wireless to Serial converter with two RS232 serial ports, which allows connecting serial devices (such as scales, printers, microterminals, etc.) and performing communication via Wi-Fi using the TCP/IP, HTTP via API and MQTT protocols.

Data received from the network is transmitted to the serial port, and data sent by serial is transmitted over the network.

1.0.1

1.1 Installation

Connect the WS2C to a power supply with 9V 2A output.

The power supply included with the WS2C Kit operates at 127V or 220V, and the device will be ready for configuration and use.


2. Webserver

The WS2C is configured through an internal webserver.
To access it, simply connect to the network created by the device and open the browser.

2.1 Connecting to the WS2C network

  1. On your computer or phone, open Wi-Fi settings.
  2. Find the network named "WS2C" (no default password).
  3. Connect, the webserver will already be available for access.
2.1.1

2.2 Accessing the webserver

Open the browser and type the address:

http://10.10.10.10
2.2.1

⚠️ Make sure to use "http://" and not "https://", as the server does not support HTTPS.


2.3 Logging into the webserver

The login screen will display the following fields:

Field Default value
Username admin
Password admin
2.3.1

3. Configuring the device

The webserver has five sections:

  1. System configuration
  2. Serial port configuration
  3. General configuration
  4. Status view
  5. Protocol configuration

3.1 System configuration

In this section you can adjust:

  • Authentication data (webserver username and password)3.1.1
  • LAN network settings (DHCP or manual)3.1.2
  • Wi-Fi settings (mode and channel)3.1.3

LAN Configuration

Field Description
LAN IP Fixed IP address (if manual mode)
Subnet mask Default: 255.255.255.0
Gateway Router address
DNS Default: 8.8.8.8 (Google)
DHCP Can be enabled or disabled

⚠️ Disabled DHCP mode is recommended to avoid IP changes and communication loss.

Wi-Fi Configuration

Field Description
Wi-Fi Mode AP + STA, AP, or STA
Network name SSID displayed in Wi-Fi search
Password Wi-Fi connection password
Channel Default "1" or values between 1 and 13

πŸ“Ά AP (Access Point): Creates the WS2C network for configuration.
πŸ“‘ STA (Station): Connects the WS2C to the local Wi-Fi network.
πŸ” AP + STA: Allows simultaneous configuration and operation (recommended).

Channel Frequency
1 2.412 GHz
2 2.417 GHz
3 2.422 GHz
4 2.427 GHz
5 2.432 GHz
6 2.437 GHz
7 2.442 GHz
8 2.447 GHz
9 2.452 GHz
10 2.457 GHz
11 2.462 GHz
12 2.467 GHz
13 2.472 GHz

3.2 Serial port configuration

The WS2C has two independent serial ports, individually configurable.

3.2.1
Parameter Description
Baud Rate Communication speed
Data Bits Data bits
Stop Bits Stop bits
Parity Parity type
Port TCP/IP port associated with serial

By default:

  • Serial 1 β†’ Port 1100
  • Serial 2 β†’ Port 1101
3.2.2

⚠️ Ports cannot be the same.

Each serial can be enabled or disabled as needed.


3.3 General configuration

This tab contains the basic system options:

3.3.1
Option Function
Restart Restarts the converter
Language Portuguese / English
Factory Reset Returns to original settings

⚠️ Resetting the system erases all user settings.


3.4 Saving data

After configuring each section, click "Save".
A success message will be displayed at the top of the page.
Restart the WS2C to apply the changes.

⚠️ To restart the converter, quickly press the physical reset button once.
Attention: Do not hold the button for more than 10 seconds, this will cause the converter to return to factory settings.


3.5 System Status

3.5.1
3.5.2

Displays information such as:

Parameter Example
System Name WS2C TGY
MAC 70:B8:F6:5C:BE:BC
IP 192.168.15.11
Mask 255.255.255.0
Firmware Version 1
Webserver Version 1

RSSI (Wi-Fi signal strength)

Value (dBm) Quality
0 to -50 Excellent
-51 to -60 Good
-61 to -70 Acceptable
-71 to -80 Weak
-81 to -100 Poor

The total bytes sent and received by each serial port via the TCP/IP protocol is also displayed.


3.6 Protocols

3.6.1

In this tab, you can enable or disable the communication protocols supported by the WS2C: TCP/IP, API (HTTP) and MQTT.

To ensure greater system stability, it is recommended to enable only the protocols that are really necessary. By default, only the TCP/IP protocol is enabled. The MQTT protocol can only be enabled if both TCP/IP and API protocols are disabled.

4. Physical interface of the device

The WS2C has:

  • 2 RS232 serial ports (male DB9) β€” pins 2 (RXD), 3 (TXD) and 5 (GND)

    4.3.1
  • 1 multifunction button

  • 1 indicator LED

4.1 Button

Action Function
Quick press Restarts the system
Hold pressed (10s) Restores factory settings

4.2 Indicator LED

LED State Meaning
Fast blinking (200ms) Error β€” requires restart
Slow blinking (1s) Normal operation
Irregular blinking System updating
Fixed on Initializing
Off Turned off

5. Firmware and Updates

The firmware version can be checked in the "General" tab of the webserver.

5.0.1

To update the firmware, download the Windows updater available here. Then, follow the step-by-step shown in the video below to ensure the update occurs without problems:


5.1 Testing Software

The TGY Cyber Suite is recommended software for testing and validating WS2C serial communication.

5.1.1

After downloading the software, you can check how to test the communication by watching the video below:

Steps:

  1. In the TGY Cyber Suite Software, access the TCP/IP Test tab
  2. Connect a loop cable to the WS2C as shown in the video.
  3. Enter the IP and serial port.
  4. Click Connect.
  5. Type a message and send.
  6. If there is loopback between pins 2 (RX) and 3 (TX), the text will return in the reception field.

6. API - Application Programming Interface

The WS2C, from firmware version 1.1, provides a REST API that facilitates integration with various external systems and applications.
Activation or deactivation of the API can be performed in the protocols menu, as explained in section 3.6 of this manual.

Watch the video below to see how to use the API in practice:


⚠️ All requests require an authentication token (minimum 6 digits).


6.1 Endpoint: /post-serial-data

Returns data received by the serial port in JSON format.

Example request:

URL:

POST http://192.168.15.130/post-serial-data

Header:

Authorization: 123456

JSON Body:

{
  "port": 1100,
  "time": 2500,
  "command": ""
}
  • port: port to listen to
  • time: listening time (ms)
  • command: optional command to send before listening

cURL:

curl -X POST http://192.168.15.130/post-serial-data \
  -H "Accept: application/json, text/plain, */*" \
  -H "Content-Type: application/json" \
  -H "Authorization: 123456" \
  -d '{"port":1100,"time":500,"command":"\u0005"}'

You can validate the API operation with the TGY Cyber Suite software

⚠️ Listening time below 30 seconds is recommended to avoid blocking other functions.


7. MQTT - Message Queuing Telemetry Transport

From firmware version 2.0, the WS2C offers MQTT protocol support, providing an efficient solution for cloud application integration and IoT automation. Configuration to enable or disable MQTT can be easily performed through the protocols menu, as detailed in section 3.6 of this manual. Check the video below for a practical demonstration of how to use MQTT with your WS2C:

πŸ“˜ WS2C - WiFi to Serial with 2 Channels – TGY Cyber Docs