Https GET not able to download file
Join Date: 2 Aug 19
Posts: 62
Posted: Wed, 2021-03-10 05:45
Hello,
After connecting to aws server, we are not able to download files more than 7kb from AWS S3.
We are able to download all files from browser that are more than 7kb from aws S3 bucket.
Below is the output we are getting.
- Connected device to WLAN.
Net> dhcpv4c wlan1
Net>
Net: DHCPv4c: IP=192.168.3.26 Subnet Mask=255.255.255.0 Gateway=192.168.3.1
dnsc start
Net> sntpc start
cert get s3-ap-south-1-amazonaws-com.pem 192.168.3.120 -s ca -t pem_ca_list
Net: Successfully downloaded s3-ap-south-1-amazonaws-com.pem
Net: Successfully converted and stored CA list
Net: ca is stored in NV memory
Net> httpc start
Net> httpc new -s -c ca
Net: HTTP client created. <client num> = 1
Net: secure rxbuf:1460 bodybuf:3000 headerbuf:2000 timeout:20000ms
Net> httpc conn 1 xxxxxx-xxxx-test.s3.ap-south-1.amazonaws.com 443
Net: conn to xxxxxx-xxxx-test.s3.ap-south-1.amazonaws.com:443 succeeded
httpc get 1 demo.elf
Net>
Net: Response code = 200, length = 0, state = 1
Net: Response code = 200, length = 1459, state = 1
Net: Response code = 200, length = 1459, state = 1
Net: Response code = 200, length = 1459, state = 1
Net: Response code = 200, length = 1459 ,state = 1
Net: Response code = 200, length = 1459, state = 1
Net: Response code = 200, length = 503, state = 1
Net: Response code = 200, length = 0, state = -8
-8 state error is QAPI_NET_HTTPC_RX_ERROR_SERVER_CLOSED. How to resolve it?
demo.elf file size is 1100Kb and it downloades only 1.6kb (1654 bytes).
We have increased rx buffer size as well, what are we missing here?
Thank you,
Akshaay
Any help or suggestion will be appreciated .
Can you try to download file locally from ssl server to check the issue with QCA4020 ?
Also, check the sniffer if you are seeing any TCP RST packets with alert 21 from Server.
However, can you help to set "net profile set 1" before http connection and downloading the file to check if this resolves.
Assuming you are using the latest release.
Hi,
Tried the solution to set "net profile set 1" before http connection, but its still not working.
Can you test it at your side by using GET request to download a file from aws s3 bucket.
If it is successful pleaase share the command here.
NOTE: Same file with same certificate is been able to download from my ESP32 device.
Thank you,
Regards,
Akshaay