Solution is to reflash SIM900A with SIM900 software and it works like a charm.
Here is the page that shows the solution.
Flashing is no trickery, just a right sequence of operations, there is
detailed instruction for arduino-like approach, my way required just a
few major steps:
- Power up your SIM900A module to respond to AT commands in auto-baud
mode (AT+IPR=0). It means you must wire powerlines, do power-on
sequence with PWRKEY etc.
- Setup flashing tool — connect it to SIM900A, set default speed of
460800 baud, choose firmware to flash from unpacked RAR file, select
“don’t check file name” check-box and press “start download” button
to see “Power On/Reset Target” message.
- Short NRESET (pin 16) to GND for a moment. Right after it reboots
flashing tool will start pushing data.
- When flashing ends with “Download complete” power off SIM900A
module. Note that reset will not work, disconnect power line and
start power-on sequence once again.
- Voila! It works now as expected. PIN accepted, logged in to network
and test text message successfully sent to my smartphone.
Thanks everyone for helping out!
I solved the problem. :)
The problem was with Extra "Space" in header.
sprintf(DataToSend, "GET %s HTTP/1.1\r\n Host: %s\r\n\r\n", PATH, HOST);
I removed that space:
sprintf(DataToSend, "GET %s HTTP/1.1\r\nHost: %s\r\n\r\n", PATH, HOST);
and then problem get resolved.
here is the response from server:
HTTP/1.1 200 OK
Date: Fri, 19 Jun 2015 03:38:14 GMT
Server: Apache
X-Powered-By: PHP/5.4.34
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Last-Modified: Fri, 19 Jun 2015 03:38:14 GMT
Vary: Accept-Encoding,User-Agent
Content-Length: 87
Content-Type: text/plain
This is REQUEST Data
data1:value1
This is GET Data
data1:value1
This is POS
HTTP/1.1 200 OK
Date: Fri, 19 Jun 2015 03:38:14 GMT
Server: Apache
X-Powered-By: PHP/5.4.34
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Last-Modified: Fri, 19 Jun 2015 03:38:14 GMT
Vary: Accept-Encoding,User-Agent
Content-Length: 87
Content-Type: text/plain
This is REQUEST Data
data1:value1
This is GET Data
data1:value1
This is POS
T Data
Thanks guys.
Best Answer
AT+CSCB is to "Select Cell Broadcast SMS Messages" - not to get a location: (datasheet, p. 70)
What you can try is explained here. First send the Test Command,
AT+CSCB=?
. You should get a response with a list of supported modes. Then you can try the Read Command,AT+CSCB?
and you should get the current mode and so. At last you can try a Write Command,AT+CSCB=<mode>
with<mode>
one of the modes listed in the response to the Test Command. You can verify this change with the Read CommandAT+CSCB?
.When you do want a location, try what PeterJ says in the comments on the question: send a
AT+CENG=2
. This sets the engineering mode (whatever that may be) and replies with all kinds of network information. Refer to the datasheet for an exact list, but it would include:With the bsic, you can use this to find your location. Other return variables may be useful as well.