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

Good morning Teltonika team,

Router rut955

FW RUT9_R_00.07.02.7

I am trying to retrieve data via JSON-RPC with wiki example from router console, but I get the following error:

curl -d "{\"jsonrpc\":\"2.0\", \"id\":1, \"method\":\"call\", \"params\":[\"00000000000000000000000000000000\", \"session\", \"login\",{\"username\":\"admin\", \"password\":\"admin01\"}]}" http://192.168.1.1/ubus

Error:

curl: (28) Failed to connect to 192.168.1.1 port 80 after 129707 ms: Operation timed out

Using Postman it works for me without problems:

1 Answer

0 votes
by anonymous
Hello,

  

I've managed to get the JSON-RPC working using both Postman and Ubuntu running on WSL.

Please update the device firmware to the latest, and try repeating the test. However, the issue seems to be on your Linux machine here. Perhaps it is not in the LAN network of the RUT955? Or perhaps it does not have a way to reach the RUT955? Please try pinging the RUT955 from that machine.

  

Best regards,
DaumantasG
by anonymous
I mean when you SSH in and run the command on the Router,

that's the error!
by anonymous

Oh, I see.

Well after testing it also seems to work on the router. However, I've noticed, that when copy-pasting the full command from the Wiki, multiple space characters get added at the end of the line, which leads to a time-out:

Another thing you could try is changing the IP to the localhost of the device: 127.0.0.1

Finally, make sure the credentials are correct and if all else fails, update the firmware of the device.

  

Best regards,
DaumantasG