-
Notifications
You must be signed in to change notification settings - Fork 215
Testing AT Commands
You can freely play with AT commands by using the "S" command option in the LTE_Demo sketch. Simply type and send the AT commands from the serial monitor but make sure "Both NL & CR" is set at the bottom of your serial monitor! Note: ATE1 enables echo so that you will also see what you typed in rather than just the response.
Below is an example of what it should look like. The "S" command was typed and entered at the top of the serial monitor to enter the serial tube mode, then the command "AT" was sent, and you can see the "OK" reply. Next, "AT+CREG?" was sent and you can also see the reply for that command. After that, echo was enabled with "ATE1":
To exit this mode simply press the reset button on your Arduino (or other microcontroller board). Note that on Leonardo/ATmega32u4 and ATSAMD21 boards you will have to restart the serial monitor for this to take effect.
NOTE: The AT commands using the serial tube become garbled up when debug serial is at 115200 baud rate but 9600 works well (default).
NOTE: Perhaps an easier method (for Windows users) is to install the Windows drivers detailed in the next section and test AT commands by using the shield's micro USB port instead!
You should always check the AT command manual for more info about the following AT commands! This is by no means a comprehensive list and I've just listed some potentially-useful ones. If you're having trouble getting connected to a network to begin with, please see this page
If you happen to do something super weird and can't remember the configuration it was in before, you can use the command "AT&F0" to factory reset the module and save yourself from impending doom.
You can see the "AT+CPSI?" to see some really cool info like the mode you're using (CAT-M1, NB-IoT, etc), as well as the cellular band and all sorts of other stuff. This is included in the "1" command in the LTE_Demo code.
With the "AT+COPS?" command you can check the name of the cell carrier and mode of operation. For my Hologram SIM card it was "Verizon Wireless Hologram". This is also included in the "1" command in the LTE_Demo code.
To view the list of network your module sees, use "AT+COPS=?" (note: this might take some time to run). This will bring up a list of networks and their network codes. You can then connect to a network manually.
You can choose to use only GSM, only LTE, or both, or an automatic mode with the "AT+CNMP=" command.
You can choose to set the preferred mode of operation to LTE CAT-M only, NB-IoT only, or both CAT-M and NB-IoT with the "AT+CMNB=" command
You probably won't have to use this, but for power users you can customize the band preference with the "AT+CNBP=,<lte_mode>" command.
You can also lock in the operating bands of the module with "AT+CBANDCFG" command.
It might be helpful to check the current system mode (GSM/EGPRS/CAT-M1/NB-IoT) using the "AT+CNSMOD?" command.
Use "AT+CGMR" to check the firmware version. "B01" is the first version.