- "request_id": "7F4",
- "response_id": "7F5"
Code: Select all
status = self.iso_tp_lib.CANTP_AddMapping(self.pcan_channel, self.txid, self.rxid,
PCANTP_ID_CAN_11BIT, PCANTP_FORMAT_NORMAL, PCANTP_MESSAGE_DIAGNOSTIC,
N_SA, N_TA_PHYS, PCANTP_ADDRESSING_PHYSICAL, N_RA)
status = self.iso_tp_lib.CANTP_AddMapping(self.pcan_channel, self.rxid, self.txid,
PCANTP_ID_CAN_11BIT, PCANTP_FORMAT_NORMAL, PCANTP_MESSAGE_DIAGNOSTIC,
N_TA_PHYS, N_SA, PCANTP_ADDRESSING_PHYSICAL, N_RA)
When I am requesting readByDataIdentifier (0xCF99) from my client application I am getting below error:
Code: Select all
[InvalidResponseException] : service execution returned an invalid response. Reason : Payload first byte is not a know service response ID.
ERROR: service execution returned an invalid response. Reason : Payload first byte is not a know service response ID.
CAN traces with 11-bits & (extended) 29-bits msgs (ECU sends both types of msgs 11-bits & 29-bits but client is only configured for 11-bits CAN msg for sen & receive)
Actually, error represents that it doesn't able to find 0x7F as a first byte from the CAN msg payload and that is why it discards the package. But the client receives 29-bits CAN msg payloads (0x00 0x02) even it configured for 11-bits CAN msgs only. You can see it in below image. This issue frequently occurs every certain request from the client (Not at fix rate). Sometime it takes time to reproduce.8896) 21042.0 Rx 07F4 8 03 22 CF 99 55 55 55 55 // ReadByDataIndetifier request
8897) 21042.3 Rx 17A00000 8 02 00 02 00 02 00 02 00
8898) 21042.5 Rx 17B00000 4 02 00 02 00 // It consider this as a response and give us error -- see below for more details
8899) 21042.8 Rx 16000000 6 00 00 00 00 00 00
8900) 21043.2 Rx 16200000 8 00 00 00 00 00 00 00 00
8901) 21043.5 Rx 16300000 8 00 00 00 00 00 00 00 00
8902) 21043.7 Rx 07F5 8 03 7F 22 31 55 55 55 55 // ReadByDataIndetifier correct response
Function calling sequence from my client application
Code: Select all
i) send_request()
response = Response.from_payload(payload)
ii) python -> Lib -> site-packages -> udsoncan -> exceptions.py -> from_payload()
if payload[0] != 0x7F: # Positive
response.service = services.cls_from_response_id(payload[0])
if response.service is None:
response.valid = False
response.invalid_reason = "Payload first byte is not a know service response ID."
return response
- PCANBasic.dll -> 4.3
- PCAN-ISO-TP.dll -> 2.0
Thank you in advance!!