7950 questions

9402 answers

15102 comments

12979 members

0 votes
48 views 0 comments
by

Good morning to everybody !.

Updated to FW RUT9_R_00.07.00 -2021-07-15 01:33:29 , but now JSON-RPC UBUS does not work

I am trying to get information with JSON-RPC UBUS on RUT955.

conex = json.dumps({"jsonrpc": "2.0", "id": "1", "method": "call", "params": ["00000000000000000000000000000000","session", "login", {"username":"admin", "password":"admin01"} ] })

response = requests.post(url, data=conex, headers=headers)

d = response.json()

sesion = d['result'][1]['ubus_rpc_session']

print sesion

#get data router

mnfInfo = '{"jsonrpc": "2.0", "id": 1, "method": "call", "params": ["'+sesion+'", "file", "exec",{"command":"mnf_info","params":["sn"]}]}'

response = requests.request("POST", url, data=mnfInfo, headers=headers)

n = response.json()

print n

Session -> 4c8887919125586a4778a9ce81b0cf41

return mnf_info -> {u'jsonrpc': u'2.0', u'id': 1, u'result': [6]}

1 Answer

0 votes
by
Hello,

Thank you for contacting.

For now i would suggest you to downgrade the firmware if you really need json rpc because 7.00 needs some fixes.

Thanks.

Regards,

Ahmed