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.
0 votes
3,367 views 3 comments
by
Hello,

is there a list of available SSH commands for the RUT955? So far I only found gsmctl and gpsctl

Especially I would like to restart the router via ssh and check/switch the state of the digital I/O.

thanks in advance!

1 Answer

0 votes
by anonymous

Hello,

When you are connected to router via SSH, you can press "tab" keyboard button twice to see a list of all router's supported SSH commands. In essence: RUT955 supports most of ash commands.

You can reboot the router using reboot SSH command.

You can read router's input values with the following commands:

  • gpio.sh get DIN1
  • gpio.sh get DIN2
  • cat /sys/class/hwmon/hwmon0/device/in0_input    (returns Analog input voltage value in mV)

You can change router's digital output state:

  • gpio.sh set DOUT1
  • gpio.sh clear DOUT1

You can change router's relay output state:

  • gpio.sh set DOUT2
  • gpio.sh clear DOUT2
Best answer
by
Excellent!
Thanks for the quick and complete answer!
by anonymous

I have a TRB141 and there is no gpio.sh. How can I  change router's relay output state using ssh?

by anonymous

Hello,

On TRBxxx devices use ubus list | grep ioman command to get all list of devices inputs/outputs. TRB141's output:

  • ioman.acl.acl0
  • ioman.adc.adc0
  • ioman.dwi.dwi0
  • ioman.dwi.dwi1
  • ioman.gpio.dio0
  • ioman.gpio.dio1
  • ioman.gpio.iio
  • ioman.gpio.onewire
  • ioman.relay.relay0
  • ioman.relay.relay1

Then you will be able to read/set these inputs/outputs with the following commands:

  • ubus call ioman.gpio.dio0 status
  • ubus call ioman.gpio.dio0 update '{"value":"0"}'
  • ubus call ioman.gpio.dio0 update '{"value":"1"}'

  • ubus call ioman.relay.relay0 status
  • ubus call ioman.relay.relay0 update '{"state":"open"}'
  • ubus call ioman.relay.relay0 update '{"state":"closed"}'