Skip to content

Commit 63fc4e9

Browse files
authored
Merge pull request #89 from brentru/master
Fix ESP8266 Compatibility and add SSL fingerprinting
2 parents 66eeae7 + 8cc0994 commit 63fc4e9

File tree

40 files changed

+50
-45
lines changed

40 files changed

+50
-45
lines changed

.travis.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ env:
1010
global:
1111
- PRETTYNAME="Adafruit IO Arduino Library"
1212

13-
1413
before_install:
1514
- source <(curl -SLs https://raw.githubusercontent.com/adafruit/travis-ci-arduino/master/install.sh)
15+
- cd $HOME/arduino_ide/libraries/
16+
- wget https://github.com/adafruit/WiFiNINA/archive/master.zip && unzip master.zip
17+
- mv WiFiNINA-master/ WiFiNINA && rm master.zip
18+
- cd /home/travis/build/adafruit/Adafruit_IO_Arduino
1619

1720
install:
1821
- arduino --install-library "Adafruit IO Arduino","Adafruit MQTT Library","ArduinoHttpClient"
19-
- arduino --install-library "Adafruit Unified Sensor","Adafruit NeoPixel","DHT sensor library"
22+
- arduino --install-library "Adafruit Unified Sensor","Adafruit NeoPixel","DHT sensor library", "Ethernet"
2023

2124
script:
22-
# build ESP8266 target
23-
# - build_platform esp8266
24-
# build SAMD target
25-
- arduino --install-library "WiFi101", "Ethernet"
26-
- build_platform zero
25+
- build_platform m4wifi
26+
- build_platform esp8266

examples/adafruitio_00_publish/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// comment out the following lines if you are using fona or ethernet
3030
#include "AdafruitIO_WiFi.h"
3131

32-
#ifdef USE_AIRLIFT
32+
#if defined(USE_AIRLIFT) || defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE)
3333
// Configure the pins used for the ESP32 connection
3434
#if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
3535
// Don't change the names of these #define's! they match the variant ones

examples/adafruitio_01_subscribe/config.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,19 @@
2929
// comment out the following lines if you are using fona or ethernet
3030
#include "AdafruitIO_WiFi.h"
3131

32-
#ifdef USE_AIRLIFT
33-
// Configure the pins used for the ESP32 connection
34-
#if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
35-
// Don't change the names of these #define's! they match the variant ones
36-
#define SPIWIFI SPI
37-
#define SPIWIFI_SS 10 // Chip select pin
38-
#define SPIWIFI_ACK 9 // a.k.a BUSY or READY pin
39-
#define ESP32_RESETN 6 // Reset pin
40-
#define ESP32_GPIO0 -1 // Not connected
41-
#endif
42-
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS, SPIWIFI_SS, SPIWIFI_ACK, ESP32_RESETN, ESP32_GPIO0, &SPIWIFI);
32+
#if defined(USE_AIRLIFT) || defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE)
33+
// Configure the pins used for the ESP32 connection
34+
#if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
35+
// Don't change the names of these #define's! they match the variant ones
36+
#define SPIWIFI SPI
37+
#define SPIWIFI_SS 10 // Chip select pin
38+
#define SPIWIFI_ACK 9 // a.k.a BUSY or READY pin
39+
#define ESP32_RESETN 6 // Reset pin
40+
#define ESP32_GPIO0 -1 // Not connected
41+
#endif
42+
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS, SPIWIFI_SS, SPIWIFI_ACK, ESP32_RESETN, ESP32_GPIO0, &SPIWIFI);
4343
#else
44-
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
44+
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
4545
#endif
4646
/******************************* FONA **************************************/
4747

examples/adafruitio_02_pubsub/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// comment out the following lines if you are using fona or ethernet
3030
#include "AdafruitIO_WiFi.h"
3131

32-
#ifdef USE_AIRLIFT
32+
#if defined(USE_AIRLIFT) || defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE)
3333
// Configure the pins used for the ESP32 connection
3434
#if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
3535
// Don't change the names of these #define's! they match the variant ones

examples/adafruitio_03_multiple_feeds/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// comment out the following lines if you are using fona or ethernet
3030
#include "AdafruitIO_WiFi.h"
3131

32-
#ifdef USE_AIRLIFT
32+
#if defined(USE_AIRLIFT) || defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE)
3333
// Configure the pins used for the ESP32 connection
3434
#if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
3535
// Don't change the names of these #define's! they match the variant ones

examples/adafruitio_04_location/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// comment out the following lines if you are using fona or ethernet
3030
#include "AdafruitIO_WiFi.h"
3131

32-
#ifdef USE_AIRLIFT
32+
#if defined(USE_AIRLIFT) || defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE)
3333
// Configure the pins used for the ESP32 connection
3434
#if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
3535
// Don't change the names of these #define's! they match the variant ones

examples/adafruitio_05_type_conversion/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// comment out the following lines if you are using fona or ethernet
3030
#include "AdafruitIO_WiFi.h"
3131

32-
#ifdef USE_AIRLIFT
32+
#if defined(USE_AIRLIFT) || defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE)
3333
// Configure the pins used for the ESP32 connection
3434
#if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
3535
// Don't change the names of these #define's! they match the variant ones

examples/adafruitio_06_digital_in/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// comment out the following lines if you are using fona or ethernet
3030
#include "AdafruitIO_WiFi.h"
3131

32-
#ifdef USE_AIRLIFT
32+
#if defined(USE_AIRLIFT) || defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE)
3333
// Configure the pins used for the ESP32 connection
3434
#if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
3535
// Don't change the names of these #define's! they match the variant ones

examples/adafruitio_07_digital_out/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// comment out the following lines if you are using fona or ethernet
3030
#include "AdafruitIO_WiFi.h"
3131

32-
#ifdef USE_AIRLIFT
32+
#if defined(USE_AIRLIFT) || defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE)
3333
// Configure the pins used for the ESP32 connection
3434
#if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
3535
// Don't change the names of these #define's! they match the variant ones

examples/adafruitio_08_analog_in/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// comment out the following lines if you are using fona or ethernet
3030
#include "AdafruitIO_WiFi.h"
3131

32-
#ifdef USE_AIRLIFT
32+
#if defined(USE_AIRLIFT) || defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE)
3333
// Configure the pins used for the ESP32 connection
3434
#if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
3535
// Don't change the names of these #define's! they match the variant ones

examples/adafruitio_09_analog_out/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// comment out the following lines if you are using fona or ethernet
3030
#include "AdafruitIO_WiFi.h"
3131

32-
#ifdef USE_AIRLIFT
32+
#if defined(USE_AIRLIFT) || defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE)
3333
// Configure the pins used for the ESP32 connection
3434
#if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
3535
// Don't change the names of these #define's! they match the variant ones

examples/adafruitio_10_dashboard_creation/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// comment out the following lines if you are using fona or ethernet
3030
#include "AdafruitIO_WiFi.h"
3131

32-
#ifdef USE_AIRLIFT
32+
#if defined(USE_AIRLIFT) || defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE)
3333
// Configure the pins used for the ESP32 connection
3434
#if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
3535
// Don't change the names of these #define's! they match the variant ones

examples/adafruitio_11_group_pub/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// comment out the following lines if you are using fona or ethernet
3030
#include "AdafruitIO_WiFi.h"
3131

32-
#ifdef USE_AIRLIFT
32+
#if defined(USE_AIRLIFT) || defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE)
3333
// Configure the pins used for the ESP32 connection
3434
#if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
3535
// Don't change the names of these #define's! they match the variant ones

examples/adafruitio_12_group_sub/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// comment out the following lines if you are using fona or ethernet
3030
#include "AdafruitIO_WiFi.h"
3131

32-
#ifdef USE_AIRLIFT
32+
#if defined(USE_AIRLIFT) || defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE)
3333
// Configure the pins used for the ESP32 connection
3434
#if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
3535
// Don't change the names of these #define's! they match the variant ones

examples/adafruitio_13_rgb/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// comment out the following lines if you are using fona or ethernet
3030
#include "AdafruitIO_WiFi.h"
3131

32-
#ifdef USE_AIRLIFT
32+
#if defined(USE_AIRLIFT) || defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE)
3333
// Configure the pins used for the ESP32 connection
3434
#if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
3535
// Don't change the names of these #define's! they match the variant ones

examples/adafruitio_14_neopixel/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// comment out the following lines if you are using fona or ethernet
3030
#include "AdafruitIO_WiFi.h"
3131

32-
#ifdef USE_AIRLIFT
32+
#if defined(USE_AIRLIFT) || defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE)
3333
// Configure the pins used for the ESP32 connection
3434
#if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
3535
// Don't change the names of these #define's! they match the variant ones

examples/adafruitio_15_temp_humidity/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// comment out the following lines if you are using fona or ethernet
3030
#include "AdafruitIO_WiFi.h"
3131

32-
#ifdef USE_AIRLIFT
32+
#if defined(USE_AIRLIFT) || defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE)
3333
// Configure the pins used for the ESP32 connection
3434
#if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
3535
// Don't change the names of these #define's! they match the variant ones

examples/adafruitio_16_servo/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// comment out the following lines if you are using fona or ethernet
3030
#include "AdafruitIO_WiFi.h"
3131

32-
#ifdef USE_AIRLIFT
32+
#if defined(USE_AIRLIFT) || defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE)
3333
// Configure the pins used for the ESP32 connection
3434
#if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
3535
// Don't change the names of these #define's! they match the variant ones

examples/adafruitio_17_time_subscribe/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// comment out the following lines if you are using fona or ethernet
3030
#include "AdafruitIO_WiFi.h"
3131

32-
#ifdef USE_AIRLIFT
32+
#if defined(USE_AIRLIFT) || defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE)
3333
// Configure the pins used for the ESP32 connection
3434
#if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
3535
// Don't change the names of these #define's! they match the variant ones

examples/adafruitio_18_device_info/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// comment out the following lines if you are using fona or ethernet
3030
#include "AdafruitIO_WiFi.h"
3131

32-
#ifdef USE_AIRLIFT
32+
#if defined(USE_AIRLIFT) || defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE)
3333
// Configure the pins used for the ESP32 connection
3434
#if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
3535
// Don't change the names of these #define's! they match the variant ones

examples/adafruitio_19_deepsleep/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// comment out the following lines if you are using fona or ethernet
3030
#include "AdafruitIO_WiFi.h"
3131

32-
#ifdef USE_AIRLIFT
32+
#if defined(USE_AIRLIFT) || defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE)
3333
// Configure the pins used for the ESP32 connection
3434
#if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
3535
// Don't change the names of these #define's! they match the variant ones

examples/adafruitio_20_shared_feed_write/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// comment out the following lines if you are using fona or ethernet
3030
#include "AdafruitIO_WiFi.h"
3131

32-
#ifdef USE_AIRLIFT
32+
#if defined(USE_AIRLIFT) || defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE)
3333
// Configure the pins used for the ESP32 connection
3434
#if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
3535
// Don't change the names of these #define's! they match the variant ones

examples/adafruitio_21_feed_read/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// comment out the following lines if you are using fona or ethernet
3030
#include "AdafruitIO_WiFi.h"
3131

32-
#ifdef USE_AIRLIFT
32+
#if defined(USE_AIRLIFT) || defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE)
3333
// Configure the pins used for the ESP32 connection
3434
#if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
3535
// Don't change the names of these #define's! they match the variant ones

examples/adafruitio_22_environmental_monitor/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// comment out the following lines if you are using fona or ethernet
3030
#include "AdafruitIO_WiFi.h"
3131

32-
#ifdef USE_AIRLIFT
32+
#if defined(USE_AIRLIFT) || defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE)
3333
// Configure the pins used for the ESP32 connection
3434
#if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
3535
// Don't change the names of these #define's! they match the variant ones

examples/adafruitio_23_ifttt/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// comment out the following lines if you are using fona or ethernet
3030
#include "AdafruitIO_WiFi.h"
3131

32-
#ifdef USE_AIRLIFT
32+
#if defined(USE_AIRLIFT) || defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE)
3333
// Configure the pins used for the ESP32 connection
3434
#if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
3535
// Don't change the names of these #define's! they match the variant ones

examples/adafruitio_24_zapier/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// comment out the following lines if you are using fona or ethernet
3030
#include "AdafruitIO_WiFi.h"
3131

32-
#ifdef USE_AIRLIFT
32+
#if defined(USE_AIRLIFT) || defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE)
3333
// Configure the pins used for the ESP32 connection
3434
#if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
3535
// Don't change the names of these #define's! they match the variant ones
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=Adafruit IO Arduino
2-
version=3.1.0
2+
version=3.2.0
33
author=Adafruit
44
maintainer=Adafruit <adafruitio@adafruit.com>
55
sentence=Arduino library to access Adafruit IO.

src/AdafruitIO_Definitions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#define ADAFRUITIO_DEFINITIONS_H_
1414

1515
#define ADAFRUITIO_VERSION_MAJOR 3
16-
#define ADAFRUITIO_VERSION_MINOR 1
16+
#define ADAFRUITIO_VERSION_MINOR 2
1717
#define ADAFRUITIO_VERSION_PATCH 0
1818

1919
// forward declaration

src/wifi/AdafruitIO_ESP8266.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ AdafruitIO_ESP8266::AdafruitIO_ESP8266(const char *user, const char *key, const
1818
_ssid = ssid;
1919
_pass = pass;
2020
_client = new WiFiClientSecure;
21+
_client->setFingerprint(AIO_SSL_FINGERPRINT);
2122
_mqtt = new Adafruit_MQTT_Client(_client, _host, _mqtt_port);
2223
_http = new HttpClient(*_client, _host, _http_port);
2324
}

0 commit comments

Comments
 (0)