Locking Devices to a Mobile Cell
Introduction
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, as it only really looks for the best signal. For now, only devices with Quectel modems support this feature.
Determining the modem manufacturer
In your RUTX_Routers WebUI, go to "Status" -> "System" page. Under the "Modem" section, you'll see the "Model" row. If the model starts with EG, RG, EC, and not SLM, this feature should work. However to make sure it's supported, command gsmctl -A 'AT+QNWLOCK=?' should not return ERROR, when ran via SSH or CLI. The response should look something like this:
When to use cell locking?
Let's say you're setting up RUTX14, which supports up to 3CA (Carrier aggregation) 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 single band 3 on Cell B as it does not support B3+B20 CA. 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.
Note: It is always recommended to use Band Lock and only resort to Cell locking if Band Lock does not resolve the issue.
Cell lock 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;
- It is not recommended to perform these actions while the device is connected remotely as if it loses connection, it will not be recoverable!
Setting the router to 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.
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.
Checking the current and neighboring cells
To know if our changes had 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:
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 - PCID/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. EARFCN is used to determine the channel frequency, but it will not be important to us in this configuration. This will be the second variable when setting up cell locking.
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:
Here's an explanation of the first line for each value:
- LTE - network generation;
- 1850 - EARFCN value;
- 459 - PCI;
- -3 - RSRQ (dB);
- -70 - RSRP (dBm);
- -47 - Signal Strength - RSSI (dBm).
The explanation for the last 3 measurements can be found on our Mobile signal strength recommendations page.
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>,<PCID>'
Output from the command should be OK, if it's not, please double-check the spelling.
Verifying the cell change
To verify that the cell change occurred, let again run the command gsmctl -A 'AT+QENG="SERVINGCELL"'
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.
Cell ID and signal strength values 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.
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 RUTX_Routers should be back to fully automatic mode.
External links
OpenCellid - database of cells and their locations;
CellMapper - database of cells, their locations as well as EARFCN and PCI data;