1. Skip to Menu
  2. Skip to Content
  3. Skip to Footer>

Attention!

We typically ship most Monday through Thursdays. We will have reduced staff starting March 29th with daily shipping resuming around April 11th. There will still be 1 or 2 shipping days during that time, but not daily. You will receive an automated email with tracking information the evening your order ships. If you can't wait, consider purchasing from STM Tuned or email us for suggestions if you're outside the USA. We thank you for your patience!

 

How can I log the J2534 calls my application makes for debugging?

PDF Print E-mail

The Openport 2.0 J2534 DLL has debugging options which are settable via an IOCTL call that provide debug output for every subsequent J2534 call that is made. You can turn this debugging on by making the following J2534 call:

#include "j2534_tactrix.h"
#include "j2534.h"
// the following are defined in the above header
// #define TX_IOCTL_BASE                            0x70000
// #define TX_IOCTL_SET_DLL_DEBUG_FLAGS            (TX_IOCTL_BASE+1)
// #define TX_IOCTL_DLL_DEBUG_FLAG_J2534_CALLS                       0x00000001

void main()
{
J2534 j2534;
j2534.init();
unsigned int flags = TX_IOCTL_DLL_DEBUG_FLAG_J2534_CALLS;
j2534.PassThruIoctl(0,TX_IOCTL_SET_DLL_DEBUG_FLAGS,(void*)flags,NULL);

// now use the J2534 DLL as you wish (open, connect, etc.)
}

Once the debugging is turned on, you can capture the output in any Windows debugger or dbgview. Notice that this call can be made as soon as the DLL is loaded, before connecting to any device, allowing you to log even the opening and closing of the device. Keep in mind that the debug output can significantly slow the throughput of the DLL - do not leave the debugging on all of the time.