|
31 | 31 | #define NOTEFILE_BASE_NAME "arduino_iot_cloud"
|
32 | 32 |
|
33 | 33 | // Notecard LoRa requires us to choose an arbitrary port between 1-99
|
34 |
| -#define NOTEFILE_DATABASE_LORA_PORT 1 |
35 | 34 | #define NOTEFILE_INBOUND_LORA_PORT 2
|
36 | 35 | #define NOTEFILE_OUTBOUND_LORA_PORT 3
|
37 | 36 |
|
38 | 37 | // Note that we use "s" versions of the Notefile extensions to ensure that
|
39 | 38 | // traffic always happens on a secure transport
|
40 |
| -#define NOTEFILE_SECURE_DATABASE NOTEFILE_BASE_NAME ".dbs" |
41 | 39 | #define NOTEFILE_SECURE_INBOUND NOTEFILE_BASE_NAME ".qis"
|
42 | 40 | #define NOTEFILE_SECURE_OUTBOUND NOTEFILE_BASE_NAME ".qos"
|
43 | 41 |
|
@@ -423,41 +421,6 @@ NetworkConnectionState NotecardConnectionHandler::update_handleInit()
|
423 | 421 | }
|
424 | 422 | #endif
|
425 | 423 |
|
426 |
| - // Set database template to support LoRa/Satellite Notecard |
427 |
| - if (NetworkConnectionState::INIT == result) { |
428 |
| - if (J *req = _notecard.newRequest("note.template")) { |
429 |
| - JAddStringToObject(req, "file", NOTEFILE_SECURE_DATABASE); |
430 |
| - JAddStringToObject(req, "format", "compact"); // Support LoRa/Satellite Notecards |
431 |
| - JAddIntToObject(req, "port", NOTEFILE_DATABASE_LORA_PORT); // Support LoRa/Satellite Notecards |
432 |
| - if (J *body = JAddObjectToObject(req, "body")) { |
433 |
| - JAddStringToObject(body, "text", TSTRINGV); |
434 |
| - JAddNumberToObject(body, "value", TFLOAT64); |
435 |
| - JAddBoolToObject(body, "flag", TBOOL); |
436 |
| - if (J *rsp = _notecard.requestAndResponse(req)) { |
437 |
| - // Check the response for errors |
438 |
| - if (NoteResponseError(rsp)) { |
439 |
| - const char *err = JGetString(rsp, "err"); |
440 |
| - Debug.print(DBG_ERROR, F("%s"), err); |
441 |
| - result = NetworkConnectionState::ERROR; |
442 |
| - } else { |
443 |
| - result = NetworkConnectionState::INIT; |
444 |
| - } |
445 |
| - JDelete(rsp); |
446 |
| - } else { |
447 |
| - Debug.print(DBG_ERROR, F("Failed to receive response from Notecard.")); |
448 |
| - result = NetworkConnectionState::ERROR; // Assume the worst |
449 |
| - } |
450 |
| - } else { |
451 |
| - Debug.print(DBG_ERROR, "Failed to allocate request: note.template:body"); |
452 |
| - JFree(req); |
453 |
| - result = NetworkConnectionState::ERROR; // Assume the worst |
454 |
| - } |
455 |
| - } else { |
456 |
| - Debug.print(DBG_ERROR, "Failed to allocate request: note.template"); |
457 |
| - result = NetworkConnectionState::ERROR; // Assume the worst |
458 |
| - } |
459 |
| - } |
460 |
| - |
461 | 424 | // Set inbound template to support LoRa/Satellite Notecard
|
462 | 425 | if (NetworkConnectionState::INIT == result) {
|
463 | 426 | if (J *req = _notecard.newRequest("note.template")) {
|
|
0 commit comments