]> git.zerfleddert.de Git - hmcfgusb/commitdiff
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 22f98ce7ac89ec1fb29c51dd6b810f37ee14343c..5d39e6c1f4840a25656e5bd02a7ca6fdb58165d5 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);
 
                                                                                        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);
                                                                                }
                                                                        }
                                                                                        return send_hm_message(dev, rdata, rbuf);
                                                                                }
                                                                        }
index 402e39678749abdc8285f4f88b05dbbe5d87cc98..bdbf6ab34a2b791cf13594a85f042a351e3e7486 100644 (file)
--- a/version.h
+++ b/version.h
@@ -1 +1 @@
-#define VERSION        "0.102"
+#define VERSION        "0.102-git"
Impressum, Datenschutz