I'm trying to get OTA to work for my application, but it's not working; After binary image finishes download and enters reboot, it cannot successfully boot up the device using the new image. Below is my application's log:
************************************************* CC3200 WIFI SWITCH Application VERSION 1.0.12-ota ************************************************* [NEW TASK EVENT] `PushButtonHandler` started... [NEW TASK EVENT] `WifiSwitchMode` started... [WATCHDOG EVENT] Watchdog started... [INFO] Host Driver Version: 1.0.1.6 [INFO] Build Version 2.6.0.5.31.1.4.0.1.1.0.3.34 [WLAN ERROR]Device disconnected from the AP AP: ,BSSID: 0:0:0:0:0:0 on an ERROR..!! [INFO] Device is configured in default state [INFO] Device started as STATION [INFO] Device id: f4b85ec87b49:1234567890 [INFO] Connection profile at index 0: [TEST] with priority 6 [INFO] Use AUTO & FAST policy with stored WIFI profile... [WLAN EVENT] STA Connected to the AP: TEST ,BSSID: 0:8e:f2:54:14:ee [NETAPP EVENT] IP Acquired: IP=192.168.1.65 , Gateway=192.168.1.254 [INFO] Connection established w/ AP and IP is aquired [INFO] Done setting time for device. [OTA] EXTLIB_OTA_GET_OPT_IS_PENDING_COMMIT? 0 [OTA] Starting OTA... [OTA] OTA run = 2 [OTA] Set OTA File for testing (return value 1) [OTA] NEW IMAGE DOWNLOAD COMPLETE [MCU] Rebooting, powering off network processor...
I'm not using Dropbox's API, instead, I am using Google App Engine and implemented the same request/response APIs as Dropbox's. From my logs, I can see the image was requests from my CC3200.
My RebootMCU() code is the same as the one found in the OTA SDK, and I've verified that it works. However, when used after the new image is set to be tested, the device will not boot up. If I press the hard reset button on the hardware, then the device will restart using the old image that was initially flashed as factory/default image.
I am lead to believe this is because the image that was downloaded is somehow corrupted and cannot be booted from. I have this guess also because after the device hangs from rebooting (like in the logs above), I use CCS to debug a similar image, then the log will say the image is successfully committed.
************************************************* CC3200 WIFI SWITCH Application VERSION 1.0.12-ota2 ************************************************* [NEW TASK EVENT] `PushButtonHandler` started... [NEW TASK EVENT] `WifiSwitchMode` started... [WATCHDOG EVENT] Watchdog started... [INFO] Host Driver Version: 1.0.1.6 [INFO] Build Version 2.6.0.5.31.1.4.0.1.1.0.3.34 [WLAN ERROR]Device disconnected from the AP AP: ,BSSID: 0:0:0:0:0:0 on an ERROR..!! [INFO] Device is configured in default state [INFO] Device started as STATION [INFO] Device id: f4b85ec87b49:1234567890 [INFO] Connection profile at index 0: [TEST] with priority 6 [INFO] Use AUTO & FAST policy with stored WIFI profile... [WLAN EVENT] STA Connected to the AP: TEST ,BSSID: 0:8e:f2:54:14:ee [NETAPP EVENT] IP Acquired: IP=192.168.1.65 , Gateway=192.168.1.254 [INFO] Connection established w/ AP and IP is aquired [INFO] Done setting time for device. [OTA] EXTLIB_OTA_GET_OPT_IS_PENDING_COMMIT? 1 [OTA] PENDING COMMIT & WLAN OK ==> PERFORM COMMIT [WSCLIENT] Connecting to: host=websocket.liuswitch.com port=443 path=/ [DNS] Got IP from DNS: [websocket.liuswitch.com] -> [IP=130.211.157.201] [WSCLIENT] Connected to: [websocket.liuswitch.com:443] [PROCESS] Got message with OPCODE: 1, HEADER_SIZE: 2, BODY_SIZE: 1 [PROCESS] Duration between messages from server: 0 seconds [PROCESS] New status: [0, 0, 0, 0, 0, 0, 0, 0]
Any ideas on why my device doesn't boot up correctly after OTA? If my guess is possible, is there a way for me to check if the downloaded image is OK and not corrupted?