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
276 views 3 comments
by anonymous
Hello, we are using the RUT955 with RutOS version 00.07.02.04 and cannot get the modem to reconnect after we disable and then re-enable the modem via JSON-RPC.

Our custom application has a test feature that intentionally disables the modem  in RUT955 so that we can test the attached satellite modem (attached to the WAN port of the RUT955)

To turn off the modem we send the following commands

{"method":"call","params":["855c3640bf9963d027a9b244f6a4175d","uci","set",{"match":{"disabled":0},"values":{"disabled":1},"section":"mob1s1a1","type":"interface","config":"network"}],"jsonrpc":"2.0","id":1}

{"method":"call","params":["855c3640bf9963d027a9b244f6a4175d","uci","commit",{"config":"network"}],"jsonrpc":"2.0","id":1}

{"method":"call","params":["855c3640bf9963d027a9b244f6a4175d","file","exec",{"command":"reload_config","params":null}],"jsonrpc":"2.0","id":1}

This seems to work and the modem is disabled in the WebUI, we enable the WAN and satellite modem performs its' test ok.

Then we send the following commands to re-enable the modem.

{"method":"call","params":["855c3640bf9963d027a9b244f6a4175d","uci","set",{"match":{"disabled":1},"values":{"disabled":0},"section":"mob1s1a1","type":"interface","config":"network"}],"jsonrpc":"2.0","id":1}

{"method":"call","params":["855c3640bf9963d027a9b244f6a4175d","uci","commit",{"config":"network"}],"jsonrpc":"2.0","id":1}

{"method":"call","params":["855c3640bf9963d027a9b244f6a4175d","file","exec",{"command":"reload_config","params":null}],"jsonrpc":"2.0","id":1}

After these commands, we expect the modem to re-register and then re-connect.  But even though all of these commands seem to be accepted, we see no errors, and the modem shows as registered ... the modem never shows "connected" and is not sending data (as far as we know).

If we use the WebUI to disable and re-enable the modem... it works fine.  The WebUI can do this...but the json-rpc cannot

I have attached the troubleshooting file
by anonymous
Is there any workaround?  The only thing that I have found will connect to the network again is a reboot?  Is there no other way...without rebooting?

2 Answers

0 votes
by anonymous

Hello, 

Using a slightly different arrangement, I was unable to reproduce your issue. The following, in combination with uci commit request did reenable the modem:

{

    "jsonrpc":"2.0", "id":1, "method":"call", "params":

    [

        "5d79f1b067147b7509a387fbc8731cfa", "uci", "set",

          {

            "config":"network",

            "type":"interface",

            "section":"mob1s1a1",

            "match":

            {

                "disabled": "1"

            },

            "values":

            {

                "disabled": "0"

            }

        }

    ]

}

by anonymous

I changed the payload to match yours.  I even copy and pasted your payload into our http request client and sent it (after modifying the token value naturally) and I see no difference.  I did a reboot and tried again to see if there was something else going with some previous commands that we had sent the device... then I tried the same sequence again to disable and re-enable the modem using your payload (and changing the 

"match":

            {

                "disabled": "0"

            },

            "values":

            {

                "disabled": "1"

            }

do a commit

then

"match":

            {

                "disabled": "1"

            },

            "values":

            {

                "disabled": "0"

            }

then do a commit... does not work. 

Modem shows registered but "data connection" continues to show Disconnected. 

I even

root@Teltonika-RUT955:~# gsmctl -A "AT+CGATT?"
+CGATT: 1

root@Teltonika-RUT955:~# gsmctl -A "AT+CGDCONT?"
+CGDCONT: 1,"IP","internet.telekom","0.0.0.0",1,0,0,0
+CGDCONT: 2,"IPV4V6","ims","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0
+CGDCONT: 3,"IPV4V6","ims","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0

gsmctl -A "AT+COPS?"
+COPS: 0,0,"Telekom.de Telekom.de",7

gsmctl -A "AT+CGPADDR=1"
+CGPADDR: 1,10.153.52.190

We are totally lost here and need this to work for our satellite modem testing.   I am attaching my new troubleshooting file .here

by anonymous
Thank you for your input.

I have informed the development department about the issue.
0 votes
by anonymous

Hello,

Sorry for the late reply.

To reenable disabled mobile interface, modem has to be reloaded. It can be done with the command below:

{
    "jsonrpc": "2.0", "id": 1, "method": "call", "params": 
    [
        "xxxxxxxx", "file", "exec",
        {
            "command":"ubus",
            "params":
            [
                "-t", "180", "call", "mobifd.modem0", "reload"
            ]
        }
    ]
}

Best regards,