Skip to content

Commit e9239c3

Browse files
Mahmood Mohammed Seoudclaude
andcommitted
🔍 debug: hex dump request_meta on both agent and server sides
Print first 16 bytes of dtp_meta_req_t on send (agent) and receive (APM server) to find where payload_id gets corrupted from 1 to 4. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 268b5e4 commit e9239c3

2 files changed

Lines changed: 22 additions & 1 deletion

File tree

satdeploy-agent/src/dtp_client.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,22 @@ int dtp_download_file(uint32_t server_node, uint8_t payload_id,
150150
return -1;
151151
}
152152

153+
/* Debug: dump request_meta before sending */
154+
{
155+
uint8_t *raw = (uint8_t *)&session->request_meta;
156+
printf("[dtp-debug] request_meta (first 16 bytes):");
157+
for (int i = 0; i < 16 && i < (int)sizeof(session->request_meta); i++)
158+
printf(" %02x", raw[i]);
159+
printf("\n");
160+
printf("[dtp-debug] throughput=%u nof_intervals=%u payload_id=%u mtu=%u session_id=%u\n",
161+
session->request_meta.throughput,
162+
session->request_meta.nof_intervals,
163+
session->request_meta.payload_id,
164+
session->request_meta.mtu,
165+
session->request_meta.session_id);
166+
fflush(stdout);
167+
}
168+
153169
/* Set user context and hooks BEFORE starting the transfer */
154170
dtp_session_set_user_ctx(session, &ctx);
155171

satdeploy-apm/src/satdeploy_apm.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,12 @@ static void *dtp_server_thread(void *arg) {
332332
continue;
333333
}
334334

335-
printf("[dtp-server] Got metadata request from node %d\n", csp_conn_src(conn));
335+
printf("[dtp-server] Got metadata request from node %d, len=%u\n",
336+
csp_conn_src(conn), packet->length);
337+
printf("[dtp-server] raw packet data (first 16 bytes):");
338+
for (int i = 0; i < 16 && i < packet->length; i++)
339+
printf(" %02x", packet->data[i]);
340+
printf("\n");
336341
fflush(stdout);
337342

338343
packet = setup_server_transfer(&server_transfer_ctx, csp_conn_src(conn), packet);

0 commit comments

Comments
 (0)