[SOLVED] Need Help SIM900 with codevision (PART2)

Status
Not open for further replies.

odongkerz

Newbie level 6
Joined
May 8, 2013
Messages
11
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Location
Indonesia
www.odongkerz.blogspot.com
Activity points
1,374
Hi again. Please help me guys.
I found an error again. When i send AT+CSTT="telkomsel","wap","wap123" through hyperterminal, the response from modul GPRS is 'OK'.
But when i send AT+CSTT="telkomsel","wap","wap123" through ATMega128A, 'ERROR' response appeare in LCD 2x16 that i use.
And the compiler is codevision avr 2.05
Here's the code that i wrote
Code:
reload:
      putsf("AT\r");
      wait(); 
      ch[0]=getchar();ch[1]=getchar();
      show_lcd();
      if(ch[0]=='O' && ch[1]=='K')
      {
        wait();
        putsf("ATE0\r");
        wait();
        ch[0]=getchar();ch[1]=getchar();
        show_lcd();
        if(ch[0]=='O' && ch[1]=='K')
        {
          wait();
          putsf("AT+CGATT=1\r");
          wait();
          ch[0]=getchar();ch[1]=getchar();
          show_lcd();
          if(ch[0]=='O' && ch[1]=='K')
          {
            wait();
            putsf("AT+CSTT=\"telkomsel\",\"wap\",\"wap123\"\r");
            wait();
            ch[0]=getchar();ch[1]=getchar();
            show_lcd();
            while(1);
          }
          esle goto reload;
        }
        else goto reload;
      }
      else goto reload;
1. When atmega128A send AT, the response is 'OK' in LCD.
2.When atmega128A send ATE0, the response is 'OK' in LCD.
3.When atmega128A send AT+CGATT=1, the response is 'OK' in LCD.
4.When atmega128A send AT+CSTT="telkomsel","wap","wap123", the response is 'ER' in LCD. But i've try send it through hyperterminal and the response is 'OK'
Why the response is 'ERROR'?
putsf("AT+CSTT=\"telkomsel\",\"wap\",\"wap123\"\r"); when i check in hyperterminal, it's correctly wrote like AT+CSTT="telkomsel","wap","wap123"

Thanks anyway
 

Try this:

After getting "OK" response from AT+CGATT=1 command, make a 3 seconds delay,
then send AT+CSTT="telkomsel","wap","wap123" and wait for "OK" response
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…