Discussion in "Embedded GSM Development" started by    usman1947    Feb 18, 2009.
Fri Mar 06 2009, 01:49 am
#21
anyone seen my code???
any problem with it???
we hv tried everything and i cant think of anything else. i will try to do serial comm. between atmega and hyperterminal to be sure...
thanks for help
Fri Mar 06 2009, 02:22 am
#22


To send ctrl+z we are sending ascii character with ascii value of 26. is it alright?

irfan abid


ctrl+z
Decimal code: 26
Hexadecimal code: 1A


we have tried both baudrates (115.2K & 9.6K) with same results.

irfan abid


I would advise you make sure which it is and stick to that figure.
Otherwise you may test at the wrong speed and get misled.
Use AT+IPR? to check the baud rate.



Fri Mar 06 2009, 02:28 am
#23
if you get IPR 0 it means modem is in autobaud mode so whatever baud u set in controller modem will work on it.

one suggestion would be try lesser baudrate 9.6 is better.
can i see your code again?
Fri Mar 06 2009, 03:50 am
#24
thx every one...
we've connected ATmega16L with hyperterminal...and we find out that it is overwritng every command on the first line...as we are not using endline command in our code..
now we(i and irfan) have added that command in our code lets see what happens... :-|
Fri Mar 06 2009, 12:11 pm
#25
as usman said, atmega is communicating correctly with hyperterminal...
i read somewhere that sim300cz sends its response in following way:

<CR><LF>*RESPONSE"<CR><LF>

FOR EXAMPLE, if atmega sends out:
AT<CR>

SIM300 will respond:
<CR><LF>OK<CR><LF>

i have changed my code to incorporate both CR & LF now. hope it should work now. havent tested yet.
i am attaching my code.
Attachment
Fri Mar 06 2009, 09:14 pm
#26
ok...we have tested new code...and it looks like that everything goes well except that sms doesnt get sent...we are using LEDs to check status as following:

sim300cz: Call Ready (first LED gets ON)

atmega: AT
Sim300cz: OK (2nd LED gets ON)

Atmega: AT+CMGS="+92........"
SIM300CZ: > (3rd LED gets ON)

ATmega: <atmega enters sms text to be sent followed by ascii 26>

at this point if the sms gets sent and sim300cz sends OK after that then 4th LED will be ON, which doesnt happen. so the problem might be in ctrl+z thing. or anything else in last step. any idea guyz????
Sat Mar 07 2009, 01:23 am
#27
Is your modem definitely in text mode rather than PDU mode ?
Can you post your latest code ?
Sat Mar 07 2009, 01:42 am
#28
I have already posted my latest code...its called sim300.zip
and sms format is definitely text. AT+CMGF? returns something like CMGF: 1
Sat Mar 07 2009, 08:00 pm
#29
It worked finally . I am posting my most recent code which worked. so far we tested it once. We will test it more today to see if it works consistently...
Sun Mar 08 2009, 12:15 am
#30
I think we are all very pleased to hear that

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

KevinTab
Sun Apr 28 2024, 05:35 am
Tumergix
Sun Apr 28 2024, 12:59 am
StevenDrulk
Sat Apr 27 2024, 08:47 pm
StephenHauct
Sat Apr 27 2024, 09:38 am
Adamsaf
Sat Apr 27 2024, 07:12 am
Robertphype
Sat Apr 27 2024, 12:23 am
ktaletrryp
Fri Apr 26 2024, 10:55 pm
Robertrip
Fri Apr 26 2024, 11:20 am