• AVR Freaks

Hot!WINC1500 Host Firmware OTA Update

Author
el_pinguino
New Member
  • Total Posts : 6
  • Reward points : 0
  • Joined: 2014/12/16 15:13:01
  • Location: 0
  • Status: offline
2019/06/27 11:28:49 (permalink)
0

WINC1500 Host Firmware OTA Update

Hi All,
 
I am trying to implement the OTA update of the SAMG55 application firmware via WINC1510.
 
Has anyone worked through the HOST_FIRMWARE_UPGRADE_OTA example in ASF?   
 
I have followed the app note DS50002806A "ATWINC1510 Host Image Download User Guide" published here: 
microchip.com/downloads/en/DeviceDoc/ATWINC1510-Host-Image-Download-User-Guide-DS50002806A.pdf
 
However, the CRC16 checksum fails.  Also, the image size reported was a lot smaller than my host binary file size.  
 
I found that the downloaded image was not my host binary, rather it is a dynamic HTML page (index?) that OpenSSL generates.  I printed the contents of SPI flash and you can see it in my terminal output below.
In fact, the behavior is the same whether or not the host binary is actually present on the OpenSSL server.
 
Does this mean my key/certificate failed?  
 
Thanks
 
-- WINC1500 Host Firmware Upgrade- Bootloader code --
-- SAMG55_XPLAINED_PRO --
-- Compiled: Jun 26 2019 16:14:14 --

Bootloader FW: Rev A
Read Info region ...
No New image found
Jump to Application Section

-- WINC1500 NEW Host Firmware upgrade example --
-- SAMG55_XPLAINED_PRO --
-- Compiled: Jun 26 2019 14:26:06 --
(APP)(INFO)Chip ID 1503a0
(APP)(INFO)DriverVerInfo: 0x13301361
(APP)(INFO)Firmware ver : 19.6.1 Svnrev 16761
(APP)(INFO)Firmware Build May 23 2018 Time 14:39:16
(APP)(INFO)Firmware Min driver ver : 19.3.0
(APP)(INFO)Driver ver: 19.6.1
(APP)(INFO)Driver built at Jun 26 2019 14:26:01

Application FW: Rev A
Wi-Fi connected
Wi-Fi IP is 192.168.1.5
(APP)(INFO)GetHostFile - URL: https://10.8.100.98:4443/host_mcu_ota.bin, urlSize: 42
(APP)(INFO)Generated HostFileHandlerID is 28
HostFileGetCallback Success: u8Handler=28
flash: init done
Write info area ...
Write info area done
ÿ-- WINC1500 Host Firmware Upgrade- Bootloader code --
-- SAMG55_XPLAINED_PRO --
-- Compiled: Jun 26 2019 16:14:14 --

Bootloader FW: Rev A
Read Info region ...
Boot Trigger is Set
Firmware length in regions: 3924
(APP)(INFO)Chip ID 1503a0
Page size: 512
<HTML><BODY BGCOLOR="#ffffff">
<pre>

s_server -key key_filtr.pem -cert cert_filtr.pem -accept 4443 -www
Secure Renegotiation IS NOT supported
Ciphers supported in s_server binary
TLSv1.3 :TLS_AES_256_GCM_SHA384 TLSv1.3 :TLS_CHACHA20_POLY1305_SHA256
TLSv1.3 :TLS_AES_128_GCM_SHA256 TLSv1.2 :ECDHE-ECDSA-AES256-GCM-SHA384
TLSv1.2 :ECDHE-RSA-AES256-GCM-SHA384 TLSv1.2 :DHE-RSA-AES256-GCM-SHA384
TLSv1.2 :ECDHE-ECDSA-CHACHA20-POLY1305 TLSv1.2 :ECDHE-RSA-CHACHA20-POLY1305
TLSv1.2
Page size: 512
:DHE-RSA-CHACHA20-POLY1305 TLSv1.2 :ECDHE-ECDSA-AES128-GCM-SHA256
TLSv1.2 :ECDHE-RSA-AES128-GCM-SHA256 TLSv1.2 :DHE-RSA-AES128-GCM-SHA256
TLSv1.2 :ECDHE-ECDSA-AES256-SHA384 TLSv1.2 :ECDHE-RSA-AES256-SHA384
TLSv1.2 :DHE-RSA-AES256-SHA256 TLSv1.2 :ECDHE-ECDSA-AES128-SHA256
TLSv1.2 :ECDHE-RSA-AES128-SHA256 TLSv1.2 :DHE-RSA-AES128-SHA256
TLSv1.0 :ECDHE-ECDSA-AES256-SHA TLSv1.0 :ECDHE-RSA-AES256-SHA
SSLv3 :DHE-RSA-AES256-SHA TLSv1.0 :EC
Page size: 512
DHE-ECDSA-AES128-SHA
TLSv1.0 :ECDHE-RSA-AES128-SHA SSLv3 :DHE-RSA-AES128-SHA
TLSv1.2 :RSA-PSK-AES256-GCM-SHA384 TLSv1.2 :DHE-PSK-AES256-GCM-SHA384
TLSv1.2 :RSA-PSK-CHACHA20-POLY1305 TLSv1.2 :DHE-PSK-CHACHA20-POLY1305
TLSv1.2 :ECDHE-PSK-CHACHA20-POLY1305 TLSv1.2 :AES256-GCM-SHA384
TLSv1.2 :PSK-AES256-GCM-SHA384 TLSv1.2 :PSK-CHACHA20-POLY1305
TLSv1.2 :RSA-PSK-AES128-GCM-SHA256 TLSv1.2 :DHE-PSK-AES128-GCM-SHA256
TLSv1.2 :AES128-GCM-
Page size: 512
SHA256 TLSv1.2 :PSK-AES128-GCM-SHA256
TLSv1.2 :AES256-SHA256 TLSv1.2 :AES128-SHA256
TLSv1.0 :ECDHE-PSK-AES256-CBC-SHA384 TLSv1.0 :ECDHE-PSK-AES256-CBC-SHA
SSLv3 :SRP-RSA-AES-256-CBC-SHA SSLv3 :SRP-AES-256-CBC-SHA
TLSv1.0 :RSA-PSK-AES256-CBC-SHA384 TLSv1.0 :DHE-PSK-AES256-CBC-SHA384
SSLv3 :RSA-PSK-AES256-CBC-SHA SSLv3 :DHE-PSK-AES256-CBC-SHA
SSLv3 :AES256-SHA TLSv1.0 :PSK-AES256-CBC-SHA384
Page size: 512

SSLv3 :PSK-AES256-CBC-SHA TLSv1.0 :ECDHE-PSK-AES128-CBC-SHA256
TLSv1.0 :ECDHE-PSK-AES128-CBC-SHA SSLv3 :SRP-RSA-AES-128-CBC-SHA
SSLv3 :SRP-AES-128-CBC-SHA TLSv1.0 :RSA-PSK-AES128-CBC-SHA256
TLSv1.0 :DHE-PSK-AES128-CBC-SHA256 SSLv3 :RSA-PSK-AES128-CBC-SHA
SSLv3 :DHE-PSK-AES128-CBC-SHA SSLv3 :AES128-SHA
TLSv1.0 :PSK-AES128-CBC-SHA256 SSLv3 :PSK-AES128-CBC-SHA
---
Ciphers common between both SSL end po
Page size: 512
ints:
DHE-RSA-AES128-GCM-SHA256 AES128-GCM-SHA256 DHE-RSA-AES128-SHA256
DHE-RSA-AES128-SHA AES128-SHA256 AES128-SHA
Signature Algorithms: 0x01+0x01:RSA+SHA1:RSA+SHA224:RSA+SHA256:RSA+SHA384:RSA+SHA512
Shared Signature Algorithms: RSA+SHA1:RSA+SHA224:RSA+SHA256:RSA+SHA384:RSA+SHA512
---
No server certificate CA names sent
---
New, TLSv1.2, Cipher is DHE-RSA-AES128-GCM-SHA256
SSL-Session:
Protocol : TLSv1.2
Cipher : DHE-RSA-AES128-GCM-SHA256
Session-ID: 55AF
Page size: 512
664C6EF525D37BCC3D652B8107AF6F4870C50C3283DC66442BFD9EC0C5AF
Session-ID-ctx: 01000000
Master-Key: 96D186DBF6D9923D29EF4C1BE943DE08D7F8F69377EEC80560212D8B1EC2604BE2A460B68391FD074505B441176E0949
PSK identity: None
PSK identity hint: None
SRP username: None
Start Time: 1561591441
Timeout : 7200 (sec)
Verify return code: 0 (ok)
Extended master secret: no
---
29 items in the session cache
0 client connects (SSL_connect())
0 client renegotiates (SSL_connect())
0
Page size: 340
client connects that finished
36 server accepts (SSL_accept())
0 server renegotiates (SSL_accept())
31 server accepts that finished
2 session cache hits
0 session cache misses
0 session cache timeouts
0 callback cache hits
0 cache full overflows (128 allowed)
---
no client certificate available
</pre></BODY></HTML>

crc diff, crc_calc 59a6 <> crc_read a0d
Clear info area ...
Clear info area done
Jump to Application Section
ú-- WINC1500 NEW Host Firmware upgrade example --
-- SAMG55_XPLAINED_PRO --
-- Compiled: Jun 26 2019 14:26:06 --
(APP)(INFO)Chip ID 1503a0
(APP)(INFO)DriverVerInfo: 0x13301361
(APP)(INFO)Firmware ver : 19.6.1 Svnrev 16761
(APP)(INFO)Firmware Build May 23 2018 Time 14:39:16
(APP)(INFO)Firmware Min driver ver : 19.3.0
(APP)(INFO)Driver ver: 19.6.1
(APP)(INFO)Driver built at Jun 26 2019 14:26:01

Application FW: Rev A
Wi-Fi connected
Wi-Fi IP is 192.168.1.5
 
#1

3 Replies Related Threads

    el_pinguino
    New Member
    • Total Posts : 6
    • Reward points : 0
    • Joined: 2014/12/16 15:13:01
    • Location: 0
    • Status: offline
    Re: WINC1500 Host Firmware OTA Update 2019/07/09 16:15:36 (permalink)
    0
    FYI:
     
    The s_server flag does need to be -WWW, not -www.
     
     -www          Respond to a 'GET /' with a status page
     -WWW         Respond to a 'GET with the file ./path
    #2
    el_pinguino
    New Member
    • Total Posts : 6
    • Reward points : 0
    • Joined: 2014/12/16 15:13:01
    • Location: 0
    • Status: offline
    Re: WINC1500 Host Firmware OTA Update 2019/07/09 16:25:07 (permalink)
    0
    Now the server is sending the actual binary image, but only the first few hundred bytes.
    When I try to send plain text files of the same size, I do receive all of it.  Could there be something in the binary erroneously indicating end of file (EOF)? 
    #3
    el_pinguino
    New Member
    • Total Posts : 6
    • Reward points : 0
    • Joined: 2014/12/16 15:13:01
    • Location: 0
    • Status: offline
    Re: WINC1500 Host Firmware OTA Update 2019/07/17 10:23:08 (permalink)
    0
    This ASF example does not work with the latest release of OpenSSL because files requested by the client are opened in text mode - not binary mode.
    #4
    Jump to:
    © 2019 APG vNext Commercial Version 4.5