Skip to content

Commit 88584ed

Browse files
committed
MCU8MASS-976 MCU8MASS-348 MCU8MASS-942 Add some more log output if the security profile is not set up
1 parent 39814aa commit 88584ed

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

src/http_client.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ static HttpResponse sendData(const char* endpoint,
116116
HTTP_TIMEOUT)) {
117117
Log.error("Timed out whilst waiting on delivering the HTTP "
118118
"payload. Is the "
119-
"server online?");
119+
"server online? If you're using HTTPS, you might need to "
120+
"provision with a different CA certificate.");
120121
return http_response;
121122
}
122123

src/mqtt_client.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,11 @@ bool MqttClientClass::begin(const char* client_id,
433433
}
434434

435435
if (SequansController.writeCommand(command) != ResponseResult::OK) {
436-
Log.error("Failed to configure MQTT");
436+
Log.error(
437+
"Failed to configure MQTT. The TLS setup might be incorrect. "
438+
"If you're using a custom broker with TLS, run the provision "
439+
"example sketch in order to provision for a custom MQTT broker "
440+
"with TLS.");
437441
return false;
438442
}
439443
} else {
@@ -467,7 +471,9 @@ bool MqttClientClass::begin(const char* client_id,
467471

468472
char urc[URC_DATA_BUFFER_SIZE] = "";
469473
if (!SequansController.waitForURC(HCESIGN_URC, urc, sizeof(urc))) {
470-
Log.error("Timed out whilst waiting for TLS signing\r\n");
474+
Log.error("Timed out whilst waiting for TLS signing. Please verify "
475+
"your certificate setup (run the provision Arduino "
476+
"sketch to set this up for a new broker).\r\n");
471477
return false;
472478
}
473479

src/sequans_controller.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ SequansControllerClass::readResponse(char* out_buffer,
661661

662662
// Enough to hold the OK and ERROR termination if the out_buffer is NULL
663663
// and the result is not needed
664-
char placeholder_buffer[10] = "";
664+
char placeholder_buffer[32] = "";
665665

666666
char* buffer = placeholder_buffer;
667667
size_t buffer_size = sizeof(placeholder_buffer);

0 commit comments

Comments
 (0)