From 81ff8e125c4100ccb86be1dffb1222951cdbac6f Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Mon, 25 Apr 2022 15:49:35 -0400 Subject: [PATCH] canbus: send 8 bytes in the id response The last byte contains the "node id" command, which is used to identify the application. Signed-off-by: Eric Callahan --- src/generic/canbus.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/generic/canbus.c b/src/generic/canbus.c index 230f59ff..dc470c25 100644 --- a/src/generic/canbus.c +++ b/src/generic/canbus.c @@ -127,9 +127,10 @@ can_process_query_unassigned(uint32_t id, uint32_t len, uint8_t *data) uint8_t send[8]; send[0] = CANBUS_RESP_NEED_NODEID; memcpy(&send[1], canbus_uuid, sizeof(canbus_uuid)); + send[7] = CANBUS_CMD_SET_NODEID; // Send with retry for (;;) { - int ret = canbus_send(CANBUS_ID_ADMIN_RESP, 7, send); + int ret = canbus_send(CANBUS_ID_ADMIN_RESP, 8, send); if (ret >= 0) return; }