- Why do we need this WiFi101_Generic library
- Changelog
- Prerequisites
- Installation
- Packages' Patches
- 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
- Troubleshooting
- Issues
- TO DO
- DONE
- Contributions and Thanks
- Contributing
- Copyright
Why do we need this WiFi101_Generic library
This WiFi101_Generic library is a port and modification
to add, as many as possible, the features to the following library
for Arduino SAMD21, etc. boards using ATMEL WINC1500 WiFi
module.
This WiFi101_Generic library currently supports these following boards:
- SAMD21
- Arduino SAMD21: MKRs, etc.
- 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.
Arduino IDE 1.8.19+
for Arduino.Arduino SAMD core 1.8.13+
for SAMD ARM Cortex-M0+ boards.Adafruit SAMD core 1.7.11+
for SAMD ARM Cortex-M0+ and M4 boards (Nano 33 IoT, etc.).Seeeduino SAMD core 1.8.3+
for SAMD21/SAMD51 boards (XIAO M0, Wio Terminal, etc.).
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 for more detailed instructions.
- Navigate to WiFi101_Generic page.
- Download the latest release
WiFi101_Generic-main.zip
. - Extract the zip file to
WiFi101_Generic-main
directory - Copy the whole
WiFi101_Generic-main
folder to Arduino libraries' directory such as~/Arduino/libraries/
.
- Install VS Code
- Install PlatformIO
- Install WiFi101_Generic library by using Library Manager. Search for WiFi101_Generic in Platform.io Author's Libraries
- 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
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).
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
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.
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
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
- AP_SimpleWebServer
- CheckWifi101FirmwareVersion
- ConnectNoEncryption
- ConnectWithWEP
- ConnectWithWPA
- FirmwareUpdater
- MDNS_WiFiWebServer
- Provisioning_WiFiWebServer
- ScanNetworks
- ScanNetworksAdvanced
- SimpleWebServerWiFi
- WiFiChatServer
- WiFiPing
- WiFiSSLClient
- WiFiUdpNtpClient
- WiFiUdpSendReceiveString
- WiFiWebClient
- WiFiWebClientRepeating
- WiFiWebServer
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
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.
Submit issues to: WiFi101_Generic issues
- Bug Searching and Killing
- Support more types boards using ATMEL WINC1500 WiFi module
- Add compatibility to WebSockets2_Generic library
- Fix severe limitation to permit sending much larger data than total 4K
- Use
allman astyle
and addutils
Many thanks for everyone for bug reporting, new feature suggesting, testing and contributing to the development of this library.
- Based on and modified from WiFi101
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 (c) Arduino LLC. All right reserved.
Copyright 2022- Khoi Hoang