@@ -202,7 +202,7 @@ const String & NotecardConnectionHandler::syncArduinoDeviceId (const String & de
202
202
}
203
203
}
204
204
205
- if (_keep_alive && initiateNotehubSync ()) {
205
+ if (initiateNotehubSync ()) {
206
206
Debug.print (DBG_ERROR, F (" Failed to sync Arduino Device ID." ));
207
207
}
208
208
}
@@ -223,14 +223,12 @@ int NotecardConnectionHandler::syncSecretDeviceKey (const String & secret_device
223
223
result = NotecardCommunicationError::NOTECARD_ERROR_GENERIC;
224
224
} else if (J *req = _notecard.newRequest (" var.set" )) {
225
225
JAddStringToObject (req, " file" , NOTEFILE_SECURE_DATABASE);
226
- JAddStringToObject (req, " name" , " arduino_iot_cloud_secret_key " );
226
+ JAddStringToObject (req, " name" , " secret_device_key " );
227
227
if (secret_device_key_.length () > 0 ) {
228
228
JAddStringToObject (req, " text" , secret_device_key_.c_str ());
229
229
}
230
- // Queue the Note when `_keep_alive` is disabled
231
- if (_keep_alive) {
232
- JAddBoolToObject (req, " sync" , true );
233
- }
230
+ JAddBoolToObject (req, " live" , true );
231
+ JAddBoolToObject (req, " sync" , true );
234
232
if (J *rsp = _notecard.requestAndResponse (req)) {
235
233
// Check the response for errors
236
234
if (NoteResponseError (rsp)) {
@@ -448,7 +446,6 @@ NetworkConnectionState NotecardConnectionHandler::update_handleInit()
448
446
}
449
447
#endif
450
448
451
- #if defined(BOARD_HAS_SECRET_KEY)
452
449
// Set database template to support LoRa/Satellite Notecard
453
450
if (NetworkConnectionState::INIT == result) {
454
451
if (J *req = _notecard.newRequest (" note.template" )) {
@@ -483,7 +480,6 @@ NetworkConnectionState NotecardConnectionHandler::update_handleInit()
483
480
result = NetworkConnectionState::ERROR; // Assume the worst
484
481
}
485
482
}
486
- #endif
487
483
488
484
// Set inbound template to support LoRa/Satellite Notecard
489
485
if (NetworkConnectionState::INIT == result) {
0 commit comments