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
412 views 7 comments
by anonymous

I am conncted through SSH using putty to my RUT955. I would like to read the status of the digital/analog ports.

According to this page (RUT955 Input/Output - Teltonika Networks Wiki (teltonika-networks.com)), I could use the command ubus call ioman.gpio.din1 status;

I get the message that the command is unfound. What is the right way to work with this command ?

by anonymous

I notice the same thing.

I also notice that typing ioman alone comes up with:

Arguments failed

Usage: [input (digital1, digital2, analog)] [value (0, 1, volts (0.018))]
OK, so I then type_______________:   ioman input digital1 
no error, but no data.
so I try _______________:   ioman input digital1 {status, value, 0, 1, volts}
they all produce "Arguments failed"
If I omit "input" thinking that is simply a keyword and the actual arguments are digital1, digital2, analog that is also an error
that also raises the question "ioman" implies Input and Output - yet there is no mention of that in the Usage
I think this utility is only 25% done at best, and broken.

So, I think, OK, there is a curl prototype too...

curl -X GET "http://192.168.1.1/cgi-bin/io_value?username=user1&password=user1&pin=dout1"

that returns an error too  - whether issued from the CLI or from the PC connected to it

The requested URL /cgi-bin/io_value?username=user1&password=user1&pin=dout1 was not found on this server.root@Teltonika-RUT955:
by anonymous

aha... some developments...
I upgraded from FW RUT9xx_R_00.06.09.2 to FW RUT9xx_R_00.07.02.7 now ioman appears to be non-existent as well as ioman.ioman.gpio.din1

However... the curl now works... I like having bouncy hair ;-)

curl -X GET "http://192.168.1.1/cgi-bin/io_value?username=user1&password=user1&pin=dout1"

Except it does not return any value - no errors...
I did change to a password other than user1 and initially "Bad username or password" came up as an error
That was corrected, and now I get nothing...

Then I thought, OK, let's see if the output works... When I sent

curl -X GET "http://192.168.1.1/cgi-bin/io_state?username=user1&password=user1&pin=dout1&state=on"
I received the response: OK... but it didn't actually change the state as reported by the UI
When I change the state through the UI, nothing is different in the CLI world  ... work in progress
by anonymous

Hello,

I have tried the commands and curl requests, but the values were returned, changed and curl requests worked as well. Below is a snippet from my shell, tested on RUT955 RUT9_R_00.07.02.7 firmware:

root@Teltonika-RUT955:~# ubus call ioman.gpio.dout1 status
{
        "value": "0",
        "direction": "out",
        "bi_dir": false
}
root@Teltonika-RUT955:~# curl -X GET "http://192.168.5.1/cgi-bin/io_state?username=user&password=pass&pin=dout1&state=on"
OK
root@Teltonika-RUT955:~# ubus call ioman.gpio.dout1 status
{
        "value": "1",
        "direction": "out",
        "bi_dir": false
}
root@Teltonika-RUT955:~# curl -X GET "http://192.168.5.1/cgi-bin/io_value?username=user&password=pass&pin=dout1"
1root@Teltonika-RUT955:~#

The noteworthy thing is that io_value is returned next to the system username in the last line, so it might have gone unnoticed.

1 Answer

0 votes
by anonymous

Hello,

The command below should give you exactly the result, provided in the wiki link you have referenced:

  • ubus call ioman.gpio.din1 status

Could you provide a screenshot of the error?

What is the firmware version that your device is using.

Could you attach a troubleshoot file from your device? To generate the file, access router's WebUI, go to System -> Administration -> Troubleshoot section and download troubleshoot file from there.

Best regards,

by anonymous
by anonymous
What is the firmware version of your device?
by anonymous
I installed the last version about a few weeks ago. Is there a way to get directly the current of the firmware through the CLI ?

Knowing that these commands do not work at the moment, is there an alternative for reading the status of the analog/digital pins ?
by anonymous

Legacy firmware versions have a different command to retrieve input/output status, as well as several other functionalities:

  • gpio.sh

If you simply enter gpio.sh in the CLI and press Enter, you will get a short description, on how to use the command.

However, to get the status of DIN1 specifically, simply execute the following:

  • gpio.sh get DIN1

Best regards,