Closed kirya-dev closed 10 months ago
Indeed, no data seems to have been received. Do you have a log that shows what really happens on the bus?
It seems no support for ID29 bits
Im started PR https://github.com/pylessard/python-udsoncan/pull/181
Thanks, How do I know when this PR is ready?
I will report logs.
But right now new problems detected! Didnt support:
Steps for reproduce:
print(client.get_supported_dtc().service_data.dtcs)
in application - no response in Time. and in logs:
PassThruWriteMsgs(1, [{ISO15765; RxStatus: 0; TxFlags: ISO15765_FRAME_PAD | CAN_29BIT_ID; TS: 00:00:00; LEN: 6; ExtraIndex: 0; Data: 18-DA-B0-F1-19-0A}], 1=>1, 1000) -> STATUS_NOERROR
PassThruReadMsgs(1, [], 1=>0, 1) -> ERR_BUFFER_EMPTY
PassThruReadMsgs(1, [{ISO15765; RxStatus: TX_MSG_TYPE | TX_INDICATION | CAN_29BIT_ID; TxFlags: 0; TS: 00:00:00.0390000; LEN: 4; ExtraIndex: 0; Data: 18-DA-B0-F1}], 1=>1, 1) -> STATUS_NOERROR
PassThruReadMsgs(1, [{ISO15765; RxStatus: START_OF_MESSAGE | CAN_29BIT_ID; TxFlags: 0; TS: 00:00:00.0500000; LEN: 4; ExtraIndex: 0; Data: 18-DA-F1-B0}], 1=>1, 1) -> STATUS_NOERROR
PassThruReadMsgs(1, [], 1=>0, 1) -> ERR_BUFFER_EMPTY
PassThruReadMsgs(1, [], 1=>0, 1) -> ERR_BUFFER_EMPTY
PassThruReadMsgs(1, [], 1=>0, 1) -> ERR_BUFFER_EMPTY
...
No any reaction on START_OF_MESSAGE 😯
UPD: Set Separation Time Min
Ioctl_ID.ISO15765_STMIN.value, 5
i can read all dtc with success.
I think we need to customize ioctl configs.
Works great with Ioctl_ID.ISO15765_STMIN.value, 0 Also in PR i add new method for formatting ID (ISO-15031-6)
Code example
with Client(conn, request_timeout=100, config=client_config) as client:
try:
client.change_session(DiagnosticSessionControl.Session.defaultSession)
dtc_data = client.get_supported_dtc().service_data
for i in range(0, dtc_data.dtc_count):
dtc = dtc_data.dtcs[i]
if dtc.status.pending:
print('Pending \t' + dtc.id_iso())
if dtc.status.confirmed:
print('Confirmed \t' + dtc.id_iso())
PS C:\Users\33gee\Desktop\can-v2-udsocan> py app.py
2023-10-15 15:37:27 [INFO] Connection: J2534 FirmwareVersion: b'CHIPSOFT J2534 Lite v. 1.5.2, SN: 253FA666B98BEF79', dllVersoin: b'CHIPSOFT J2534 DLL Library v. 1.5.2, Jan 4 2021 12:19:06', apiVersionb'04.04'
2023-10-15 15:37:27 [INFO] Connection: J2534 Connection opened
2023-10-15 15:37:27 [INFO] UdsClient: DiagnosticSessionControl<0x10> - Switching session to defaultSession (0x01)
2023-10-15 15:37:27 [DEBUG] Connection: Sending 2 bytes : [b'1001']
2023-10-15 15:37:27 [DEBUG] Connection: Received 2 bytes : [b'5001']
2023-10-15 15:37:27 [INFO] UdsClient: Received positive response for service DiagnosticSessionControl (0x10) from server.
2023-10-15 15:37:27 [INFO] UdsClient: ReadDTCInformation<0x19> - Sending request with subfunction "reportSupportedDTCs" (0x0A).
2023-10-15 15:37:27 [DEBUG] Connection: Sending 2 bytes : [b'190a']
2023-10-15 15:37:28 [DEBUG] Connection: Received 399 bytes : [b'......']
2023-10-15 15:37:28 [INFO] UdsClient: Received positive response for service ReadDTCInformation (0x19) from server.
Pending U0100-00
Confirmed U0100-00
Pending U0128-00
Confirmed U0128-00
Pending U0131-00
Confirmed U0131-00
Pending U0129-00
Confirmed U0129-00
Pending U0155-00
Confirmed U0155-00
Pending U0029-00
Confirmed U0029-00
Pending U3000-49
Confirmed U3000-49
Pending U0151-00
Confirmed U0151-00
Pending U12B7-00
Confirmed U12B7-00
Pending U0122-00
Confirmed U0122-00
Nice to look😊
Now ready for merge PR or review.
merged
Code:
Logs: