aqhome-tool: temporarily added delay between sending of packages.

This commit is contained in:
Martin Preuss
2025-01-22 01:09:56 +01:00
parent 0a10d136d5
commit 19af9daea7

View File

@@ -555,6 +555,8 @@ int _sendFlashRecord(GWEN_MSG_ENDPOINT *epTcp,
else
fprintf(stdout, "Send data: dest addr=%04x, len=%d bytes\n", address, sendLen);
usleep(100000);
msgNode=AQH_FlashDataMsg_new(0, 0xc1, AQH_MSG_TYPE_FLASH_DATA, address, ptr, sendLen);
if (msgNode==NULL) {
DBG_ERROR(NULL, "Error creating message");
@@ -568,8 +570,10 @@ int _sendFlashRecord(GWEN_MSG_ENDPOINT *epTcp,
GWEN_Msg_free(msgNode);
rv=_waitForFlashResponseMessage(epTcp, timeoutInSeconds);
if (rv==0)
break;
if (rv==0) {
fprintf(stdout, "-> ACK received.\n");
break;
}
else {
DBG_ERROR(NULL, "Negative response to flash data message (%d)", rv);
}