Changes

no edit summary
Line 25: Line 25:     
Insert following <b>script</b> (this script is for this manual purpose, yours might be different) example:
 
Insert following <b>script</b> (this script is for this manual purpose, yours might be different) example:
 
+
{{#switch:{{{name}}}
 +
|RUTX10=
 +
<pre>
 +
#!/bin/ash
 +
while true
 +
do
 +
date > /tmp/regfile  #where data will be stored
 +
df | awk 'NR==3 {print $3}' >> /tmp/regfile
 +
df | awk 'NR==4 {print $3}' >> /tmp/regfile
 +
sleep 5
 +
done
 +
</pre>
 +
|RUTX08=
 +
<pre>
 +
#!/bin/ash
 +
while true
 +
do
 +
date > /tmp/regfile  #where data will be stored
 +
df | awk 'NR==3 {print $3}' >> /tmp/regfile
 +
df | awk 'NR==4 {print $3}' >> /tmp/regfile
 +
sleep 5
 +
done
 +
</pre>
 +
|
 +
<pre>
 
  #!/bin/ash
 
  #!/bin/ash
 
  while true
 
  while true
Line 34: Line 58:  
  sleep 5
 
  sleep 5
 
  done
 
  done
 
+
</pre>
 +
}}
 
After saving change execution rights with this command:
 
After saving change execution rights with this command:
   Line 46: Line 71:  
And script will run in the background.
 
And script will run in the background.
   −
With this script we will be able to get routers local time and couple 3G signal values each 5 seconds.
+
With this script we will be able to get routers local time and couple {{#switch:{{{name}}}
 +
|RUTX10= DF application |RUTX08= DF application | GSM}} values each 5 seconds.
 
Data stored in <b>regfile (cat /tmp/regfile)</b> looks like this:
 
Data stored in <b>regfile (cat /tmp/regfile)</b> looks like this:
 +
{{#switch:{{{name}}}
 +
|RUTX10=
 +
<pre>
 +
Wed Jun 17 15:11:29 EEST 2020
 +
69
 +
27
 +
</pre>
 +
|RUTX08=
 +
<pre>
 +
Wed Jun 17 15:11:29 EEST 2020
 +
69
 +
27
 +
</pre>
 +
|
 +
<pre>
 +
Wed Jun 17 15:11:29 EEST 2020
 +
-69
 +
27
 +
</pre>
 +
}}
   −
Wed Jun 17 15:11:29 EEST 2020
  −
-69
  −
27
      
To view collected data in HEX execute this command via SSH:  
 
To view collected data in HEX execute this command via SSH:  
Line 71: Line 114:     
With Modbus TCP master you can read data just by using ASCII data type and interactive test button.  
 
With Modbus TCP master you can read data just by using ASCII data type and interactive test button.  
 +
{{#switch:{{{series}}}
 +
|RUT9XX = [[File:Configuration examples modbus tcp master test.png|border|class=tlt-border]]
 +
|RUT2XX = [[File:Configuration examples modbus tcp master test.png|border|class=tlt-border]]
 +
|RUTX  = [[File:Configuration examples rutx modbus tcp master test.png|border|class=tlt-border]]
 +
|TRB1  = [[File:Configuration examples trb1 modbus tcp master test.png|border|class=tlt-border]]
 +
|TRB2  = [[File:Configuration examples rutx modbus tcp master test.png|border|class=tlt-border]]
 +
}}
   −
[[File:Configuration examples modbus tcp master test.png|border|class=tlt-border]]
      
To determine how many registers to specify in the '''Register count/Values''' field you should divide character count by two. For example, if you have 28 characters you should input  14 to '''Register count/Values''' field.
 
To determine how many registers to specify in the '''Register count/Values''' field you should divide character count by two. For example, if you have 28 characters you should input  14 to '''Register count/Values''' field.
Line 81: Line 130:  
<ul>
 
<ul>
 
<li>Protocol: Modbus TCP;</li>
 
<li>Protocol: Modbus TCP;</li>
<li>IP Address: 192.168.3.1 (routers LAN or WAN IP);</li>
+
<li>IP Address: 192.168.{{#ifeq:{{{series}}}|TRB1|2|1}}.1 (routers LAN or WAN IP);</li>
 
<li>Port: 502 (port number on which Modbus TCP Slave is listening);</li>
 
<li>Port: 502 (port number on which Modbus TCP Slave is listening);</li>
 
<li>Device: 1</li>
 
<li>Device: 1</li>
Line 89: Line 138:  
With this configuration you should get routers <b>date</b> in <b>hex</b>. Below is the example of configuration and what reply we get from the router:  
 
With this configuration you should get routers <b>date</b> in <b>hex</b>. Below is the example of configuration and what reply we get from the router:  
   −
[[File:Configuration examples modbus comtest pro.png|border|class=tlt-border]]
+
{{#switch:{{{series}}}
 +
|RUT9XX = [[File:Configuration examples rutx modbus comtest pro.png|border|class=tlt-border]]
 +
|RUT2XX = [[File:Configuration examples rutx modbus comtest pro.png|border|class=tlt-border]]
 +
|RUTX  = [[File:Configuration examples rutx modbus comtest pro.png|border|class=tlt-border]]
 +
|TRB1  = [[File:Configuration examples trb1 modbus comtest pro.png|border|class=tlt-border]]
 +
|TRB2  = [[File:Configuration examples rutx modbus comtest pro.png|border|class=tlt-border]]
 +
}}
    
And as you can see we received a reply in hex:  
 
And as you can see we received a reply in hex:  

Navigation menu