Discussion in "Embedded GSM Development" started by    praky    Feb 29, 2012.
Wed Feb 29 2012, 10:09 am
#1
Hi,
I am trying to send SMS on a SIM 900 module. but message doesn't get sent. I get the OK response but no +CMGS response. The message isn't recieved on other no.

I am using baud rate of 115200.

When I execute the code with SIM300 at a baud rate of 9600, the message gets sent successfully. Is there a "known" problem in SIM900 module as opposed to SIM300.

I also found this on internet:
http://www.edaboard.com/thread197080.html
Wed Feb 29 2012, 11:01 am
#2
The problem is solved. i found that I had to use some delay before sending message body. And the some more after sending CTRL Z


[ Edited Wed Feb 29 2012, 11:04 am ]
Wed Feb 29 2012, 05:15 pm
#3
@ praky
yes after sending
at+cmgs="xxxxx"
u has to wait of this response ">"
after this u has to send nsg
at the end send 0x1a (CTRL Z)
Fri Mar 02 2012, 07:36 am
#4
thanks, thats why the delay is working. And I think this was not case with sim300.

But why wasn't this mention in the SIM900 documentation?
Sun Mar 04 2012, 03:35 am
#5
sim900 is not as good as sim300
Sun Apr 28 2013, 09:01 pm
#6
mine is not working out,below are my code
ORG 0000H
MOV P1,#0FFH
MOV P2,#0FFH


STARTUP:
JNB P2.0,START
JMP STARTUP

START:
clr p1.0
call delay2
setb p1.0
call delay
MOV TMOD,#20H ;//TIMER 1, MODE 2
MOV TH1,#-3 ;//9600 BAUD RATE
MOV SCON,#50H ;//8 BIT, 1 STOP, EN ENABLED
SETB TR1
ACALL DELAY
ACALL DELAY
ACALL DELAY
MOV DPTR,#MSG1
ACALL H1
ACALL DELAY
MOV DPTR,#MSG2
ACALL H1
ACALL DELAY

MOV DPTR,#MSG3
ACALL H1
ACALL DELAY
MOV DPTR,#MSG4
ACALL H1
ACALL DELAY
CLR P1.0
CALL DELAY2
SETB P1.0
CALL DELAY2
CLR P1.0
CALL DELAY2
SETB P1.0
CALL DELAY2
CLR P1.0
CALL DELAY2
SETB P1.0
CALL DELAY2
CLR P1.0
CALL DELAY2
SETB P1.0
CALL DELAY2
AJMP STARTUP


H1: CLR A
MOVC A,@A+DPTR
JZ B1
ACALL SEND
INC DPTR
SJMP H1
B1:
RET
SEND: MOV SBUF,A
H2: JNB TI,H2
CLR TI
RET
DELAY: MOV R3,#50H
HERE2: MOV R4,#50H
HERE: DJNZ R4,HERE
DJNZ R3,HERE2
RET


DELAY2:
MOV R0,#8
MOV R1,#125
MOV R2,#50
MOTION: DJNZ R2,MOTION
DJNZ R1,MOTION
DJNZ R0,MOTION
RET





ORG 300H
MSG1: DB "AT",0DH
DB 0H
MSG2: DB "AT+CMGF=1",0DH
DB 0H

MSG3: DB "AT+CMGS=",'"+2348039309417"',0DH
DB 0H
MSG4: DB "CHECK",0x1A
DB 0H

END
pls can some one help me

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Robertrip
Fri Apr 26 2024, 11:20 am
ArnoldDiant
Fri Apr 26 2024, 03:53 am
RodneyKnorb
Thu Apr 25 2024, 07:08 pm
Williamjef
Thu Apr 25 2024, 02:08 pm
SamuelSmise
Thu Apr 25 2024, 09:56 am
DustinErele
Thu Apr 25 2024, 08:44 am
ztaletpzca
Wed Apr 24 2024, 11:19 pm
IrardlPex
Wed Apr 24 2024, 08:42 pm