Page 1 of 1

DEBUG_CAN seems not to work

Posted: Tue 18. Feb 2020, 17:23
by MaxenceD
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...

Re: DEBUG_CAN seems not to work

Posted: Wed 19. Feb 2020, 09:26
by K.Wagner
Hello,

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

Re: DEBUG_CAN seems not to work

Posted: Wed 19. Feb 2020, 09:31
by F.Vergnaud
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.

Re: DEBUG_CAN seems not to work

Posted: Wed 19. Feb 2020, 09:56
by MaxenceD
Hello,
Indeed, the file is there. Again, thanks for the quick support !