Difference between revisions of "Testing TCP link mode with RS232 and RS485"
(Created page with "==Understanding what is RS232/RS485 TCP Link mode== In this mode link with external device (for example PC) using text messages can be established. TFT100 has to be connected...") |
m (Protected "Testing TCP link mode with RS232 and RS485" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))) |
(No difference)
|
Latest revision as of 10:05, 27 March 2023
Main Page > E-Mobility Trackers > TFT100 > TFT100 FAQ > Testing TCP link mode with RS232 and RS485Understanding what is RS232/RS485 TCP Link mode
In this mode link with external device (for example PC) using text messages can be established. TFT100 has to be connected to the external device through RS232 or RS485. Any string of data coming to RS232 or RS485 will be routed to server (if link is currently active). Messages that are exchanged between the device and server, have to be packed in Codec.12 format. Here for TCP link establishment we will be using Hercules. For sending messages from external device to server over the TFT100 Terminal will be used.
Setting parameters in configurator for TCP Ascii mode test
First of all, in the TFT100 configurator you have to set parameters for RS232 or RS485 (depends on which RS232 or RS485 port you are using) in global parameters window. Here in RS232 settings section Baudrate can be chosen to any available. Mode has to be chosen to TCP Ascii. |
Message Timestamp
Message Timestamp parameter is used to determine if it is necessary to include timestamp in RS232 TCP packet when sending to server. If parameter is Enabled, then Codec 13 is used for data sending. Otherwise, Codec 12 is used.
You can also use RS485 which is also suitable for Ascii TCP Link mode. In order to make a link between the device and server, Domain and Target Server Port have to be set in the working device profile, GPRS data sending Settings section. When right parameters are set, you can save the configuration to the device.
Establishing test link with server through Hercules
In this case we have a PC that is considered to be a server and an external device at the same time. When the device is configured and connected to the external device, next what we have to do is to start Hercules (Figure 2) which is in server side and will be used for sending/receiving messages. (Please keep in mind that external device RX cable needs to be connected to the TFT100 device TX cable and external device TX cable connected to TFT100 RX cable.) Here you have to choose TCP Server section from the upper menu. In the marked fields:
|
Sending from server to external device over Hercules
When sending a message from Hercules, first you have to pack it in Codec.12 format. If you want to send a message to external device over the device from server, a packed message should be pasted into the Send field in Hercules (Figure 2, marked field 3). The HEX format box should be unchecked if the text is in HEX format |
Open Hercules application and just type your message in the marked field (3) and press Send button (4). If sent successfully, you will see it in Hercules Sent data field (Figure 4). For example test text will be sent: Hello, lets test TCP link mode. In Codec.12 format it looks: On terminal you should now receive message: Sending from external device to server over TerminalFor testing data sending from external device to server, enter text you want to send on Terminal and press send. You can check if data is received to server in Hercules. Sample text: Hello, lets test TCP link mode. Please keep in mind, that special chars (ASCII Names) needs to be marked. Links for download |