AT+ command for HTTP GET: Download file from http server

sidekick
Posts: 3
Joined: Fri Jun 19, 2015 3:11 pm

AT+ command for HTTP GET: Download file from http server

Postby sidekick » Fri Jun 19, 2015 3:40 pm

I'm a complete n00b to AT+ command, and have been struggling to download a file hosted on a website (say, file xyz.hex on abc.com, i.e. http://abc.com/xyz.hex). I've a custom board with SIM800H GSM/GPRS module on it. I wish to download the file and store it on on-board memory. I'm issuing following set of command:

Code: Select all

AT+HTTPINIT
AT+HTTPPARA=\"URL\",\"http://abc.com/xyz.hex"
AT+HTTPPARA=\"CID\",1
AT+HTTPACTION=0

wait for +HTTPACTION" response

After the last command, i'm assuming that I would get +HTTPACTION as the resposne, and the download should happen, bunt instead, i get error in connection. Please note that after every command, i'm waiting for about 500ms for 'OK' response

ESP_Faye
Posts: 1646
Joined: Mon Oct 27, 2014 11:08 am

Re: AT+ command for HTTP GET: Download file from http server

Postby ESP_Faye » Tue Jun 23, 2015 11:57 am

Hi,

It seems that you are not using the AT firmware provided from Espressif System. Our AT firmware didn't have the command "AT+HTTPXXX"

Our AT firmware is on BBS http://bbs.espressif.com/viewtopic.php?f=5&t=554

Here is an example of sending HTTP packet http://bbs.espressif.com/viewtopic.php?f=10&t=560

I'm not sure if it can help or not. sorry for the inconvenience.

sidekick
Posts: 3
Joined: Fri Jun 19, 2015 3:11 pm

Re: AT+ command for HTTP GET: Download file from http server

Postby sidekick » Thu May 12, 2016 5:32 am

My apologies for late response. Yes, I posted this issue assuming that ESP8266 also supports this command but as you've mentioned and also from the ESP8266, AT+ instruction set manual v0.25, it is clear that ESP8266 firmware does not support this command. OTOH. I was able to successfully download the firmware binary file (It was for OTA purposes) over GSM using SIMCOM's AT+ command sets. Since the file to be downloaded is bigger than the maximum stack size of my target MCU, I had to implement a buffering mechanism and primitive flow control (Glad that AT+ command set of SIMCOM's SIM800H allows one to specify offset and length in AT+HTTPREAD=<offset>,<len> while trying to download over HTTP)

Raphiki
Posts: 1
Joined: Mon Nov 07, 2016 11:18 pm

Re: AT+ command for HTTP GET: Download file from http server

Postby Raphiki » Mon Nov 07, 2016 11:55 pm

sidekick wrote:My apologies for late response. Yes, I posted this issue assuming that ESP8266 also supports this command but as you've mentioned and also from the ESP8266, AT+ instruction set manual v0.25, it is clear that ESP8266 firmware does not support this command. OTOH. I was able to successfully download the firmware binary file (It was for OTA purposes) over GSM using SIMCOM's AT+ command sets. Since the file to be downloaded is bigger than the maximum stack size of my target MCU, I had to implement a buffering mechanism and primitive flow control (Glad that AT+ command set of SIMCOM's SIM800H allows one to specify offset and length in AT+HTTPREAD=<offset>,<len> while trying to download over HTTP)


Hello !
I'm trying to do exactly what you have done with the SIMCOM's SIM800 (download a bin file trough the HTTP Application, and flash my MCU -ESP8266- by the way).
If you have the time, could you share some of your works here or by mail : raphael@42factory.com ?
It would be really nice of you

tilz0R
Posts: 38
Joined: Sat Dec 26, 2015 8:36 pm
Contact:

Re: AT+ command for HTTP GET: Download file from http server

Postby tilz0R » Mon Nov 21, 2016 9:54 pm


Who is online

Users browsing this forum: No registered users and 2 guests