Skip to content

AT Command Test

Timothy Woo edited this page Apr 10, 2018 · 3 revisions

You can also freely play with AT commands with the example sketch named "AT_Command_Test.ino". This sketch allows you to enter AT commands into the serial monitor and is great for seeing the module's responses to different commands!

NOTE: Perhaps an easier method (for Windows users) is to install the Windows drivers detailed in this section and test AT commands by using the shield's micro USB port instead!

When using this sketch make sure the line "fona.begin(115200);" in setup() has the correct baud rate, otherwise you can't talk to the module to begin with! 115200 is the default so chance are it will work, and if you don't remember if you changed the baud rate try 4800.

  • Make sure you have "No line ending" select at the bottom of the serial monitor
  • The module should turn on by itself, but if you need it later you can type "ON" and press Enter. Do this if the module was off because you can't communicate with it otherwise! Note that for the SIM7500 it can take about 13s before the PWR LED actually turns on after the PWRKEY pin is pulsed low.
  • Test an AT command by entering "AT". You should receive an "OK" from the module. Then try something like "ATI" to get the module identification number.
  • To turn off the module, type "OFF"
  • To reset the module, press "RESET"
  • In case you do anything super funky, type "FACTORY" to factory reset the module to start from scratch! Please note that this might reset the baud rate to 115200.
  • To change the baud rate, type "BAUD" where is the baud rate. For example, if you want to switch to 4800 baud, enter "BAUD4800" and you should see it enter an AT command.
  • You can check the network registration with "AT+CREG?". What you want to see is "+CREG: 0,1"
  • Next type "AT+CPSI?" to see the network you're connected to. It should be either LTE CAT-M1 or LTE CAT-NB! If it's connected to either of these, you're good to go!
  • Have fun playing around with the AT commands! For detailed descriptions on each AT command, view the AT command manual. If it makes things any easier, AT commands are not case sensitive!

When you type the commands it should look something like this (it should say SIM7500 of course, this is just an example):

The asterisks (***) indicate debug text and arrows (-->) indicate AT commands being sent to the module. Everything else is responses from the module.

Potentially Useful AT Commands

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.

Factory Reset

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.

Get Network Info

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.

Check network name

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.

Set GSM/LTE Preference

You can choose to use only GSM, only LTE, or both, or an automatic mode with the "AT+CNMP=" command.

Set Band Preference

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.

Check Network System Mode

It might be helpful to check the current system mode (GSM/EGPRS/LTE) using the "AT+CNSMOD?" command.