Closed KnightOfNih closed 3 years ago
hi please ask waveshare for help & support - we dont own that module! :)
Well shucks. Does your team have an example of using HTTP POST with a body attached? In theory, it should all work the same since you both use a SIM7070 (I would assume).
nope, we have never used a SIM7070, don't even own one!
Ok, thank you for the prompt responses. Sorry, was using a library built on top of yours! https://github.com/botletics/SIM7000-LTE-Shield
Arduino board: [Waveshare SIM7070G Cat-M/NB-IoT/GPRS HAT](SIM7070G Cat-M/NB-IoT/GPRS HAT)
Platform.io
Version: 1.55.0 Commit: c185983a683d14c396952dd432459097bc7f757f Date: 2021-03-30T16:01:05.981Z (1 wk ago) Electron: 11.3.0 Chrome: 87.0.4280.141 Node.js: 12.18.3 V8: 8.7.220.31-electron.0 OS: Darwin x64 18.7.0
Hello Gents,
First off, I'd like to give a very greatful thank you to the library writers for doing this. There's no way I would have gotten as far as I would have without this very helpful repo. Thank you.
Using the example sketches provided with the library to do an HTTP POST. A POST operation works (needed to add some delay commands for SIM7070) but when I add a body to the POST, the POST fails.
In particular, here are the commands to add the body post.
Here is the entire sketch below. This was modified slightly from the ESP32 example. Again, everything works perfectly when I comment out the "addBodyToPost" function.
This code gives me the output below:
ESP32 SIMCom Basic Test Initializing....(May take several seconds) Configuring to 9600 baud Attempting to open comm with ATs ---> AT <--- AT ---> AT <--- AT ---> ATE0 <--- ATE0 ---> ATE0 <--- OK ---> AT+GMR <--- Revision:1951B03SIM7070
OK
FONA is OK Found SIM7070 ---> AT+GSN <--- 869777041783823 Module IMEI: 869777041783823 ---> AT+CFUN=1 <--- OK ---> AT+CGDCONT=1,"IP","hologram" <--- OK ---> AT+CNMP=38 <--- OK ---> AT+CMNB=1 <--- OK ---> AT+CPSI? <--- +CPSI: LTE CAT-M1,Online,310-410,0x3A85,46161679,402,EUTRAN-BAND12,5110,3,3,-17,-80,-50,11 OK replyOK ---> AT+CNACT=0,1 <--- OK <--- +APP PDP: 0,ACTIVE ---> AT+CNACT? <--- +CNACT: 0,1,"10.155.118.146" ---> AT+SHCONF="URL","http://b225f0b114f9.ngrok.io" <--- OK ---> AT+SHCONF="BODYLEN",1024 <--- OK ---> AT+SHCONF="HEADERLEN",350 <--- OK ---> AT+SHCONN <--- OK ---> AT+SHSTATE? <--- +SHSTATE: 1 ---> AT+SHCHEAD <--- OK ---> AT+SHAHEAD="Content-Type","text/plain" <--- OK ---> AT+SHAHEAD="Host","b225f0b114f9.ngrok.io" <--- OK ---> AT+SHAHEAD="User-Agent","IOE Client" <--- OK ---> AT+SHBOD=4,10000 <--- > ---> foo <--- OK ---> AT+SHREQ="http://b225f0b114f9.ngrok.io",3 <--- OK Unable to get status ---> AT+SHDISC <--- AT+SHDISC
Any ideas on what's going wrong?
I've tried with and without headers. I've tried with varying SHBOD lengths (i.e. AT+SHBOD=3,... instead of AT_SHBOD=4). No luck.