Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.
/ WiFi101_Generic Public archive

Network driver for for SAMD21, SAMD51 boards using ATMEL WINC1500 module (used on Arduino/Genuino Wifi Shield 101 and MKR1000 boards). Modified from Arduino WiFi101 library. Now with fix of severe limitation to permit sending much larger data and be compatible with WebSockets2_Generic library

License

Notifications You must be signed in to change notification settings

khoih-prog/WiFi101_Generic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WiFi101_Generic library for boards using ATMEL WINC1500 WiFi

arduino-library-badge GitHub release GitHub contributions welcome GitHub issues



Table of Contents



Why do we need this WiFi101_Generic library

Features

This WiFi101_Generic library is a port and modification to add, as many as possible, the features to the following library

  1. WiFi101

for Arduino SAMD21, etc. boards using ATMEL WINC1500 WiFi module.


Currently supported Boards

This WiFi101_Generic library currently supports these following boards:

  1. SAMD21
  • Arduino SAMD21: MKRs, etc.
  1. SAMD51
  • Adafruit SAMD51 (M4): Metro M4, Grand Central M4, ItsyBitsy M4, Feather M4 Express, Trellis M4, Metro M4 AirLift Lite, MONSTER M4SK Express, Hallowing M4, etc.


Prerequisites

  1. Arduino IDE 1.8.19+ for Arduino. GitHub release
  2. Arduino SAMD core 1.8.13+ for SAMD ARM Cortex-M0+ boards. GitHub release
  3. Adafruit SAMD core 1.7.11+ for SAMD ARM Cortex-M0+ and M4 boards (Nano 33 IoT, etc.). GitHub release
  4. Seeeduino SAMD core 1.8.3+ for SAMD21/SAMD51 boards (XIAO M0, Wio Terminal, etc.). Latest release

Installation

Use Arduino Library Manager

The best and easiest way is to use Arduino Library Manager. Search for WiFi101_Generic, then select / install the latest version. You can also use this link arduino-library-badge for more detailed instructions.

Manual Install

  1. Navigate to WiFi101_Generic page.
  2. Download the latest release WiFi101_Generic-main.zip.
  3. Extract the zip file to WiFi101_Generic-main directory
  4. Copy the whole WiFi101_Generic-main folder to Arduino libraries' directory such as ~/Arduino/libraries/.

VS Code & PlatformIO:

  1. Install VS Code
  2. Install PlatformIO
  3. Install WiFi101_Generic library by using Library Manager. Search for WiFi101_Generic in Platform.io Author's Libraries
  4. Use included platformio.ini file from examples to ensure that all dependent libraries will installed automatically. Please visit documentation for the other options and examples at Project Configuration File


Packages' Patches

1. For Arduino SAMD boards

To be able to compile, run and automatically detect and display BOARD_NAME on Arduino SAMD (Nano-33-IoT, etc) boards, you have to copy the whole Arduino SAMD Packages_Patches directory into Arduino SAMD directory (~/.arduino15/packages/arduino/hardware/samd/1.8.13).

For core version v1.8.10+

Supposing the Arduino SAMD version is 1.8.13. Now only one file must be copied into the directory:

  • ~/.arduino15/packages/arduino/hardware/samd/1.8.13/platform.txt

Whenever a new version is installed, remember to copy this files into the new version directory. For example, new version is x.yy.zz

This file must be copied into the directory:

  • ~/.arduino15/packages/arduino/hardware/samd/x.yy.zz/platform.txt

For core version v1.8.9-

Supposing the Arduino SAMD version is 1.8.9. These files must be copied into the directory:

  • ~/.arduino15/packages/arduino/hardware/samd/1.8.9/platform.txt
  • ~/.arduino15/packages/arduino/hardware/samd/1.8.9/cores/arduino/Arduino.h

Whenever a new version is installed, remember to copy these files into the new version directory. For example, new version is x.yy.z

These files must be copied into the directory:

  • ~/.arduino15/packages/arduino/hardware/samd/x.yy.z/platform.txt
  • ~/.arduino15/packages/arduino/hardware/samd/x.yy.z/cores/arduino/Arduino.h

This is mandatory to fix the notorious Arduino SAMD compiler error. See Improve Arduino compatibility with the STL (min and max macro)

 ...\arm-none-eabi\include\c++\7.2.1\bits\stl_algobase.h:243:56: error: macro "min" passed 3 arguments, but takes just 2
     min(const _Tp& __a, const _Tp& __b, _Compare __comp)

Whenever the above-mentioned compiler error issue is fixed with the new Arduino SAMD release, you don't need to copy the Arduino.h file anymore.

2. For Adafruit SAMD boards

To be able to compile, run and automatically detect and display BOARD_NAME on Adafruit SAMD (Itsy-Bitsy M4, etc) boards, you have to copy the whole Adafruit SAMD Packages_Patches directory into Adafruit samd directory (~/.arduino15/packages/adafruit/hardware/samd/1.7.11).

Supposing the Adafruit SAMD core version is 1.7.11. These files must be copied into the directory:

  • ~/.arduino15/packages/adafruit/hardware/samd/1.7.11/platform.txt
  • ~/.arduino15/packages/adafruit/hardware/samd/1.7.11/cores/arduino/Print.h
  • ~/.arduino15/packages/adafruit/hardware/samd/1.7.11/cores/arduino/Print.cpp

Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz These files must be copied into the directory:

  • ~/.arduino15/packages/adafruit/hardware/samd/x.yy.zz/platform.txt
  • ~/.arduino15/packages/adafruit/hardware/samd/x.yy.zz/cores/arduino/Print.h
  • ~/.arduino15/packages/adafruit/hardware/samd/x.yy.zz/cores/arduino/Print.cpp

3. For Seeeduino SAMD boards

To be able to compile, run and automatically detect and display BOARD_NAME on Seeeduino SAMD (XIAO M0, Wio Terminal, etc) boards, you have to copy the whole Seeeduino SAMD Packages_Patches directory into Seeeduino samd directory (~/.arduino15/packages/Seeeduino/hardware/samd/1.8.3).

Supposing the Seeeduino SAMD core version is 1.8.3. These files must be copied into the directory:

  • ~/.arduino15/packages/Seeeduino/hardware/samd/1.8.3/platform.txt
  • ~/.arduino15/packages/Seeeduino/hardware/samd/1.8.3/cores/arduino/Arduino.h
  • ~/.arduino15/packages/Seeeduino/hardware/samd/1.8.3/cores/arduino/Print.h
  • ~/.arduino15/packages/Seeeduino/hardware/samd/1.8.3/cores/arduino/Print.cpp

Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz These files must be copied into the directory:

  • ~/.arduino15/packages/Seeeduino/hardware/samd/x.yy.zz/platform.txt
  • ~/.arduino15/packages/Seeeduino/hardware/samd/x.yy.zz/cores/arduino/Arduino.h
  • ~/.arduino15/packages/Seeeduino/hardware/samd/x.yy.zz/cores/arduino/Print.h
  • ~/.arduino15/packages/Seeeduino/hardware/samd/x.yy.zz/cores/arduino/Print.cpp


Examples:

  1. AP_SimpleWebServer
  2. CheckWifi101FirmwareVersion
  3. ConnectNoEncryption
  4. ConnectWithWEP
  5. ConnectWithWPA
  6. FirmwareUpdater
  7. MDNS_WiFiWebServer
  8. Provisioning_WiFiWebServer
  9. ScanNetworks
  10. ScanNetworksAdvanced
  11. SimpleWebServerWiFi
  12. WiFiChatServer
  13. WiFiPing
  14. WiFiSSLClient
  15. WiFiUdpNtpClient
  16. WiFiUdpSendReceiveString
  17. WiFiWebClient
  18. WiFiWebClientRepeating
  19. WiFiWebServer


Debug

Debug is enabled by default on Serial. Debug Level from 0 to 4. To disable, change the WIFININA_LOGLEVEL to 0

// Use this to output debug msgs to Serial
#define DEBUG_WIFININA_PORT         Serial
// Use 0 to disable all output debug msgs
// Debug Level from 0 to 4
#define _WIFININA_LOGLEVEL_              2

Troubleshooting

If you get compilation errors, more often than not, you may need to install a newer version of the board's core, applying Libraries' Patches, Packages' Patches or this library latest version.



Issues

Submit issues to: WiFi101_Generic issues


TO DO

  1. Bug Searching and Killing
  2. Support more types boards using ATMEL WINC1500 WiFi module

DONE

  1. Add compatibility to WebSockets2_Generic library
  2. Fix severe limitation to permit sending much larger data than total 4K
  3. Use allman astyle and add utils


Contributions and Thanks

Many thanks for everyone for bug reporting, new feature suggesting, testing and contributing to the development of this library.

  1. Based on and modified from WiFi101

Contributing

If you want to contribute to this project:

  • Report bugs and errors
  • Ask for enhancements
  • Create issues and pull requests
  • Tell other people about this library

Copyright

Copyright (c) Arduino LLC. All right reserved.

Copyright 2022- Khoi Hoang

About

Network driver for for SAMD21, SAMD51 boards using ATMEL WINC1500 module (used on Arduino/Genuino Wifi Shield 101 and MKR1000 boards). Modified from Arduino WiFi101 library. Now with fix of severe limitation to permit sending much larger data and be compatible with WebSockets2_Generic library

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published