Feather M4 / ATWinc1500 Firmware Update Failure

For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
rmortimer
 
Posts: 2
Joined: Tue Jan 19, 2021 5:37 pm

Feather M4 / ATWinc1500 Firmware Update Failure

Post by rmortimer »

I have a Feather M4 Express wired up to a ATWinc1500 breakout board. Checking the firmware it suggesting updating - when I tried I got the "Error while erasing flash memory". The installed firmware was at 19.5.4 - so I decided to ignore updating the firmware (yes I did check the pins were configured). I could connect to my router, successfully execute the WiFiSSLClient sketch. I modified the sketch to go to my SSL website ... and it wouldn't connect. I could hit it on port 80 but not port 443. - as all non-SSL requests are redirected to https - this didn't help me. Next step was to update the SSL certs but this was blocked by a "error reading flash memory" on the firmware updater SSL cert update.

Bottom line, I'm between a rock and hard place with this. I have the latest IDE (1.8.19) and the latest WiFi101 (0.16.1). Any thoughts on how to fix this?

User avatar
rmortimer
 
Posts: 2
Joined: Tue Jan 19, 2021 5:37 pm

Re: Feather M4 / ATWinc1500 Firmware Update Failure

Post by rmortimer »

An update. I looked at where the failure was occurring in the wifi101 library - there seemed nothing that complex in the failing code so I suspected that the atsamd51 was sending commands too quickly for atwinc1500 flash operations. I plugged in a Feather M0 board and the SSL cert was added without issue. So unless I have something flaky with my Feather M4 Express board - the Feather M4 / ATWinc1500 combination doesn't look that viable if you need to add an SSL Cert which in most circumstances is going to be necessary.

So having got my cert (b.t.w this is an letsencrypt cert on my web server in the cloud) into the ATWinc1500 flash I discovered that though the ATwinc1500 firmware supported TLS 1.2 cipher methods, the wifi101 library did not. So for the case where the cert is uploaded but you still cannot connect to the https server this is most likely issue. The fix for this is to update WiFi101.cpp source file to enable the necessary TLS 1.2 cipher method. In my case, the change was:

m2m_ssl_set_active_ciphersuites(SSL_CIPHER_RSA_WITH_AES_128_CBC_SHA | SSL_CIPHER_RSA_WITH_AES_128_CBC_SHA256 | SSL_CIPHER_RSA_WITH_AES_128_GCM_SHA256 | SSL_CIPHER_RSA_WITH_AES_256_CBC_SHA | SSL_CIPHER_RSA_WITH_AES_256_CBC_SHA256 | SSL_CIPHER_DHE_RSA_WITH_AES_128_GCM_SHA256 );

This change was around line 317; cipher names are in the socket.h file.

After that, the test sketch using the Feather M4 Express worked.

Locked
Please be positive and constructive with your questions and comments.

Return to “Wireless: WiFi and Bluetooth”