From 44c3a0a8aada7670278fe432faf909a97bdf99cb Mon Sep 17 00:00:00 2001
From: iceman1001 <iceman@iuse.se>
Date: Sun, 24 Mar 2019 19:50:53 +0100
Subject: [PATCH] chg: 'lf keri demod' - added stopbits

---
 client/cmdlfkeri.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/client/cmdlfkeri.c b/client/cmdlfkeri.c
index 3228e31f4..0fda6c683 100644
--- a/client/cmdlfkeri.c
+++ b/client/cmdlfkeri.c
@@ -41,8 +41,8 @@ int usage_lf_keri_sim(void) {
 // find KERI preamble in already demoded data
 int detectKeri(uint8_t *dest, size_t *size, bool *invert) {
 
-    uint8_t preamble[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1};
-    uint8_t preamble_i[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0};
+    uint8_t preamble[] = {1,1,1,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1};
+    uint8_t preamble_i[] = {0,0,0,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0};
 
     // sanity check.
     if (*size < sizeof(preamble) + 100) return -1;
@@ -157,18 +157,16 @@ int CmdKeriClone(const char *Cmd) {
             2 << T5555_MAXBLOCK_SHIFT;
     }
 
-
     // MSB is ONE
     internalid |= 0x80000000;
-
+    
     // 3 LSB is ONE
     uint64_t data = ((uint64_t)internalid << 3) + 7;
+    PrintAndLogEx(INFO, "Preparing to clone KERI to T55x7 with Internal Id: %" PRIx64, internalid );
 
     //
     blocks[1] = data >> 32;
     blocks[2] = data & 0xFFFFFFFF;
-
-    PrintAndLogEx(INFO, "Preparing to clone KERI to T55x7 with Internal Id: %u", internalid);
     print_blocks(blocks, 3);