hello,
I want to check Testerpresent service (0x3E) in PCAN Basic API work well.
first, I checked positive response when I submit Testerpresent service (0x3E) after entering Extended Session (10 03).
but there's no interval sending message about 2000 ms. so I wander whether it's work well in PCAN Basic API Tool or tester should add interval sending request.
If the tool itself doesn't send a interval message, How do I write the code?
I'd appreciate it if you could show me an example.
Best Regards,
thanks
How to implementation of TesterPresent using python
-
- Software Development
- Posts: 305
- Joined: Mon 9. Sep 2013, 12:21
Re: How to implementation of TesterPresent using python
Hello,
PCANBasic is an API that only supports low-level CAN communication:
- read and write CAN/CANFD frames,
- it does not implement mechanism from higher level protocol like UDS (or ISO-TP which is required by UDS protocol).
Yet if you only want to send a TesterPresent request (which is a Single Frame request), you can do so with PCAN-Basic.
You mentioned entering Extended Session and would like the API to keep alive the session by sending TesterPresent: this is the kind of UDS mechanism that is not handle by PCAN-Basic.
You need to implement it on your own: simply create a thread that transmits a TesterPresent request every 2000ms.
Please be careful: if you intend to make further UDS communication with PCANBasic, you may have to handle segmented communications on your own (ISO-TP protocol).
PCANBasic is an API that only supports low-level CAN communication:
- read and write CAN/CANFD frames,
- it does not implement mechanism from higher level protocol like UDS (or ISO-TP which is required by UDS protocol).
Yet if you only want to send a TesterPresent request (which is a Single Frame request), you can do so with PCAN-Basic.
You mentioned entering Extended Session and would like the API to keep alive the session by sending TesterPresent: this is the kind of UDS mechanism that is not handle by PCAN-Basic.
You need to implement it on your own: simply create a thread that transmits a TesterPresent request every 2000ms.
Please be careful: if you intend to make further UDS communication with PCANBasic, you may have to handle segmented communications on your own (ISO-TP protocol).
Best regards,
Fabrice
Fabrice
Re: How to implementation of TesterPresent using python
Dear F.Vergnaud
Hello,
first of all, Thanks to you, I solved these problems.
It's easy to make new thread. but new thread, main thread and tkinter thread are hard to connect each other......
ISO-TP protocol is soooo complicated!!
Thanks so much for your help.
Best Regards,
Hello,
first of all, Thanks to you, I solved these problems.
It's easy to make new thread. but new thread, main thread and tkinter thread are hard to connect each other......
ISO-TP protocol is soooo complicated!!
Thanks so much for your help.
Best Regards,