Espressif Cloud Server to Custom Server

Alexis
Posts: 5
Joined: Thu Jul 28, 2016 9:38 am

Espressif Cloud Server to Custom Server

Postby Alexis » Tue Nov 14, 2017 5:57 pm

Hi,

I'm developping a Firmware for a device based on the ESP8266 supporting the FOTA.
Until now, I was handling the FOTA through the Espressif Cloud Server but I would like to move to my Own Custom Server.

I've tried to simply replace the HTTP GET I'm doing on the Espressif Cloud Server by a HTTP GET on my Own Server, but it doesn't work.
I've also tried to Get the Size of the Firmware first to erase the flash sector (which I was doing directly when I was doing the GET and reading the Header with the Espressif Cloud Server) but it's doesn't work either.

So my question is about the Custom Server; is there anything specific to do there to allow the ESP8266 to download the Binary file ?
In the FOTA Guide, it is said: "The custom server must support the downloading function". Is there anything special to handle at this point ?

I've tested the Custom Server with Curl command and when I'm doing:
curl LINK_OF_THE_CUSTOM_SERVER/rom.bin"

It works exactly as when I'm doing:
curl -H "Authorization: token HERE_IS_THE_MASTER_DEVICE_KEY" 'https://iot.espressif.cn/v1/device/rom/?action=download_rom&version=v1.0&filename=rom.bin'


Anything I could miss on this part ?

Thanks,

Her Majesty
Posts: 202
Joined: Mon Oct 27, 2014 11:09 am

Re: Espressif Cloud Server to Custom Server

Postby Her Majesty » Tue Nov 14, 2017 10:23 pm

I think it needs your server to be a HTTP server.
Open your url "LINK_OF_THE_CUSTOM_SERVER/rom.bin" with a browser on your PC, can the rom.bin be downloaded on your PC?

Alexis
Posts: 5
Joined: Thu Jul 28, 2016 9:38 am

Re: Espressif Cloud Server to Custom Server

Postby Alexis » Wed Nov 15, 2017 9:42 am

Hello,

Yes the Server is a HTTP Server.
And yes if I open the URL directly in my browser, I can download the rom.bin on my computer.

So I'm not sure where the problem comes from:
- If I try to download the file on my Browser or with a CURL command from the Custom Server, it works.
- If I try to download the file on the ESP8266 from the Espressif Cloud Server, it works.
But if I try to download the file on the ESP8266 from the Custom Server it doesn't work anymore.

Isn't anything special to do on the Server to make it "downloadable" from the ESP8266 ?

Thanks,

Alexis
Posts: 5
Joined: Thu Jul 28, 2016 9:38 am

Re: Espressif Cloud Server to Custom Server

Postby Alexis » Mon Nov 20, 2017 11:21 am

Hello,

A little update on this issue:
- With my custom Server, I'm able to download a small file; but still not able to download the binary file I need for the OTA (285 KB),
- My custom Server is based in Europe and my Device is based in China.

Is it possible that the Connection is closed by the Server before I am able to download the entire file ?
Then, how the Server should be configured regarding timing considerations ?

Would it be possible to have Support Contact from Espressif Server ?
On the server website: http://iot.espressif.cn/#/api-en/#api-more-contact ; the Contact information is missing...

Thanks,

Alexis
Posts: 5
Joined: Thu Jul 28, 2016 9:38 am

Re: Espressif Cloud Server to Custom Server

Postby Alexis » Wed Dec 06, 2017 4:57 pm

I've investigated more on this issue and it seems that it's not possible to download the binary file from a Secure Server (using SSL).

Who is online

Users browsing this forum: No registered users and 2 guests