aqhome-tool: temporarily added delay between sending of packages.
This commit is contained in:
@@ -555,6 +555,8 @@ int _sendFlashRecord(GWEN_MSG_ENDPOINT *epTcp,
|
|||||||
else
|
else
|
||||||
fprintf(stdout, "Send data: dest addr=%04x, len=%d bytes\n", address, sendLen);
|
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);
|
msgNode=AQH_FlashDataMsg_new(0, 0xc1, AQH_MSG_TYPE_FLASH_DATA, address, ptr, sendLen);
|
||||||
if (msgNode==NULL) {
|
if (msgNode==NULL) {
|
||||||
DBG_ERROR(NULL, "Error creating message");
|
DBG_ERROR(NULL, "Error creating message");
|
||||||
@@ -568,8 +570,10 @@ int _sendFlashRecord(GWEN_MSG_ENDPOINT *epTcp,
|
|||||||
GWEN_Msg_free(msgNode);
|
GWEN_Msg_free(msgNode);
|
||||||
|
|
||||||
rv=_waitForFlashResponseMessage(epTcp, timeoutInSeconds);
|
rv=_waitForFlashResponseMessage(epTcp, timeoutInSeconds);
|
||||||
if (rv==0)
|
if (rv==0) {
|
||||||
break;
|
fprintf(stdout, "-> ACK received.\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
DBG_ERROR(NULL, "Negative response to flash data message (%d)", rv);
|
DBG_ERROR(NULL, "Negative response to flash data message (%d)", rv);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user