4G/LTE - AT Command





AT Command in Windows Power Shell


One thing on old Windows that I liked very much but not available on recent windows is HyperTerminal.  It was so usefull for automation with serial port e.g, AT Command. There are several alternatives you can use Putty, but somehow I don't feel much intimacy with this tool.

Luckily I found an handy alternative (at least to me) last night which comes out with Windows by default. It is a command line program called "PowerShell". It allows you to do a kind of programming like .NET framework directly in command line. I don't get any deeper into the programming aspect of PowerShell. You only need to know about 3~4 lines of syntax to use 'AT' command and I will just put down the list of frequently used AT command in the form of PowerShell command so that you can just copy and paste as you need.


I would start with the basic setup and small set of test, and keep extending the list as I get along.


< Basic Setup >


The basic usage is as shown below. I wouldn't explain too much on this and I think you can intuitively understand the meaning.


PS C:\> $port= new-Object System.IO.Ports.SerialPort COM19,9600,None,8,one // set COM port as you need

PS C:\> $port.open()  // Open the Serial Port

PS C:\> $port.WriteLine("Any AT Command `r")   // `r is the most important. I spent quite a while to figure this out.

PS C:\> $port.WriteLine("Any AT Command `r")   // (`) is the character called grave-accent. Which is on the same key

                                                                   // as '~' in my keyboard.


PS C:\> $port.Close()  // After you are done with AT command, I would suggest you to close it.



< Copy this and past it into PowerShell Window when you want to open a Serial Port >


Before you copy and past, modify COM port setting according to the device attached to the control PC.


$port= new-Object System.IO.Ports.SerialPort COM19,9600,None,8,one




< Power Cycle UE >




There are several different form of +CFUN and modify the command depending on your need. Also, this CFUN does not seems to automatically set Airplane Mode to be Off.  



< Answering the Voice Call >




This doesn't seem to work in case of VoLTE (PS Call).