Skip to content

cicchiello/WiFi101_FM0_WINC1500_19.6.1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Customized WiFi101 library for the Adafruit Feather M0+ WINC1500

GOAL: upgrade the ATWINC1500 (B version) from firmware version 19.4.4 to 19.6.1, and customize the WiFi101 library to expose the newly supported WPA2 Enterprise EAP (several flavors) authentication functionality.

HARDWARE: No extra hardware was required (just laptop, Feather M0+ WINC1500[1], and USB cable)

SOFTWARE: Arduino IDE (I’m using 1.6.9, newer should certainly also work)

The firmware binary is taken directly from Microchip’s Atmel Studio 7’s ASF package 3.42.0.1279 [2] [3]

The WiFi101 modifications are derived/ported, in an indirect lineage, from the following sources:

  1. Adafruit_WINC1500 0.9.1[4] (with some local customizations)

  2. WiFi101 0.15.2 [5]

  3. Microchip’s Atmel Studio 7’s ADF package 3.42.0.1279 (same as for the firmware)

Firmware Upgrade

The first challenge was to upgrade the ATWINC1500's firmware. In order to do this with the tools I had at hand, it meant using the Arduino WiFi101 Firmware Upgrade tools.

It looked like all that should be necessary is to use the standard WiFi101 FirmwareUpdater example sketch and the Arduino IDE FirmwareUpdater plugin[6] to upload the Microchip firmware binary[7].

Warning
Interestingly, the FirmwareUpdater-plugin repo contains a 19.6.1 directory with a firmware binary. I didn’t try to confirm that they are identical, though they quite likely are. I just used the Microchip binary.

To start, I first uploaded the CheckWiFi101FirmwareVersion sketch, and confirmed my device was indeed 19.4.4 and my Arduino library was expecting 19.4.4. So, first thing to do was find the #define that declares the required firmware version and change that to 19.6.1.

// in Adafruit_WINC1500.h
#define WIFI_FIRMWARE_REQUIRED "19.6.1"

A quick check with CheckWiFi101FirmwareVersion confirms that took. Now, on to the WiFi101 Firmware Updater plugin on the IDE’s Tools menu.

Unfortunately, I discovered that the plugin doesn’t properly recognize my particular hardware, so it wouldn’t offer an upgrade to 19.6.1, even after ensuring that it had a properly arranged 19.6.1 subdirectory. In fact, it didn’t offer any of the intermediate upgrades available, either. Since it didn’t recognize my hardware, it just defaulted to offering 19.4.4. To get past this without modifying the plugin itself, I simply placed the appropriate binary (19.6.1’s m2m_aio_3a0.bin) in the 19.4.4 subdirectory, and uploaded that. A quick check with the CheckWiFi101FirmwareVersion sketch confirmed success!

Host (Arduino) library porting

The Arduino library work started with the old Adafruit_WINC1500 library, as I had working code based on it. I proceeded to replace the several Atmel-derived driver directories with the same set of directories from the ASF package, then debugged until I had things working.

I then proceeded to get a copy of the latest WiFi101 and merged and forward-porting to that. For the most part, I’m left with code that you will find in either the WiFi101 0.15.2 or the driver libraries of the ASF package 3.42.0.1279. I believe this approximates the normal process of updating the WiFi101 library to a new or updated wifi hardware.

Warning
I cannot submit this to Arduino as an updated WiFi101 library, yet, as there is significant functionality that I cannot test.

Characterizing Changes

Most files are identical to either the analogous WiFi101 0.15.2 file, or the Microchip 16.9.1 driver file. Most of the places where there is some divergence involves earlier customizations of the WiFi101 driver files for the Arduino environment. Most of those customizations have been ported forward to the same 16.9.1 files.

Files changed a lot (perhaps more than necessary?):

  • src/driver/source/m2m_hif.c

  • src/driver/source/m2m_wifi.c

  • src/socket/source/socket.c

  • src/spi_flash/source/spi_flash.c

Testing

Warning
Relatively little testing has been done, so far!

The following Arduino sketches have been confirmed to work with these changes:

  • FirmwareUpdater

  • CheckWifi101FirmwareVersion

  • ConnectWithWPA

  • ConnectWithWPA2Enterprise (new; derived from ConnectWithWPA)

  • WiFiWebClient

  • WiFiSSLClient

Licenses

All source material has license information in the relevant references. All modifications I’ve made are licensed under the GNU Lesser General Public License.

Copyright (c) 2018 JFC Enterprises LLC. All right reserved.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA


2. ATWINC15x0 firmware release note
3. ASF 3.42.0.1279 download page
4. Adafruit’s original WiFi101 ATWINC1500 variant github repo
5. Arduino’s WiFi101 github repo
6. IDE FirmwareUpdater plugin github repo
7. named m2m_aio_3a0.bin, found deep in the ASF distro under a 19.6.1 directory

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published