Open maziu opened 3 months ago
Looks interesting interesting as for me, i would love to have it for j1939 ;) . @hartkopp , what do you think?
Isn't this already part of isotpdump?
Just to follow up on this pending discussion:
First the use of the "human readable" candump output is a bad idea as it would make much more sense to use the compact log-file format. And then also use the functions provided by lib.c and lib.h.
Another approach could be to move the entire UDS decoding stuff from the current isotpdump into some uds.h and uds.c files. This UDS decoding can then be used similar to lib.[ch] either from isotpdump and isotpsniffer.
@olerem : is there any substantial difference between ISO-TP and UDS for automotive diagnosis and its use in J1939?
@hartkopp ISO-TP is transport protocol (like TCP in TCP/IP stack), while UDS is application layer. ISO-TP can carry different data than UDS, however, most common use case is actually transporting UDS. But UDS frames can exist on a bus without ISO-TP (only single ones, but seen cars that use only them).
Imho it makes sense to extract UDS to separate library, however, I can't decide which one.
I'm willing to work in next few weeks moving uds interpreter to separate library if you find if neccessary - I'm using these tools now daily and can contribute to them.
Also, answering your previous comment - it's partially in the isotpdump right now. However, when analysing unknown traffic on a bus (eg. reverse engineering) it's not practical. Isotpdump required source and target address, and use case described by me helps to find interesting addresses, by analysing all of them.
@hartkopp ISO-TP is transport protocol (like TCP in TCP/IP stack), while UDS is application layer. ISO-TP can carry different data than UDS, however, most common use case is actually transporting UDS. But UDS frames can exist on a bus without ISO-TP (only single ones, but seen cars that use only them).
Yes, I'm aware what UDS looks like. You can also put it on top of IP with DoIP.
Imho it makes sense to extract UDS to separate library, however, I can't decide which one.
Maybe "library" is a bit too high level naming. My wish would be to minimize code duplication and simply have UDS definitions in one place. Mainly moving these definitions out of isotpdump and make them accessable for isotpdump and isotpsniffer.
I'm willing to work in next few weeks moving uds interpreter to separate library if you find if neccessary - I'm using these tools now daily and can contribute to them.
Thanks! That's very valuable that you use these tools and therefore can form requirements.
Also, answering your previous comment - it's partially in the isotpdump right now. However, when analysing unknown traffic on a bus (eg. reverse engineering) it's not practical. Isotpdump required source and target address, and use case described by me helps to find interesting addresses, by analysing all of them.
Ah, ok. Got your point.
Although isotpsniffer got a new feature to monitor broadcast/functional addressing yesterday (https://github.com/linux-can/can-utils/commit/367e0df4aa6b7ada09826f858092d4502548ce1c), you would like to have a tool which not only displays a single UDS communication but can show multiple UDS interactions??
Hello, I'm extending can-utils toolset for my personal usage, and wanted to discuss whether these tools may be useful to be added to repo. I've created tool for finding possible ISO TP traffic on a bus, and interpreting frames as UDS services. Goal is to create tools for preliminary analysis of network/devices structure. I find them useful for analysis of unknown high-load buses, as isotp* tools right now needs source and desination addresses, which may be unknown at the beginning.
Please have look at these use cases:
Simply interpret candump frames as UDS and display possible match:
Interpret each frame from candump as separate one - find ISO TP type and (for Single and First frames) perform UDS analysis
Interpret each frame from isotpsniffer (or isotprecv) as UDS message, display possible match (sorry for 'unknown service' here, I don't have good traffic at the moment here, it will display found service in a same way as in the use cases above)
Do you find that useful? Any comments about formatting? What do you think about using the tool with pipe, not as standalone?