Contact Info

Crumbtrail

ActiveXperts.com » Serial Port Component » Tutorials » Basics of Programming SMS

Basics of programming SMS using a cellular phone

SMS

Sending an SMS

How to send an SMS from a terminal type application:
AT+CMGF=1 Sets the terminal into text mode.
AT+CSMS=1 Sets phase 2+ Sim compatability.
AT+CNMI=2,2,0,1,1 Storage setup, read the Command set for more options.
AT+CSMP=49,167,0,0 Read destruction manual if you want to know why.
AT+CMGS=<destination cell number> Hit enter and wait for prompt.
<type message> and then <ctrl-Z> to send. 

Store and send from memory

Store an SMS in a specific memory location and then send it.
AT+CSMS=1 Sets phase 2+ Sim compatability.
AT+CNMI=2,2,0,1,1 Storage setup, read the Command set for more options.
AT+CMGW= <CR>Wait for the prompt, type in your message, and hit  <ctrl-Z>
The Terminal then returns the memory location number that the messgae has been stored in.
AT+CMSS= <memoy location number> ,<destination cell number> 

Cell information

Where am I?

Cell broadcast information for the nearest sell tower.
AT+CMGF=1 Sets the terminal into text mode.
AT+CSMS=1 Sets phase 2+ Sim compatability.
AT+CNMI=2,0,2,0,1 Storage setup, read the Command set for more options.
AT+CSCB=0,50,1 Tells you where you are in space and time.

Info on the 7 nearest cells

Cell information for the serving cell and 6 others.
AT^MONP Displays the above mentioned.

Auto answering

The below mentioned info has been tested on two of SA's cell networks, with almost the same 
results. Note that Siemens engines will only auto answer data calls not voice... but there are 
other ways. The Type of incomming call is identified by the network, not the terminal.

GSM to GSM (terminals)

ATS0=1 auto answer after one ring. Remember the calling terminal needs to dial ATD<cell number> 
only, no  ; , this indicades a voice call.
AT+CRC=1 identifies what the incomming call is, useful for debugging.

Land line to GSM (option 1)

The PSTN in SA only supports analog (voice) calls. To make a data call to a GSM handset or a 
Terminal you need data services enabled on the cell contract, with this the cell Network will 
supply you with a couple of extra numbers for your account, one of these is the data number. 
If you dial this number from a land line the cell network tells the handset or terminal that 
this is a data call.

Land line to GSM (option 2)
It is possible to tell the termnal to treat all incomming calls as data calls and therefore 
answer anything.
AT+CSNS=4 this tells the Terminal, if it rings, treat it as data.
ATS0=1 auto answer after one ring.
This only seems to works on one of SA's networks.

Locks

Get rid of pin number
Once you have booted up and entered the pin number the first time
Type AT+CLCK="SC",0,<pin number>
The next time you start up, you will not need the Pin.