English
Communication channels
Configure TCP, UDP or serial, start a channel and test an exchange.
Create a channel
Open External communications → Communication channels → Add. Enter a display name and a name identifier unique within your organization. Choose a mode based on the connection or wiring below. Save the channel and leave it stopped until its binding is ready.
| How the device communicates | Mode | What to enter |
|---|---|---|
| The device connects to ThinkLink | TCP server | ThinkLink listening address and port |
| ThinkLink connects to the device | TCP client | Device address and listening port |
| The device sends datagrams to ThinkLink | UDP server | Local listening address and port |
| ThinkLink sends datagrams to a fixed peer | UDP client | Peer address and port |
| The meter connects over RS-485 or RS-232 | Serial | Server serial port path and meter settings |
TCP framing and UDP destinations
Match TCP framing to the device protocol. For delimiter framing, enter the delimiter in hex, such as 0D 0A for CRLF. For fixed-length frames, enter the body length. For length-prefixed frames, select a 1-, 2- or 4-byte big-endian length field. ThinkLink strips the delimiter or length header on reception. Your script must include it when sending.
Each UDP datagram is one message. Use reply to respond to its sender. To send from a UDP server to a specific address, add the destination IP and port to the channel's allowlist.
Where to connect a serial meter and how to set up the port
Connect the meter or USB adapter to the server or gateway running ThinkLink. Enter its device path, such as /dev/ttyUSB0. For a container deployment, map the device into the container. Check that the service account can read and write to it and that no other channel or application has opened the port.
Match the meter's baud rate, data bits, stop bits, parity and flow control. For example, 9600 8N1 means 9600 baud, eight data bits, no parity and one stop bit. ThinkLink uses the idle gap between bytes to separate serial frames. If frames are split or merged, adjust the gap to match the meter protocol.
Start and check status
Before you start, ask an administrator to select your organization in System Config and grant access to the channels, scripts, bindings and logs you need in Role Management. One regular organization per deployment can start live channels. Other organizations can save configurations and simulate scripts. Switching authorization stops the previous organization's channels.
Enable the script and binding, then return here and select Start. Open Details → Runtime details to check the state and receive/send counters. TCP servers also list live sessions. Stop a running channel before editing it. Stopping disconnects it and cancels queued requests.
Test a message and reply
After enabling the sample script and binding it to Data received, use a network client or serial terminal at the other end. Send this line as UTF-8 text and append the actual CRLF bytes 0D 0A. For a delimiter-framed TCP channel, set the channel delimiter to 0D 0A too.
Send from the peer
json
{"type":"report","seq":1,"temperature":25.6,"humidity":60}Expected reply at the peer
json
{"type":"ack","seq":1,"ok":true}Check that the reply contains the same seq you sent. If you also configured telemetry parsing, open the device's Application Data → Realtime Data and verify the timestamp, temperature and humidity. When testing an actual meter, use the message format and checksum specified by its protocol.
If a request times out or the peer receives no reply, check Logs.
If the channel will not start
| Symptom | What to check |
|---|---|
| The menu is missing, or Start is denied | For a missing menu, ask the administrator to check role permissions. If you can edit a channel but cannot start it, check the authorized organization. |
| TCP fails to start, or a serial port will not open | Read the channel's failure reason. For TCP, check the listening port and reachability of the peer. For serial, check the device path, container mapping, permissions and whether the port is in use. |