Closed chindro closed 5 years ago
are you going to merge it?
I failed to run the sample, do you know the reason? See below,
Initializing ...
OK
Check if network is registered...
Start HTTP demonstration, yeah!
if something is failing you may want to debug, check sim900.h
Initializing ...
OK
Check if network is registered...
OK
opening bearer ...
failed
@chindro I found three reasons caused the failure,
@chindro This pull request is nice, I will merge it first, and modified some code.
so, you will fix these issues the next days?
* **httpSendGetRequest**, the url content should not contain header **http://**
this is working for me. What device are you using? I'm using SIM800L.
@chindro I'm using SIM900, it's ok for containing header http://. I saw that if this sample were failed and return false, AT+HTTPINIT can only be executed once unless AT+HTTPTERM were executed. The same situation for AT+SAPBR=1,1 and AT+SAPBR=0,1. I suggest before opening bearer we get bearer status then decide whether to open bearer or not. And before initializing http terminating http first.
these commits add functions that directly use the built-in HTTP functions of the SIM8/900 module, for now only HTTP GET is supported, maybe I will add POST in the future. Some of the commit messages are quite lengthy and provide some additional information.