Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Overview

This short guide will help you understand how to troubleshoot issues/problems with the CAT-M/NB-IoT connection. A lot of information about the connection can be obtained using modem "AT" commands. By definition, "AT" means 'attention'. Each command string is prefixed with "AT", and a number of discrete commands can be concatenated after the "AT". 

Please check the examples below to better understand how to initiate those commands and what information can be obtained using them.

Initiating AT Commands

Option A

To send the command, you must use the CLI.

Open the terminal and type in the following:

note: Mobile network is managed by the ISP. If there are any issues with the connection, we advise contacting ISP beforehand and making sure that they support/allow the connection or the setting in the first place. If you decide to change the configuration with AT commands (without consulting with the ISP), you can do it at your own risk.

Initiating AT Commands

Option A

To send the command, you must use the CLI.

Open the terminal and type in the following:

Code Block
languageros
[admin@MikroTik] > system serial-terminal port=modem channel=2

...

In the example above, AT command "at+cpin?" is used and the answer "+CPIN: READY" is received.

Option B

The second way to send AT commands is through the ppp-client interface:

Code Block
languageros
[admin@MikroTik] > interface/ ppp-client/ at-chat input="AT+CPIN\?"
number: 0
  output: +CPIN: READY

You can get the same result as with Option A.

AT Commands

at

Simple at command checks communication between the module (device) and application.

...

When "OK" is returned, it means the module successfully responded.

at+cpin?

This command is used to check the status of the SIM card.

...

If you get the response "+CME ERROR: SIM not inserted" → double-check that the SIM card is properly installed in the SIM slot.

at+cfun?

The "CFUN" command is used to check the functional mode. There could be different responses to this command.

...

You can manually set the mode to full functionality with the command at+cfun=1.

at+cops?

The at+cops? command is used to check the current network connection.

...

The fourth part of the response represents the technology used. "8" stands for eMTC (CAT-M) and "9" for NB-IoT.

at+cops=?

The at+cops=? is used to get the list of all available ISPs. This commandcantake some time (up ~ 1 min) to display the results.

...

You can manually set up the ISP that you wish to connect to via the command at+cops=mode,format,"provider", where mode is the mode used (0→ automatic network selection, ; 1→ manual network selection), format is the ISP name format (0→ long alphanumeric format, ; 1→ short alphanumeric format, ; 2→ numeric format), and "provider" is the ISP name (in the format that was selected). For example, to manually select the network from the list, use the command at+cops=1,1,"LMT".

To select ISP automatically, use the command at+cops=0.

at+

...

creg?

at+creg? command is used to check the network's registration status.

note: This command will work only when the modem is already registered in the network.

The at+csq command returns received signal strength indication (RSSI) and channel bit error (BER) values.

Code Block
languageros
[Ctrl-A is the prefix key]           
   


at+csqcreg?
+csqCREG: 250,991

OK

The first value is RSSI (dBm):shows whether the network registration unsolicited result code is enabled or disabled (0→ disabled, 1→ enabled; 2→ enabled + location information). The second value shows circuit mode registration status (0→ not registered/the device is not searching for an operator to register to; 1→ registered/home network; 2→ not registered, but trying to search for an operator to register to; 3→ registration was denied; 4→ unknown; 5→ registered and roaming).

If you have more than 2 values returned, it means that network registration and location information unsolicited result code is enabled. The second value will show a two-byte location area code in hexadecimal format, the third value will show four-byte GERANE/E-UTRAN cell ID in hexadecimal format and the last value will show access technology of the serving cell ("8" for CAT-M and "9" for NB-IoT).

at+csq

The at+csq command returns received signal strength indication (RSSI) and channel bit error (BER) values. This command will return proper values only when the registration in the network is complete.

Code Block
languageros
[Ctrl-A is the prefix key]           


at+csq
+csq: 25,99

OK

The first value is RSSI (dBm):

ValueRSSI
0-113 dBm
ValueRSSI
0-113 dBm or less
1-111 dBm
2-30-109 to -53 dBm
31-51 dBm or greater
99not know/not detectable (network not found)

...

As per the example/output "+csq: 25,99", the result translates to RSSI~63 dBm and BER parameter not detectable.

at+qnwinfo

...

The command returns information about access technology, ISP and band selected. This command will return proper information only when the registration in the network is complete.

Code Block
languageros
[Ctrl-A is the prefix key]              


at+qnwinfo
+QNWINFO: "eMTC","24701","LTE BAND 20",6300

OK

As per the example above, you can see that the current module uses "eMTC" (CAT-M), ISP is "24701" (numeric format, which stands for "LMT"), LTE Band 20, and channel ID "6300".

at+qcsq

note: This command will work only when the modem is already registered in the network.

"6300".

at+qcsq

The command at+qcsq returns information about the signal strength of the current ISP connection and the technology used.

Code Block
languageros
[Ctrl-A is the prefix key]                 


at+qcsq
+QCSQ: "eMTC",-62,-87,111,-12

OK

...

As per the example above, RSSI=-62 dBm, RSRP=-87 dBm, SINR=111(111/5-20)~2 dB, RSRQ=-12 dB.

at+qcfg="iotopmode"?

...

The command is used to check which technology is used to connect to ISP. It is possible for the modem to work only in CAT-M mode, only in NB-IoT mode, or in both.

...

You can lock the SIM card to work only in the specific mode with the command at+qcfg="iotopmode",mode,effect, where mode is the mode (0→ only CAT-M, ; 1→ only NB-IoT, ; 2→ both), and effect is when to take effect (0→ to take effect after reboot, 1→ to take effect immediately).

at+qcfg="band"?

note: This command will work only when the modem is already registered in the network.

reboot; 1→ to take effect immediately).

To speed up network searching, it is suggested to execute the command at+cfun=0 (to turn off the radio) and then use the described command. After that, execute at+cfun=1,1 (to turn on the radio back and reset the module to take effect).

at+qcfg="band"?

This command is used to check which bands/frequencies are currently accepted.

...

Code Block
languageros
[Ctrl-A is the prefix key]     


at+qcfg="band",0x0,0x100002000000000f0e189f,0x10004200000000090e189f,1

OK,0x10004200000000090e189f,1

OK

To speed up network searching, it is suggested to execute the command at+cfun=0 (to turn off the radio) and then use the described command. After that, execute at+cfun=1,1 (to turn on the radio back and reset the module to take effect).

at+qgpscfg="priority",(0-1)

note: This command will work only when the modem is already registered in the network.

It is important to understand that data transfer over CAT-M/NB-IoT and GNSS can not work simultaneously (WWAN and GNSS Rx chains in the BG77 module share certain hardware blocks, meaning the module does not support concurrent operation of WWAN and GNSS.). That is why the at+qgpscfg="priority",(0-1) command was introduced.

...

When the device is in the GNSS priority mode, the GNSS positioning request succeeds in all WWAN states. If the device is in the RCC-connected state , it will release the RCC connection and initiates the GNSS session. After that, if there is WWAN data to be sent → RCC connection will be initiated again.