SIM800 post request stop after a while

Hi,

I am desperate to get my SIM800L module (http://www.ebay.co.uk/itm/SIM800L-GPRS-GSM-Module-Board-Quadband-QUAD-BAND-Antenna-for-MCU-Arduino-/321992759287) sending POST requests for a long period of time… Sometimes it stops after 100 requests in a row, sometimes 300 so it’s really weird.

Everytime I run it, it sends the request for a while (between 1 and 3 hours) and suddenly stops on these AT commands:
—> AT+HTTPINIT
<—

OK
When it works the OK is on the same line and it goes on to the next AT command.
—> AT+HTTPTERM
<— ERROR
—> AT+HTTPINIT
<— OK
—> AT+HTTPPARA=“CID”
<— OK
—> AT+HTTPPARA=“UA”
<— OK
—> AT+HTTPPARA=“URL”
<— OK
—> AT+HTTPPARA=“CONTENT”
<— OK
—> AT+HTTPDATA=1221,10000
<— DOWNLOAD
<— OK
—> AT+HTTPACTION=1
<— OK
Status: 201
Len: 0
—> AT+HTTPREAD
<— OK
—> AT+HTTPTERM
<— OK

I thought it was a powering problem so I connected the module to the VIN pin of my arduino mega via a buck converter but the problem is still here!

Does anybody have any idea what could be wrong? I can send you the code if needed.

Many thanks in advance
Pauline

Does anybody have any idea what could be wrong?

Your code. Or your power supply.

I can send you the code if needed.

Well, duh.

I’ve attached the code. It’s an arduino mega that is receiving data via SRF (radio com) and sends the data to the cloud via the SIM800L module.

I power the board with a 12V jack power supply (1500mA max).

If you have an idea where the problem can come from let me know.
Cheers

Gateway.ino (2.57 KB)

GSMService.h (4.17 KB)

SdService.h (8.17 KB)

SRFService.h (3.27 KB)

Now I've tried with a 12V 4A power supply and the bug is still here so I think this is not a powering issue.