cancel
Showing results for 
Search instead for 
Did you mean: 

WICED Studio Wi-Fi Combo

New Contributor II

Hey all, i'm having some really frustrating issues with OTA2. I want to integrate it into an existing project but i'm having trouble with just getting the stock example to work for me.

I've done all the reading, namely the WICED OTA2 Update Support document and the forum post (Over The Air update in CYW43907 ), and for a guide i've been following this post: OTA2 Update for SDK-3.7.0. I am able to follow everything up to step 5 where I am issuing the get_update command through the command interface. here is the exact command I use: <get_update 192.168.223.1:8080/OTA2_image_file.bin>

The resulting output is this:

0000 00:18:25.142 PLAYER_EVENT_GET_UPDATE !

0001 00:18:25.146 ota2_test_get_update() wiced_ota2_service_init() bg_service:0x52d090

Download the OTA Image file - get it NOW!

Joining : NETGEAR24

Successfully joined : NETGEAR24

0002 00:19:04.277 ota2_service_connect() wiced_tcp_connect() failed! 7014

0003 00:19:04.283 wiced_ota2_service_get_the_update() ota2_service_connect() failed!

0004 00:19:04.290 wiced_ota2_service_get_the_update() ota2_service_connect() failed (list)!

0005 00:19:04.298 OTA2: wiced_ota2_service_get_the_update() FAILED check if timers started!

0006 00:19:04.306 PLAYER_EVENT_STOP_TIMED_UPDATE called ota2_test_stop_timed_update()! 0

So i'm not sure whats really happening here - but i should say ive tried using my own file server I wrote in python as well as the mongoose server used in the example, both to no avail. Any ideas?

I also want to mention how I want to use this in case there someone can provide a stripped down version that might be easier understood/used by me. Basically I have a device that will ping a server every 10 minutes - the server will respond with some basic info, including a field that indicates whether an update is available. If one is, the device will connect to the update server and initiate a OTA2 update. I should also say that this process on the device will need to be completely autonomous, as once the device is deployed it cannot be accessed.

Appreciate the help!

0 Likes
Reply
1 Solution
Moderator
Moderator

Summarizing the answer:

The issue was with the port - Even though I supplied the port (8080) in the get_update command, the code was still trying using port 80.

>> In ota2_example the WICED_OTA2_HTTP_PORT is defined as 80. Change this port to 8080 in file

libraries\daemons\ota2_service\wiced_ota2_service.h

OTA2 image had some problems:

>> I was able to fix my second issue by uploading a new ota2_factory_download image

View solution in original post

0 Likes
Reply
10 Replies
Moderator
Moderator

Hello,

Does the red LED blink continuously before this error is thrown?

0 Likes
Reply
New Contributor II

Hi @riya:

The red led (LED_1) on the 43907 eval kit doesn't blink at all for me, it is consistently on for the whole process of startup, network connection, and get_update. What behavior should I be expecting?

0 Likes
Reply
Moderator
Moderator

It is expected to blink continuously after the get_update command is issued. Can you please enable the logs before giving get_update and post the log? Command to enable the log:

log 3

(4 or 5 will give even more details)

New Contributor II

Hi riya​: thanks for the suggestion, I should've looked at the source a little closer and found the log. This helped me isolate and fix the problem, and I was able to get it to work a few times.

The issue was with the port - Even though I supplied the port (8080) in the get_update command, the code was still trying using port 80. Is there a proper way to specify the port that I missed in the example?

I am now also running into another problem with the fail safe. On my last attempt at updating, the extraction of the new app failed - ill supply the log:

0714 00:04:51.467 Extract the OTA2 Image in the Staged Area NOW (will FAIL on Internal Flash systems)

Copy Current DCT to Saved DCT.

wiced_ota2_get_status(4) Download complete. Ready for extract.

extracting: APPS.bin

.

extracting: DCT.bin

.

extracting: snip.ota2_extract-CYW943907AEVA

...................

extracting: filesystem.bin

................................

extracting: snip.scan-CYW943907AEVAL1F.stri

......

0715 00:05:04.546 Reboot now to see change!

OTA2_Failsafe: Started ...

OTA2_Failsafe: Extract Staged

OTA2_Failsafe: Extract Factory Reset

OTA2_Failsafe Extraction Failed !!!

The problem is that after I tried to reload the ota2_example it just prints the last 4 lines about the OTA2 failsafe. I even tried loading a new project onto the board (which worked, it can run the new app just fine) and then reloading the ota2_example, but it just goes back to the extraction fail, like something in memory inst getting overwritten. What should I do about this?

I also have one more question which is probably the most important of the three - is there a way to reset the system via a software solution? In my application I wont have physical access to the board to hit a reset button. Are there any other options that can be used autonomously?

Thanks for the help.

0 Likes
Reply
New Contributor II

Hi riya​, I was able to fix my second issue by uploading a new ota2_factory_download image, so my only 2 questions are about the software reboots and the port issue. Sorry about that!

0 Likes
Reply
Moderator
Moderator

In ota2_example the WICED_OTA2_HTTP_PORT is defined as 80. Change this port to 8080 in file
libraries\daemons\ota2_service\wiced_ota2_service.h

New Contributor II

Awesome. So what about the reboot? I see there is a flag that can be set, how does the OTA2 system accomplish this?

0 Likes
Reply
New Contributor II

Reviving this to ask a follow up - is there an example of OTA2 with no command interface? I'm trying to port OTA2 over to my app, all it does it get_update when the ota subsystem is called. However, without the command interface it wont actually do the download.

0 Likes
Reply
Moderator
Moderator

If you dont have a provision to reboot your board manually, you can send it to hibernation after update and it should load the updated image on booting up

Moderator
Moderator

Summarizing the answer:

The issue was with the port - Even though I supplied the port (8080) in the get_update command, the code was still trying using port 80.

>> In ota2_example the WICED_OTA2_HTTP_PORT is defined as 80. Change this port to 8080 in file

libraries\daemons\ota2_service\wiced_ota2_service.h

OTA2 image had some problems:

>> I was able to fix my second issue by uploading a new ota2_factory_download image

View solution in original post

0 Likes
Reply