Closed grady34 closed 6 months ago
I just keep getting a 701 error code.
Hi @grady34 , Could you tell me details?
Hello @matsujirushi
WioLTE Wio;
void setup() { delay(200);
SerialUSB.begin(115200); SerialUSB.println(""); SerialUSB.println("--- START ---------------------------------------------------");
SerialUSB.println("### I/O Initialize."); Wio.Init();
SerialUSB.println("### Power supply ON."); Wio.PowerSupplyLTE(true); delay(500);
SerialUSB.println("### Turn on or reset."); if (!Wio.TurnOnOrReset()) { SerialUSB.println("### ERROR! ###"); return; }
SerialUSB.println("### Connecting to \""APN"\"."); if (!Wio.Activate(APN, USERNAME, PASSWORD)) { SerialUSB.println("### ERROR! ###"); return; }
SerialUSB.println("### Setup completed."); }
void loop() { char data[100]; int status; WioLTEHttpHeader header; header["Accept"] = "/"; header["User-Agent"] = "QUECTEL_MODULE"; header["Connection"] = "keep-alive"; header["Content-Type"] = "application/x-www-form-urlencoded"; header["Accept-Encoding"] = "gzip, deflate, br"; header["Authorization"] = "Bearer tokenremovedforprivacy";
SerialUSB.println("### Post."); sprintf(data, "lat=35.439247&lng=-97.601626&device_name=Test&marker_color=red", millis() / 1000); SerialUSB.print("Post:"); SerialUSB.print(data); SerialUSB.println(""); if (!Wio.HttpPost(WEBHOOK_URL, data, &status, header, 120000)) { //SerialUSB.print(Wio.HttpPost(WEBHOOK_URL, data, &status, header)); SerialUSB.println("### ERROR! ###");
goto err;
}
SerialUSB.print("Status:"); SerialUSB.println(status);
err: SerialUSB.println("### Wait."); delay(INTERVAL); }
ERROR! 1251
it seems like it is failing at this line of code in the WIOLTE.cpp file. Line 1253
if (!str.WriteFormat("AT+QHTTPPOST=%d,%d,%d", headerSb.Length() + strlen(data), timeoutSec, timeoutSec)) return RET_ERR(false, E_UNKNOWN);
From the information you have given us, all we know is that there is an error inside the Quectel EC21.
-> +CME ERROR: 701
701 is "HTTP unkown error". (-> HTTP(S) AT Commands Manual)
Okay. I will look into that. Thank you for your help!
Hello. I can not get the httppost to work when posting to a https host. It seems like the conversion is in the code, but I don't see any response errors. Can anyone help?