10925 questions

13028 answers

20309 comments

27378 members

0 votes
220 views 3 comments
by

Hello Teltonika,

we use a TRB140 module in several projects to provide SMS functionality. Our host processor communicates with the TRB140 over UBUS / JSON RPC. After updating to version TRB1_R_00.02.05.1 there is a problem with the modem under the following circumstances:

  1. Detach antenna -> mobile state changes to unregistered or net searching
  2. Try to send an SMS via http://192.168.2.1/cgi-bin/sms_send?username=xxx&password=yyy&number=004912345678&text=OK
  3. The HTTP request never finishes (which is ok, because the SMS cannot be sent without antenna)
  4. Close the browser tab so that the HTTP request is cancelled
  5. Enter gsmctl --simstate on the console. The command hangs forever. If you look into the webinterface, all modem related information disappears:
  6. I can manually reboot the modem "gsmctl -Q". But after that "gsmctl --pinstate" returns "PIN REQUIRED" although PIN is correctly configured.

I think the modem should not crash and become unresponsive, if it fails to send an SMS because of missing mobile connection.

Is there any workaround / bugfix for this problem from point 5?

Or is there any possibility to reboot the modem and not having the PIN REQUIRED problem from point 6?

Thank you very much!
Adrian


 

1 Answer

0 votes
by

Hi,

It is totally normal that your modem hangs when it doesn't finish a task that is supposed to finish. When you send a POST/GET request to the router - which then sends a request to the modem, after closing the browser tab it doesn't mean that you stopped the request. It was sent but never got a response.

So let's say the modem hangs as it tries to finish the prompt, but while it has no connection - it cannot.

About your other issue with the PIN. It should be also normal that it doesn't take the PIN from configs, as gsmctl only reboots the modem, but does not search for the PIN. Could you try rebooting it from WebUI instead? Status > Network > Restart Modem It should get your PIN if you do that.

EB.

by
Ok, thank you for your answer.

Do you know how long the timeout is, before the modem gives up sending the SMS?
And is there any possibility to reset the modem using JSON RPC and to set the PIN correctly? The WebUI is used only for initial configuration in our systems.
by

Setting PIN via JSON-RPC would be this:

{ "jsonrpc":"2.0", "id":1, "method":"call", "params": [ "yourSessionID", "uci", "set", { "config":"simcard", "type":"sim", "match": { "pincode": "1234" }, "values": { "pincode":"4321" } } ] }

{ "jsonrpc":"2.0", "id":1, "method":"call", "params": [ "yourSessionID", "uci", "commit", { "config":"simcard" } ] }

{ "jsonrpc": "2.0", "id": 1, "method": "call", "params": [ "yourSessionID", "file", "exec", { "command": "luci-reload" } ] }

And restarting the modem:

{

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

    [

        "yourSessionID", "file", "exec",

        {

            "command":"/etc/init.d/gsmd",

            "params":

            [

                "restart"

            ]

        }

    ]

}

EB.

by
Perfect, thanks!