Skip to content

Commit 29cfe80

Browse files
committed
examples: fix username/password secure element logic
1 parent 2c59002 commit 29cfe80

File tree

14 files changed

+23
-23
lines changed

14 files changed

+23
-23
lines changed

examples/ArduinoIoTCloud-Advanced/arduino_secrets.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#endif
1010

1111
/* ESP8266 ESP32 */
12-
#if defined(BOARD_HAS_SECRET_KEY)
12+
#if !defined(BOARD_HAS_SECURE_ELEMENT)
1313
#define SECRET_DEVICE_KEY "my-device-password"
1414
#endif
1515

examples/ArduinoIoTCloud-Advanced/thingProperties.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#error "Please check Arduino IoT Cloud supported boards list: https://github.com/arduino-libraries/ArduinoIoTCloud/#what"
77
#endif
88

9-
#if defined(BOARD_HAS_SECRET_KEY)
9+
#if !defined(BOARD_HAS_SECURE_ELEMENT)
1010
#define BOARD_ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
1111
#endif
1212

@@ -22,7 +22,7 @@ CloudLocation location;
2222
CloudColor color;
2323

2424
void initProperties() {
25-
#if defined(BOARD_HAS_SECRET_KEY)
25+
#if !defined(BOARD_HAS_SECURE_ELEMENT)
2626
ArduinoCloud.setBoardId(BOARD_ID);
2727
ArduinoCloud.setSecretDeviceKey(SECRET_DEVICE_KEY);
2828
#endif

examples/ArduinoIoTCloud-Basic/arduino_secrets.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
* https://github.com/arduino-libraries/ArduinoIoTCloud/#what
55
*/
66
#if defined(BOARD_HAS_WIFI)
7-
#define SECRET_WIFI_SSID "YOUR_WIFI_NETWORK_NAME"
8-
#define SECRET_WIFI_PASS "YOUR_WIFI_PASSWORD"
7+
#define SECRET_WIFI_SSID "-_-"
8+
#define SECRET_WIFI_PASS "smea86861518"
99
#endif
1010

1111
/* ESP8266 ESP32 */
12-
#if defined(BOARD_HAS_SECRET_KEY)
12+
#if !defined(BOARD_HAS_SECURE_ELEMENT)
1313
#define SECRET_DEVICE_KEY "my-device-password"
1414
#endif
1515

examples/ArduinoIoTCloud-Basic/thingProperties.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#error "Please check Arduino IoT Cloud supported boards list: https://github.com/arduino-libraries/ArduinoIoTCloud/#what"
77
#endif
88

9-
#if defined(BOARD_HAS_SECRET_KEY)
9+
#if !defined(BOARD_HAS_SECURE_ELEMENT)
1010
#define BOARD_ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
1111
#endif
1212

@@ -21,7 +21,7 @@ int potentiometer;
2121
int seconds;
2222

2323
void initProperties() {
24-
#if defined(BOARD_HAS_SECRET_KEY)
24+
#if !defined(BOARD_HAS_SECURE_ELEMENT)
2525
ArduinoCloud.setBoardId(BOARD_ID);
2626
ArduinoCloud.setSecretDeviceKey(SECRET_DEVICE_KEY);
2727
#endif

examples/ArduinoIoTCloud-BlockForOTA/arduino_secrets.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#endif
1010

1111
/* ESP8266 ESP32 */
12-
#if defined(BOARD_HAS_SECRET_KEY)
12+
#if !defined(BOARD_HAS_SECURE_ELEMENT)
1313
#define SECRET_DEVICE_KEY "my-device-password"
1414
#endif
1515

examples/ArduinoIoTCloud-BlockForOTA/thingProperties.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#error "Please check Arduino IoT Cloud supported boards list: https://github.com/arduino-libraries/ArduinoIoTCloud/#what"
77
#endif
88

9-
#if defined(BOARD_HAS_SECRET_KEY)
9+
#if !defined(BOARD_HAS_SECURE_ELEMENT)
1010
#define BOARD_ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
1111
#endif
1212

@@ -21,7 +21,7 @@ int potentiometer;
2121
int seconds;
2222

2323
void initProperties() {
24-
#if defined(BOARD_HAS_SECRET_KEY)
24+
#if !defined(BOARD_HAS_SECURE_ELEMENT)
2525
ArduinoCloud.setBoardId(BOARD_ID);
2626
ArduinoCloud.setSecretDeviceKey(SECRET_DEVICE_KEY);
2727
#endif

examples/ArduinoIoTCloud-Callbacks/arduino_secrets.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#endif
1010

1111
/* ESP8266 ESP32 */
12-
#if defined(BOARD_HAS_SECRET_KEY)
12+
#if !defined(BOARD_HAS_SECURE_ELEMENT)
1313
#define SECRET_DEVICE_KEY "my-device-password"
1414
#endif
1515

examples/ArduinoIoTCloud-Callbacks/thingProperties.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#error "Please check Arduino IoT Cloud supported boards list: https://github.com/arduino-libraries/ArduinoIoTCloud/#what"
77
#endif
88

9-
#if defined(BOARD_HAS_SECRET_KEY)
9+
#if !defined(BOARD_HAS_SECURE_ELEMENT)
1010
#define BOARD_ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
1111
#endif
1212

@@ -15,7 +15,7 @@
1515
#endif
1616

1717
void initProperties() {
18-
#if defined(BOARD_HAS_SECRET_KEY)
18+
#if !defined(BOARD_HAS_SECURE_ELEMENT)
1919
ArduinoCloud.setBoardId(BOARD_ID);
2020
ArduinoCloud.setSecretDeviceKey(SECRET_DEVICE_KEY);
2121
#endif

examples/ArduinoIoTCloud-DeferredOTA/arduino_secrets.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#endif
1010

1111
/* ESP8266 ESP32 */
12-
#if defined(BOARD_HAS_SECRET_KEY)
12+
#if !defined(BOARD_HAS_SECURE_ELEMENT)
1313
#define SECRET_DEVICE_KEY "my-device-password"
1414
#endif
1515

examples/ArduinoIoTCloud-DeferredOTA/thingProperties.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#error "Please check Arduino IoT Cloud supported boards list: https://github.com/arduino-libraries/ArduinoIoTCloud/#what"
77
#endif
88

9-
#if defined(BOARD_HAS_SECRET_KEY)
9+
#if !defined(BOARD_HAS_SECURE_ELEMENT)
1010
#define BOARD_ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
1111
#endif
1212

@@ -15,7 +15,7 @@ void onLedChange();
1515
bool led;
1616

1717
void initProperties() {
18-
#if defined(BOARD_HAS_SECRET_KEY)
18+
#if !defined(BOARD_HAS_SECURE_ELEMENT)
1919
ArduinoCloud.setBoardId(BOARD_ID);
2020
ArduinoCloud.setSecretDeviceKey(SECRET_DEVICE_KEY);
2121
#endif

examples/ArduinoIoTCloud-Schedule/arduino_secrets.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#endif
1010

1111
/* ESP8266 ESP32 */
12-
#if defined(BOARD_HAS_SECRET_KEY)
12+
#if !defined(BOARD_HAS_SECURE_ELEMENT)
1313
#define SECRET_DEVICE_KEY "my-device-password"
1414
#endif
1515

examples/ArduinoIoTCloud-Schedule/thingProperties.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#error "Please check Arduino IoT Cloud supported boards list: https://github.com/arduino-libraries/ArduinoIoTCloud/#what"
77
#endif
88

9-
#if defined(BOARD_HAS_SECRET_KEY)
9+
#if !defined(BOARD_HAS_SECURE_ELEMENT)
1010
#define BOARD_ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
1111
#endif
1212

@@ -26,7 +26,7 @@ CloudSchedule monthly;
2626
CloudSchedule yearly;
2727

2828
void initProperties() {
29-
#if defined(BOARD_HAS_SECRET_KEY)
29+
#if !defined(BOARD_HAS_SECURE_ELEMENT)
3030
ArduinoCloud.setBoardId(BOARD_ID);
3131
ArduinoCloud.setSecretDeviceKey(SECRET_DEVICE_KEY);
3232
#endif

examples/utility/ArduinoIoTCloud_Travis_CI/arduino_secrets.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#endif
1010

1111
/* ESP8266 ESP32*/
12-
#if defined(BOARD_HAS_SECRET_KEY)
12+
#if !defined(BOARD_HAS_SECURE_ELEMENT)
1313
#define SECRET_DEVICE_KEY "my-device-password"
1414
#endif
1515

examples/utility/ArduinoIoTCloud_Travis_CI/thingProperties.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
DEFINES
1111
******************************************************************************/
1212

13-
#if defined(BOARD_HAS_SECRET_KEY)
13+
#if !defined(BOARD_HAS_SECURE_ELEMENT)
1414
#define BOARD_ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
1515
#endif
1616

@@ -86,7 +86,7 @@ void onStringPropertyChange();
8686
******************************************************************************/
8787
#if defined(HAS_TCP)
8888
void initProperties() {
89-
#if defined(BOARD_HAS_SECRET_KEY)
89+
#if !defined(BOARD_HAS_SECURE_ELEMENT)
9090
ArduinoCloud.setBoardId(BOARD_ID);
9191
ArduinoCloud.setSecretDeviceKey(SECRET_DEVICE_KEY);
9292
#endif

0 commit comments

Comments
 (0)