8297 questions

9760 answers

15547 comments

13864 members

0 votes
87 views 1 comments
by

Hi all — I am attempting to submit the system metrics (power, signal, etc) from an RUTX11 router to a remote application. Initially I attempted to use MQTT, but this doesn't seem compatible with Google Cloud IoT. I am now attempting to use the Modbus Data-to-Server functionality to submit the parameters, but no connections are attempted to my application.

I ssh'd into the RUTX11, and found the binary "/usr/sbin/modbus_data_sender". I couldn't find any logs for this, but this was running via /etc/init.d/modbus_data_sender. Manually running the binary printed the following log lines every 15 seconds:

Sender cfg02efdf_1628438822 is running through a loop
Failed to retrieve a data record (size < 0 )

As I couldn't find the source code for this binary, I loaded it into Ghidra & traced the issue to the database table "modbus_data" in "/tmp/.modbus_tcp_master_db": the table doesn't exist, therefore the SQL COUNT query below returns an error, and prints out the error message above.

Is it possible to use the Modbus Data-to-Server functionality to forward the parameters listed in the documentation over via HTTP? I think I'd need to somehow configure the RUTX11 in both Modbus client & server modes to publish the system metrics to itself, then onto my application via data-to-server HTTP?

I'm going to take another pass at MQTT as that would be much simpler, but I'd love to understand why this hasn't worked.

I'm using the latest firmware: RUTX_R_00.07.00.

1 Answer

0 votes
by
Hi,

Yes, your logic is correct, RUTX11 must request Modbus data on itself and then with Data to Server functionality send the data to your wanted HTTP(S) destination. I'm not sure why the above didn't work for you, as the database that you've found is correct, did you check if the file of the database was there when you tried to reach it? Or was it the error in SQL syntax and something can't be read from the database?

EB.
by

Hi, thank you for your response & my apologies for the delay in mine: I'm progressing down the MQTT route for retrieving RUTX11 statistics.

The database was present in the directory listed, but only contained the "sent_id_table". Because it couldn't find the Modbus table, the SQL query failed.

 

I'm assuming this is because I didn't enable either the Modbus TCP slave or TCP master — MQTT is proving challenging, so I'd rather get this working if I could, but I don't know anything about Modbus to understand what I need to configure to get this working.