FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
+1 vote
224 views 0 comments
by anonymous
Hi I’ve create a simple Modbus TCP server structured on pyModbusTCP with my Rasberry Pi. I would like that the RUTX12 will be able to send the 3rd register address (Mobile Signal Strenght) to the server... Can someone help me in this configuration?

2 Answers

–1 vote
by anonymous
Hi,

If you want to set up a Modbus slave and master configuration between RUTX12 and Raspberry Pi - I'm afraid I will not be able to help you, as I'm personally not well acknowledged with your Raspberry Pi and the service running on it.

On other hand, you can use Data To Server functionality that sends data like this, but in different structures and to different servers.

Please take a look at this: https://wiki.teltonika-networks.com/view/RUTX12_Data_to_Server

Maybe it will give you more possible cases of how to do it.

If you're still looking to use Slave and Master configurations, please follow this wiki page:

https://wiki.teltonika-networks.com/view/RUTX12_Modbus

EB.
+1 vote
by anonymous

Hi there,

I don't recommend using data to server. As soon as you turn it on your GPS will not be available to other services. I also don't use a pi or pyModbusTCP  but Modbus is Modbus, it really doesn't matter your specific configuration using the pi. Thats the beauty of Modbus. With Modbus there is always at least one slave and always only one master. A slave only speaks when asked by a master. In this setup your pi is the Master and RUTX12 the slave. So the RUTX12 will not "send" the data on its own. The pi must ask and the RUTX12 will "reply".

First of all you have to know if you want to keep the connection open to the RUTX12 and poll regularly like once every second. 

c = ModbusClient(host="[rutx12 IP here]", port=502, unit_id=1, auto_open=True)

Or if you wanna open the connection, get the data and close it afterwards.

c = ModbusClient(host="[rutx12 IP here]", port=502, unit_id=1 auto_open=True, auto_close=True)

Once the connection has been made you can ask for the data. Here is a list of registers for the RUTX12. The signal strength is register #4. 

regs = c.read_holding_registers(4, 1)