carrascoacd/ArduinoSIM800L

not working

ran-j opened this issue · 6 comments

ran-j commented

Im traing to send data to my server

`#include <Http.h>
int tes = 0;
int RX_PIN = 7;
int TX_PIN = 8;
int RST_PIN = 12;
HTTP http(9600, RX_PIN, TX_PIN, RST_PIN);
void setup() {
Serial.begin(9600);
Serial.println("Starting!");
}

void loop() {
if(tes==0){
tes = 1;
http.configureBearer("movistar.es");
http.connect();

char response[256];
Result result = http.post("www.rannet.com.br/test", "{\"date\":\"12345678\"}", response);

Serial.println(response);

http.disconnect();

}else{

}

}`

And the output is

`Starting!
AT

OK
AT+CREG?

+CREG: 0,4

OK
AT+CBC

+CBC: 0,0,3242

OK
AT+CSQ

+CSQ: 22,0

OK
AT+CREG?

+CREG: 0,0

OK
AT+CBC

+CBC: 0,0,3247

OK
AT+CSQ

+CSQ: 19,0

OK
AT+CREG?

+CREG: 0,0

OK
AT+CBC

+CBC: 0,0,3264

OK
AT+CSQ

+CSQ: 19,0

OK
AT+CREG?

+CREG: 0,0

OK
AT+CBC

+CBC: 0,0,3258

OK
AT+CSQ

+CSQ: 17,0

OK
AT+CREG?

+CREG: 0,0

OK
AT+CBC

+CBC: 0,0,3253

OK
AT+CSQ

+CSQ: 18,0

OK
AT+CREG?

+CREG: 0,0

OK
AT+CBC

+CBC: 0,0,3231

OK
AT+CSQ

+CSQ: 22,0

OK
AT+CREG?

+CREG: 0,0

OK
AT+CBC

+CBC: 0,0,3264

OK
AT+CSQ

+CSQ: 22,0

OK
AT+CREG?

+CREG: 0,0

OK
AT+CBC

+CBC: 0,0,3264

OK
AT+CSQ

+CSQ: 23,0

OK
AT+CREG?

+CREG: 0,0

OK
AT+CBC

+CBC: 0,0,3264

OK
AT+CSQ

+CSQ: 23,0

OK
`

ran-j commented

how do I do AT+CRE registration ?

ran-j commented

Right, now this :

`
AT+CREG?

+CREG: 0,2

OK
�⸮AT+CSQ

+CSQ: 0,0

OK
AT+CREG?

+CREG: 0,2

OK

Call Ready

SMS Ready
AT+CBC

+CBC: 0,0,3286

OK
AT+CSQ

+CSQ: 0,0

OK
�⸮AT+CBC

+CBC: 0,0,3209

OK
AT+CSQ

+CSQ: 0,0

OK

Call Ready

SMS Ready
AT+CREG?

+CREG: 0,2

OK
`

I think your device is restarting so you are reconnecting always, notice the � characters and the "Call Ready" output. Check the power supply as it could not be enough (should deliver at least 2A peak current if you are using sim800l).

ran-j commented

I made it, apparently dont work with DCcduino.

@ran-j I'm using a DCcduino uno also and it works perfectly. I had a similar problem and it was because the power supply for the SIM800L was not enough (it can't be connected directly to the arduino. It needs an independent LiPo battery)