mirror of
https://gitlab.com/mobian1/eg25-manager.git
synced 2025-08-29 23:32:14 +02:00
Merge branch 'at_logging' into 'master'
Fix logging of at commands (was preventing sending them) See merge request mobian1/devices/eg25-manager!36
This commit is contained in:
7
src/at.c
7
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
|
||||
|
Reference in New Issue
Block a user