diff --git a/gatchat/test-qcdm.c b/gatchat/test-qcdm.c index a15ea9ce..c3619825 100644 --- a/gatchat/test-qcdm.c +++ b/gatchat/test-qcdm.c @@ -28,7 +28,6 @@ #include #include "gattty.h" -#include "gatutil.h" #include "gathdlc.h" static gboolean option_debug = FALSE; @@ -95,9 +94,6 @@ static void hdlc_debug(const char *str, void *data) static void hdlc_receive(const unsigned char *buf, gsize len, void *data) { - if (option_debug == TRUE) - g_at_util_debug_dump(TRUE, buf, len, hdlc_debug, "QCDM"); - parse_qcdm(buf, len); } @@ -107,10 +103,6 @@ static void send_command(GAtHDLC *hdlc, guint8 cmd) cmdbuf[0] = cmd; - if (option_debug == TRUE) - g_at_util_debug_dump(FALSE, cmdbuf, sizeof(cmdbuf), - hdlc_debug, "QCDM"); - g_at_hdlc_send(hdlc, cmdbuf, sizeof(cmdbuf)); } @@ -123,10 +115,6 @@ static void send_subsys_command(GAtHDLC *hdlc, guint8 id, guint16 cmd) cmdbuf[2] = cmd & 0xff; cmdbuf[3] = cmd >> 8; - if (option_debug == TRUE) - g_at_util_debug_dump(FALSE, cmdbuf, sizeof(cmdbuf), - hdlc_debug, "QCDM"); - g_at_hdlc_send(hdlc, cmdbuf, sizeof(cmdbuf)); } @@ -166,7 +154,7 @@ int main(int argc, char **argv) g_print("Device: %s\n", option_device); - channel = g_at_tty_open(option_device, NULL); + channel = g_at_tty_open_qcdm(option_device); if (channel == NULL) { g_printerr("Failed to open QCDM device\n"); return 1; @@ -184,6 +172,9 @@ int main(int argc, char **argv) if (option_debug == TRUE) g_at_hdlc_set_debug(hdlc, hdlc_debug, "HDLC"); + g_at_hdlc_set_xmit_accm(hdlc, 0); + g_at_hdlc_set_recv_accm(hdlc, 0); + g_at_hdlc_set_receive(hdlc, hdlc_receive, NULL); send_command(hdlc, 0x00); /* Version info */