8843 questions

10489 answers

16451 comments

15774 members

0 votes
591 views 10 comments
by
Not sure whether it's used properly - will .1.3.6.1.4.1.48690.2.17.0 (ConnectionUptime) always return a string different than "0" when being on wired? And other way round - is it possible to receive "0" when being cellular? I couldn't find this information and just checked experimentally that it is "0" on wired. Not sure however, if we can assume it's always non "0" on cellular.

1 Answer

0 votes
by

Hi!

This OID belongs to GSM sub-tree in SNMP, so it means it will only show you connection up-time of the mobile. If, in your scenario, the main WAN interface is wired WAN and mobile is disconnected - then it should show you zero, as it means the mobile connection is down and not being used at this very moment. 

If you want to look if your Wired WAN is connected you can use this OID .1.3.6.1.4.1.48690.7.4.0

NOTE: it will only show you the state of the WAN port, not the uptime.

EB.

Best answer
by
Hi, thanks for quick reply. My scenario is: I would like to detect on which media type modem is currently working. So I have both wired and mobile enabled. I need to know when wired connection (which is the primary one) failovers to mobile (and back - by reporting to another monitoring app). At the moment I check mobile connection uptime - if it is "0", I "assume" I am on wired, if not - cellular. Not sure also if that string will be always in the same format (i.e. "0", not for example "000").
by
Uptime will not be "0" even if you have Wired WAN as your main interface, as probably your mobile will be enabled as WAN failover. So to get the correct information you would still need to disable mobile connection after you initiate Wired WAN as your main.

Regarding format - if it's zero it will still be one digit "0".

EB.
by
Thanks, so is there any recommended approach to obtain medium type that is currently being used? I need both wired and mobile enabled (to support failover to mobile) - but I would like to get information (about currently used medium type) on demand from my app. I am using RUT2XX_R_00.01.06.1 firmware, but it shouldn't be a problem to upgrade to a later one.
by

I would suggest using SMS utilities which will let you not only obtain the required information about the device but also change configurations.

by
I have registered - as previously I was asking questions anonymously. SMS is not really acceptable for me. I am looking for some API, like getting some SNMP variables. It is due to using a common interface mechanism for other modems as well. Is there any simple way to programmatically get current connection type?
by
You will be able to do it with a new RMS API that should come out in two weeks.

EB.
by

Thank you. There is also something like commands that can be run on failover (can be found here in the bottom: https://community.teltonika-networks.com/17469/comand-changing-between-lte-and-wired?show=17469#q17469). But they are probably some internal modem commands, which I cannot use to interact with my other devices / applications. Am I right?

by
Failover is used more like a feature, not a command. Failover will initiate itself once one of the main interfaces are down and will switch to the secondary interface to keep up the connection.

Regarding "commands that can be run on failover" is not possible, for now, we only support reporting features as getting notified with SMS or email when some kind of event happened.

EB.
by

Hi,
on our modems we have enabled JSON RPC (System -> Administration -> Access control).

We are using this API to obtain SIM ICCID number.

During tests we noticed that we can also send through this API command IP ROUTE :

{
 "jsonrpc": "2.0", "id": 1, "method": "call", "params":
  [
   "session_key_number", "file", "exec",
    {
     "command":"IP",
     "params":
     [
        "route"
     ]
  }
 ]
}

As a response, we are getting promising results. This one is returned when modem is on wired connection:

{
  "jsonrpc": "2.0",
 "id": 1,
 "result": [
 0,
 {
  "code": 0,
 "stdout": "default via 000.00.00.00 dev eth1 \ndefault via 000.00.00.00 dev wwan0 metric 10 \n000.00.00.00/21 dev eth1 proto kernel  scope link src 000.00.00.00 \n000.00.00.00.1 dev eth1 proto static scope link src 000.00.00.00 \n000.00.00.00/30 dev wwan0 proto       static scope link metric 10 \n000.00.00.00 dev wwan0 proto static scope link src 000.00.00.00 metric 10 \n000.00.00.00/24 dev br-   lan     
proto kernel scope link src 000.00.00.00 \n000.00.00.00 via 000.00.00.00 dev wwan0 \n000.00.00.00 via 000.00.00.00 dev wwan0 \n"
  }
 ]
}

And this one when the modem is on cellular connection:

{

"jsonrpc": "2.0",

"id": 1,

"result": [

0,

{

"code": 0,

"stdout": "default via 000.00.00.00 dev wwan0 \n000.00.00.00/30 dev wwan0 proto static scope link metric 10 \n000.00.00.00 dev wwan0 proto static scope link src 000.00.00.00 metric 10 \n000.00.00.00/24 dev br-lan proto kernel scope link src 000.00.00.00 \n000.00.00.00 via 000.00.00.00 dev wwan0 \n000.00.00.00 via 000.00.00.00 dev wwan0 \n"

}

]

}

Can you confirm that we can use this command to obtain information about the current connection type (current WAN)? And if so, can we treat the first (default via 000.00.00.00 dev wwan0)line from stdout as a current connection type?

by
Hi again,
I'm an author of above^ question.
And if I may ask another question. Is this possible to update modem firmware "accidentally"? Maybe due to some kind of self-update mechanism?