PCAN UDS Message Flow Control and Tester present problem?

A free API for the communication with control devices according to UDS (ISO 14229-1)
Ken0711
Posts: 21
Joined: Wed 19. Jul 2023, 03:04

PCAN UDS Message Flow Control and Tester present problem?

Post by Ken0711 » Thu 27. Jul 2023, 08:39

Hi,

(Question 1)
When From Sender send the service and the get the response message number more than 8 bytes ,and the sender send the flow control message ,but actually the sender only send the request and then waitforservice ,there is nothing to be sent between sender and receiver,so the flow control whether is from waitforservice or pcan .and flow control message (30 0A 0A),But from sender ,never define block size and Stmin,so it also from the PCAN ?

As shown below message

Code: Select all

     5)       106.6  Tx         0784  8  02 19 0A 55 55 55 55 55 
     6)       107.1  Rx         078C  8  10 0F 59 0A 11 FD 01 51
     7)       108.2  Tx         0784  8  30 0A 0A 55 55 55 55 55 
     8)       109.9  Rx         078C  8  21 11 FD 01 42 11 FD 01 
     9)       111.2  Rx         078C  8  22 06 11 FF FF FF FF FF
Code As Shown Attachment!

(Question 2)
Sometimes when the code wait the next operation ,the sender send the 3E 80 automatically, but from program ,we never use the function SvcRoutineControl
So the service send by the PCAN?Time difference is 2s.

Code: Select all

   127)    118091.2  Tx         0784  8  02 3E 80 55 55 55 55 55 
   128)    118091.2  Tx         0784  8  02 3E 80 55 55 55 55 55 
   129)    120092.5  Tx         0784  8  02 3E 80 55 55 55 55 55 
   130)    120092.5  Tx         0784  8  02 3E 80 55 55 55 55 55 
   131)    122094.8  Tx         0784  8  02 3E 80 55 55 55 55 55 
   132)    122094.8  Tx         0784  8  02 3E 80 55 55 55 55 55 
   133)    124096.1  Tx         0784  8  02 3E 80 55 55 55 55 55 
   134)    124096.1  Tx         0784  8  02 3E 80 55 55 55 55 55 

Thanks!
Attachments
code.PNG
code.PNG (48.47 KiB) Viewed 30857 times
Last edited by K.Wagner on Thu 27. Jul 2023, 08:47, edited 1 time in total.
Reason: Code formatting for better reading

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

Re: PCAN UDS Message Flow Control and Tester present problem?

Post by K.Wagner » Thu 27. Jul 2023, 10:05

Hello,

first of all, please, do not send an email to our support with the same questions as in the forum. You are doubling our job. Choose a way for posting your questions and keep tied to it.

To your questions:
Ken0711 wrote:
Thu 27. Jul 2023, 08:39
When From Sender send the service and the get the response message number more than 8 bytes ,and the sender send the flow control message ,but actually the sender only send the request and then waitforservice ,there is nothing to be sent between sender and receiver,so the flow control whether is from waitforservice or pcan .and flow control message (30 0A 0A),But from sender ,never define block size and Stmin,so it also from the PCAN ?
Not sure to understand your question as you seem to use the word "sender" for both participants. Nevertheless, what you are seeing is just the ISO 15765-2 transport protocol. The block size and stmin are set by the ECU (responder) as seen in the Clear-to-Send frame

Code: Select all

7)       108.2  Tx         0784  8  30 0A 0A 55 55 55 55 55
After that the whola data ist sent.
Ken0711 wrote:
Thu 27. Jul 2023, 08:39
Sometimes when the code wait the next operation ,the sender send the 3E 80 automatically, but from program ,we never use the function SvcRoutineControl
So the service send by the PCAN?Time difference is 2s.
UDS uses automatically the tester present. This is described in the ISO 15765 norm. It is also described in our documentation (see picture attached).

Please check the ISO norm and the UDS documentation to understand how it works. We actually do not give support on the norm itself but using the library. Thank for your understanding.
Attachments
tester-present.PNG
tester-present.PNG (39.91 KiB) Viewed 30841 times
Best regards,
Keneth

Ken0711
Posts: 21
Joined: Wed 19. Jul 2023, 03:04

Re: PCAN UDS Message Flow Control and Tester present problem?

Post by Ken0711 » Thu 27. Jul 2023, 10:41

Hi,

Thanks for your support!

For normally understand ,the BS and STmin from the Server.
but actually ,from my message ,it sent by client(As shown Tx) ,this is confused !

Tx 0784 8 30 0A 0A 55 55 55 55 55

If i want to disable the automatic tester present, to use the Parameters?
PUDS_PARAMETER_USE_NO_RESPONSE_AUTOMATIC_TESTER_PRESENT = 0x213

Thanks !

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

Re: PCAN UDS Message Flow Control and Tester present problem?

Post by K.Wagner » Thu 27. Jul 2023, 11:04

Dear,
Ken0711 wrote:
Thu 27. Jul 2023, 10:41
For normally understand ,the BS and STmin from the Server.
but actually ,from my message ,it sent by client(As shown Tx) ,this is confused !
I do not know your code or your implementation, but in an UDS communication, the node sending information requested by another node is the responder. It doesn't have to be an ECU, but also an application.We do this for instance with the sample projects for simulating and showing communication examples.
Ken0711 wrote:
Thu 27. Jul 2023, 10:41
If i want to disable the automatic tester present, to use the Parameters?
PUDS_PARAMETER_USE_NO_RESPONSE_AUTOMATIC_TESTER_PRESENT = 0x213
I already gave you the answer to this indirectly within my last post. PUDS_PARAMETER_AUTOMATIC_TESTER_PRESENT is a configurable parameter with a default value of true (active). If you set it to false, the logical consequence is that it will be deactivated.
tester-present2.PNG
tester-present2.PNG (30.73 KiB) Viewed 30837 times
Again, please read the documentation and the norm to understand how UDS and the library work...
Best regards,
Keneth

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

Re: PCAN UDS Message Flow Control and Tester present problem?

Post by K.Wagner » Thu 27. Jul 2023, 11:29

Just for clarification on:
Ken0711 wrote:
Thu 27. Jul 2023, 10:41
For normally understand ,the BS and STmin from the Server.
but actually ,from my message ,it sent by client(As shown Tx) ,this is confused !
the node receiving the first frame is the one sending the STmin/BS information
Best regards,
Keneth

Ken0711
Posts: 21
Joined: Wed 19. Jul 2023, 03:04

Re: PCAN UDS Message Flow Control and Tester present problem?

Post by Ken0711 » Wed 13. Dec 2023, 07:08

Good Morning Pcan support,

Pcan send the 3E 80 per two seconds automatically during transfer data.

and the 3E 38 is sent by the physical address ,so now i intended to send the 3E 80 by the Functional address

so how to change the address?

Thanks!

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

Re: PCAN UDS Message Flow Control and Tester present problem?

Post by K.Wagner » Wed 13. Dec 2023, 09:42

Hello,
Ken0711 wrote:
Wed 13. Dec 2023, 07:08
so now i intended to send the 3E 80 by the Functional address
The address used for communication is part of the network address information. This information has to be passed to each service for request configuration. Within the sample project 06_client_all_request you can see how a TesterPresent is sent using functional addressing. Here's a snippet of it:

Code: Select all

// Sends a functional TesterPresent message
config.type = uds_msgtype.PUDS_MSGTYPE_USDT;
config.nai.target_type = cantp_isotp_addressing.PCANTP_ISOTP_ADDRESSING_FUNCTIONAL;
config.nai.target_addr = (UInt16)uds_address.PUDS_ADDRESS_ISO_15765_4_ADDR_OBD_FUNCTIONAL;
Console.WriteLine(); Console.WriteLine(); Console.WriteLine("Sends a functional TesterPresent message: ");
status = UDSApi.SvcTesterPresent_2013(channel, config, out request, UDSApi.uds_svc_param_tp.PUDS_SVC_PARAM_TP_ZSUBF);
Best regards,
Keneth

Ken0711
Posts: 21
Joined: Wed 19. Jul 2023, 03:04

Re: PCAN UDS Message Flow Control and Tester present problem?

Post by Ken0711 » Wed 13. Dec 2023, 11:30

Hi,

If I sent the tester present manually ,the PCAN will continued to send the tester present automatedly or not ?

Thanks!

Ken0711
Posts: 21
Joined: Wed 19. Jul 2023, 03:04

Re: PCAN UDS Message Flow Control and Tester present problem?

Post by Ken0711 » Wed 13. Dec 2023, 11:35

Hi,

When Flashing ,there still have the tester present sent by the canid(0000),and physical address ,Please check the Attachment .

Image

why there still have the tester present from canid 0000?

Thanks!
Attachments
3E80.PNG
3E80.PNG (103.17 KiB) Viewed 28338 times

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

Re: PCAN UDS Message Flow Control and Tester present problem?

Post by K.Wagner » Wed 13. Dec 2023, 16:49

Hello,

the frame 0000h [3E 80] is not an ISOTP frame and it is not comming from the PCAN-UDS/PCAN-ISO-TP APIs. This looks like a bad configured UUDT message, or just a CAN frame being transmitted from any other participant. The actual automatic tester-present frame is 073Ch [02 3E 80]
Ken0711 wrote:
Wed 13. Dec 2023, 11:30
If I sent the tester present manually ,the PCAN will continued to send the tester present automatedly or not ?
The automated tester present mechanism is activated when a non default diagnostic session is active and it only supports default physical addressing.
Best regards,
Keneth

Post Reply