}
if (msg[CTL] & 0x20) {
- int cnt = 10;
+ int cnt = 3;
int pfd;
do {
errno = 0;
break;
}
} while(cnt--);
+
+ if (cnt == -1) {
+ fprintf(stderr, "\nMissing ACK!\n");
+ return 0;
+ }
}
}
break;
printf("HomeMatic OTA flasher version " VERSION "\n\n");
- while((opt = getopt(argc, argv, "f:s:c:s:h")) != -1) {
+ while((opt = getopt(argc, argv, "b:c:f:hs:")) != -1) {
switch (opt) {
case 'b':
bps = atoi(optarg);