pylessard / python-udsoncan

Python implementation of UDS (ISO-14229) standard.
MIT License
586 stars 201 forks source link

Functionality for CAN-FD #116

Closed Ahelion closed 2 years ago

Ahelion commented 2 years ago

General question(not quite issues): Background: I can set up the Bus ( vector ) as CAN_FD, but when the message is send via client.read_data_by_id the Baud Rate Switch BIT is not set. Is there something extra to do for the client? Checked with CANOE for logging only.

pylessard commented 2 years ago

Do you use Python-can? If you do, you must set the flag is_fd=true when sending a message. If you use the PythonCanIsoTPconenction, there's an option in the TransportLayer to automatically set that flag.

See : https://can-isotp.readthedocs.io/en/latest/isotp/implementation.html#can_fd

Ahelion commented 2 years ago

Do you use Python-can? If you do, you must set the flag is_fd=true when sending a message. If you use the PythonCanIsoTPconenction, there's an option in the TransportLayer to automatically set that flag.

See : https://can-isotp.readthedocs.io/en/latest/isotp/implementation.html#can_fd

When setting the BUS, yes, so I set both rates, and set the fd thing to true. then I use this: udsoncan.client.Client(self, conn, config=default_client_config, request_timeout = None)

in a with statement:

with client(bla bla) as client: client.read_data_by_id() -> here I can see the message on the BUS, but no bit rate switch

pylessard commented 2 years ago

You must set the option on the TransportLayer. I gave you a link to the aprameter definition. Read what I wrote.

pylessard commented 2 years ago

With python-can, you can use a Can-fd bus to send normal message. So you also need to set a flag on each message. I think this is what confuses you.

Ahelion commented 2 years ago

I did not forget, just waiting for HW to free up, for me to test it.

pylessard commented 2 years ago

shall we close this issue?

Ahelion commented 2 years ago

shall we close this issue?

YES! thank you very much