]> cvs.zerfleddert.de Git - hmcfgusb/blobdiff - hmsniff.c
enable-hmmodiprf: add small script to enable a tty for HMIPRF
[hmcfgusb] / hmsniff.c
index 638ae1d4e96847e7c7ac178a5a95496abd3be78f..01afe05788f00b41597bb0c02d691de687708174 100644 (file)
--- a/hmsniff.c
+++ b/hmsniff.c
@@ -231,6 +231,7 @@ static int parse_hmuartlgw(enum hmuartlgw_dst dst, uint8_t *buf, int buf_len, vo
 
        switch(buf[0]) {
                case HMUARTLGW_APP_RECV:
+                       buf[3] = buf_len - 4;
                        dissect_hm(buf + 3, buf_len - 3);
                case HMUARTLGW_APP_ACK:
                        break;
@@ -322,7 +323,7 @@ int main(int argc, char **argv)
                        buf[1] = speed;
                        hmcfgusb_send(dev.hmcfgusb, buf, 2, 1);
                } else {
-                       dev.hmuartlgw = hmuart_init(uart, parse_hmuartlgw, &rdata);
+                       dev.hmuartlgw = hmuart_init(uart, parse_hmuartlgw, &rdata, 1);
                        if (!dev.hmuartlgw) {
                                fprintf(stderr, "Can't initialize HM-MOD-UART!\n");
                                exit(1);
Impressum, Datenschutz