Fill variable with value from interface/lte/cellular/Access Technology ... possible ?

Hi

Is it possible to fill a variable with the value of “interface/lte/cellular/Access Technology” in a LtAP Router for example ?
If yes, wath are the possible values like: LTE (CA2), Evolved 3G …etc.

thx for help, Richard

What you mean ?



If yes, wath are the possible values like: LTE (CA2), Evolved 3G ...etc.

Evolved 3G (LTE) -> you have a LTE connection.
LTE (CA2) -> you have a LTE connection with 2 Bands/Frequency as Carrier Aggregation.

In a script i want to put the actual value of “Access Techbnolgy” in a global variable … is this possible ?

Check first line of code of this:
Watch LTE parameters: http://forum.mikrotik.com/t/r11e-lte6-2ca-not-staying-connected/136004/22

sorry i can’t figure it out … how must the line look like ? :wink:

In terminal:
RouterOS v6: put ([interface lte info lte1 once as-value ]->“access-technology”)
RouterOS v7: put ([interface/lte/monitor lte1 once as-value ]->“access-technology”)

and create a global variable for ros6:

global SiB_MyLTEAccTech ([/interface lte info lte1 once as-value ]->"access-technology") ;

Thank you Sib! This had been driving me crazy for over an hour.

For future me googling:

interface/lte/monitor lte1 once

will get you the list of available item names (called keys) and values.

To extract a specific key:

:put ([interface/lte/monitor lte1 once as-value ]->"imei")

or

:local lteStatus ([interface/lte/monitor lte1 once as-value ]->"status"); :put "Lte is $lteStatus";

When you using an “as-value” command from the help docs or forum posts, make sure the “value” is in the list.
On my chateaux 5G running v7.8, “access-technology” is not one of the available items.

Better to do something like this, works regardless if it's v6 or v7.
{
:local cmdname "info" ; :if ([/system resource get version] ~ "^7\.") do={:set cmdname "monitor"}
:local cmdstring ":return [/interface lte $cmdname ([find]->0) once as-value]"
:local ltemon [[:parse $cmdstring]]

mode 1

:put "IMEI is $($ltemon->"imei")"
:put "Current Operator is $($ltemon->"current-operator")"

mode 2, if the values are readed multipe times:

:local lteimei ($ltemon->"imei")
:local lteoperator ($ltemon->"current-operator")
:put "IMEI is $lteimei"
:put "Current Operator is $lteoperator and the IMEI still $lteimei"
}