Locking Devices to a Mobile Cell: Difference between revisions
DaumantasG (talk | contribs) No edit summary |
No edit summary |
||
(27 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
== | <p style="color:red">The information in this page is updated in accordance with [https://wiki.teltonika-networks.com/view/FW_%26_SDK_Downloads'''00.07.08'''] firmware version.</p> | ||
All mobile carrier cells are assigned a unique ID, which is broadcasted to all connected devices. It is usually irrelevant information for the end user, as cell switching on mobile phones and routers has become very good. But sometimes in remote areas, it is beneficial to lock the LTE router to a single cell, as automatic mode may choose a cell with fewer or slower bands | ==Introduction== | ||
<p style="color:red">'''IMPORTANT NOTE:''' This feature is not officially supported by the modem manufacturers or by Teltonika. It should not be used in mission-critical infrastructure or large fleets of devices. If you experience any issues, please disable this feature.</p> | |||
This article contains instructions on how to lock your Teltonika device to a specific cell. All mobile carrier cells are assigned a unique ID, which is broadcasted to all connected devices. It is usually irrelevant information for the end user, as cell switching on mobile phones and routers has become very good. But sometimes in '''remote areas''', it is beneficial to lock the LTE router to a single cell, as automatic mode may choose a cell with fewer or slower bands. For now, only some devices support this feature.<br> | |||
'''Note:''' ''When the device is locked onto a single cell, it can still perform carrier aggregation (Cat 6 and higher modems only) with any other band/cell. The cell that you lock to will act as a primary band. The only way to circumvent this would be to also lock the router to a particular band.'' | |||
== | ==Compatible modems== | ||
Not all modems support cell locking. To find out if your device is compatible, in your device WebUI, go to '''Status → System''' page. Under the '''Internal modem''' section, you'll see the '''Model''' row:<br> | |||
[[ | [[File:Lock_device_to_a_mobile_cell_7.8_status_modem.png|border|class=tlt-border]]<br> | ||
If the model starts with '''EG, EC''' ''(Quectel)'' or '''SLM''' ''(Meig)'', and '''not RG''' ''(5G devices)'', this feature should work. However to make sure it's supported, command '''gsmctl -A 'AT+QNWLOCK=?'''' ''(for Quectel modems)'' or '''gsmctl -A 'AT^CELLLOCK=?'''' ''(for Meig modems)'' should return these options when ran via [[Command_Line_Interfaces_RutOS#SSH|SSH]] or [[Command_Line_Interfaces_RutOS#CLI_.28WebUI.29|CLI]]:<br> | |||
===Quectel=== | |||
---- | |||
<pre> | |||
root@Teltonika-RUTX11:~# gsmctl -A 'AT+QNWLOCK=?' | |||
+QNWLOCK: "common/4g",<num of cells>,[[<freq>,<pci>],...] | |||
+QNWLOCK: "common/lte"[,<action>[,<EARFCN>,<PCI>[,<status>]]] | |||
</pre> | |||
===Meig=== | |||
---- | |||
<pre> | |||
root@Teltonika-RUT955:~# gsmctl -A 'AT^CELLLOCK=?' | |||
^CELLLOCK: (0-1),("02","03"),(0-1),("arfcn"),("pci") | |||
</pre> | |||
==When to use cell locking== | |||
Let's say you're setting up RUTX14, which supports '''Carrier Aggregation''' of up to 3 bands, and you have two cell towers within a similar distance. Let's say Cell A transmits on bands 1, 7, and 20, while Cell B transmits on bands 3 and 20. | |||
Since the signal from Cell B is a little stronger, the router will connect to two bands, and the bandwidth will be lower than using three bands. This means much lower speeds and reduced throughput. | |||
If we lock the router into only using Cell A, we might get a little worse signal, but much better speeds due to using 3 bands at the same time.<br> | |||
= | [[File:Networking_Quectel_configuration_locking_cellids_on_devices_with_quectel_modems_topology_v1_700x.png|border|class=tlt-border]] | ||
Another use case could be to avoid '''overloaded cells'''. In some areas, even when the signal to a cell is great, speeds can be disappointing. This can be caused by lacking carrier infrastructure and overloaded cell towers. In this case, cell locking could be useful to connect to a cell tower with a worse signal, yet achieve better speeds.<br> | |||
'''''Note: It is always recommended to use [[Band_Lock|Band Lock]] and only resort to Cell locking if Band Lock does not resolve the issue.''''' | '''''Note: It is always recommended to use [[Band_Lock|Band Lock]] and only resort to Cell locking if Band Lock does not resolve the issue.''''' | ||
== | ==Configuration== | ||
While we do not support this function via our WebUI just yet, it can quite easily be done using [[AT_Commands|AT commands]]. AT commands are the "native language" for mobile modems, which the router uses to communicate with the modem. | While we do not support this function via our WebUI just yet, it can quite easily be done using [[AT_Commands|AT commands]]. AT commands are the "native language" for mobile modems, which the router uses to communicate with the modem. | ||
'''A few notes before we get started:''' | '''A few notes before we get started:''' | ||
* The described method works with Teltonika RUT/RUTX/TCR/TRB series devices, that contain Quectel modems; | * The described method works with Teltonika RUT/RUTX/TCR/TRB series devices, that contain '''Quectel''' modems; | ||
* Using this command will lock the device into LTE-only mode; | * Using this command will lock the device into '''LTE-only mode'''; | ||
* Rebooting the device might remove the cell lock; | * Rebooting the device ''might'' remove the cell lock on Quectel modems; | ||
* '''It is not recommended to perform these actions while the device is connected remotely as if it loses connection, it will not be recoverable!''' | * '''It is not recommended to perform these actions while the device is connected remotely as if it loses connection, it will not be recoverable!''' | ||
=== | ===Quectel=== | ||
---- | ---- | ||
====Configuring LTE-only mode==== | |||
---- | |||
To start, we'll set the router to LTE-only mode, by using the command:<br> | To start, we'll set the router to LTE-only mode, by using the command:<br> | ||
<pre>gsmctl -A 'AT+QCFG="NWSCANMODE",3,1'</pre> | |||
Where:<br> | |||
*'''3''' - ''LTE-only mode;''<br> | |||
*'''1''' - ''Take effect immediately after executing the command.''<br> | |||
''''' | The [[RUTOS_gsmctl_Commands|'''gsmctl''']] module is responsible for communication with the modem using [[AT_Commands|AT commands]]. By using the argument -A we can directly send the AT commands to the modem. | ||
This may cause the router to lose connection for a few seconds, so before continuing to the next step, please make sure the router is connected to the network. | This may cause the router to lose connection for a few seconds, so before continuing to the next step, please make sure the router is connected to the network. | ||
Line 37: | Line 59: | ||
'''''Note: Do not use WebUI to change this setting. It has to be done via AT commands.''''' | '''''Note: Do not use WebUI to change this setting. It has to be done via AT commands.''''' | ||
===Finding the serving cell details=== | ====Finding the serving cell details==== | ||
---- | ---- | ||
To know if our changes will have any effect, we'll check the current cell we're connected to, by using a command:<br> | |||
<pre>gsmctl -A 'AT+QENG="SERVINGCELL"'</pre> | |||
The output should look something like this: | The output should look something like this: | ||
<pre> | |||
root@Teltonika-RUTX11:~# gsmctl -A 'AT+QENG="SERVINGCELL"' | |||
+QENG: "servingcell","NOCONN","LTE","FDD",246,02,139B15,459,1850,3,5,5,90,-74,-4,-50,20,0,-32768,- | |||
</pre> | |||
We're mostly interested only in the highlighted parts: | We're mostly interested only in the highlighted parts: | ||
* '''139B15''' - currently serving cell ID in hexadecimal form. This ID is unique to each cell. It is only used as a reference point in this configuration.<br> | * '''139B15''' - currently serving cell ID in hexadecimal form. This ID is unique to each cell. It is only used as a reference point in this configuration.<br> | ||
* '''459''' - PCI or Physical Cell Identity. PCI is necessary for a modem to communicate with a cell tower. This is one of the variables we will use when setting up cell locking.<br> | * '''459''' - PCI or Physical Cell Identity. PCI is necessary for a modem to communicate with a cell tower. This is one of the variables we will use when setting up cell locking.<br> | ||
* '''1850''' - LTE EARFCN stands for E-UTRA Absolute Radio Frequency Channel Number | * '''1850''' - LTE EARFCN stands for E-UTRA Absolute Radio Frequency Channel Number. This will be the second variable when setting up cell locking.<br> | ||
===Finding the neighbouring cells details=== | ====Finding the neighbouring cells details==== | ||
---- | ---- | ||
To check the neighboring cells, that we can connect to, this command should be used:<br> | To check the neighboring cells, that we can connect to, this command should be used:<br> | ||
<pre>gsmctl -A 'AT+QENG="NEIGHBOURCELL"'</pre> | |||
And the output should look like this: | |||
<pre> | |||
And the output should look like this:< | root@Teltonika-RUTX11:~# gsmctl -A 'AT+QENG="NEIGHBOURCELL"' | ||
+QENG: "neighbourcell intra","LTE",1850,459,-6,-71,-43,0,-,-,-,-,- | |||
+QENG: "neighbourcell intra","LTE",1850,451,-20,-96,-63,0,-,-,-,-,- | |||
</pre> | |||
Here's an explanation of the first line for each value:<br> | Here's an explanation of the first line for each value:<br> | ||
* '''LTE''' - network generation; | * '''LTE''' - network generation; | ||
* '''1850''' - EARFCN value; | * '''1850''' - EARFCN value. EARFCN is used to determine the channel frequency and bandwidth, thus it can be useful to determine the band of neighbouring cell. This can be achieved using [https://5g-tools.com/4g-lte-earfcn-calculator/ EARFCN calculator]; | ||
* '''459''' - PCI; | * '''459''' - PCI; | ||
* '''-6''' - RSRQ (dB); | * '''-6''' - RSRQ (dB); | ||
Line 71: | Line 96: | ||
'''From these outputs, the most fitting cell should be picked, and its EARFCN and PCI value should be noted.''' | '''From these outputs, the most fitting cell should be picked, and its EARFCN and PCI value should be noted.''' | ||
===Locking to a selected cell=== | ====Locking to a selected cell==== | ||
---- | |||
Once we pick out the cell that we prefer, we can execute this command, with <EARFCN> and <PCID> replaced with desired variables from the previous commands (< and > are not needed): | |||
<pre>gsmctl -A 'AT+QNWLOCK="common/lte",2,<EARFCN>,<PCI>'</pre> | |||
Output from the command should be '''OK''', if it's not, please double-check the spelling. | |||
===Meig=== | |||
---- | |||
====Configuring LTE-only mode==== | |||
---- | |||
To start, we'll set the router to LTE-only mode, by using the command:<br> | |||
<pre>gsmctl -A 'AT^SYSCFGEX="03"'</pre> | |||
The [[RUTOS_gsmctl_Commands|'''gsmctl''']] module is responsible for communication with the modem using [[AT_Commands|AT commands]]. By using the argument -A we can directly send the AT commands to the modem. | |||
This may cause the router to lose connection for a few seconds, so before continuing to the next step, please make sure the router is connected to the network. | |||
'''''Note:''''' Do not use WebUI to change this setting. It has to be done via AT commands. | |||
====Finding the serving cell details==== | |||
---- | |||
To know if our changes will have any effect, we'll check the current cell we're connected to, by using a command:<br> | |||
<pre>gsmctl -A 'AT+CELLINFO=1'</pre> | |||
The output should look something like this: | |||
<pre> | |||
root@Teltonika-RUT955:~# gsmctl -A 'AT+CELLINFO=1' | |||
+CELLINFO:LTE,FDD LTE,246,02,1284885,459,5019,21,144,3,100,1850,19850,-47,-77,-5,164,12,4,255,-,-,1,-,1,-,0,0,0 | |||
</pre> | |||
We're mostly interested only in the highlighted parts: | |||
* '''1284885''' - currently serving cell ID. This ID is unique to each cell. It is only used as a reference point in this configuration.<br> | |||
* '''459''' - PCI or Physical Cell Identity. PCI is necessary for a modem to communicate with a cell tower. This is one of the variables we will use when setting up cell locking.<br> | |||
* '''1850''' - LTE EARFCN stands for E-UTRA Absolute Radio Frequency Channel Number. This will be the second variable when setting up cell locking.<br> | |||
====Finding the neighbouring cells details==== | |||
---- | |||
To check the neighboring cells, that we can connect to, this command should be used:<br> | |||
<pre>gsmctl -A 'AT+CELLINFO=2'</pre> | |||
And the output should look like this: | |||
<pre> | |||
root@Teltonika-RUT955:~# gsmctl -A 'AT+CELLINFO=2' | |||
+CELLINFO: "intra","LTE",1850,451,-5,-72,-59,-,0,0,-,-,0,0,0,0,0,0,0,0,-2080444074,-2080444074 | |||
</pre> | |||
Here's an explanation of the first line for each value:<br> | |||
* '''LTE''' - network generation; | |||
* '''1850''' - EARFCN value. EARFCN is used to determine the channel frequency and bandwidth, thus it can be useful to determine the band of neighbouring cell. This can be achieved using [https://5g-tools.com/4g-lte-earfcn-calculator/ EARFCN calculator]; | |||
* '''451''' - PCI; | |||
* '''-5''' - RSRQ (dB); | |||
* '''-72''' - RSRP (dBm); | |||
* '''-59''' - Signal Strength - RSSI (dBm). | |||
The explanation for the last 3 measurements can be found on our [[Mobile_Signal_Strength_Recommendations|Mobile signal strength recommendations]] page. | |||
'''From these outputs, the most fitting cell should be picked, and its EARFCN and PCI value should be noted.''' | |||
====Setting the device to the airplane mode==== | |||
---- | ---- | ||
To set the device to the airplane mode, run this command: | |||
<pre>gsmctl -A 'AT+CFUN=0'</pre> | |||
'''This process may take up to one minute''', and when it's done, the modem will reply '''OK''' in the terminal. | |||
====Locking to a selected cell==== | |||
---- | |||
Once we pick out the cell that we prefer, we can execute this command, with <EARFCN> and <PCID> replaced with desired variables from the previous commands (< and > are not needed): | |||
<pre>gsmctl -A 'AT^CELLLOCK=<0-disable / 1-enable>,<2-WCDMA / 3-LTE>,1,<EARFCN>,<PCID>'</pre> | |||
So an example command would look like this: | |||
<pre>gsmctl -A 'AT^CELLLOCK=1,3,1,1850,451'</pre> | |||
Output from the command should be '''OK''', if it's not, please double-check the spelling. | Output from the command should be '''OK''', if it's not, please double-check the spelling. | ||
== | ====Disabling the airplane mode==== | ||
To verify that the cell change occurred, wait around 30 seconds and again run the command ''' | ---- | ||
To disable the airplane mode after the configuration is done, run this command: | |||
<pre>gsmctl -A 'AT+CFUN=1'</pre> | |||
'''It can take up to around 5 minutes''' for the modem to reconnect to the desired cell, thus the modem status should be monitored in the WebUI by navigating to Status → Network → Mobile until the '''Data connection state''' changes to '''Connected'''. | |||
==Results== | |||
To verify that the cell change occurred, wait around 30 seconds and again run the command from the '''Finding the serving cell details''' section. | |||
The output values for PCI and EARFCN should now match the ones used in the previous command. If not, please double check, that you have not set the same cell as the router was connected to before. | The output values for PCI and EARFCN should now match the ones used in the previous command. If not, please double check, that you have not set the same cell as the router was connected to before. | ||
''Note: After changing SIM card settings, please verify that the cell lock is still in place, as some settings could cause the cell lock to reset.'' | '''Note:''' ''After changing SIM card settings, please verify that the cell lock is still in place, as some settings could cause the cell lock to reset.'' | ||
Cell ID | Cell ID value can also be checked by going to ''Status → Network → Mobile'' in the router's WebUI: | ||
[[File: | [[File:Lock_device_to_a_mobile_cell_7.8_status.png|border|class=tlt-border]]<br> | ||
''Please keep in mind that Cell ID is displayed in its decimal form on WebUI.'' | ''Please keep in mind that Cell ID is displayed in its decimal form on WebUI.'' | ||
==Reverting to an automatic cell selection== | ==Reverting to an automatic cell selection== | ||
If you decide that this feature is no longer needed, it can always be reverted back to automatic cell selection. | If you decide that this feature is no longer needed, it can always be reverted back to automatic cell selection. | ||
First, let's set cell selection back to auto using this command:< | ===Quectel=== | ||
---- | |||
First, let's set cell selection back to auto using this command: | |||
<pre>gsmctl -A 'AT+QNWLOCK="common/lte",0'</pre> | |||
Then, we need to bring the device service mode back to Auto, by using this command:< | Then, we need to bring the device service mode back to Auto, by using this command: | ||
<pre>gsmctl -A 'AT+QCFG="NWSCANMODE",0,1'</pre> | |||
And that's it! Your router should be back to fully automatic mode. | |||
===Meig=== | |||
---- | |||
First, let's set cell selection back to auto using this command: | |||
<pre>gsmctl -A 'AT^CELLLOCK=0'</pre> | |||
Then, we need to bring the device service mode back to Auto, by using this command: | |||
<pre>gsmctl -A 'AT^SYSCFGEX="00"'</pre> | |||
And that's it! Your | And that's it! Your router should be back to fully automatic mode. | ||
== | ==See also/References== | ||
[https://www.opencellid.org/ OpenCellid] - database of cells and their locations;<br> | [https://www.opencellid.org/ OpenCellid] - database of cells and their locations;<br> | ||
[https://www.cellmapper.net/ CellMapper] - database of cells, their locations as well as EARFCN and PCI data;<br> | [https://www.cellmapper.net/ CellMapper] - database of cells, their locations as well as EARFCN and PCI data;<br> | ||
[[Category:Modem control]] |
Latest revision as of 11:00, 1 August 2024
Main Page > General Information > Configuration Examples > Modem control > Locking Devices to a Mobile CellThe information in this page is updated in accordance with 00.07.08 firmware version.
Introduction
IMPORTANT NOTE: This feature is not officially supported by the modem manufacturers or by Teltonika. It should not be used in mission-critical infrastructure or large fleets of devices. If you experience any issues, please disable this feature.
This article contains instructions on how to lock your Teltonika device to a specific cell. All mobile carrier cells are assigned a unique ID, which is broadcasted to all connected devices. It is usually irrelevant information for the end user, as cell switching on mobile phones and routers has become very good. But sometimes in remote areas, it is beneficial to lock the LTE router to a single cell, as automatic mode may choose a cell with fewer or slower bands. For now, only some devices support this feature.
Note: When the device is locked onto a single cell, it can still perform carrier aggregation (Cat 6 and higher modems only) with any other band/cell. The cell that you lock to will act as a primary band. The only way to circumvent this would be to also lock the router to a particular band.
Compatible modems
Not all modems support cell locking. To find out if your device is compatible, in your device WebUI, go to Status → System page. Under the Internal modem section, you'll see the Model row:
If the model starts with EG, EC (Quectel) or SLM (Meig), and not RG (5G devices), this feature should work. However to make sure it's supported, command gsmctl -A 'AT+QNWLOCK=?' (for Quectel modems) or gsmctl -A 'AT^CELLLOCK=?' (for Meig modems) should return these options when ran via SSH or CLI:
Quectel
root@Teltonika-RUTX11:~# gsmctl -A 'AT+QNWLOCK=?' +QNWLOCK: "common/4g",<num of cells>,[[<freq>,<pci>],...] +QNWLOCK: "common/lte"[,<action>[,<EARFCN>,<PCI>[,<status>]]]
Meig
root@Teltonika-RUT955:~# gsmctl -A 'AT^CELLLOCK=?' ^CELLLOCK: (0-1),("02","03"),(0-1),("arfcn"),("pci")
When to use cell locking
Let's say you're setting up RUTX14, which supports Carrier Aggregation of up to 3 bands, and you have two cell towers within a similar distance. Let's say Cell A transmits on bands 1, 7, and 20, while Cell B transmits on bands 3 and 20.
Since the signal from Cell B is a little stronger, the router will connect to two bands, and the bandwidth will be lower than using three bands. This means much lower speeds and reduced throughput.
If we lock the router into only using Cell A, we might get a little worse signal, but much better speeds due to using 3 bands at the same time.
Another use case could be to avoid overloaded cells. In some areas, even when the signal to a cell is great, speeds can be disappointing. This can be caused by lacking carrier infrastructure and overloaded cell towers. In this case, cell locking could be useful to connect to a cell tower with a worse signal, yet achieve better speeds.
Note: It is always recommended to use Band Lock and only resort to Cell locking if Band Lock does not resolve the issue.
Configuration
While we do not support this function via our WebUI just yet, it can quite easily be done using AT commands. AT commands are the "native language" for mobile modems, which the router uses to communicate with the modem.
A few notes before we get started:
- The described method works with Teltonika RUT/RUTX/TCR/TRB series devices, that contain Quectel modems;
- Using this command will lock the device into LTE-only mode;
- Rebooting the device might remove the cell lock on Quectel modems;
- It is not recommended to perform these actions while the device is connected remotely as if it loses connection, it will not be recoverable!
Quectel
Configuring LTE-only mode
To start, we'll set the router to LTE-only mode, by using the command:
gsmctl -A 'AT+QCFG="NWSCANMODE",3,1'
Where:
- 3 - LTE-only mode;
- 1 - Take effect immediately after executing the command.
The gsmctl module is responsible for communication with the modem using AT commands. By using the argument -A we can directly send the AT commands to the modem.
This may cause the router to lose connection for a few seconds, so before continuing to the next step, please make sure the router is connected to the network.
Note: Do not use WebUI to change this setting. It has to be done via AT commands.
Finding the serving cell details
To know if our changes will have any effect, we'll check the current cell we're connected to, by using a command:
gsmctl -A 'AT+QENG="SERVINGCELL"'
The output should look something like this:
root@Teltonika-RUTX11:~# gsmctl -A 'AT+QENG="SERVINGCELL"' +QENG: "servingcell","NOCONN","LTE","FDD",246,02,139B15,459,1850,3,5,5,90,-74,-4,-50,20,0,-32768,-
We're mostly interested only in the highlighted parts:
- 139B15 - currently serving cell ID in hexadecimal form. This ID is unique to each cell. It is only used as a reference point in this configuration.
- 459 - PCI or Physical Cell Identity. PCI is necessary for a modem to communicate with a cell tower. This is one of the variables we will use when setting up cell locking.
- 1850 - LTE EARFCN stands for E-UTRA Absolute Radio Frequency Channel Number. This will be the second variable when setting up cell locking.
Finding the neighbouring cells details
To check the neighboring cells, that we can connect to, this command should be used:
gsmctl -A 'AT+QENG="NEIGHBOURCELL"'
And the output should look like this:
root@Teltonika-RUTX11:~# gsmctl -A 'AT+QENG="NEIGHBOURCELL"' +QENG: "neighbourcell intra","LTE",1850,459,-6,-71,-43,0,-,-,-,-,- +QENG: "neighbourcell intra","LTE",1850,451,-20,-96,-63,0,-,-,-,-,-
Here's an explanation of the first line for each value:
- LTE - network generation;
- 1850 - EARFCN value. EARFCN is used to determine the channel frequency and bandwidth, thus it can be useful to determine the band of neighbouring cell. This can be achieved using EARFCN calculator;
- 459 - PCI;
- -6 - RSRQ (dB);
- -71 - RSRP (dBm);
- -45 - Signal Strength - RSSI (dBm).
The explanation for the last 3 measurements can be found on our Mobile signal strength recommendations page. From these outputs, the most fitting cell should be picked, and its EARFCN and PCI value should be noted.
Locking to a selected cell
Once we pick out the cell that we prefer, we can execute this command, with <EARFCN> and <PCID> replaced with desired variables from the previous commands (< and > are not needed):
gsmctl -A 'AT+QNWLOCK="common/lte",2,<EARFCN>,<PCI>'
Output from the command should be OK, if it's not, please double-check the spelling.
Meig
Configuring LTE-only mode
To start, we'll set the router to LTE-only mode, by using the command:
gsmctl -A 'AT^SYSCFGEX="03"'
The gsmctl module is responsible for communication with the modem using AT commands. By using the argument -A we can directly send the AT commands to the modem.
This may cause the router to lose connection for a few seconds, so before continuing to the next step, please make sure the router is connected to the network.
Note: Do not use WebUI to change this setting. It has to be done via AT commands.
Finding the serving cell details
To know if our changes will have any effect, we'll check the current cell we're connected to, by using a command:
gsmctl -A 'AT+CELLINFO=1'
The output should look something like this:
root@Teltonika-RUT955:~# gsmctl -A 'AT+CELLINFO=1' +CELLINFO:LTE,FDD LTE,246,02,1284885,459,5019,21,144,3,100,1850,19850,-47,-77,-5,164,12,4,255,-,-,1,-,1,-,0,0,0
We're mostly interested only in the highlighted parts:
- 1284885 - currently serving cell ID. This ID is unique to each cell. It is only used as a reference point in this configuration.
- 459 - PCI or Physical Cell Identity. PCI is necessary for a modem to communicate with a cell tower. This is one of the variables we will use when setting up cell locking.
- 1850 - LTE EARFCN stands for E-UTRA Absolute Radio Frequency Channel Number. This will be the second variable when setting up cell locking.
Finding the neighbouring cells details
To check the neighboring cells, that we can connect to, this command should be used:
gsmctl -A 'AT+CELLINFO=2'
And the output should look like this:
root@Teltonika-RUT955:~# gsmctl -A 'AT+CELLINFO=2' +CELLINFO: "intra","LTE",1850,451,-5,-72,-59,-,0,0,-,-,0,0,0,0,0,0,0,0,-2080444074,-2080444074
Here's an explanation of the first line for each value:
- LTE - network generation;
- 1850 - EARFCN value. EARFCN is used to determine the channel frequency and bandwidth, thus it can be useful to determine the band of neighbouring cell. This can be achieved using EARFCN calculator;
- 451 - PCI;
- -5 - RSRQ (dB);
- -72 - RSRP (dBm);
- -59 - Signal Strength - RSSI (dBm).
The explanation for the last 3 measurements can be found on our Mobile signal strength recommendations page. From these outputs, the most fitting cell should be picked, and its EARFCN and PCI value should be noted.
Setting the device to the airplane mode
To set the device to the airplane mode, run this command:
gsmctl -A 'AT+CFUN=0'
This process may take up to one minute, and when it's done, the modem will reply OK in the terminal.
Locking to a selected cell
Once we pick out the cell that we prefer, we can execute this command, with <EARFCN> and <PCID> replaced with desired variables from the previous commands (< and > are not needed):
gsmctl -A 'AT^CELLLOCK=<0-disable / 1-enable>,<2-WCDMA / 3-LTE>,1,<EARFCN>,<PCID>'
So an example command would look like this:
gsmctl -A 'AT^CELLLOCK=1,3,1,1850,451'
Output from the command should be OK, if it's not, please double-check the spelling.
Disabling the airplane mode
To disable the airplane mode after the configuration is done, run this command:
gsmctl -A 'AT+CFUN=1'
It can take up to around 5 minutes for the modem to reconnect to the desired cell, thus the modem status should be monitored in the WebUI by navigating to Status → Network → Mobile until the Data connection state changes to Connected.
Results
To verify that the cell change occurred, wait around 30 seconds and again run the command from the Finding the serving cell details section. The output values for PCI and EARFCN should now match the ones used in the previous command. If not, please double check, that you have not set the same cell as the router was connected to before.
Note: After changing SIM card settings, please verify that the cell lock is still in place, as some settings could cause the cell lock to reset.
Cell ID value can also be checked by going to Status → Network → Mobile in the router's WebUI:
Please keep in mind that Cell ID is displayed in its decimal form on WebUI.
Reverting to an automatic cell selection
If you decide that this feature is no longer needed, it can always be reverted back to automatic cell selection.
Quectel
First, let's set cell selection back to auto using this command:
gsmctl -A 'AT+QNWLOCK="common/lte",0'
Then, we need to bring the device service mode back to Auto, by using this command:
gsmctl -A 'AT+QCFG="NWSCANMODE",0,1'
And that's it! Your router should be back to fully automatic mode.
Meig
First, let's set cell selection back to auto using this command:
gsmctl -A 'AT^CELLLOCK=0'
Then, we need to bring the device service mode back to Auto, by using this command:
gsmctl -A 'AT^SYSCFGEX="00"'
And that's it! Your router should be back to fully automatic mode.
See also/References
OpenCellid - database of cells and their locations;
CellMapper - database of cells, their locations as well as EARFCN and PCI data;