Hi, how are you issuing the requests?
I've tested with RUT140 and getting data via modbus TCP from RUTX11. Unfortunatelly I don't have a Serial device to test in the exactly way you want to do it.
Nevertheless, I used these commands and works as expected.
I got the RUTX11 reference from here
To get:
Required Value |
Register Address |
Register Number |
Number Of Registers |
Representation |
System uptime |
1 |
2 |
2 |
32 bit unsigned integer |
Mobile signal strength (RSSI in dBm) |
3 |
4 |
2 |
32 bit integer |
Router name |
71 |
72 |
16 |
Text |
I've used:
- mosquitto_pub -h 192.168.1.50 -t request -m "0 1 0 192.168.1.60 502 3 1 3 72 3"
- mosquitto_pub -h 192.168.1.50 -t request -m "0 2 0 192.168.1.60 502 3 1 3 2 2"
- mosquitto_pub -h 192.168.1.50 -t request -m "0 3 0 192.168.1.60 502 3 1 3 4 2"
The syntax is this one:
0 <COOKIE> <IP_TYPE> <IP> <PORT> <TIMEOUT> <SLAVE_ID> <MODBUS_FUNCTION> <REGISTER_NUMBER> <REGISTER_COUNT/VALUE>
Using the Router name request as example:
0 - Textual format (For now only 0 implemented)
1 - Cookie (It's the request ID, if you'll develop a software to manage your requests can use an auto-increment value)
0 - IPV4 uses 0 option
192.168.1.60 - Modbus slave IP
502 - Timeout
3 - Modbus request type (3 for read holding requests)
1 - Modbus Slave ID
3 - Modbus request type (3 for read holding requests)
72 - First register you will read
3 - Register count (Quantity of registers you will get/write in your request)
![](https://community.teltonika-networks.com/?qa=blob&qa_blobid=2880680745347382119)
Remember that all the data is shown in decimal, texts for example should be translated to ASCII
If you have further doubts, please let me know.
Regards.