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

Commit

Permalink
v1.8.15-1 to use new WiFi101_Generic
Browse files Browse the repository at this point in the history
### Releases v1.8.15-1

1. Using new [WiFi101_Generic](https://github.com/khoih-prog/WiFi101_Generic) library to permit sending larger data than total 4K when using `MKR1000` or `MKRWiFi1010` with `ATMEL WINC1500 WiFi`
2. Modify examples for new features
  • Loading branch information
khoih-prog authored Nov 18, 2022
1 parent 84f9f77 commit d628009
Show file tree
Hide file tree
Showing 40 changed files with 290 additions and 66 deletions.
20 changes: 15 additions & 5 deletions examples/AP_SimpleWebServer/AP_SimpleWebServer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,12 @@
#define WIFI_FIRMWARE_LATEST_VERSION "1.4.8"

#include <SPI.h>
#include <WiFiNINA_Generic.h>

#if USING_WIFI101
#include <WiFi101_Generic.h>
#else
#include <WiFiNINA_Generic.h>
#endif

///////please enter your sensitive data in the Secret tab/arduino_secrets.h
char ssid[] = SECRET_SSID; // your network SSID (name)
Expand All @@ -66,19 +71,24 @@ WiFiServer server(80);

void setup()
{
pinMode(led, OUTPUT); // set the LED pin mode

//Initialize serial and wait for port to open:
Serial.begin(115200);

while (!Serial && millis() < 5000);

Serial.print(F("\nStart AP_SimpleWebServer on "));
Serial.println(BOARD_NAME);
Serial.println(WIFININA_GENERIC_VERSION);

pinMode(led, OUTPUT); // set the LED pin mode
Serial.println(BOARD_NAME);

// check for the WiFi module:
#if USING_WIFI101
if (WiFi.status() == WL_NO_SHIELD)
#else
Serial.println(WIFININA_GENERIC_VERSION);

if (WiFi.status() == WL_NO_MODULE)
#endif
{
Serial.println(F("Communication with WiFi module failed!"));

Expand Down
2 changes: 2 additions & 0 deletions examples/AP_SimpleWebServer/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@
#define BOARD_TYPE "SAMD Zero"
#elif defined(ARDUINO_SAMD_MKR1000)
#define BOARD_TYPE "SAMD MKR1000"
#define USING_WIFI101 true
#elif defined(ARDUINO_SAMD_MKRWIFI1010)
#define BOARD_TYPE "SAMD MKRWIFI1010"
#define USING_WIFI101 true
#elif defined(ARDUINO_SAMD_NANO_33_IOT)
#define BOARD_TYPE "SAMD NANO_33_IOT"
#elif defined(ARDUINO_SAMD_MKRFox1200)
Expand Down
16 changes: 13 additions & 3 deletions examples/ConnectNoEncryption/ConnectNoEncryption.ino
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,12 @@
#define WIFI_FIRMWARE_LATEST_VERSION "1.4.8"

#include <SPI.h>
#include <WiFiNINA_Generic.h>

#if USING_WIFI101
#include <WiFi101_Generic.h>
#else
#include <WiFiNINA_Generic.h>
#endif

char ssid[] = SECRET_SSID; // your network SSID (name)

Expand All @@ -58,10 +63,15 @@ void setup()

Serial.print(F("\nStart ConnectNoEncryption on "));
Serial.println(BOARD_NAME);
Serial.println(WIFININA_GENERIC_VERSION);


// check for the WiFi module:
#if USING_WIFI101
if (WiFi.status() == WL_NO_SHIELD)
#else
Serial.println(WIFININA_GENERIC_VERSION);

if (WiFi.status() == WL_NO_MODULE)
#endif
{
Serial.println(F("Communication with WiFi module failed!"));

Expand Down
2 changes: 2 additions & 0 deletions examples/ConnectNoEncryption/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@
#define BOARD_TYPE "SAMD Zero"
#elif defined(ARDUINO_SAMD_MKR1000)
#define BOARD_TYPE "SAMD MKR1000"
#define USING_WIFI101 true
#elif defined(ARDUINO_SAMD_MKRWIFI1010)
#define BOARD_TYPE "SAMD MKRWIFI1010"
#define USING_WIFI101 true
#elif defined(ARDUINO_SAMD_NANO_33_IOT)
#define BOARD_TYPE "SAMD NANO_33_IOT"
#elif defined(ARDUINO_SAMD_MKRFox1200)
Expand Down
14 changes: 12 additions & 2 deletions examples/ConnectWithWEP/ConnectWithWEP.ino
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@
#define WIFI_FIRMWARE_LATEST_VERSION "1.4.8"

#include <SPI.h>
#include <WiFiNINA_Generic.h>

#if USING_WIFI101
#include <WiFi101_Generic.h>
#else
#include <WiFiNINA_Generic.h>
#endif

///////please enter your sensitive data in the Secret tab/arduino_secrets.h
char ssid[] = SECRET_SSID; // your network SSID (name)
Expand All @@ -71,10 +76,15 @@ void setup()

Serial.print(F("\nStart ConnectWithWEP on "));
Serial.println(BOARD_NAME);
Serial.println(WIFININA_GENERIC_VERSION);

// check for the WiFi module:
#if USING_WIFI101
if (WiFi.status() == WL_NO_SHIELD)
#else
Serial.println(WIFININA_GENERIC_VERSION);

if (WiFi.status() == WL_NO_MODULE)
#endif
{
Serial.println(F("Communication with WiFi module failed!"));

Expand Down
2 changes: 2 additions & 0 deletions examples/ConnectWithWEP/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@
#define BOARD_TYPE "SAMD Zero"
#elif defined(ARDUINO_SAMD_MKR1000)
#define BOARD_TYPE "SAMD MKR1000"
#define USING_WIFI101 true
#elif defined(ARDUINO_SAMD_MKRWIFI1010)
#define BOARD_TYPE "SAMD MKRWIFI1010"
#define USING_WIFI101 true
#elif defined(ARDUINO_SAMD_NANO_33_IOT)
#define BOARD_TYPE "SAMD NANO_33_IOT"
#elif defined(ARDUINO_SAMD_MKRFox1200)
Expand Down
16 changes: 13 additions & 3 deletions examples/ConnectWithWPA/ConnectWithWPA.ino
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@
#define WIFI_FIRMWARE_LATEST_VERSION "1.4.8"

#include <SPI.h>
#include <WiFiNINA_Generic.h>

#if USING_WIFI101
#include <WiFi101_Generic.h>
#else
#include <WiFiNINA_Generic.h>
#endif

///////please enter your sensitive data in the Secret tab/arduino_secrets.h
char ssid[] = SECRET_SSID; // your network SSID (name)
Expand All @@ -58,10 +63,15 @@ void setup()

Serial.print(F("\nStart ConnectWithWPA on "));
Serial.println(BOARD_NAME);
Serial.println(WIFININA_GENERIC_VERSION);


// check for the WiFi module:
#if USING_WIFI101
if (WiFi.status() == WL_NO_SHIELD)
#else
Serial.println(WIFININA_GENERIC_VERSION);

if (WiFi.status() == WL_NO_MODULE)
#endif
{
Serial.println(F("Communication with WiFi module failed!"));

Expand Down
2 changes: 2 additions & 0 deletions examples/ConnectWithWPA/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@
#define BOARD_TYPE "SAMD Zero"
#elif defined(ARDUINO_SAMD_MKR1000)
#define BOARD_TYPE "SAMD MKR1000"
#define USING_WIFI101 true
#elif defined(ARDUINO_SAMD_MKRWIFI1010)
#define BOARD_TYPE "SAMD MKRWIFI1010"
#define USING_WIFI101 true
#elif defined(ARDUINO_SAMD_NANO_33_IOT)
#define BOARD_TYPE "SAMD NANO_33_IOT"
#elif defined(ARDUINO_SAMD_MKRFox1200)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ void setup()
Serial.print(F("\nStart ConnectWithWPA2Enterprise on "));
Serial.println(BOARD_NAME);
Serial.println(WIFININA_GENERIC_VERSION);

// check for the WiFi module:

if (WiFi.status() == WL_NO_MODULE)
{
Serial.println(F("Communication with WiFi module failed!"));
Expand Down
17 changes: 14 additions & 3 deletions examples/MultiServers/MultiServers.ino
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@
#define WIFI_FIRMWARE_LATEST_VERSION "1.4.8"

#include "defines.h"
#include <WiFiNINA_Generic.h>

#include <SPI.h>

#if USING_WIFI101
#include <WiFi101_Generic.h>
#else
#include <WiFiNINA_Generic.h>
#endif

// https://github.com/ocrdu/NINA-Websocket
#include <WebSocketServer.h>
Expand Down Expand Up @@ -119,10 +126,14 @@ void setup()
Serial.print(F("\nStart MultiServers on "));
Serial.println(BOARD_TYPE);

// check for the WiFi module:
#if USING_WIFI101
if (WiFi.status() == WL_NO_SHIELD)
#else
Serial.println(WIFININA_GENERIC_VERSION);

// check for the WiFi module:

if (WiFi.status() == WL_NO_MODULE)
#endif
{
Serial.println(F("Communication with WiFi module failed!"));

Expand Down
2 changes: 2 additions & 0 deletions examples/MultiServers/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@
#define BOARD_TYPE "SAMD Zero"
#elif defined(ARDUINO_SAMD_MKR1000)
#define BOARD_TYPE "SAMD MKR1000"
#define USING_WIFI101 true
#elif defined(ARDUINO_SAMD_MKRWIFI1010)
#define BOARD_TYPE "SAMD MKRWIFI1010"
#define USING_WIFI101 true
#elif defined(ARDUINO_SAMD_NANO_33_IOT)
#define BOARD_TYPE "SAMD NANO_33_IOT"
#elif defined(ARDUINO_SAMD_MKRFox1200)
Expand Down
1 change: 0 additions & 1 deletion examples/RGB_LED_Test/RGB_LED_Test.ino
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#error Only for ARDUINO_NANO_RP2040_CONNECT using arduino-pico core
#endif

//#include <WiFiNINA.h>
#include <WiFiNINA_Generic.h>

void setup()
Expand Down
20 changes: 16 additions & 4 deletions examples/ScanNetworks/ScanNetworks.ino
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@
#define WIFI_FIRMWARE_LATEST_VERSION "1.4.8"

#include <SPI.h>
#include <WiFiNINA_Generic.h>

#if USING_WIFI101
#include <WiFi101_Generic.h>
#else
#include <WiFiNINA_Generic.h>
#endif

void setup()
{
Expand All @@ -57,10 +62,15 @@ void setup()

Serial.print(F("\nStart ScanNetworks on "));
Serial.println(BOARD_NAME);

// check for the WiFi module:
#if USING_WIFI101
if (WiFi.status() == WL_NO_SHIELD)
#else
Serial.println(WIFININA_GENERIC_VERSION);

// check for the WiFi module:

if (WiFi.status() == WL_NO_MODULE)
#endif
{
Serial.println(F("Communication with WiFi module failed!"));

Expand Down Expand Up @@ -149,7 +159,9 @@ void printEncryptionType(int thisType)
Serial.print(F("Auto"));
break;

case ENC_TYPE_UNKNOWN:
#if !USING_WIFI101
case ENC_TYPE_UNKNOWN:
#endif
default:
Serial.print(F("Unknown"));
break;
Expand Down
20 changes: 16 additions & 4 deletions examples/ScanNetworksAdvanced/ScanNetworksAdvanced.ino
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@
#define WIFI_FIRMWARE_LATEST_VERSION "1.4.8"

#include <SPI.h>
#include <WiFiNINA_Generic.h>

#if USING_WIFI101
#include <WiFi101_Generic.h>
#else
#include <WiFiNINA_Generic.h>
#endif

void setup()
{
Expand All @@ -58,10 +63,15 @@ void setup()

Serial.print(F("\nStart ScanNetworksAdvanced on "));
Serial.println(BOARD_NAME);
Serial.println(WIFININA_GENERIC_VERSION);

// check for the WiFi module:
// check for the WiFi module:
#if USING_WIFI101
if (WiFi.status() == WL_NO_SHIELD)
#else
Serial.println(WIFININA_GENERIC_VERSION);

if (WiFi.status() == WL_NO_MODULE)
#endif
{
Serial.println(F("Communication with WiFi module failed!"));

Expand Down Expand Up @@ -163,7 +173,9 @@ void printEncryptionType(int thisType)
Serial.print(F("Auto"));
break;

case ENC_TYPE_UNKNOWN:
#if !USING_WIFI101
case ENC_TYPE_UNKNOWN:
#endif
default:
Serial.print(F("Unknown"));
break;
Expand Down
2 changes: 2 additions & 0 deletions examples/ScanNetworksAdvanced/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@
#define BOARD_TYPE "SAMD Zero"
#elif defined(ARDUINO_SAMD_MKR1000)
#define BOARD_TYPE "SAMD MKR1000"
#define USING_WIFI101 true
#elif defined(ARDUINO_SAMD_MKRWIFI1010)
#define BOARD_TYPE "SAMD MKRWIFI1010"
#define USING_WIFI101 true
#elif defined(ARDUINO_SAMD_NANO_33_IOT)
#define BOARD_TYPE "SAMD NANO_33_IOT"
#elif defined(ARDUINO_SAMD_MKRFox1200)
Expand Down
16 changes: 13 additions & 3 deletions examples/SimpleWebServerWiFi/SimpleWebServerWiFi.ino
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,12 @@
#define WIFI_FIRMWARE_LATEST_VERSION "1.4.8"

#include <SPI.h>
#include <WiFiNINA_Generic.h>

#if USING_WIFI101
#include <WiFi101_Generic.h>
#else
#include <WiFiNINA_Generic.h>
#endif

///////please enter your sensitive data in the Secret tab/arduino_secrets.h
char ssid[] = SECRET_SSID; // your network SSID (name)
Expand All @@ -75,10 +80,15 @@ void setup()

Serial.print(F("\nStart SimpleWebServerWiFi on "));
Serial.println(BOARD_NAME);
Serial.println(WIFININA_GENERIC_VERSION);

// check for the WiFi module:
// check for the WiFi module:
#if USING_WIFI101
if (WiFi.status() == WL_NO_SHIELD)
#else
Serial.println(WIFININA_GENERIC_VERSION);

if (WiFi.status() == WL_NO_MODULE)
#endif
{
Serial.println(F("Communication with WiFi module failed!"));

Expand Down
2 changes: 2 additions & 0 deletions examples/SimpleWebServerWiFi/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@
#define BOARD_TYPE "SAMD Zero"
#elif defined(ARDUINO_SAMD_MKR1000)
#define BOARD_TYPE "SAMD MKR1000"
#define USING_WIFI101 true
#elif defined(ARDUINO_SAMD_MKRWIFI1010)
#define BOARD_TYPE "SAMD MKRWIFI1010"
#define USING_WIFI101 true
#elif defined(ARDUINO_SAMD_NANO_33_IOT)
#define BOARD_TYPE "SAMD NANO_33_IOT"
#elif defined(ARDUINO_SAMD_MKRFox1200)
Expand Down
Loading

0 comments on commit d628009

Please sign in to comment.