Fifth day, Wednesday
(11/07/2012)
Assalamualaikum and peace everyone who still follow
my blog. I’m gladly still health and can continue my work, so thankfully to my
god that give me healthy body. From my last task in previous day, my supervisor
has ordered to understand about AT command in GSM Modem. So today they have
given GSM Modem to me to try it out. 3 people are in charges and they are
Rahmah, Syuhada and included with myself. The tasks are sending SMS and receive
SMS. For the future task, we need to combined with programmable PIC to send the
information to the owner by SMS and owner can control the circuit by send SMS
back and the PIC will execute what been ordered by owner.
Before we go through more, there a theory that must
to know it. Global System for Mobile Communications (GSM) is a technology for
second generation (2G) digital cellular networks which is a replacement for
first generation (1G) analog cellular. It described a digital, circuit switched
network optimized for full duplex voice telephony. The modem is a device that
modulates an analog carrier signal to encode digital information and also
demodulates such a carrier signal to decode the transmitted information. Modem is
attached to computers for ‘dial-up’ to connect with other computer systems.
GSM modem is a specialized type of modem that
operates over subscription based wireless network which is similar to a mobile
phone. It accepts a SIM card and basically acts like a mobile phone for the
computer. Similar to modem operations except that it sends and receives data
through radio waves rather than a telephone line.
Sending SMS
1. Insert
the valid SIM card into the SIM slot.
2. Connect
the GSM Modem to the supplied AC-DC adapter and also to the serial port of the
PC.
3. Select
the correct COM Port in Hyper Terminal and set up the parameters as follows.
4. Power
on the GSM Modem and wait for it to initialize. While waiting, we can use the
following command to make sure we can communicate with the GSM Modem.
AT <ENTER>
|
The GSM Modem should
respond with “OK”.
5. Once
it’s ready, the following response will be received from the modem.
Call
Ready
|
6. Now
we can start sending the AT command to the GSM Modem. Start by configure the
modem to use Text Mode instead of PDU mode for the SMS. This mode allows us to
send SMS using AT commands without the need to encode the binary PDU field of
the SMS. Use the following command to put the modem in text mode and it should
respond with “OK”.
AT+CMGF=1<ENTER>
|
7. After
that, we can send the SMS message with the following command:-
AT+CMGF=”0135219644”
<ENTER>
|
Replace the above phone number with your own number. The
modem will respond with:-
>
|
>TEST
<CTRL+Z>
|
After few seconds, the modem will respond with the message
ID of the message, indicating that the message has been sent correctly.
+CMGS:
49
|
TEXT THAT RECEIVE FROM MOBILE PHONE
Receiving SMS
1.
Set up the GSM Modem following step 1 – 6 in the
previous section.
2.
Once the GSM Modem is ready, we can use a mobile phone
to send a SMS to the modem.
3.
The following response received from the modem indicates a new SMS is
received.
+CMTI:"SM",1
The last character indicates the memory index
number, we use this index to read or delete this message. In this case, the
index number is 1.
4.
To list out all the available SMS in the SIM card, we
can use the following command:
AT+CMGL="ALL"<ENTER>And the modem will respond with a list of SMS messages in the SIM card.
LIST SMS MESSAGE IN SIM CARD
PROBLEM STATEMENT
During the experiment we got a few problem such as:
- After select the correct COM Port in Hyper Terminal and set up the parameters, then we need to power on GSM modem. This activity should be repeated when to send or receive SMS. If we just let the modem power on, we can't get CALL READY. So, my opinion it harasses jobs to do.
- First experiment in sending SMS, we got an error occur like below:
it show that +CMS ERROR : 515. From the action has been taken, we try another laptop to test the GSM modem and try to change the SIM card. Finally, after a few laptop been test, we got to send SMS. After we analyze the problem, we need to push the <CTRL+Z> key many time so they will appear +CMGS: 49
From what we done today, we know the function of GSM Modem in sending and receive SMS. we also know to use the AT command for this operation.