thehapyone / BareBoneSim800

A BareBone Arduino Library For SIM800 Modules
GNU General Public License v3.0
47 stars 18 forks source link

[INFO] steps to active APN and data flow #2

Closed marabesi closed 6 years ago

marabesi commented 6 years ago

First of all, thank you VERY MUCH for this wonderful lib which I've learned a lot reading the source code.

My question is how did you manage to get the flows? For example, in the following code you had to execute a series of commands to get the locations working:

this->SoftwareSerial::print (F(" AT+SAPBR=3,1,\"CONTYPE\",\"GPRS\" \r\n" ));
    _buffer=_readSerial();  // set bearer parameter
    this->SoftwareSerial::print (F(" AT+SAPBR=3,1,\"APN\",\"internet\" \r\n" ));
    _buffer=_readSerial();  // set apn
    this->SoftwareSerial::print (F(" AT+SAPBR=1,1 \r\n"));
    delay(1200);
    _buffer=_readSerial();          // activate bearer context
    this->SoftwareSerial::print (F(" AT+SAPBR=2,1\r\n "));
    delay(3000);
    _buffer=_readSerial();      

First enable the GPRS, second setting the APN and so one, how did you know that?

I've found a PDF where I could understand better all the commands, but not the flows.

thehapyone commented 6 years ago

The flows are described in the device datasheet. I actually read it from the beginning to the end. For example, the commands for getting the location are described in the image attached. flow syntax flow syntax2

So yeah, that's how I got the flows working.

marabesi commented 6 years ago

Cool, just closed the issue since you gave me the answer :)

marabesi commented 6 years ago

Obs: I've added the pdf link for further reference