sim300cz and atmega16L
Fri Mar 06 2009, 01:49 am
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
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
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
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?
one suggestion would be try lesser baudrate 9.6 is better.
can i see your code again?
Fri Mar 06 2009, 03:50 am
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... :-|
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
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.
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.
Fri Mar 06 2009, 09:14 pm
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????
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
Is your modem definitely in text mode rather than PDU mode ?
Can you post your latest code ?
Can you post your latest code ?
Sat Mar 07 2009, 01:42 am
I have already posted my latest code...its called sim300.zip
and sms format is definitely text. AT+CMGF? returns something like CMGF: 1
and sms format is definitely text. AT+CMGF? returns something like CMGF: 1
Sat Mar 07 2009, 08:00 pm
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...
Powered by e107 Forum System