flash-ota: delay sending AES response a bit
authorMichael Gernoth <michael@gernoth.net>
Sun, 8 Nov 2015 18:23:40 +0000 (19:23 +0100)
committerMichael Gernoth <michael@gernoth.net>
Sun, 8 Nov 2015 18:23:40 +0000 (19:23 +0100)
Some devices (at least HM-CC-IT-WM-W-EU) don't like receiving an
AES response too early and will ignore it. Delay sending a bit to
fix this.

flash-ota.c
version.h

index 22f98ce..5d39e6c 100644 (file)
@@ -325,6 +325,7 @@ int send_hm_message(struct ota_dev *dev, struct recv_data *rdata, uint8_t *msg)
                                                                                        memcpy(&(rbuf[PAYLOAD]), resp, 16);
                                                                                        SET_LEN_FROM_PAYLOADLEN(rbuf, 16);
 
+                                                                                       usleep(110000); /* Determined by a fair dice roll */
                                                                                        return send_hm_message(dev, rdata, rbuf);
                                                                                }
                                                                        }
index 402e396..bdbf6ab 100644 (file)
--- a/version.h
+++ b/version.h
@@ -1 +1 @@
-#define VERSION        "0.102"
+#define VERSION        "0.102-git"
Impressum, Datenschutz