DEBUG_CAN seems not to work

A free API for the communication with control devices according to UDS (ISO 14229-1)
Locked
MaxenceD
Posts: 8
Joined: Fri 14. Feb 2020, 11:21

DEBUG_CAN seems not to work

Post by MaxenceD » Tue 18. Feb 2020, 17:23

Hello,
I'm trying to use the parameter PUDS_DEBUG_CAN to trace CAN messages to the STDOUT, however I don't see anything written there from the UDS API.

Code: Select all

   
    quint8 ulBuffer = PUDS_DEBUG_CAN;
    fprintf(stdout,"Setting PUDS_DEBUG_CAN to %d\n",ulBuffer);
    status = uds->_UDS_SetValue(PUDS_USBBUS1, PUDS_PARAM_DEBUG, &ulBuffer, sizeof(ulBuffer));
    fprintf(stdout,"Status: %d\n",status);

    ulBuffer = 0;
    status = uds->_UDS_GetValue(PUDS_USBBUS1, PUDS_PARAM_DEBUG, &ulBuffer, sizeof(ulBuffer));
    fprintf(stdout,"Getting PUDS_DEBUG_CAN: %d\n",ulBuffer);
    fprintf(stdout,"Status: %d\n",status);

    TPUDSMsg msg;
    do{
        status = uds->_UDS_Read(PUDS_USBBUS1, &msg);
    }while(status != 0);
    fprintf(stdout, "received message with data:   %d %d %d \n", msg.DATA.RAW[0],msg.DATA.RAW[1],msg.DATA.RAW[2]);

    fflush(stdout);


Output in console -> no trace from UDS API:

Code: Select all

Setting PUDSetting PUDS_DEBUG_CAN to 1
Status: 0
Getting PUDS_DEBUG_CAN: 1
Status: 0
received message with data:   127 49 204
Press <RETURN> to close this window...

K.Wagner
Software Development
Software Development
Posts: 767
Joined: Wed 22. Sep 2010, 13:36

Re: DEBUG_CAN seems not to work

Post by K.Wagner » Wed 19. Feb 2020, 09:26

Hello,

indeed, it seems as this parameter is not working properly. We will investigate this. Thanks for bringing this to our attention
Best regards,
Keneth

F.Vergnaud
Software Development
Software Development
Posts: 170
Joined: Mon 9. Sep 2013, 12:21

Re: DEBUG_CAN seems not to work

Post by F.Vergnaud » Wed 19. Feb 2020, 09:31

Dear Maxence,

The debug CAN information has indeed changed and the documentation is deprecated, thanks for pointing that out.
CAN information will be logged in the file "PCANBasic.log" in the working directory of the application.
Best regards,
Fabrice

MaxenceD
Posts: 8
Joined: Fri 14. Feb 2020, 11:21

Re: DEBUG_CAN seems not to work

Post by MaxenceD » Wed 19. Feb 2020, 09:56

Hello,
Indeed, the file is there. Again, thanks for the quick support !

Locked