@@ -84,8 +84,11 @@ class ArduinoIoTCloudClass {
84
84
ArduinoIoTCloudClass ();
85
85
~ArduinoIoTCloudClass ();
86
86
87
- int begin (ConnectionHandler &connection, String device_id, String password, String brokerAddress = DEFAULT_BROKER_ADDRESS_USER_PASS_AUTH, uint16_t brokerPort = DEFAULT_BROKER_PORT_USER_PASS_AUTH);
87
+ # ifdef BOARD_HAS_ECCX08
88
88
int begin (ConnectionHandler &connection, String brokerAddress = DEFAULT_BROKER_ADDRESS_SECURE_AUTH, uint16_t brokerPort = DEFAULT_BROKER_PORT_SECURE_AUTH);
89
+ #else
90
+ int begin (ConnectionHandler &connection, String brokerAddress = DEFAULT_BROKER_ADDRESS_USER_PASS_AUTH, uint16_t brokerPort = DEFAULT_BROKER_PORT_USER_PASS_AUTH);
91
+ #endif
89
92
int begin (Client &net, String brokerAddress = DEFAULT_BROKER_ADDRESS_SECURE_AUTH, uint16_t brokerPort = DEFAULT_BROKER_PORT_SECURE_AUTH);
90
93
// Class constant declaration
91
94
static const int MQTT_TRANSMIT_BUFFER_SIZE = 256 ;
@@ -109,7 +112,14 @@ class ArduinoIoTCloudClass {
109
112
inline void setThingId (String const thing_id) {
110
113
_thing_id = thing_id;
111
114
};
112
-
115
+ #ifdef BOARD_ESP
116
+ inline void setDeviceId (String const device_id) {
117
+ _device_id = device_id;
118
+ }
119
+ inline void setPassword (String const password) {
120
+ _password = password;
121
+ }
122
+ #endif
113
123
inline String getThingId () const {
114
124
return _thing_id;
115
125
};
@@ -209,7 +219,7 @@ class ArduinoIoTCloudClass {
209
219
210
220
void sendPropertiesToCloud ();
211
221
212
- String _device_id, _password, _thing_id, _brokerAddress;
222
+ String _device_id, _thing_id, _brokerAddress;
213
223
uint16_t _brokerPort;
214
224
215
225
ArduinoCloudThing Thing;
@@ -219,6 +229,7 @@ class ArduinoIoTCloudClass {
219
229
#elif defined(BOARD_ESP)
220
230
WiFiClientSecure *_sslClient;
221
231
X509List _certificate;
232
+ String _password;
222
233
#endif
223
234
224
235
MqttClient *_mqttClient;
0 commit comments