Manual:Interface/LTE: Difference between revisions

From MikroTik Wiki
Jump to navigation Jump to search
 
(82 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{Versions|v6+,v5.12+}}
{{Versions|v6+,v5.12+}}


{{Warning|This manual is moved to https://help.mikrotik.com/docs/display/ROS/LTE}}
__TOC__
__TOC__


Line 6: Line 7:


==Summary==
==Summary==
<p id="shbox">
<p id="shbox">
<b>Package:</b> <code>system</code>
<b>Package:</b> <code>system</code>
</p>
</p>
<p>Support for Direct-IP mode type cards only. (QMI Support may be possible in future)</p>
<p>Support for Direct-IP mode type cards only. MBIM support is available in RouterOS v7 releases and MBIM driver is loaded automatically. If modem is not recognized in RouterOS v6 - Please test it in v7 releases before asking for support in RouterOS v6. </p>
<p>To enable access via a PPP interface instead of a LTE Interface, change direct IP mode with <code>/port firmware set ignore-directip-modem=yes</code> command and a reboot. Note that using PPP emulation mode you will not get the same max speeds as using the native lte interface.</p>
<p>To enable access via a PPP interface instead of a LTE Interface, change direct IP mode with <code>/port firmware set ignore-directip-modem=yes</code> command and a reboot. Note that using PPP emulation mode you may not get the same throughput speeds as using the LTE interface emulation type.</p>
{{Warning | In RouterOS v7 ignore-direct-modem parameter is moved under <code>/system routerboard modem</code> menu}}


==LTE Client==
==LTE Client==
Line 21: Line 22:
|prop=Property
|prop=Property
|desc=Description
|desc=Description
}}
{{Mr-arg-table
|arg=add-default-route
|type=yes {{!}} no
|default=no
|desc=Whether to add default route to forward all traffic over the LTE interface. (for RouterOS<=6.40)
}}
}}


Line 34: Line 28:
|type=yes {{!}} no
|type=yes {{!}} no
|default=no
|default=no
|desc=Enable data roaming for connecting to other countries data-providers. Note all LTE modems support this feature
|desc=Enable data roaming for connecting to other countries data-providers. Not all LTE modems support this feature. Some modems, that do not fully support this feature, will connect to the network but will not establish an IP data connection with <var>allow-roaming</var> set to no.
}}
}}


{{Mr-arg-table
{{Mr-arg-table
|arg=authentication
|arg=apn-profiles
|type=pap {{!}} chap
|default=
|desc=Allowed protocol to use for authentication (for RouterOS<=6.40)
}}
 
{{Mr-arg-table
|arg=apn
|type=string
|type=string
|default=""
|default=default
|desc=Service Provider's Access Point Name (for RouterOS<=6.40)
|desc=Which APN profile to use for this interface
}}
}}


{{Mr-arg-table
{{Mr-arg-table
|arg=band
|arg=band
|type=
|type=integer list
|default=""
|default=""
|desc=Frequency band used in communication <code>[https://en.wikipedia.org/wiki/LTE_frequency_bands#Frequency_bands_and_channel_bandwidths LTE Bands and bandwidths]</code>
|desc=Frequency band used in communication <code>[https://en.wikipedia.org/wiki/LTE_frequency_bands#Frequency_bands_and_channel_bandwidths LTE Bands and bandwidths]</code>
Line 65: Line 52:
}}
}}


{{Mr-arg-table
|arg=default-route-distance
|type=integer
|default=1
|desc=Since v6.2, sets distance value applied to auto created default route, if <var>add-default-route</var> is also selected (for RouterOS<=6.40)
}}


{{Mr-arg-table
{{Mr-arg-table
Line 90: Line 71:
|type=string
|type=string
|default=""
|default=""
|desc=Modem init string
|desc=Modem init string (AT command that will be executed at modem startup)
}}
}}


Line 109: Line 90:
{{Mr-arg-table
{{Mr-arg-table
|arg=network-mode
|arg=network-mode
|type=3g {{!}} auto {{!}} gsm {{!}} lte
|type=3g {{!}} gsm {{!}} lte
|default=auto
|default=3g,gsm,lte
|desc=Select/force mode LTE interface is to operate with
|desc=Select/force mode for LTE interface to operate with
}}
}}


{{Mr-arg-table
{{Mr-arg-table
|arg=password
|arg=operator
|type=string
|type=integer
|default=""
|default=""
|desc=Password used for authentication. (for RouterOS<=6.40)
|desc=used to lock device to specific operator full PLMN number is used for lock consisting from MCC+MNC. [https://en.wikipedia.org/wiki/Public_land_mobile_network PLMN codes]
}}
}}


{{Mr-arg-table
{{Mr-arg-table-end
|arg=pin
|arg=pin
|type=string
|type=integer
|default=""
|default=""
|desc=SIM Card's PIN code.
|desc=SIM Card's PIN code.
}}
{{Mr-arg-table
|arg=apn-profiles
|type=string
|default=default
|desc=(for RouterOS=>6.40)
}}
{{Mr-arg-table-end
|arg=user
|type=string
|default=""
|desc=User name used for authentication. (for RouterOS<=6.40)
}}
}}


=== APN profiles ===
=== APN profiles ===


All network related setting are moved under profiles, starting from RouterOS 6.41
All network related settings are moved under profiles, starting from RouterOS 6.41
<p id="shbox"><b>Sub-menu:</b> <code>/interface lte apn</code></p>
<p id="shbox"><b>Sub-menu:</b> <code>/interface lte apn</code></p>


Line 168: Line 135:
{{Mr-arg-table
{{Mr-arg-table
|arg=authentication
|arg=authentication
|type=pap {{!}} chap
|type=pap {{!}} chap {{!}} none
|default=
|default=none
|desc=Allowed protocol to use for authentication
|desc=Allowed protocol to use for authentication
}}
{{Mr-arg-table
|arg=default-route-distance
|type=integer
|default=2
|desc=Sets distance value applied to auto created default route, if <var>add-default-route</var> is also selected.
LTE route by default is with distance 2 to prefer wired routes over LTE
}}
}}


Line 177: Line 152:
|type=ipv4 {{!}} ipv4-ipv6 {{!}} ipv6
|type=ipv4 {{!}} ipv4-ipv6 {{!}} ipv6
|default=
|default=
|desc=Allowed protocol to use for authentication
|desc=Requested PDN type
}}
 
{{Mr-arg-table
|arg=ipv6-interface
|type=
|default=
|desc=Interface on which to advertise IPv6 prefix
}}
 
 
{{Mr-arg-table
|arg=name
|type=string
|default=
|desc=APN profile name
}}
}}


{{Mr-arg-table
{{Mr-arg-table
|arg=default-route-distance
|arg=number
|type=integer
|type=integer
|default=1
|default=
|desc=Since v6.2, sets distance value applied to auto created default route, if <var>add-default-route</var> is also selected
|desc=APN profile number
}}
 
{{Mr-arg-table
|arg=passthrough-interface
|type=
|default=
|desc= Interface to passthrough IP configuration (activates passthrough)
}}
 
{{Mr-arg-table
|arg=passthrough-mac
|type=MAC
|default=auto
|desc=If set to auto, then will learn MAC from first packet
}}
 
{{Mr-arg-table
|arg=password
|type=string
|default=
|desc=Password used if any of the authentication protocols are active
}}
}}


{{Mr-arg-table
|arg=use-peer-dns
|type=yes {{!}} no
|default=yes
|desc=If set to yes, uses DNS recieved from LTE interface
}}


{{Mr-arg-ro-table-end
{{Mr-arg-ro-table-end
|arg=number
|arg=user
|type=integer
|type=integer
|desc=APN profile number
|default=
|desc=Username used if any of the authentication protocols are active
}}
}}


Line 212: Line 232:
{{Mr-arg-ro-table
{{Mr-arg-ro-table
|arg=freeze-frame-interval
|arg=freeze-frame-interval
|type=
|type=integer
|desc=time between data printout
|desc=time between data printout
}}
}}
Line 219: Line 239:
|arg=number
|arg=number
|type=integer
|type=integer
|desc=Interface number
|desc=Interface number or name
}}
}}


Line 272: Line 292:
Start with network settings -  
Start with network settings -  


{{Warning | For RouterOS versions up to 6.40
{{Warning | This guide is for RouterOS versions starting from 6.41
<br><br><br>
Set correct parameters on LTE client interface (provided by network provider):
<pre>
/interface lte
set [ find ] apn=phoneprovider.net authentication=chap name=lte1 network-mode=auto password=web user=web
</pre>
}}
}}
Start with network settings -
Add new connection parameters under LTE apn profile (provided by network provider):


{{Warning | For RouterOS versions from 6.41
<br><br><br>
Add new connection parameters under LTE apn profile (provided by network provider):
<pre>
<pre>
/interface lte apn
/interface lte apn
Line 293: Line 306:
/interface lte set [find] apn-profiles=profile1
/interface lte set [find] apn-profiles=profile1
</pre>
</pre>
}}


LTE interface should appear with running (R) flag:
LTE interface should appear with running (R) flag:
Line 303: Line 314:
</pre>
</pre>


 
From RouterOS=>6.41 DHCP client is added automatically. If it's not added - add a DHCP Client to LTE Interface manually:
Add a DHCP Client to LTE Interface just created:
<pre>
<pre>
/ip dhcp-client
/ip dhcp-client
add default-route-distance=1 disabled=no interface=lte1
add default-route-distance=1 disabled=no interface=lte1
</pre>
</pre>
If required, add NAT Masquerade for LTE Interface to get internet:
If required, add NAT Masquerade for LTE Interface to get internet to the local network:
<pre>
<pre>
/ip firewall nat
/ip firewall nat
Line 340: Line 350:
</pre>
</pre>


==Passthrough==
==Passthrough Example==


Starting from RouterOS v6.41 some LTE interfaces support LTE Passthrough feature where the IP configuration is applied directly to the client device. In this case modem firmware is responsible for the IP configuration and router is used only to configure modem settings - APN, Network Technologies and IP-Type. In this configuration the router will not get IP configuration from the modem.
Starting from RouterOS v6.41 some LTE interfaces support LTE Passthrough feature where the IP configuration is applied directly to the client device. In this case modem firmware is responsible for the IP configuration and router is used only to configure modem settings - APN, Network Technologies and IP-Type. In this configuration the router will not get IP configuration from the modem.
Line 347: Line 357:


Passthrough will only work for one host. Router will automatically detect MAC address of the first received packet and use it for the Passthrough. If there are multiple hosts on the network it is possible to lock the Passthrough to a specific MAC.
Passthrough will only work for one host. Router will automatically detect MAC address of the first received packet and use it for the Passthrough. If there are multiple hosts on the network it is possible to lock the Passthrough to a specific MAC.
On the host on the network where the Passthrough is providing the IP a DHCP-Client should be enabled on that interface to.
Note, that it will not be possible to connect to the LTE router via public lte ip address or from the host which is used by the passthrough. It is suggested to create additional connection from the LTE router to the host for configuration purposes. For example vlan interface between the LTE router and host.
Note, that it will not be possible to connect to the LTE router via public lte ip address or from the host which is used by the passthrough. It is suggested to create additional connection from the LTE router to the host for configuration purposes. For example vlan interface between the LTE router and host.


To enable the Passthrough a new entry is required or the default entry should be changed in the '/interface lte apn' menu
To enable the Passthrough a new entry is required or the default entry should be changed in the '/interface lte apn' menu
 
{{Warning | Passthrough is not supported by all chipsets.
}}
Examples.
Examples.


Line 381: Line 393:
[admin@MikroTik] > /interface lte set lte2 apn-profiles=interface2
[admin@MikroTik] > /interface lte set lte2 apn-profiles=interface2
</pre>
</pre>
==Dual SIM==
{{ Note | The command for sim slot selection changes in v6.45.1 and again in v7. Some device models like SXT, have SIM slots named "a" and "b" instead of "up" and down"}}
For some boards with dual SIM slots connected to the same modem slot (like LtAP mini, ltAP, SXT) it is possible to alternate between these SIM slots.
Command for pre 6.45.1:
<pre>
/system routerboard sim set sim-slot=down
</pre>
Command after 6.45.1:
<pre>
/system routerboard modem set sim-slot=down
</pre>
Command in RouterOS v7 version:
<pre>
/interface lte settings set sim-slot=down
</pre>
<h3>Usage Example:</h3>
Follow this link - [[Dual_SIM_Application|Dual SIM Application]], to see examples of how to change SIM slot based on roaming status and in case the interface status is down with help of RouterOS scripts and scheduler.


==Tips and Tricks==
==Tips and Tricks==
Line 388: Line 420:
===Find device location using Cell information===
===Find device location using Cell information===


On devices using R11e-LTE card (wAP LTE kit) some extra information is provided under info command (from  6.41rc61)
On devices using R11e-LTE International version card (wAP LTE kit) some extra information is provided under info command (from  6.41rc61)
<pre>
<pre>
   current-operator: 24701
   current-operator: 24701
Line 401: Line 433:


{{Mr-arg-table
{{Mr-arg-table
|arg=current-cellid
|arg=current-operator
|type=integer
|type=integer
|default=
|default=
Line 425: Line 457:
===Using Cell lock===
===Using Cell lock===


It is possible to lock R11e-LTE modem equipped device to exact LTE tower. LTE info command provides (from  6.41rc61):
It is possible to lock R11e-LTE, R11e-LTE6 and R11e-4G modems and equipped devices to exact LTE tower. LTE info command provides currently used cellular tower information:
<pre>
<pre>
         phy-cellid: 384
         phy-cellid: 384
             earfcn: 1300 (band 3, bandwidth 20Mhz, cqi 0)
             earfcn: 1300 (band 3, bandwidth 20Mhz, cqi 8)
</pre>
</pre>


Line 449: Line 481:
|desc=Absolute Radio Frequency Channel Number
|desc=Absolute Radio Frequency Channel Number
}}
}}
Exact tower location as well as available bands and other information can be acquired from mobile carrier or by using online services:
[https://www.cellmapper.net/map CellMapper]


By using those acquired variables it's possible to send AT command to modem for locking to tower in current format:
By using those acquired variables it's possible to send AT command to modem for locking to tower in current format:


'''for R11e-LTE and R11e-LTE6'''
<pre>
<pre>
AT*Cell=<mode>,<NetworkMode>,<band>,<EARFCN>,<PCI>
AT*Cell=<mode>,<NetworkMode>,<band>,<EARFCN>,<PCI>
Line 457: Line 494:
where
where


<mode> :
<mode> :
0 – Cell/Frequency disabled
0 – Cell/Frequency disabled
1 – Frequency lock enabled
1 – Frequency lock enabled
Line 469: Line 506:


<band>
<band>
add if band lock is also required (usually can be left blank)
Not in use, leave this blank


<EARFCN>
<EARFCN>
Line 483: Line 520:
</pre>
</pre>


After reboot or modem reset, all set on locks are lost.
For R11e-LTE all set on locks are lost after reboot or modem reset. Cell data can be also gathered from "cell-monitor".
 
For R11e-LTE6 cell lock works only for the primary band, this can be useful if you have multiple channels on the same band and you want to lock it to a specific earfcn. Note, that cell lock is not band-specific and for ca-band it can also use other frequency bands, unless you use band lock.
 
Use cell lock to set the primary band to the 1300 earfcn and use the second channel for the ca-band:
 
<pre>
/interface lte at-chat lte1 input="AT*Cell=2,3,,1300,138"
</pre>
Now it uses the earfcn: 1300 for the primary channel:
<pre>
        primary-band: B3@20Mhz earfcn: 1300 phy-cellid: 138
              ca-band: B3@5Mhz earfcn: 1417 phy-cellid: 138
</pre>
You can also set it the other way around:
<pre>
/interface lte at-chat lte1 input="AT*Cell=2,3,,1417,138"
</pre>
Now it uses the earfcn: 1417 for the primary channel:
<pre>
        primary-band: B3@5Mhz earfcn: 1417 phy-cellid: 138
              ca-band: B3@20Mhz earfcn: 1300 phy-cellid: 138
</pre>
 
For R11e-LTE6 modem cell lock information will not be lost after reboot or modem reset. To remove cell lock use at-chat command:
<pre>
/interface lte at-chat lte1 input="AT*Cell=0"
</pre>
 
'''for R11e-4G'''
 
<pre>
AT%CLCMD=<mode>,<mode2>,<EARFCN>,<PCI>,<PLMN>
AT%CLCMD=1,1,3250,244,\"24705\"
 
where
 
<mode> :
0 – Cell/Frequency disabled
1 – Cell lock enabled
 
<mode2> :
0 - Save lock for first scan
1 - Always use lock
(after each reset modem will clear out previous settings no matter what is used here)
 
<EARFCN>
earfcn from lte info
 
<PCI>
phy-cellid from lte info
 
<PLMN>
Mobile operator code
</pre>
All PLMN codes available [https://en.wikipedia.org/wiki/Mobile_country_code here] this variable can be also left blank
 
To lock modem to the cell - modem needs to be in non operating state, easiest way for '''R11e-4G''' modem is to add CellLock line to "modem-init" string:
<pre>
/interface lte set lte1 modem-init="AT%CLCMD=1,1,3250,244,\"24705\""
</pre>
 
Multiple cells can also be added by providing list instead of one tower informatin in following format:
<pre>
AT%CLCMD=<mode>,<mode2>,<EARFCN_1>,<PCI_1>,<PLMN_1>,<EARFCN_2>,<PCI_2>,<PLMN_2>
</pre>
For example to lock to two different PCIs within same band and operator:
<pre>
/interface lte set lte1 modem-init="AT%CLCMD=1,1,6300,384,\"24701\",6300,385,\"24701\""
</pre>
 
===Cell Monitor===
 
Cell monitor allows to scan available nearby mobile network cells:
<pre>
[admin@MikroTik] > interface lte cell-monitor lte1
PHY-CELLID BAND                                  EARFCN                                          RSRP        RSRQ          RSSI
        11 B3                                    1300                                        -107dBm      -175dB
      306 B1                                    150                                          -115dBm      -195dB
      373 B3                                    1300                                        -111dBm      -195dB
      374 B3                                    1300                                        -111dBm      -195dB
      384 B1                                    150                                          -106dBm      -120dB
      384 B7                                    2850                                        -115dBm      -175dB
      384 B20                                  6300                                          -97dBm      -195dB
</pre>
 
Gathered data can be used for more precise location detection or for Cell lock.


==Troubleshooting==
==Troubleshooting==
Line 519: Line 642:
</pre>
</pre>
Example to lock to LTE band 7,
Example to lock to LTE band 7,
<pre>[admin@MikroTik] /interface lte set lte1 modem-init="AT^SYSCFGEX=\"03\",3FFFFFFF,2,4,40,,
<pre>[admin@MikroTik] /interface lte set lte1 modem-init="AT^SYSCFGEX=\"03\",3FFFFFFF,2,4,40,,"
</pre>
</pre>


Line 552: Line 675:
/system routerboard settings set init-delay=5s
/system routerboard settings set init-delay=5s
</pre>
</pre>
<h3>Modem firmware upgrade</h3>
{{Warning | Before attempting LTE modem firmware upgrade - upgrade RouterOS version to latest releases [https://wiki.mikrotik.com/wiki/Manual:Upgrading_RouterOS How To Upgrade RouterOS]
}}
Starting from RouterOS version 6.44beta20 it is possible to upgrade modems firmware.
Firmware update is available only as FOTA Firmware Over The Air - firmware upgrade can only be done through working mobile connection for:
*)R11e-LTE
*)R11e-LTE-US
Firmware update available as FOTA and as well as upgrade from file for:
*)R11e-4G
*)R11e-LTE6
Firmware updates usually includes small improvements in stability or small bug fixes that can't be included into RouterOS.
Check currently used firmware version by running:
<pre>
[admin@MikroTik] > /interface lte info lte1 once
-----
revision: "MikroTik_CP_2.160.000_v008"
-----
</pre>
Check if new firmware is available:
<pre>
[admin@MikroTik] > /interface lte firmware-upgrade lte1
  installed: MikroTik_CP_2.160.000_v008
    latest: MikroTik_CP_2.160.000_v010
</pre>
Upgrade firmware:
<pre>
[admin@MikroTik] > interface lte firmware-upgrade lte1 upgrade=yes
  status: downloading via LTE connection (>2min)
</pre>
Whole upgrade process may take up to 10 minutes, depending on mobile connection speed.
After successful upgrade issue USB power-reset, reboot device or run AT+reset command, to update modem version readout under info command:
<pre>
[admin@MikroTik] > /interface lte at-chat lte1 input="AT+reset"
</pre>
if modem has issues connecting to cells after update, or there are any other unrelated issues - wipe old configuration with:
<pre>
/interface lte at-chat lte1 input="AT+RSTSET"
</pre>
<h3>Avoiding tethering speed throttling</h3>
Some operators (TMobile, YOTA etc.) allows unlimited data only for device SIM card is used on, all other data coming from mobile hotspots or tethering is highly limited by volume or by throughput speed.
[https://www.reddit.com/r/hacking/comments/54a7dd/bypassing_tmobiles_tethering_data_capthrottling/ Some sources] have found out that this limitation is done by monitoring TTL (Time To Live) values from packets to determinate if limitations need to be applied (TTL is decreased by 1 for each "hop" made).
RouterOS allows changing the TTL parameter for packets going from the router to allow hiding sub networks. Keep in mind that this may conflict with fair use policy.
<pre>
/ip firewall mangle
add action=change-ttl chain=postrouting new-ttl=set:65 out-interface=lte1 passthrough=yes
</pre>
More information: [https://m.habr.com/en/post/238351/ YOTA], [https://www.reddit.com/r/mikrotik/comments/acq4kz/anyone_familiar_with_configuring_the_ltap_us_with/ TMobile]
<h3>Unlocking SIM card after multiple wrong PIN code attempts</h3>
After locking SIM card, unlock can be done through "at-chat"
Check current PIN code status:
<pre>
/interface/lte/at-chat lte1 input="at+cpin\?"
</pre>
If card is locked - unlock it by providing:
<pre>
/interface lte at-chat lte1 input="AT+CPIN=\"PUK_code\",\"NEW_PIN\""
</pre>
Replace PUK_code and NEW_PIN with matching values.


{{Cont}}
{{Cont}}

Latest revision as of 12:16, 7 March 2022

Applies to RouterOS: v6+,v5.12+

Warning: This manual is moved to https://help.mikrotik.com/docs/display/ROS/LTE


Summary

Package: system

Support for Direct-IP mode type cards only. MBIM support is available in RouterOS v7 releases and MBIM driver is loaded automatically. If modem is not recognized in RouterOS v6 - Please test it in v7 releases before asking for support in RouterOS v6.

To enable access via a PPP interface instead of a LTE Interface, change direct IP mode with /port firmware set ignore-directip-modem=yes command and a reboot. Note that using PPP emulation mode you may not get the same throughput speeds as using the LTE interface emulation type.

Warning: In RouterOS v7 ignore-direct-modem parameter is moved under /system routerboard modem menu


LTE Client

Sub-menu: /interface lte

Properties

Property Description
allow-roaming (yes | no; Default: no) Enable data roaming for connecting to other countries data-providers. Not all LTE modems support this feature. Some modems, that do not fully support this feature, will connect to the network but will not establish an IP data connection with allow-roaming set to no.
apn-profiles (string; Default: default) Which APN profile to use for this interface
band (integer list; Default: "") Frequency band used in communication LTE Bands and bandwidths
comment (string; Default: "") Descriptive name of an item
disabled (yes | no; Default: yes) Whether interface is disabled or not. By default it is disabled.
mac-address (MAC; Default: "") Media Access Control number of an interface.
modem-init (string; Default: "") Modem init string (AT command that will be executed at modem startup)
mtu (integer; Default: 1500) Maximum Transmission Unit. Max packet size that LTE interface will be able to send without packet fragmentation.
name (string; Default: "") Descriptive name of the interface.
network-mode (3g | gsm | lte; Default: 3g,gsm,lte) Select/force mode for LTE interface to operate with
operator (integer; Default: "") used to lock device to specific operator full PLMN number is used for lock consisting from MCC+MNC. PLMN codes
pin (integer; Default: "") SIM Card's PIN code.

APN profiles

All network related settings are moved under profiles, starting from RouterOS 6.41

Sub-menu: /interface lte apn

Property Description
add-default-route (yes | no) Whether to add default route to forward all traffic over the LTE interface.
apn (string) Service Provider's Access Point Name
authentication (pap | chap | none; Default: none) Allowed protocol to use for authentication
default-route-distance (integer; Default: 2) Sets distance value applied to auto created default route, if add-default-route is also selected. LTE route by default is with distance 2 to prefer wired routes over LTE
ip-type (ipv4 | ipv4-ipv6 | ipv6; Default: ) Requested PDN type
ipv6-interface (; Default: ) Interface on which to advertise IPv6 prefix
name (string; Default: ) APN profile name
number (integer; Default: ) APN profile number
passthrough-interface (; Default: ) Interface to passthrough IP configuration (activates passthrough)
passthrough-mac (MAC; Default: auto) If set to auto, then will learn MAC from first packet
password (string; Default: ) Password used if any of the authentication protocols are active
use-peer-dns (yes | no; Default: yes) If set to yes, uses DNS recieved from LTE interface
user (integer) Username used if any of the authentication protocols are active

Scanner

It is possible to scan LTE interfaces with /interface lte scan command

Available read only properties:

Property Description
duration (integer) Duration of scan in seconds
freeze-frame-interval (integer) time between data printout
number (integer) Interface number or name

User Info command

It is possible to send special "info" command to LTE interface with /interface lte info command.

Properties (Up to 6.40)

Property Description
user-command (string; Default: "") send a command to LTE card to extract useful information, e.g. with AT commands
user-command-only (yes | no; Default: )

User at-chat command

It is possible to send user defined "at-chat" command to LTE interface with /interface lte at-chat command.

[admin@MikroTik] > /interface lte at-chat lte1 input="AT*mrd_imei\?"                         
  output: *MRD_IMEI:356159060388208

OK

You can also use "at-chat" function in scripts and assign command output to variable.

[admin@MikroTik] > :global "lte_command" [/interface lte at-chat lte1 input="AT*mrd_imei\?" as-value ] 
[admin@MikroTik] > :put $"lte_command"
output=*MRD_IMEI:356159060388208

OK

Quick setup example

Start with network settings -

Warning: This guide is for RouterOS versions starting from 6.41


Start with network settings - Add new connection parameters under LTE apn profile (provided by network provider):

/interface lte apn
add name=profile1 apn=phoneprovider.net authentication=chap password=web user=web

Select newly created profile for LTE connection:

/interface lte set [find] apn-profiles=profile1

LTE interface should appear with running (R) flag:

[admin@MikroTik] > /interface lte print 
Flags: X - disabled, R - running 
 0  R name="lte1" mtu=1500 mac-address=AA:AA:AA:AA:AA:AA 

From RouterOS=>6.41 DHCP client is added automatically. If it's not added - add a DHCP Client to LTE Interface manually:

/ip dhcp-client
add default-route-distance=1 disabled=no interface=lte1

If required, add NAT Masquerade for LTE Interface to get internet to the local network:

/ip firewall nat
add action=masquerade chain=srcnat out-interface=lte1

After interface is added, you can use "info" command to see what parameters client acquired (parameters returned depends on LTE hardware device):

[admin@MikroTik] > /interface lte info lte1 once 
status: call in progress
pin-status: no password required
functionality: full
manufacturer: Huawei Technologies Co., Ltd.
model: ME909u-521
revision: 12.631.07.01.00
current-operator: vodafone ES
current-cellid: 44436007
access-technology: Evolved 3G (LTE)
signal-strengh: -79 dBm
frame-error-rate: n/a
earfcn: n/a
imei: 860461024123456
imsi: 234012555034981
uicc: n/a
rssi: -79dBm
rsrp: -109dBm
rsrq: -13dB
sinr: -1dB
[admin@MikroTik] >

Passthrough Example

Starting from RouterOS v6.41 some LTE interfaces support LTE Passthrough feature where the IP configuration is applied directly to the client device. In this case modem firmware is responsible for the IP configuration and router is used only to configure modem settings - APN, Network Technologies and IP-Type. In this configuration the router will not get IP configuration from the modem. The LTE Passthrough modem can pass both IPv4 and IPv6 addresses if that is supported by modem. Some modems support multiple APN where you can pass the traffic from each APN to a specific router interface.

Passthrough will only work for one host. Router will automatically detect MAC address of the first received packet and use it for the Passthrough. If there are multiple hosts on the network it is possible to lock the Passthrough to a specific MAC. On the host on the network where the Passthrough is providing the IP a DHCP-Client should be enabled on that interface to. Note, that it will not be possible to connect to the LTE router via public lte ip address or from the host which is used by the passthrough. It is suggested to create additional connection from the LTE router to the host for configuration purposes. For example vlan interface between the LTE router and host.

To enable the Passthrough a new entry is required or the default entry should be changed in the '/interface lte apn' menu

Warning: Passthrough is not supported by all chipsets.


Examples.

To configure the Passthrough on ether1:

[admin@MikroTik] > /interface lte apn add apn=apn1 passthrough-interface=ether1
[admin@MikroTik] > /interface lte set lte1 apn-profiles=apn1

To configure the Passthrough on ether1 host 00:0C:42:03:06:AB:

[admin@MikroTik] > /interface lte apn add apn=apn1 passthrough-interface=ether1 passthrough-mac=00:0C:42:03:06:AB
[admin@MikroTik] > /interface lte set lte1 apn-profiles=apn1

To configure multiple APNs on ether1 and ether2:

[admin@MikroTik] > /interface lte apn add apn=apn1 passthrough-interface=ether1
[admin@MikroTik] > /interface lte apn add apn=apn2 passthrough-interface=ether2
[admin@MikroTik] > /interface lte set lte1 apn-profiles=apn1,apn2

To configure multiple APNs with the same APN for different interfaces:

[admin@MikroTik] > /interface lte apn add name=interface1 apn=apn1
[admin@MikroTik] > /interface lte apn add name=interface2 apn=apn1 passthrough-interface=ether1
[admin@MikroTik] > /interface lte set lte1 apn-profiles=interface1
[admin@MikroTik] > /interface lte set lte2 apn-profiles=interface2

Dual SIM

Note: The command for sim slot selection changes in v6.45.1 and again in v7. Some device models like SXT, have SIM slots named "a" and "b" instead of "up" and down"


For some boards with dual SIM slots connected to the same modem slot (like LtAP mini, ltAP, SXT) it is possible to alternate between these SIM slots.

Command for pre 6.45.1:

/system routerboard sim set sim-slot=down

Command after 6.45.1:

/system routerboard modem set sim-slot=down

Command in RouterOS v7 version:

/interface lte settings set sim-slot=down

Usage Example:

Follow this link - Dual SIM Application, to see examples of how to change SIM slot based on roaming status and in case the interface status is down with help of RouterOS scripts and scheduler.

Tips and Tricks

This paragraph contains information for additional features and usage cases.

Find device location using Cell information

On devices using R11e-LTE International version card (wAP LTE kit) some extra information is provided under info command (from 6.41rc61)

   current-operator: 24701
                lac: 40
     current-cellid: 2514442
Property Description
current-operator (integer; Default: ) Contains MCC and MNC. For example: current-operator: 24701 breaks to: MCC=247 MNC=01
lac (integer; Default: ) location area code (LAC)
current-cellid (integer; Default: ) Station identification number

Values can be used to find location in databases: Cell Id Finder

Using Cell lock

It is possible to lock R11e-LTE, R11e-LTE6 and R11e-4G modems and equipped devices to exact LTE tower. LTE info command provides currently used cellular tower information:

         phy-cellid: 384
             earfcn: 1300 (band 3, bandwidth 20Mhz, cqi 8)
Property Description
phy-cellid (integer; Default: ) Physical Cell Identification (PCI) of currently used cell tower.
earfcn (integer; Default: ) Absolute Radio Frequency Channel Number

Exact tower location as well as available bands and other information can be acquired from mobile carrier or by using online services:

CellMapper

By using those acquired variables it's possible to send AT command to modem for locking to tower in current format:

for R11e-LTE and R11e-LTE6

AT*Cell=<mode>,<NetworkMode>,<band>,<EARFCN>,<PCI>

where

<mode> :
0 – Cell/Frequency disabled
1 – Frequency lock enabled
2 – Cell lock enabled

<NetworkMode>
0 – GSM
1 – UMTS_TD
2 – UMTS_WB
3 – LTE

<band>
Not in use, leave this blank

<EARFCN>
earfcn from lte info

<PCI>
phy-cellid from lte info

To lock modem at previously used tower at-chat can be used:

/interface lte at-chat lte1 input="AT*Cell=2,3,,1300,384"

For R11e-LTE all set on locks are lost after reboot or modem reset. Cell data can be also gathered from "cell-monitor".

For R11e-LTE6 cell lock works only for the primary band, this can be useful if you have multiple channels on the same band and you want to lock it to a specific earfcn. Note, that cell lock is not band-specific and for ca-band it can also use other frequency bands, unless you use band lock.

Use cell lock to set the primary band to the 1300 earfcn and use the second channel for the ca-band:

/interface lte at-chat lte1 input="AT*Cell=2,3,,1300,138"

Now it uses the earfcn: 1300 for the primary channel:

         primary-band: B3@20Mhz earfcn: 1300 phy-cellid: 138
              ca-band: B3@5Mhz earfcn: 1417 phy-cellid: 138

You can also set it the other way around:

/interface lte at-chat lte1 input="AT*Cell=2,3,,1417,138"

Now it uses the earfcn: 1417 for the primary channel:

         primary-band: B3@5Mhz earfcn: 1417 phy-cellid: 138
              ca-band: B3@20Mhz earfcn: 1300 phy-cellid: 138

For R11e-LTE6 modem cell lock information will not be lost after reboot or modem reset. To remove cell lock use at-chat command:

/interface lte at-chat lte1 input="AT*Cell=0"

for R11e-4G

AT%CLCMD=<mode>,<mode2>,<EARFCN>,<PCI>,<PLMN>
AT%CLCMD=1,1,3250,244,\"24705\"

where

<mode> :
0 – Cell/Frequency disabled
1 – Cell lock enabled

<mode2> :
0 - Save lock for first scan
1 - Always use lock 
(after each reset modem will clear out previous settings no matter what is used here)

<EARFCN>
earfcn from lte info

<PCI>
phy-cellid from lte info

<PLMN>
Mobile operator code

All PLMN codes available here this variable can be also left blank

To lock modem to the cell - modem needs to be in non operating state, easiest way for R11e-4G modem is to add CellLock line to "modem-init" string:

/interface lte set lte1 modem-init="AT%CLCMD=1,1,3250,244,\"24705\""

Multiple cells can also be added by providing list instead of one tower informatin in following format:

AT%CLCMD=<mode>,<mode2>,<EARFCN_1>,<PCI_1>,<PLMN_1>,<EARFCN_2>,<PCI_2>,<PLMN_2>

For example to lock to two different PCIs within same band and operator:

/interface lte set lte1 modem-init="AT%CLCMD=1,1,6300,384,\"24701\",6300,385,\"24701\""

Cell Monitor

Cell monitor allows to scan available nearby mobile network cells:

[admin@MikroTik] > interface lte cell-monitor lte1
PHY-CELLID BAND                                  EARFCN                                          RSRP         RSRQ          RSSI
        11 B3                                    1300                                         -107dBm       -175dB
       306 B1                                    150                                          -115dBm       -195dB
       373 B3                                    1300                                         -111dBm       -195dB
       374 B3                                    1300                                         -111dBm       -195dB
       384 B1                                    150                                          -106dBm       -120dB
       384 B7                                    2850                                         -115dBm       -175dB
       384 B20                                   6300                                          -97dBm       -195dB

Gathered data can be used for more precise location detection or for Cell lock.

Troubleshooting

Enable LTE logging:

[admin@MikroTik] > /system logging add topics=lte

Check for errors in log:

[admin@MikroTik] > /log print

11:08:59 lte,async lte1: sent AT+CPIN? 
11:08:59 lte,async lte1: rcvd +CME ERROR: 10 

search for CME error description online,

in this case: CME error 10 - SIM not inserted

Locking band on Huawei and other modems

To lock band for Huawei modems /interface lte set lte1 band="" option can't be used.

It is possible to use AT commands to lock to desired band manually.

To check all supported bands run at-chat command:

[admin@MikroTik] /interface lte at-chat lte1 input="AT^SYSCFGEX=\?"

output: ^SYSCFGEX: ("00","03","02","01","99"),((2000004e80380,"GSM850/GSM900/GSM1800/GSM1900/WCDMA BCI/WCDMA BCII/WCDMA BCV/WCDMA BCVIII"),
(3fffffff,"All Bands")),(0-2),(0-4),((800d7,"LTE BC1/LTE BC2/LTE 
BC3/LTE BC5/LTE BC7/LTE BC8/LTE BC20"),(7fffffffffffffff,"All Bands")) 
OK

Example to lock to LTE band 7,

[admin@MikroTik] /interface lte set lte1 modem-init="AT^SYSCFGEX=\"03\",3FFFFFFF,2,4,40,,"

Change last part 40 to desired band specified hexadecimal value where:

4 LTE BC3
40 LTE BC7
80000 LTE BC20
7FFFFFFFFFFFFFFF  All bands
etc

All band HEX values and AT commands can be found in Huawei AT Command Interface Specification guide

Check if band is locked:

[admin@MikroTik] /interface lte at-chat lte1 input="AT^SYSCFGEX\?"

output: ^SYSCFGEX: "03",3FFFFFFF,0,2,40
OK

For more information check modem manufacturers AT command reference manuals.

mPCIe modems with RB9xx series devices

For mPCIe modems to work in RB9xx series devices it is required to set the USB type to mPCIe, this can be done using the following command:

/system routerboard usb set type=mini-PCIe

In case your modem is not being recognized after a soft reboot, then you might need to add a delay before the USB port is being initialized. This can be done using the following command:

/system routerboard settings set init-delay=5s

Modem firmware upgrade

Warning: Before attempting LTE modem firmware upgrade - upgrade RouterOS version to latest releases How To Upgrade RouterOS


Starting from RouterOS version 6.44beta20 it is possible to upgrade modems firmware.

Firmware update is available only as FOTA Firmware Over The Air - firmware upgrade can only be done through working mobile connection for:

  • )R11e-LTE
  • )R11e-LTE-US

Firmware update available as FOTA and as well as upgrade from file for:

  • )R11e-4G
  • )R11e-LTE6

Firmware updates usually includes small improvements in stability or small bug fixes that can't be included into RouterOS.

Check currently used firmware version by running:

[admin@MikroTik] > /interface lte info lte1 once

-----
revision: "MikroTik_CP_2.160.000_v008"
-----

Check if new firmware is available:

[admin@MikroTik] > /interface lte firmware-upgrade lte1 
  installed: MikroTik_CP_2.160.000_v008
     latest: MikroTik_CP_2.160.000_v010

Upgrade firmware:

[admin@MikroTik] > interface lte firmware-upgrade lte1 upgrade=yes
  status: downloading via LTE connection (>2min)

Whole upgrade process may take up to 10 minutes, depending on mobile connection speed.

After successful upgrade issue USB power-reset, reboot device or run AT+reset command, to update modem version readout under info command:

[admin@MikroTik] > /interface lte at-chat lte1 input="AT+reset"

if modem has issues connecting to cells after update, or there are any other unrelated issues - wipe old configuration with:

/interface lte at-chat lte1 input="AT+RSTSET"

Avoiding tethering speed throttling

Some operators (TMobile, YOTA etc.) allows unlimited data only for device SIM card is used on, all other data coming from mobile hotspots or tethering is highly limited by volume or by throughput speed. Some sources have found out that this limitation is done by monitoring TTL (Time To Live) values from packets to determinate if limitations need to be applied (TTL is decreased by 1 for each "hop" made). RouterOS allows changing the TTL parameter for packets going from the router to allow hiding sub networks. Keep in mind that this may conflict with fair use policy.

/ip firewall mangle
add action=change-ttl chain=postrouting new-ttl=set:65 out-interface=lte1 passthrough=yes

More information: YOTA, TMobile

Unlocking SIM card after multiple wrong PIN code attempts

After locking SIM card, unlock can be done through "at-chat"

Check current PIN code status:

/interface/lte/at-chat lte1 input="at+cpin\?"

If card is locked - unlock it by providing:

/interface lte at-chat lte1 input="AT+CPIN=\"PUK_code\",\"NEW_PIN\""

Replace PUK_code and NEW_PIN with matching values.

[ Top | Back to Content ]