summaryrefslogtreecommitdiffstats
path: root/gatchat
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2011-07-26 16:00:15 +0200
committerMarcel Holtmann <marcel@holtmann.org>2011-07-26 16:02:24 +0200
commit73b711551c11a83e4de6d4f28400c5286216a7cc (patch)
tree21b7b38aece4b151fe82745af728cb3f192dfcba /gatchat
parent0f29c33c5b823198e8288b5785a0aeaeb8b9b78c (diff)
downloadofono-73b711551c11a83e4de6d4f28400c5286216a7cc.tar.bz2
gatchat: Fix port settings and debugging for QCDM test tool
Diffstat (limited to 'gatchat')
-rw-r--r--gatchat/test-qcdm.c17
1 files changed, 4 insertions, 13 deletions
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 <glib.h>
#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 */