]> cvs.zerfleddert.de Git - hmcfgusb/blobdiff - flash-ota.c
flash-ota: increment msgid when re-sending bootloader-request
[hmcfgusb] / flash-ota.c
index 953ed34de92fce5ca91c73756c164957be76ce6b..5e24aa6ddb74216e943b4318d94ad932c882b5b1 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