Wednesday, June 10, 2009

AT Command for fun

What is AT Commands?

Computers use AT commands to communicate with modems. Most communications applications, however, have a user interface that hides the AT commands from the user. [1]

AT commands can be issued via a communications application. When the software in the Nokia product has received an AT command, it responds with a message that is displayed on the screen of the used device, which can also be the mobile phone. [1]


Some AT commands are not supported by all Nokia products or by all operators. Giving a command that is not supported by the product causes an error response. Some Nokia products do not necessarily support all command parameters and using the unsupported parameters causes an error response. [1]

Simple AT Command for fun ;)
Let's play a bit using your phone! I'm using my Nokia 6120 classic, connect it with bluetooth, open a Hyperterminal. Try to type the green command on your hyperterminal.
1. To call/dial, for example phone number 085612345678
ATD085612345678;
Note: Actually, the reference said to dial ATD085612345678 (without using the semicolon ; ) but somehow my cellphone always give me a "NO CARRIER" response.
So I tried to google, and.. Tadaaa…
Just add a simple semicolon (;) and it's working. I guess the previous one tried to dial using data mode, because when it dialed the number, I saw a "phone-with-letter-D" icon on the upper right corner.
2. To send sms to phone number 085612345678
AT+CMGF=1
OK
AT+CSCS=”GSM”
OK
AT+CMGS=”085612345678”
> Hello world
// end the message by press Ctrl+Z, and then "Enter"

The AT commands above are successfully tested.

Just try it..
This is a basic knowledge for making sms gateway. And, believe me, there are so much more to try! Now you can imagine.. There's a lot of applications that you can make using the AT Commands.
Happy coding!

References:
[1] FORUM NOKIA; AT Command Set For Nokia GSM And WCDMA Products, Version 1.2; July 1, 2005
[2] Charley Yang; SIM300 Software Application Note V2.0

No comments: