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 |
| do | | do |
| date > /tmp/regfile #where data will be stored | | date > /tmp/regfile #where data will be stored |
− | {{#switch:{{{series}}}
| |
− | |RUT9XX =
| |
− |
| |
| gsmctl -X >> /tmp/regfile | | gsmctl -X >> /tmp/regfile |
| gsmctl -E >> /tmp/regfile | | gsmctl -E >> /tmp/regfile |
− | |RUT2XX =
| |
− |
| |
− | gsmctl -X >> /tmp/regfile
| |
− | gsmctl -E >> /tmp/regfile
| |
− | |RUTX =
| |
− |
| |
− | gsmctl -q >> /tmp/regfile
| |
− | gsmctl -c >> /tmp/regfile
| |
− | |TRB1 =
| |
− | gsmctl -q >> /tmp/regfile
| |
− | gsmctl -c >> /tmp/regfile
| |
− | |TRB2 =
| |
− |
| |
− | gsmctl -q >> /tmp/regfile
| |
− | gsmctl -c >> /tmp/regfile
| |
− | }}
| |
| sleep 5 | | sleep 5 |
| done | | done |
− | | + | </pre> |
| + | }} |
| After saving change execution rights with this command: | | After saving change execution rights with this command: |
| | | |
Line 65: |
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 114: |
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: |