flash-ota: increment msgid when re-sending bootloader-request
authorMichael Gernoth <michael@gernoth.net>
Fri, 11 Sep 2015 12:15:46 +0000 (14:15 +0200)
committerMichael Gernoth <michael@gernoth.net>
Fri, 11 Sep 2015 12:15:46 +0000 (14:15 +0200)
flash-ota.c

index 953ed34..5e24aa6 100644 (file)
@@ -660,7 +660,6 @@ int main(int argc, char **argv)
 
        if (hmid && my_hmid) {
                printf("Sending device with hmid %06x to bootloader\n", hmid);
-               out[MSGID] = msgid++;
                out[CTL] = 0x30;
                out[TYPE] = 0x11;
                SET_SRC(out, my_hmid);
@@ -670,6 +669,7 @@ int main(int argc, char **argv)
 
                cnt = 3;
                do {
+                       out[MSGID] = msgid++;
                        if (send_hm_message(&dev, &rdata, out)) {
                                break;
                        }
Impressum, Datenschutz