Problem with testTesterPresdent in the Samples
Problem with testTesterPresdent in the Samples
hello together,
I try to use your examples from the samples (C_C++)
the Peak CAN devices is connected, no controller, I want to use the servier_simulator.cpp!
when I achive the line "status = UDS_SvcTesterPresent_2013(channel, config, &request, PUDS_SVC_PARAM_TP_ZSUBF)," I get the status "PUDS_STATUS_NOT_INITIALIZED"
I am using VS!
my Quation is: why I can't get response from server_simulation?
thanks in Advance!
I try to use your examples from the samples (C_C++)
the Peak CAN devices is connected, no controller, I want to use the servier_simulator.cpp!
when I achive the line "status = UDS_SvcTesterPresent_2013(channel, config, &request, PUDS_SVC_PARAM_TP_ZSUBF)," I get the status "PUDS_STATUS_NOT_INITIALIZED"
I am using VS!
my Quation is: why I can't get response from server_simulation?
thanks in Advance!
- Attachments
-
- testerPresent.png (32.95 KiB) Viewed 4941 times
-
- Software Development
- Posts: 305
- Joined: Mon 9. Sep 2013, 12:21
Re: Problem with testTesterPresdent in the Samples
Hello,
You are using samples 05_server_simulator and 06_client_all_request.
Each sample initializes a CAN channel: by default client connects on USBBUS1 and server on USBBUS2.
Your client outputs "Initialize UDS:2" which is PCANTP_STATUS_ALREADY_INITIALIZED (channel is in use).
You cannot re-use the channel of the server simulator in the client example. You need to use 2 different CAN nodes.
You are using samples 05_server_simulator and 06_client_all_request.
Each sample initializes a CAN channel: by default client connects on USBBUS1 and server on USBBUS2.
Your client outputs "Initialize UDS:2" which is PCANTP_STATUS_ALREADY_INITIALIZED (channel is in use).
You cannot re-use the channel of the server simulator in the client example. You need to use 2 different CAN nodes.
Best regards,
Fabrice
Fabrice
Re: Problem with testTesterPresdent in the Samples
thaks for the quick response!
I have a PEAKCan with only one channel! if I modify the client_all_request.cpp to "client_handle = PCANTP_HANDLE_USBBUS1" and server_simulator to "tp_handle = PCANTP_HANDLE_USBBUS2"
I get in the screen "05-server_simulator.exe following outputs:
PCAN-UDS API Version - 2.3.2.350: OK
Initialize channel: KO
Set server address: KO
Set ISO 15765-4 timeouts values: KO
Get request timeout value (3435973836ms): KO
Get response timeout value (3435973836ms): KO
Set receive event parameter: KO
Start listening, press Q to quit.
I have a PEAKCan with only one channel! if I modify the client_all_request.cpp to "client_handle = PCANTP_HANDLE_USBBUS1" and server_simulator to "tp_handle = PCANTP_HANDLE_USBBUS2"
I get in the screen "05-server_simulator.exe following outputs:
PCAN-UDS API Version - 2.3.2.350: OK
Initialize channel: KO
Set server address: KO
Set ISO 15765-4 timeouts values: KO
Get request timeout value (3435973836ms): KO
Get response timeout value (3435973836ms): KO
Set receive event parameter: KO
Start listening, press Q to quit.
- Attachments
-
- Screenshot 2024-10-16 090638.png (35.88 KiB) Viewed 4906 times
-
- Software Development
- Posts: 305
- Joined: Mon 9. Sep 2013, 12:21
Re: Problem with testTesterPresdent in the Samples
Hello,
If you don't have a physical UDS ECU connected to your CAN bus, you won't be able to any UDS communication with only one CAN node.
Otherwise you need to plug another PCAN device on your PC and connect both CAN devices with a CAN cable (which must be terminated with 120 ohm resistances on each side).
If you don't have a physical UDS ECU connected to your CAN bus, you won't be able to any UDS communication with only one CAN node.
Otherwise you need to plug another PCAN device on your PC and connect both CAN devices with a CAN cable (which must be terminated with 120 ohm resistances on each side).
Best regards,
Fabrice
Fabrice
Re: Problem with testTesterPresdent in the Samples
ich thought "05_server_simulator" will take over the role of physical ECU. isn't it?
for what I need "05_server_simulator"?
for what I need "05_server_simulator"?
-
- Sales & Support
- Posts: 1083
- Joined: Fri 20. Sep 2019, 13:31
Re: Problem with testTesterPresdent in the Samples
Hello,
As mentioned by my colleague F.Vergnaud:
So yes, the example acts as a server, without a client however there won't be much happening.
BR
Marvin
As mentioned by my colleague F.Vergnaud:
Otherwise you need to plug another PCAN device on your PC and connect both CAN devices with a CAN cable
So yes, the example acts as a server, without a client however there won't be much happening.
BR
Marvin
---
Marvin Heidemann
PEAK-Support Team
Marvin Heidemann
PEAK-Support Team
Re: Problem with testTesterPresdent in the Samples
hello,
the samples work perfectly with two PeakCAN devices (USB and Pro). thanks for the support and the advice with resistence!
I still have another basic quetion:
I want to connect now a physical ECU to PCAN-USB and I want to reuse your example "\06_client_all_request"
here are my steps:
1. Hardware: connect ECU to PeaCAN USB (in between 120 ohm resistance)
2. Software
the samples work perfectly with two PeakCAN devices (USB and Pro). thanks for the support and the advice with resistence!
I still have another basic quetion:
I want to connect now a physical ECU to PCAN-USB and I want to reuse your example "\06_client_all_request"
here are my steps:
1. Hardware: connect ECU to PeaCAN USB (in between 120 ohm resistance)
2. Software
- - Open your \06_client_all_request.cpp code
- to change:- config.nai.source_addr = phys. CAN ID from my tester;
config.nai.target_addr = phys. CAN ID from my ECU;
- I start only "06_lient_all_request.cpp" in VS - config.nai.source_addr = phys. CAN ID from my tester;
-
- Software Development
- Posts: 305
- Joined: Mon 9. Sep 2013, 12:21
Re: Problem with testTesterPresdent in the Samples
Hello,
Be careful, source_addr and target_address are adresses defined during network design, it is not related to CAN IDs. CAN IDs are used in ISOTP mappings: it links CAN IDs and ISOTP network addressing.
Please check the documentation §4.3 "UDS and ISO-TP Network Addressing Information", and especially "§4.3.3 PCAN-UDS 2.x Example" if you need to configure non standardized CAN IDs.
Be careful, source_addr and target_address are adresses defined during network design, it is not related to CAN IDs. CAN IDs are used in ISOTP mappings: it links CAN IDs and ISOTP network addressing.
Please check the documentation §4.3 "UDS and ISO-TP Network Addressing Information", and especially "§4.3.3 PCAN-UDS 2.x Example" if you need to configure non standardized CAN IDs.
Best regards,
Fabrice
Fabrice