Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for j1939dump and j1939player #207

Open
josemic opened this issue May 28, 2020 · 6 comments
Open

Request for j1939dump and j1939player #207

josemic opened this issue May 28, 2020 · 6 comments

Comments

@josemic
Copy link
Contributor

josemic commented May 28, 2020

This is a request for discussion for a j1939player, similar to canplayer, which can replay j1939 message.

For now it is assumed that the output of j1939dump is similar to j1939spy. With additionally the option to assemble j1939 TP and ETP messages as requested by this linux-can issue: Add russport to not interactively reassamble (E)TP messages #6
Additionally timestamps are needed, in order to keep the timing during replay.

I'd like to see a j1939player, which can replay messages based upon the J1939-NAME(s), optionally filtered by PGN(s). This would allow to test j1939 application message decoders e.g. of Isobus messages.

@marckleinebudde
Copy link
Member

First we need a way to save complete (E)TP messages in user space. I see two options:

  1. Extend the kernel's j1939 socket to receive (E)TP into user space without actively taking part in the communication.
  2. Re-assemble (E)TP from a can-dump in user space.

@josemic
Copy link
Contributor Author

josemic commented May 28, 2020

Perhaps we have a third option (or is that the same as 2.?):

  1. Have tool that postprocesses log files and reassembles (E)TP messages
    E.g.:
   j1939spy -P -b 4193977 vcan0 > myj1939dump.log
   cat myj1939dump.log | ETPandTPpostprocessor > myj1939dump_postprocessed.log
   j1939player -NAME 1122334455667788 myj1939dump_postprocessed.log

@marckleinebudde
Copy link
Member

ACK, this is what I meant with 2.

@josemic
Copy link
Contributor Author

josemic commented May 30, 2020

One difference is that 1. is working for realtime tracing with tools too. E.g. a (to be written) wireshark j1939 decoder. While 2. will never work with realtime trace tools.
The benefit of 2 is, that it keeps the complexity out of the kernel.

@marckleinebudde
Copy link
Member

marckleinebudde commented Jun 2, 2020

If the kernel can re-assemble RAW CAN frames into j1939 (E)TP, this should also be possible in user space, too. Maybe it doesn't fit into the programming model of wireshark. On the other hand wireshark can decode TCP, which spans over sevel IP packages....

@josemic
Copy link
Contributor Author

josemic commented Jun 30, 2020

I think a j1939player needs to replay besides messages accoding to its name, all messages to global address (DA=0xFF) too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants