I am working on the sim800C board, primarily on sending HTTP post requests.
As I understand from manual and samples online, the process of sending a post request with AT commands involves:
Configuring Bearers: open a bearer and set it up:
AT+SAPBR=3,1,"APN","CMNET";+SAPBR=1,1;
Do HTTPINIT and then set up parameters:
AT+HTTPINIT;+HTTPPARA="CID",1;+HTTPPARA="URL","example.url";+HTTPPARA="CONTENT","application/json";
Set request body size and timeout then input the data
AT+HTTPDATA=90,10000
{"test":"test-conent"}
Start post session and read response(if needed. In my case, I only care about status code)
AT+HTTPACTION=1
Terminate HTTP service and close bearer
AT+HTTPTERM
Close bearer
AT+SAPBR=0,1
My question is, are any of these steps reusable if I'm sending multiple post requests? Closing and re-opening the bearer over and over can be really time-consuming, compared with other settings steps.
I have tried using the same bearer for multiple requests but got 601 status code after the first one. Is there a workaround to reuse the same bearer but still make multiple posts wit it?
Found the answer myself after testing: step 2-5 are reusable.