I am using PCAN-OBDII library API and running the OBDII C++ sample project on laptop.
All the required libraries/dlls like PCAN-UDS, PCAN-ISOTP and PCAN-Basic are present.
Also since, I do not get run-time errors of missing DLLs, I am assuming that the required
DLLs are found at run-time. PCAN USB hardware is connected to the laptop.
Please refer the following sample code snippet:
Code: Select all
// Set the PCAN-Channel to use (PCAN-USB Channel 1)
Channel = POBDII_USBBUS1;
// Define logging (of creation and destruction, and for newly created connections)
BYTE debug = POBDII_LOGGING_TO_STDOUT;
OBDII_SetValue(POBDII_USBBUS1, POBDII_PARAM_LOGGING, &debug, 1);
printf("Channel: 0x%02x, CAN BUS Status: 0x%02x\n\n", Channel, OBDII_GetStatus(Channel));
status = OBDII_Initialize(Channel, POBDII_BAUDRATE_500K, 0, 0, 0);
Subsequent OBDII_Initialize() returns 0x15 i.e POBDII_ERROR_UNSUPPORTED_ECUS.
With the same hardware, if I run the UDS sample project, UDS_Initialize(Channel, PUDS_BAUD_500K, 0, 0, 0);
returns successfully. I have successfully tested all the UDS requests with my ECU.
I have been working on this for a few hours now and haven't been able to figure out what
could cause the OBDII calls to fail. Am I missing something ? Would appreciate suggestions on this.
Many thanks,
Ajit (India)