OTA from AWS via HTTP

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
BiM_4640481
Level 4
Level 4
25 replies posted 25 sign-ins 10 replies posted

Hi,

I am using Toshiba NAND flash with CY8CKIT-062S2-43012. I am using this flash for OTA using HTTP with the sample application "AnyCloud_OTA_Using_HTTPS". OTA is successful with the local mongoose server as mentioned in the application.

Now instead of local mongoose server my requirement is to use AWS. I have placed the bin file and ota_update.json job document in a bucket in S3 AWS and these files are made public. I want to download these via HTTP.  Can you please guide me how to implement this.?

I modified the HTTP_SERVER (bucket_name.s3.amazonaws.com) and HTTP_SERVER_PORT (changed to 80) in file ota_app_config.h

Can you please guide me on this?

 

Thanks,

Binsy M S

0 Likes
1 Solution

Hi Dheeraj,

Thanks for the document. 

While waiting for your reply, I tried with same "AnyCloud_OTA_Using_HTTPS" example by changing port to 80 and server to AWS.  Initially I faced "HTTP parse header fail" as the field "Content-length" was not present in the initial 256 header bytes. So I modified the macro CY_OTA_HTTP_TYPICAL_HEADER_SIZE  from 256 to 512, so that the field 'Content-length' gets included in the downloaded header bytes. With these modifications OTA with AWS using HTTP is successful.

Thanks,

Binsy M S

View solution in original post

0 Likes
2 Replies
lock attach
Attachments are accessible only for community members.
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

Hello @BiM_4640481 ,

Please find the attached PDF that explains how you can go about the OTA process. The instructions are for a different kit, but it should be similar for your kit as well. Let me know if you have any queries. 

Regards,
Dheeraj

0 Likes

Hi Dheeraj,

Thanks for the document. 

While waiting for your reply, I tried with same "AnyCloud_OTA_Using_HTTPS" example by changing port to 80 and server to AWS.  Initially I faced "HTTP parse header fail" as the field "Content-length" was not present in the initial 256 header bytes. So I modified the macro CY_OTA_HTTP_TYPICAL_HEADER_SIZE  from 256 to 512, so that the field 'Content-length' gets included in the downloaded header bytes. With these modifications OTA with AWS using HTTP is successful.

Thanks,

Binsy M S

0 Likes