Page 1 of 1

PCAN ISO TP Gleichen SA TA

Posted: Thu 15. Jun 2017, 21:09
by carlo@otakeys
Hallo ,

API PCAN ISO TP WINDOWS

Ich habe ein problem mit der channel configuration extended addressing.

Toyota hat ein fremde iso-tp -configuration
SA und TA sind gleich , CanidTX und CanidRX verschiedend , aber gleich für verschiedene Ecu's.

Beispiel ecu1 l:
CanIDtx : 0x750
Canidrx : 0x758
extended addressing
SA : 0x40
TA :0x40
ecu2:
CanIDtx : 0x750
Canidrx : 0x758
extended addressing
SA : 0x31
TA :0x31

I'm diesen setup gibt es einen fremde output beim senden von ein TPcanTPmessage. Beim senden wird der CanIDRX genutzt und nicht der CanidTX , als wir der SA und TA verschiendend configurieren wir der CanIDTX genzutzt(ist OK).

Beim alle andere configurationen extended addressing wo der SA TA verschiedend sind habe ich keine problemen.
Wan ich diesen configuration unter Linux aufuhren , socket Can , dan ist es möglich die SA einzel zu gebrauchen.

TPcanTPmessage hat keine Canid TX , RX , nur Sa und TA , ist senden dan nicht der trigger der canid TX zu nutzen ?
Gibt es auch einen NONE_CANID wie beim broadcast , aber für TA ?

grt
Carlo

Re: PCAN ISO TP Gleichen SA TA

Posted: Fri 16. Jun 2017, 15:48
by F.Vergnaud
Hallo Carlo,

Ich werde auf Englisch antworten, wenn es ein Problem ist, lassen Sie uns wissen, und ein Kollege wird auf Deutsch beantworten. ;)

I've reproduced your use-case and manage to successfully configure your mappings. First I've used the PCTPServer sample to simulate your ECUs, in order to do so I've added the following mappings:

Code: Select all

	// Those mappings are used to receive 0x750 ISO-TP frames (and internally transmit the Flow Control frame with 0x758)
	//  note that with only these mappings, the ECU is not able to send messages.
	Status = CANTP_AddMapping(Channel, 0x750, 0x758,
		PCANTP_ID_CAN_11BIT, PCANTP_FORMAT_EXTENDED, PCANTP_MESSAGE_DIAGNOSTIC,
		0x40, 0x40, PCANTP_ADDRESSING_PHYSICAL, 0x00);
	Status = CANTP_AddMapping(Channel, 0x750, 0x758,
		PCANTP_ID_CAN_11BIT, PCANTP_FORMAT_EXTENDED, PCANTP_MESSAGE_DIAGNOSTIC,
		0x31, 0x31, PCANTP_ADDRESSING_PHYSICAL, 0x00);
Next on a Tester Client, I've configured the following 4 mappings:

Code: Select all

	// mappings used to receive 0x758 ISO-TP frames (i.e. those mappings are used to read the Flow Control fram transmitted by the ECU) 
	// (additionnaly should a First Frame be received, the Client will answer with a 0x750 Flow Control frame)
	Status = CANTP_AddMapping(Channel, 0x758, 0x750,
		PCANTP_ID_CAN_11BIT,
		PCANTP_FORMAT_EXTENDED,
		PCANTP_MESSAGE_DIAGNOSTIC,
		PCANTP_ADDRESSING_PHYSICAL,
		0x40, 0x40, 0x00);
	Status = CANTP_AddMapping(Channel, 0x758, 0x750,
		PCANTP_ID_CAN_11BIT,
		PCANTP_FORMAT_EXTENDED,
		PCANTP_MESSAGE_DIAGNOSTIC,
		PCANTP_ADDRESSING_PHYSICAL,
		0x31, 0x31, 0x00);

Code: Select all

	// mappings used to receive 0x750 ISO-TP frames (and use 0x758 for the Flow Control frame)
	// but this can also be intrepreted as mappings used to send 0x750 ISO-TP frames (in this case the canIdResponse is not used)
	Status = CANTP_AddMapping(Channel, 0x750, 0x758,
		PCANTP_ID_CAN_11BIT,
		PCANTP_FORMAT_EXTENDED,
		PCANTP_MESSAGE_DIAGNOSTIC,
		PCANTP_ADDRESSING_PHYSICAL,
		0x40, 0x40, 0x00);
	Status = CANTP_AddMapping(Channel, 0x750, 0x758,
		PCANTP_ID_CAN_11BIT,
		PCANTP_FORMAT_EXTENDED,
		PCANTP_MESSAGE_DIAGNOSTIC,
		PCANTP_ADDRESSING_PHYSICAL,
		0x31, 0x31, 0x00);
The problem in your case is that, when you want to transmit to the target (0x40 for instance), the API finds 2 possible mappings (because the Source and Target addresses are the same). Then the first mapping in the internal list of mappings that matches your request will be used.
In my example you can notice that the mappings to transmit the messages are added at the end because the mappings defined last have a greater priority when a mapping is searched.

Re: PCAN ISO TP Gleichen SA TA

Posted: Mon 19. Jun 2017, 08:58
by carlo@otakeys
Hi Fabrice,

I have tested your solution to switch order off the mapping , indeed this is the solution for my problem.

Thnx!!

Carlo