C code for gsm interfacing with lpc2148

Status
Not open for further replies.

amanpreet001

Newbie level 4
Joined
Mar 19, 2015
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
44
Can anybody help me with the C code for interfacing GSM with LPC2148. I have previously worked on AVR. In need of a full C code as I am just a beginner in this..
 

dear aman if you are beginner then you directly moving gsm is not good idea. do on serial communication and other things then you move on. Please try something and ask help. here everybody are there to guide you not to provide ready made stuff
 

I have already done small programs like blinking LEDs etc but was having problem specifically in gsm and gps codes.
 

Attachments

  • gsmnew.txt
    3.2 KB · Views: 94

Please correct me where am i wrong in the gsm code
as it is not sending any data..
 

first u study what to send and recieve from GSM module.Which GSM Module are you using??
PHP:
PRODUCT NAME 	: GSM MODEM 
HARDWARE  	:  SIM 300 MODULE
COMMUNICATION 	: RS232
COMMANDS	: AT
INPUT VOLTAGE	: 12VDC / 1AMP   
*************************************************************************************************************************
ANTENNA  -  PULL THE ANTENNA OUT IF THE SIGNAL IS WEAK

HOW TO TEST!!!!

1. INSERT THE SIMCARD INTO SIM TRAY BACKSIDE 
2. CONNECT THE RS232 CABLE TO THE PC SERIAL PORT -  SERIAL PORT PROPERTIES ( RESTORE DEFAULTS - 9600 BAUD RATE)
3. OPEN HYPERTERMINAL FROM WINDOWS START>PROGRAMS>ACCESARIES>COMMUNICATIONS>HYPERTERMINAL
4. SELECT THE COMPORT WITH BAUD RATE 9600 
5. TYPE "AT " ECHO "OK" IF ECHO IS OK COMMUNICATION IS OK !!!!!!!!!+


6. CHECK THE LED STATUS ( NETWORK SERCHING , NETWORK CONNECTED, IS SHOWN IN LED STATUS GIVEN BELOW)
****************************************************************************************************************************
 Working state of network status indication LED OUTPUT

State SIM300 function

Off SIM300 is not running
64ms On/ 0.8SEC Off SIM300 does not find the network
64ms On/ 3 SEC Off SIM300 find the network
64ms On/ 300ms Off GPRS communication
*****************************************************************************************************************************

TO CHQ GAIN - AT+CSQ=?
TO CHK NETWORK - AT+COPS=?


Examples for send and receive SMS

For sending SMS in text Mode:

AT+CMGF=1 press enter
AT+CMGS=”mobile number” press enter
Once The AT commands is given’ >’ prompt will be displayed on the screen.
Type the message to sent via SMS. After this, press ctrl+Z to send the SMS.
If the SMS sending is successful, “ok” will be displayed along with the message number.


For reading SMS in the text mode:
AT+CMGF=1 Press enter
AT+CMGR= no.
Number (no.) is the message index number stored in the sim card. For new SMS, URC will be received
on the screen as +CMTI: SM ‘no’. Use this number in the AT+CMGR number to read the message.
Voice call
Initiating outgoing call:
ATD+ mobile number; press enter
For disconnecting the active call:
ATH press enter
For receiving incoming call:
ATA press enter



**************************************************USEFUL AT COMMANDS FOR SETTINGS *****************************************************************

TO CHANGE BAUDRATE  - AT+IPR=BAUDRATE(Ex 9600) 0-115200 For maore details refer AT commands Document page 33

TO SAVE THE SETTINGS AT&W

TO RESTORE FACTORY DEFAULTS TYPE AT&F THEN SAVE IT AT&W

***************************************************************************************************************************************
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…