Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Need Help SIM900 with codevision (PART2)

Status
Not open for further replies.

odongkerz

Newbie level 6
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.:oops: 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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top