AT+HTTPCPOST response throws busy p.. SEND FAIL error after sending data

Kavya S
Posts: 6
Joined: Wed Jul 19, 2023 7:33 am

AT+HTTPCPOST response throws busy p.. SEND FAIL error after sending data

Postby Kavya S » Wed Jul 19, 2023 9:31 am

I am trying to use HTTPCPOST AT command in ESP32 WROVER to communicate with STM32H7 controller, On trying I could receive a response as OK followed by > , its same as you have mentioned in example provided in the website. But after sending the data which is application/json format data packet I am receiving response as busy p... SEND FAIL. I have tried with the same example provided in your website for HTTPCPOST as the same, the response is OK followed by > and busy p... SEND FAIL.
I had given the command as: AT+HTTPCPOST="http://httpbin.org/post",427,2,"connection: keep-alive","content-type: application/json"
for this I received OK followed by >.
But after sending the data {"headers": {"Accept": "application/json","Accept-Encoding": "gzip, deflate","Accept-Language": "en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7","Content-Length": "0","Host": "httpbin.org","Origin": "http://httpbin.org","Referer": "http://httpbin.org/","User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36","X-Amzn-Trace-Id": "Root=1-6150581e-1ad4bd5254b4bf5218070413"}} I received busy p... SEND FAIL. I have send the data using AT+CIPSEND command received the response as busy p... SEND FAIL and I have also tried to send the data after AT+HTTPCPOST command received the same response busy p... SEND FAIL.

I have tried an another method by sending the URL in AT+CIPSEND command first and sent the data next in the same AT+CIPSEND command, In this case I could receive the response from the server side the data I have provided but I throws the error as "Bad syntax error 400-".
Could you suggest the solution to fix this issue and what could the cause for this issue?

bidrohini
Posts: 202
Joined: Thu Oct 27, 2022 12:55 pm

Re: AT+HTTPCPOST response throws busy p.. SEND FAIL error after sending data

Postby bidrohini » Wed Jul 19, 2023 3:06 pm

In your AT+HTTPCPOST command, the "Content-Length" is set to "0," which means you are sending an empty payload. However, in the provided data, you have a JSON payload. The Content-Length should be set to the actual length of your JSON data, not "0."

Kavya S
Posts: 6
Joined: Wed Jul 19, 2023 7:33 am

Re: AT+HTTPCPOST response throws busy p.. SEND FAIL error after sending data

Postby Kavya S » Thu Jul 20, 2023 5:12 am

After changing the content length also, I am getting the same error busy p... SEND FAIL

Who is online

Users browsing this forum: No registered users and 46 guests