TRB245 Modbus RTU-485 data cannot be sent to MQTT Broker!

“Data to Server” and “Modbus Serial Master” configuration is provided. TRB245 is connected on the broker. Request Testing is successful. However, data cannot be sent to MQTT Broker.

FW Version: TRB2_R_00.07.04.1
Modbus Serial Master Slave Device Configuration, Frequency Period value is 10. Data to Server Period value is also 10.
{“%r”: %a} tag information input is provided in JSON format.
Segment count: All and Data Filtering: All entries were made. MQTT Topic etc. information entries were provided.

I used FW Version: TRB2_R_00.07.02 before. Data was sent to MQTT Broker with similar configuration without encountering any problems.

If someone can provide support, I will be very pleased.


Could you please clarify what MQTT broker are you using?

Also, would it be possible for you to share screenshots of your configurations? Before posting them, make sure to hide any sensitive information, such as connection strings.

Kind Regards,

Hello AndzejJ,

The MQTT Broker is Faz3 IoT Platform. It is the platform we use in many of our projects. It is compliant with MQTT 3.1.1

Thank you very much.
Kind Regards,


I’ve noticed that they have a free trial and wanted to test it, but it seems that the servers are down. Is it currently working for you on the other devices?

Have you enabled Modbus Master and Requests in the Modbus Serial Master?

The connection string ‘’, is that a full string? If so, can you try pinging it from System → Administration → Troubleshoot?

You have port 1883 entered and the TLS option is disabled, so I assume the platform does not use TLS. Correct?

Finally, would it be possible for you to test it with some other MQTT like HiveMQ (public one for testing here)? This would help to see if the issue is with the configurations on TRB, or in communication between TRB and Faz3 IoT.

Kind Regards,

Hello AndzejJ,

I overlooked enabling each Request in the Modbus Serial Master. I thought that enabling Brackets would be enough:( You put it in a red frame, this was a warning for me. The data started to flow to the platform. Thank you very much for your help.

Meanwhile, JSON format of the data sent to the platform is [{“frq”: 49.999237},{“L1”: 229.542236},{“L2”: 229.638519},{“L3”: 229.527298}]. Even though Remove Brackets is “on” in Request Configuration, Square Bracket is at the beginning and end as above!

The number of Square and Curly Brackets is quite high. Is it possible to change the format to {“frq”: 49.9,“L1”: 229.5,“L2”: 229.6,“L3”: 229.5} and reduce the number of decimal digits? Is there an easy solution way in JSON format definition? if you want I can open a separate case for this question.

Many thanks again.

Kind regards


Not really. There should be many improvements to Data Sender in v7.5 firmware version and it will allow for way more customization. However, I am not sure of all the capabilities that will be available with it.

Each request comes in curly braces. If you set segment count to all (more than 1), it will be in an array within square brackets. If you really want to receive all requests without square brackets, you can remove those by editing the configuration file from command line. Simply access the CLI (instructions here) with username ‘root’ and edit data sender configuration file:

vi /etc/config/modbus_data_sender

Press ‘i’ to start editing. Use arrow keys to navigate.
Replace the segment count and format as follows:

  option json_segment_count 'all'
  option format_non_array '1'

Press ‘ESC’, type ‘:wq!’ to save and quit. Then, restart data sender with:

/etc/init.d/modbus_data_sender restart

Kind Regards,

1 Like

Hello AndzejJ,

I haven’t been able to implement your advice yet since I don’t have the device with me now, but I will do so at the first opportunity.
Thank you for your valuable response.

Kind Regards.

1 Like

This topic was automatically closed after 15 days. New replies are no longer allowed.