7662 questions

9091 answers

14654 comments

12054 members

0 votes
206 views 6 comments
by

Hello,
I'm having troubles in setting up the TRB142 as RS232 to MQTT with Data to Server.
MQTT setup should be correct but I'm not able to check if the serial port is working properly.
I am trying to send data with the Arduino Serial Port Monitor, but there's no way to check if the TRB142 receives it correctly or where the problem is.

Do you have suggestions?

Thank you very much.

by
Update
The serial port is working properly but I'm not able to make MQTT work.

My Server is working well with other clients, but with my TRB142 there's no way to make it work.
How can I apply the patch reported here? https://community.teltonika-networks.com/25578/cannot-publish-trb245-remote-broker-what-wrong-with-settings

I hope it could help in solving my problem...

Regrads
Marco

1 Answer

0 votes
by
Update 2

With a Modbus simulator I am able to send Modbus data with MQTT.
The problem is that I want to send SERIAL RS232 data with MQTT but I'm not able to configure it.

I have already followed all your tutorials, but I was not able to send an easy serial serial RS232 datastream.

Thank you in advance.
Marco
by

Hello, 

For the issue, you are having may I know if the said device connected to the TRB142 is having its own configuration for the MQTT communication. If it having the MQTT configuration with the device options then you can do is use the Over IP functionality of the device you can read more information about it from this link: TRB142 RS232 - Teltonika Networks Wiki (teltonika-networks.com)

I hope it helps. 

Regards,
Mellow

by
Hi Mellow,
thank you for your reply!

No my device doesn't have an MQTT connection, I have the TTRB142 for that. I want to send serial RS232 data from my device to MQTT through the TRB142, but up to now I was able just to send Modbus data, no way for "normal" SERIAL RS232 data.

I was able to send serial RS232 data from my device to an IP address (with Putty connected to TRB's mobile IP), but also in this case I wasn't able to send the serial data to MQTT.

So my configuration should be the following:

[RS232 Serial Device] -> [TRB142] -> [MQTT Server]

Thank you in advance
Marco
by

Hello, 

If you want to do it this way: 

[RS232 Serial Device] -> [TRB142]->[MQTT Server] 

The Over IP functionality would be used to reach the RS232 device and the MQTT server will be the one to pull the data from the RS232 device. 

As you can see I have shared the link for the Over IP functionality. Where you just configure it as a client that will connect to the server. But this one will be just a link of communication let say you're MQTT port is running on 1883 you can pull the data from the IP address of the TRB142. This would be possible if the device is sending/supporting MQTT functionality. Or There is another functionality the MQTT Bridge. 

You can find more information about the MQTT bridge here: TRB142 MQTT - Teltonika Networks Wiki (teltonika-networks.com)

Also, one more thing that would be possible is to assign the sim card IP address to the TRB142 via Passthrough Mode or Bridge mode you can read more details about this at this link: TRB142 WAN - Teltonika Networks Wiki (teltonika-networks.com)

Note: In order to reach the device from the internet it must have Public IP address. 

Regards,
Mellow

by
Hi Mellow,
thank you for providing these options but actually what I may need is the DATA TO SERVER functionality to support RS232 serial communication instead of Modbus.

In my understanding the MQTT bridge is not an option, as I don't have to establish a communication between two MQTT servers but to make communicate a serial device with an MQTT server. Serial device does not support MQTT, therefore I need that TRB142 simply reads serial data (an HEX String) and forward them to an MQTT server just it does for Modbus.

Is there a way to do that?

Thank you in advance
Marco
by

Hello, 

So if my understanding is correct, you want to have a functionality where the data monitored in the serial interface will be sent to your server? If yes, as of now there is no functionality available for that except Over IP functionality. Could you try this configuration and see if it solves your problem. 


You can configure it in Services  > RS232 

Regards, 
Mellow