You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when i set
bus = EtasBus(channel=CHANNEL_1, fd=True, bitrate=500000),
but it send the message by CAN:
Expected behavior
I want to read the UDS DTC in FD CAN by using ETAS 582.1
Additional context
OS and version: win10
Python version: 3.9 (win32)
python-can version: 4.4.0
python-can interface/s (if applicable): ETAS 582.1
#!/usr/bin/env python
-- coding: utf-8 --
import isotp
import can
import logging
import udsoncan
import snapshot_did_class
from can.interfaces.etas import EtasBus # value can / 582
from udsoncan.connections import PythonIsoTpConnection
from udsoncan.client import Client
status_mask = 0xAF
isotp_params = {
'stmin': 32, # 将请求发送方在连续帧之间等待时间。0 ~ 127ms或100 ~ 900ns,取值范围为0xf1 ~ 0xf9
# Will request the sender to wait 32ms between consecutive frame. 0-127ms or 100-900ns with values from 0xF1-0xF9
'blocksize': 8, # 流控帧单包大小,0为不限制
# Request the sender to send 8 consecutives frames before sending a new flow control message
'wftmax': 0, # 错误帧最大数
# Number of wait frame allowed before triggering an error
'tx_padding': 0xCC, # 空白字节CAN是0x00, FD CANi用0xCC填充
# Will pad all transmitted CAN messages with byte 0x00. None means no padding
'rx_flowcontrol_timeout': 1000, # 流控帧超时时间
# Triggers a timeout if a flow control is awaited for more than 1000 milliseconds
'rx_consecutive_frame_timeout': 1000, # 连续帧超时时间
# Triggers a timeout if a consecutive frame is awaited for more than 1000 milliseconds
}
Describe the bug
when i set
![1000113614](https://private-user-images.githubusercontent.com/50546434/340310035-ae844f0d-3956-4211-a9f7-e4bde7aea2e5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM3NDkyMDcsIm5iZiI6MTcyMzc0ODkwNywicGF0aCI6Ii81MDU0NjQzNC8zNDAzMTAwMzUtYWU4NDRmMGQtMzk1Ni00MjExLWE5ZjctZTRiZGU3YWVhMmU1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE1VDE5MDgyN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRkMmY5NGQ2MDk0NDQ0Yzk4MWNkZmIxZjIzODEzODQ1YTI2NzIwYjlmZDZjZDFkNDllZTY5ZDdlYWMyODRkYzEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Sl3Xrh5HU72yDgZP-QCIpwEwv5DzWMIregA_7PFeWb8)
bus = EtasBus(channel=CHANNEL_1, fd=True, bitrate=500000),
but it send the message by CAN:
Expected behavior
I want to read the UDS DTC in FD CAN by using ETAS 582.1
Additional context
OS and version: win10
Python version: 3.9 (win32)
python-can version: 4.4.0
python-can interface/s (if applicable): ETAS 582.1
#!/usr/bin/env python
-- coding: utf-8 --
import isotp
import can
import logging
import udsoncan
import snapshot_did_class
from can.interfaces.etas import EtasBus # value can / 582
from udsoncan.connections import PythonIsoTpConnection
from udsoncan.client import Client
status_mask = 0xAF
isotp_params = {
'stmin': 32, # 将请求发送方在连续帧之间等待时间。0 ~ 127ms或100 ~ 900ns,取值范围为0xf1 ~ 0xf9
# Will request the sender to wait 32ms between consecutive frame. 0-127ms or 100-900ns with values from 0xF1-0xF9
'blocksize': 8, # 流控帧单包大小,0为不限制
# Request the sender to send 8 consecutives frames before sending a new flow control message
'wftmax': 0, # 错误帧最大数
# Number of wait frame allowed before triggering an error
'tx_padding': 0xCC, # 空白字节CAN是0x00, FD CANi用0xCC填充
# Will pad all transmitted CAN messages with byte 0x00. None means no padding
'rx_flowcontrol_timeout': 1000, # 流控帧超时时间
# Triggers a timeout if a flow control is awaited for more than 1000 milliseconds
'rx_consecutive_frame_timeout': 1000, # 连续帧超时时间
# Triggers a timeout if a consecutive frame is awaited for more than 1000 milliseconds
}
configs = can.interface.detect_available_configs(interfaces="etas")
CHANNEL_1 = configs[0]['channel'] # CHANNEL_1:ETAS://USB/ES582.1:115287/CAN:1
bus = EtasBus(channel=CHANNEL_1, fd=True, bitrate=500000) # 582的CAN1才行
tp_addr = isotp.Address(isotp.AddressingMode.Normal_11bits, txid=0x78A, rxid=0x7CA) # Network layer addressing scheme
stack = isotp.CanStack(bus=bus, address=tp_addr, params=isotp_params) # Network/Transport layer (IsoTP protocol)
conn = PythonIsoTpConnection(stack) # interface between Application and Transport layer, Define the connection using
configRE300 = snapshot_did_class.config
def read_dtc_and_snapshot():
with Client(conn, request_timeout=100, config=configRE300) as client: # Application layer (UDS protocol)
response = client.get_dtc_by_status_mask(status_mask)
read_dtc_and_snapshot()
The text was updated successfully, but these errors were encountered: