10879 questions

12963 answers

20221 comments

26142 members

+1 vote
110 views 0 comments
by
Good morning everyone, I would like to ask several questions regarding the TRB142 device.

1. If I send a text string through the RS232 port (Example:'-42.56,-44.61,-13.84,nan,nan,nan,nan,nan,nan,nan,0.00,32.00,0.00,32.00) every certain time (period), how could I display it in the TRB142 device?

2. How could I send that same text string by MQTT to a MQTT Broker?

1 Answer

0 votes
by

Hello,

1. Here is how you could do it:

  • Go to RS232 configuration in the WebUI. Select Serial type as Over IP, Mode - Server, Port - for example, 8000, but anything above 1024 should work. 
  • Apply configuration changes.
  • Navigate to System -> CLI, login using root as username and your router's password or access the device via SSH using a client such as PuTTy and use the same credentials to login.
  • Enter command: nc <router's_LAN_IP> <Port_Number>
  • You should be able to see the data. Example below: 

2. Unless the data is in MODBUS protocol, it is not possible to transfer serial data by MQTT. In MODBUS case, you could configure data transmission via MQTT using Data to server functionality, which is detailed here: https://wiki.teltonika-networks.com/view/TRB142_Data_to_Server. Otherwise, Over IP mode could be used, but TRB142 works only as a transparent gateway between client and server, without adding any additional data processing. 

How MQTT works in Teltonika devices is described in this website: https://wiki.teltonika-networks.com/view/Monitoring_via_MQTT.

Best regards,

Žygimantas   

Best answer