Hi everyone.:-D
I'm odong from indonesia. I'm sorry if my english is not good enough and i hope u get what i said. But let me know if i'm not to bad in english :sad:
i've problem with my thesis and i realy realy hopeless how to program sim900 with codevision. And i begging for your help.
Before i start, here's the situation
With this sim900, i want to sending a data which added to server's database. I've succes in php web things. And i have succes testing the modul and adding data(random numbers of latitude and longitude that i entered it self) in hyperterminal.
Here's this, the AT command and the response
Code:
AT
OK // the response from sim900
ATE0
OK // the response from sim900
AT+CGATT=1
OK // the response from sim900
AT+CSTT="telkomsel","wap","wap123" //it's just Cellular Network Provider things
OK // the response from sim900
AT+CIICR
OK // the response from sim900
AT+CIFSR
dinamic IP address from network provider // the response from sim900
AT+SAPBR=3,1,"CONTYPE","GPRS"
OK // the response from sim900
AT+SAPBR=3,1,"APN","telkomsel"
OK // the response from sim900
AT+SAPBR=1,1
OK // the response from sim900
AT+HTTPINIT
OK // the response from sim900
AT+HTTPPARA="CID",1
OK // the response from sim900
AT+HTTPPARA="URL","the url which will adding data to my database "
OK // the response from sim900
AT+HTTPACTION=0
OK // the response from sim900
+HTTPACTION:0,200,421 // the response from sim900. i forgot the correct value
When i check the database, the data have been added
Now, here's the problem. I'm using atmeda 128A and the compiler is codevision AVR.
I have try make this code;
Code:
whilel(1)
{ putsf("AT\r\n");
while(getchar()!='K'); // WAITING FOR 'OK'
putsf("ATE0\r\n");
while(getchar()!='K');
putsf("AT+CGATT=1\r\n");
while(getchar()!='K');;
putsf("AT+CSTT=\"telkomsel\",\"wap\",\"wap123\"\r\n");
while(getchar()!='K');
putsf("AT+CIICR\r\n");
while(getchar()!='K');
putsf("AT+CIFSR\r\n");
while(getchar()=='E');
putsf("AT+SAPBR=3,1,\"CONTYPE\",\"GPRS\"\r\n");
while(getchar()!='K');
putsf("AT+SAPBR=3,1,\"APN\",\"telkomsel\"\r\n");
while(getchar()!='K');
putsf("AT+SAPBR=1,1\r\n");
while(getchar()!='K');
putsf("AT+HTTPINIT\r\n");
while(getchar()!='K');
putsf("AT+HTTPPARA=\"CID\",1\r\n");
while(getchar()!='K');
putsf("AT+HTTPPARA=\"URL\",\"www.elektro-08.com/GPS/latitude_longitude.php?latitude=1234567890&longitude=9876543210\"\r\n");
while(getchar()!='K');
putsf("AT+HTTPACTION=0\r\n");
while(getchar()!='+'); // WAITING FOR '+'
}
I connected the rx(sim900) to tx(atmega128) and tx(sim900) to rx(atmega128) and the atmega128 connected to pc with serial to usb cable.
I checked the hyperterminal and the at command that atmega128 sending is correct.
But sometime the response is ERROR because the atmega128 stop sending caracter in hyperterminal screen.
I've try like put iff error then what, goto reload, while this then that,etc. And i don't know what else to do.
I confuse how to get and write it down on hyperterminal or somethingelse like lcd and if it "ERROR' then the program will re-transmited.
Please help me what should i do next guys
Thanks before