From cc19d01eca8a36cf8fcec2eed2a943bd2d2a4804 Mon Sep 17 00:00:00 2001 From: James Portman Date: Sun, 15 Sep 2024 17:08:28 +0100 Subject: [PATCH 1/2] Add support for ioctl clear message filters --- j2534/j2534.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/j2534/j2534.c b/j2534/j2534.c index 361e5d1..65fa9c5 100644 --- a/j2534/j2534.c +++ b/j2534/j2534.c @@ -1797,6 +1797,16 @@ int32_t PassThruIoctl(const unsigned long ChannelID, const unsigned long ioctlID r = LIBUSB_SUCCESS; } + if (ioctlID == J2534_CLEAR_MSG_FILTERS) + { + // TODO: this would be good to have + if (write_log) + writelog("[CLEAR_MSG_FILTERS]\n"); + + // Unsure what needs to happen here + + // r = LIBUSB_SUCCESS; + } EXIT_IOCTL: if (write_log) From 2698e05bd2399fa768ad0f3ca3a27e4c9524416a Mon Sep 17 00:00:00 2001 From: no Date: Sun, 15 Sep 2024 19:58:46 +0100 Subject: [PATCH 2/2] try ark command --- j2534/j2534.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/j2534/j2534.c b/j2534/j2534.c index 65fa9c5..af5f3ba 100644 --- a/j2534/j2534.c +++ b/j2534/j2534.c @@ -1802,10 +1802,12 @@ int32_t PassThruIoctl(const unsigned long ChannelID, const unsigned long ioctlID // TODO: this would be good to have if (write_log) writelog("[CLEAR_MSG_FILTERS]\n"); - - // Unsure what needs to happen here - - // r = LIBUSB_SUCCESS; + // atk5 -1 4 + // unsure what the 5 is - protocol ID? channel ID? + // 4 is command sequence number - seems to be optional + snprintf(data, MAX_LEN, "atk%lu -1\r\n", ChannelID); + // setting NULL for expected reply accepts an "aro" which is the norm + r = usb_send_expect(data, strlen(data), MAX_LEN, 2000, NULL); } EXIT_IOCTL: