- for (i = 0; i < len; i++) {
- printf("%02X", buf[i]);
- }
- printf("\n");
- printf("Packet information:\n");
- printf("\tLength: %u\n", buf[0]);
- printf("\tMessage ID: %u\n", buf[1]);
- printf("\tSender: %02x%02x%02x\n", buf[4], buf[5], buf[6]);
- printf("\tReceiver: %02x%02x%02x\n", buf[7], buf[8], buf[9]);
- printf("\tControl Byte: 0x%02x\n", buf[2]);
- printf("\t\tFlags: ");
- if (buf[2] & (1 << 0)) printf("WAKEUP ");
- if (buf[2] & (1 << 1)) printf("WAKEMEUP ");
- if (buf[2] & (1 << 2)) printf("CFG ");
- if (buf[2] & (1 << 3)) printf("? ");
- if (buf[2] & (1 << 4)) printf("BURST ");
- if (buf[2] & (1 << 5)) printf("BIDI ");
- if (buf[2] & (1 << 6)) printf("RPTED ");
- if (buf[2] & (1 << 7)) printf("RPTEN ");
- printf("\n");
- printf("\tMessage type: %s (0x%02x)\n", hm_message_types(buf[3]), buf[3]);
- printf("\tMesage: ");
- for (i = 10; i < len; i++) {
- printf("%02X", buf[i]);
- }
- printf("\n");
+ if (verbose) {
+ printf("%s.%06ld: ", ts, tv.tv_usec);
+
+ for (i = 0; i < len; i++) {
+ printf("%02X", buf[i]);
+ }
+ printf("\n");
+ printf("Packet information:\n");
+ printf("\tLength: %u\n", buf[0]);
+ printf("\tMessage ID: %u\n", buf[1]);
+ printf("\tSender: %02x%02x%02x\n", buf[4], buf[5], buf[6]);
+ printf("\tReceiver: %02x%02x%02x\n", buf[7], buf[8], buf[9]);
+ printf("\tControl Byte: 0x%02x\n", buf[2]);
+ printf("\t\tFlags: ");
+ if (buf[2] & (1 << 0)) printf("WAKEUP ");
+ if (buf[2] & (1 << 1)) printf("WAKEMEUP ");
+ if (buf[2] & (1 << 2)) printf("CFG ");
+ if (buf[2] & (1 << 3)) printf("? ");
+ if (buf[2] & (1 << 4)) printf("BURST ");
+ if (buf[2] & (1 << 5)) printf("BIDI ");
+ if (buf[2] & (1 << 6)) printf("RPTED ");
+ if (buf[2] & (1 << 7)) printf("RPTEN ");
+ printf("\n");
+ printf("\tMessage type: %s (0x%02x 0x%02x)\n", hm_message_types(buf[3], buf[10]), buf[3], buf[10]);
+ printf("\tMessage: ");
+ for (i = 10; i < len; i++) {
+ printf("%02X", buf[i]);
+ }
+ printf("\n");
+
+ printf("\n");
+ } else {
+ if (!(count++ % 20))
+ printf(" LL NR FL CM sender recvr payload\n");