
w w w . f u t - e l c t r o n i c s . c o m
void loop()
{
if (mySerial.available())
Serial.write(mySerial.read());
if (Serial.available())
mySerial.write(Serial.read());
}
Upload the sketch to the Arduino board.
Now all done to start use Arduino with either method
1. Using AT commands.
Open your favorite serial terminal software, choose the COM port for Arduino, set it to operate at
19200 8-N-1. I used” SSCOM “English edition.
Press and hold the power button a short while (Over 3 seconds) on the GPRS Shield to turn it on. Wait
half a minute for the GPRS Shield to connect to the network (Led Net will start blinking every 3
seconds or so). But there will not any information back in the monitor. If you want to see messages
from the shield in the serial monitor such as, you need disable auto-bauding mode, using
"AT+IPR=19200”. (Factory setting is AT+IPR=0 auto-bauding)
RDY
+CFUN: 1
+CPIN: READY
Call Ready
Now, type and send "AT" (without the quotes) followed by carriage return (enter key) to the Arduino board.
The GPRS Shield should respond by sending back an "OK". This would mean that you have been able to
successfully setup your GPRS Shield can now play around with various AT Commands. (If you are using the
readily available Serial Monitor in the Arduino IDE, you should set the line ending to "Carriage return" along
with a baud rate of 19200).
Sending a text message (SMS) –AT COMMAND
Install GSM shield in Arduino board and connect power cord.
Open your serial monitor program (I use SSCOM)
Through your serial terminal software, send AT+CMGF=1 and press the Enter key. The GPRS Shield can
send SMSes in two modes: Text mode and PDU (or binary) mode. Since we want to send out a human
readable message, we will select the text mode. The GPRS Shield will respond with an OK.
Send AT+CMGS="+XXXX6043032" and press the Enter key (include the quotes). This will instruct the
GPRS Shield to start accepting text for a new message meant for the phone number specified (replace
the number with the phone number of the target phone). The GPRS Shield will send a > signaling you
to start typing the message.
Komentáře k této Příručce