diff --git a/src/at.c b/src/at.c index b50ceea..b8bb3e8 100644 --- a/src/at.c +++ b/src/at.c @@ -83,8 +83,6 @@ gboolean at_send_command(struct EG25Manager *manager) manager->at_callback = at_cmd->callback; - g_message("Sending command: %s", g_strstrip(command)); - do { ret = write(manager->at_fd, &command[pos], len); @@ -243,12 +241,15 @@ static gboolean modem_response(gint fd, } while (ret > 0 && pos < (sizeof(response) - 1)); if (pos > 0) { + g_autofree gchar *escaped = NULL; + response[pos] = 0; g_strstrip(response); if (strlen(response) == 0) return TRUE; - g_message("Response: [%s]", response); + escaped = g_strescape(response, "\""); + g_message("Response: [%s]", escaped); /* * When the modem is started, it outputs 'RDY' to indicate that