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.
+1 vote
1,743 views 5 comments
by
Hello,

I need to use a Sim card extender for my project. I've noticed that there is a metal part on the tray slot holder which must inform the router that the tray is out. As I use a sim extender I remove the sim card without opening the tray but when I put it back it’s not detected anymore. When I reboot the modem, sometimes it works (Sim card redetected) but sometimes not... What is the best way to re-detect the Sim card programmatically? By the way I haven't found the command the reboot the modem through JSON monitoring...

Thank you in advance for your help!

Vincent

1 Answer

0 votes
by anonymous
Hi,

Which router are you using ?

Module reboot has to detect a SIM card. There is no command at the moment for JSON to reboot module, but you can use command "/etc/init.d/modem restart" from the routers terminal.
Best answer
by

Thank you for your answer! It's a RUT240. Unfortunatly I can't use the terminal because everything is done programmatically and I can't use ssh as it's not compatible since RUT routers use the last security protocol (I'm under windows Iot core)... Do you think that the reboot command through JSON should do the job? I've tried it but I got a strange result...Couldn't access to the web interface anymore and I got a error message... 

Here is the commande I'm talking about:

{
    "jsonrpc":"2.0","id":1,"method":"call","params":
    [
        "5cd4b143b182c07bc578ae3310d6280e","file","exec",
        {
            "command":"reboot","params":["config"]
        }
    ]
}
by anonymous
Reboot command should also work fine, because you reboot the module with the router itself. Do you get the error message everytime you reboot ?
by
I've tried again the Reboot command and I didnt get any error this time but my Sim card status was still "Not inserted" then I click on Restart modem in the Web interface and after that the Sim card was detected. Is there any way to call the reboot modem? Can we send a post request in order to do that?
by anonymous
Hello,
You can try this RPC-JSON request:

{
    "jsonrpc":"2.0","id":1,"method":"call","params":
    [
        "5cd4b143b182c07bc578ae3310d6280e","file","exec",
        {
            "command":"/etc/init.d/modem","params":["restart"]
        }
    ]
}
by
Hello! It works well! In fact I had a poor contact on my sim card extender that's why sometimes it kept saying "Not inserted"... But anyway this command is better than reboot the entire router! Thank you!