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

Leverage the kernel J1939 implementation for socketcan interfaces? #12

Open
robynnepiers opened this issue Aug 20, 2020 · 2 comments
Open

Comments

@robynnepiers
Copy link

According to the What's New for the socket library, Python 3.9+ supports the kernel J1939 protocol family on supported Linux kernel versions. This is kernel 5.4+ per the eLinux wiki, which is the version shipped with Ubuntu 20.04 LTS.

I'm not sure how feasible this is considering the API this library provides and the desire to support Python 2 (although I suppose this could just be treated as progressive enhancement or an option that can be opted into, falling back to the userspace implementation if unavailable), but it would be nice to support an abstraction of that as well so the work can be deferred to the kernel instead of the implementation being purely userspace in Python.

@milhead2
Copy link
Owner

milhead2 commented Aug 20, 2020

That sounds like a great idea!
It will be a while before we can divorce python<3.9 or kernel<5.4 but I like the idea of automatically picking up the kernel support for J1939 if it's available.. It would probably expose a rash of errors in this code to get a kernel implementation to talk to a python one but it does drive long-term support down and eventually to near-0.
I do a lot of socketcan work during the day and have seen mention of the J1939 features but not tried to use them. We've supported our own stacks for so long on our embedded projects we have no immediate plans to change.
For this library however; The direction you are taking sounds exciting, mostly because I generally run all of our test environment which this library contributes to on Linux. At times execution speed has been an issue, especially when we install everything on a $50 Beagleboard. A kernel implementation would help mitigate that.
My time is quite limited and I try mostly to keep up with the odd bug report, is there any chance you would be interested to give it a whirl? Let me know, I'm always eager to get others involved in the library.
Mil

@polybassa
Copy link

polybassa commented Aug 20, 2020 via email

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

3 participants