Skip to content

Commit e57ab50

Browse files
committed
examples: add CellularConnectionHandler
1 parent 12e9def commit e57ab50

File tree

10 files changed

+25
-5
lines changed

10 files changed

+25
-5
lines changed

examples/ArduinoIoTCloud-Advanced/arduino_secrets.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
#endif
1515

1616
/* MKR GSM 1400 */ /* MKR NB 1500 */ /* Portenta CAT.M1/NB IoT GNSS Shield */
17-
#if defined(BOARD_HAS_GSM) || defined(BOARD_HAS_NB) || defined(BOARD_HAS_CATM1_NBIOT)
17+
/* Portenta H7 and C33 + Portenta Mid Carrier + 4G Module */
18+
#if defined(BOARD_HAS_GSM) || defined(BOARD_HAS_NB) || \
19+
defined(BOARD_HAS_CATM1_NBIOT) || defined(BOARD_HAS_CELLULAR)
1820
#define SECRET_PIN ""
1921
#define SECRET_APN ""
2022
#define SECRET_LOGIN ""

examples/ArduinoIoTCloud-Advanced/thingProperties.h

+2
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,6 @@ void initProperties() {
4949
//EthernetConnectionHandler ArduinoIoTPreferredConnection;
5050
/* Manual mode. It will fallback in DHCP mode if SECRET_OPTIONAL_IP is invalid or equal to "0.0.0.0" */
5151
EthernetConnectionHandler ArduinoIoTPreferredConnection(SECRET_OPTIONAL_IP, SECRET_OPTIONAL_DNS, SECRET_OPTIONAL_GATEWAY, SECRET_OPTIONAL_NETMASK);
52+
#elif defined(BOARD_HAS_CELLULAR)
53+
CellularConnectionHandler ArduinoIoTPreferredConnection(SECRET_PIN, SECRET_APN, SECRET_LOGIN, SECRET_PASS);
5254
#endif

examples/ArduinoIoTCloud-Basic/arduino_secrets.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
#endif
1515

1616
/* MKR GSM 1400 */ /* MKR NB 1500 */ /* Portenta CAT.M1/NB IoT GNSS Shield */
17-
#if defined(BOARD_HAS_GSM) || defined(BOARD_HAS_NB) || defined(BOARD_HAS_CATM1_NBIOT)
17+
/* Portenta H7 and C33 + Portenta Mid Carrier + 4G Module */
18+
#if defined(BOARD_HAS_GSM) || defined(BOARD_HAS_NB) || \
19+
defined(BOARD_HAS_CATM1_NBIOT) || defined(BOARD_HAS_CELLULAR)
1820
#define SECRET_PIN ""
1921
#define SECRET_APN ""
2022
#define SECRET_LOGIN ""

examples/ArduinoIoTCloud-Basic/thingProperties.h

+2
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,6 @@ void initProperties() {
4848
NBConnectionHandler ArduinoIoTPreferredConnection(SECRET_PIN, SECRET_APN, SECRET_LOGIN, SECRET_PASS);
4949
#elif defined(BOARD_HAS_CATM1_NBIOT)
5050
CatM1ConnectionHandler ArduinoIoTPreferredConnection(SECRET_PIN, SECRET_APN, SECRET_LOGIN, SECRET_PASS);
51+
#elif defined(BOARD_HAS_CELLULAR)
52+
CellularConnectionHandler ArduinoIoTPreferredConnection(SECRET_PIN, SECRET_APN, SECRET_LOGIN, SECRET_PASS);
5153
#endif

examples/ArduinoIoTCloud-Callbacks/arduino_secrets.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
#endif
1515

1616
/* MKR GSM 1400 */ /* MKR NB 1500 */ /* Portenta CAT.M1/NB IoT GNSS Shield */
17-
#if defined(BOARD_HAS_GSM) || defined(BOARD_HAS_NB) || defined(BOARD_HAS_CATM1_NBIOT)
17+
/* Portenta H7 and C33 + Portenta Mid Carrier + 4G Module */
18+
#if defined(BOARD_HAS_GSM) || defined(BOARD_HAS_NB) || \
19+
defined(BOARD_HAS_CATM1_NBIOT) || defined(BOARD_HAS_CELLULAR)
1820
#define SECRET_PIN ""
1921
#define SECRET_APN ""
2022
#define SECRET_LOGIN ""

examples/ArduinoIoTCloud-Callbacks/thingProperties.h

+2
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,6 @@ void initProperties() {
3333
//EthernetConnectionHandler ArduinoIoTPreferredConnection;
3434
/* Manual mode. It will fallback in DHCP mode if SECRET_OPTIONAL_IP is invalid or equal to "0.0.0.0" */
3535
EthernetConnectionHandler ArduinoIoTPreferredConnection(SECRET_OPTIONAL_IP, SECRET_OPTIONAL_DNS, SECRET_OPTIONAL_GATEWAY, SECRET_OPTIONAL_NETMASK);
36+
#elif defined(BOARD_HAS_CELLULAR)
37+
CellularConnectionHandler ArduinoIoTPreferredConnection(SECRET_PIN, SECRET_APN, SECRET_LOGIN, SECRET_PASS);
3638
#endif

examples/ArduinoIoTCloud-Schedule/arduino_secrets.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
#endif
1515

1616
/* MKR GSM 1400 */ /* MKR NB 1500 */ /* Portenta CAT.M1/NB IoT GNSS Shield */
17-
#if defined(BOARD_HAS_GSM) || defined(BOARD_HAS_NB) || defined(BOARD_HAS_CATM1_NBIOT)
17+
/* Portenta H7 and C33 + Portenta Mid Carrier + 4G Module */
18+
#if defined(BOARD_HAS_GSM) || defined(BOARD_HAS_NB) || \
19+
defined(BOARD_HAS_CATM1_NBIOT) || defined(BOARD_HAS_CELLULAR)
1820
#define SECRET_PIN ""
1921
#define SECRET_APN ""
2022
#define SECRET_LOGIN ""

examples/ArduinoIoTCloud-Schedule/thingProperties.h

+2
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,6 @@ void initProperties() {
5656
//EthernetConnectionHandler ArduinoIoTPreferredConnection;
5757
/* Manual mode. It will fallback in DHCP mode if SECRET_OPTIONAL_IP is invalid or equal to "0.0.0.0" */
5858
EthernetConnectionHandler ArduinoIoTPreferredConnection(SECRET_OPTIONAL_IP, SECRET_OPTIONAL_DNS, SECRET_OPTIONAL_GATEWAY, SECRET_OPTIONAL_NETMASK);
59+
#elif defined(BOARD_HAS_CELLULAR)
60+
CellularConnectionHandler ArduinoIoTPreferredConnection(SECRET_PIN, SECRET_APN, SECRET_LOGIN, SECRET_PASS);
5961
#endif

examples/utility/ArduinoIoTCloud_Travis_CI/arduino_secrets.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
#endif
1515

1616
/* MKR GSM 1400 */ /* MKR NB 1500 */ /* Portenta CAT.M1/NB IoT GNSS Shield */
17-
#if defined(BOARD_HAS_GSM) || defined(BOARD_HAS_NB) || defined(BOARD_HAS_CATM1_NBIOT)
17+
/* Portenta H7 and C33 + Portenta Mid Carrier + 4G Module */
18+
#if defined(BOARD_HAS_GSM) || defined(BOARD_HAS_NB) || \
19+
defined(BOARD_HAS_CATM1_NBIOT) || defined(BOARD_HAS_CELLULAR)
1820
#define SECRET_PIN ""
1921
#define SECRET_APN ""
2022
#define SECRET_LOGIN ""

examples/utility/ArduinoIoTCloud_Travis_CI/thingProperties.h

+2
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ String str_property_8;
6969
//EthernetConnectionHandler ArduinoIoTPreferredConnection;
7070
/* Manual mode. It will fallback in DHCP mode if SECRET_OPTIONAL_IP is invalid or equal to "0.0.0.0" */
7171
EthernetConnectionHandler ArduinoIoTPreferredConnection(SECRET_OPTIONAL_IP, SECRET_OPTIONAL_DNS, SECRET_OPTIONAL_GATEWAY, SECRET_OPTIONAL_NETMASK);
72+
#elif defined(BOARD_HAS_CELLULAR)
73+
CellularConnectionHandler ArduinoIoTPreferredConnection(SECRET_PIN, SECRET_APN, SECRET_LOGIN, SECRET_PASS);
7274
#endif
7375

7476
/******************************************************************************

0 commit comments

Comments
 (0)