From e20b1c52d3c243a4d843a094124322dd4c307e4f Mon Sep 17 00:00:00 2001 From: Martin Preuss Date: Sun, 4 May 2025 03:30:28 +0200 Subject: [PATCH] increased verbosity. --- apps/aqhome-nodes/r_forward.c | 2 ++ apps/aqhome-tool/nodes/flash.c | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/apps/aqhome-nodes/r_forward.c b/apps/aqhome-nodes/r_forward.c index f011e93..29798e8 100644 --- a/apps/aqhome-nodes/r_forward.c +++ b/apps/aqhome-nodes/r_forward.c @@ -20,6 +20,7 @@ #include "aqhome/msg/ipc/m_ipc_connect.h" #include "aqhome/msg/ipc/m_ipc_result.h" #include "aqhome/msg/ipc/m_ipc_tag16.h" +#include #include @@ -54,6 +55,7 @@ void AQH_NodeServer_HandleForward(AQH_OBJECT *o, AQH_OBJECT *ep, const AQH_MESSA AQH_Message_SetData(nodeMsg, ptr, len); AQH_Message_SetUsedSize(nodeMsg, len); AQH_Endpoint_AddMsgOut(xo->ttyEndpoint, nodeMsg); + DBG_ERROR(NULL, "Forwarding node message %d to node", AQH_NodeMessage_GetMsgType(nodeMsg)); } else { DBG_ERROR(NULL, "TTY endpoint currently not connected"); diff --git a/apps/aqhome-tool/nodes/flash.c b/apps/aqhome-tool/nodes/flash.c index 3396685..29ca336 100644 --- a/apps/aqhome-tool/nodes/flash.c +++ b/apps/aqhome-tool/nodes/flash.c @@ -26,6 +26,7 @@ #include #include +#include #include @@ -308,6 +309,8 @@ int _flashRecord(AQH_OBJECT *o, // usleep(100000); sendLen=(len>pageSize)?pageSize:len; fprintf(stdout, " - sending page: addr=%04x, len=%d (%d bytes left)\n", address, sendLen, len); +// GWEN_Text_DumpString((const char*)ptr, sendLen, 5); + rv=_flashData(o, address, ptr, sendLen, timeoutInSeconds); if (rv<0) { DBG_INFO(NULL, "here (%d)", rv); @@ -338,6 +341,16 @@ int _flashData(AQH_OBJECT *o, uint32_t address, const uint8_t *ptr, uint32_t len DBG_ERROR(NULL, "Error creating message"); return GWEN_ERROR_GENERIC; } + + if (0) { + GWEN_BUFFER *dbuf; + + dbuf=GWEN_Buffer_new(0, 256, 0, 1); + AQH_NodeMessage_DumpToBuffer(nodeMsg, dbuf, "sent"); + fprintf(stderr, "%s\n", GWEN_Buffer_GetStart(dbuf)); + GWEN_Buffer_free(dbuf); + } + rv=_trySendMsgAndWaitForFlashResponse(o, nodeMsg, GWEN_Buffer_GetStart(dbuf), timeoutInSeconds); GWEN_Buffer_free(dbuf); return rv;