classification
Title: socket library support for CAN_J1939
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: gvanrossum, karlding, miss-islington, orsenthil
Priority: normal Keywords: patch

Created on 2020-04-15 05:29 by karlding, last changed 2020-05-20 02:37 by miss-islington. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 19538 merged karlding, 2020-04-15 05:39
PR 20248 merged karlding, 2020-05-20 02:25
PR 20249 merged miss-islington, 2020-05-20 02:32
Messages (7)
msg366487 - (view) Author: Karl Ding (karlding) * Date: 2020-04-15 05:29
It would be nice to have support J1939 sockets.

Support for J1939 landed as part of the SAE J1939 SocketCAN patches, which are available after the Linux 5.4rc1 kernel. This is another protocol family for SocketCAN, much like the existing support for ISOTP and BCM.

Effectively, supporting this would hand off as much to the kernel as possible, which gives Python programs the ability deal with J1939 without having to implement the logic existing in the kernel in userspace.

This is provided to userspace [0] via the <linux/can/j1939.h> header.

I'd be happy to work on this and provide a PR.

[0] https://www.kernel.org/doc/html/latest/networking/j1939.html
msg367534 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2020-04-28 14:36
Looks reasonable.
msg367708 - (view) Author: miss-islington (miss-islington) Date: 2020-04-29 22:31
New changeset 360371f79c48f15bbcee7aeecacf97a899913b25 by karl ding in branch 'master':
bpo-40291: Add support for CAN_J1939 sockets (GH-19538)
https://github.com/python/cpython/commit/360371f79c48f15bbcee7aeecacf97a899913b25
msg367709 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2020-04-29 22:32
Thanks, good luck using this!
msg369413 - (view) Author: Karl Ding (karlding) * Date: 2020-05-20 02:28
Should this be added to the What's New for 3.9? I see a smaller change that exposes the CAN_RAW_JOIN_FILTERS constant mentioned.

I've created https://github.com/python/cpython/pull/20248 if this is needed.
msg369414 - (view) Author: miss-islington (miss-islington) Date: 2020-05-20 02:31
New changeset 550f30c8f33a2ba844db2ce3da8a897b3e882c9a by karl ding in branch 'master':
bpo-40291: Mention socket.CAN_J1939 in What's New (GH-20248)
https://github.com/python/cpython/commit/550f30c8f33a2ba844db2ce3da8a897b3e882c9a
msg369415 - (view) Author: miss-islington (miss-islington) Date: 2020-05-20 02:37
New changeset 12fa658d0565c6c53d25f464f29ef596a0df5e2a by Miss Islington (bot) in branch '3.9':
bpo-40291: Mention socket.CAN_J1939 in What's New (GH-20248)
https://github.com/python/cpython/commit/12fa658d0565c6c53d25f464f29ef596a0df5e2a
History
Date User Action Args
2020-05-20 02:37:24miss-islingtonsetmessages: + msg369415
2020-05-20 02:32:04miss-islingtonsetpull_requests: + pull_request19537
2020-05-20 02:31:55miss-islingtonsetmessages: + msg369414
2020-05-20 02:28:23karldingsetmessages: + msg369413
2020-05-20 02:25:46karldingsetpull_requests: + pull_request19536
2020-04-29 22:32:24gvanrossumsetstatus: open -> closed
resolution: fixed
messages: + msg367709

stage: patch review -> resolved
2020-04-29 22:31:27miss-islingtonsetnosy: + miss-islington
messages: + msg367708
2020-04-29 19:17:33orsenthilsetnosy: + orsenthil
2020-04-28 14:36:17gvanrossumsetnosy: + gvanrossum
messages: + msg367534
2020-04-15 05:39:25karldingsetkeywords: + patch
stage: patch review
pull_requests: + pull_request18886
2020-04-15 05:29:19karldingcreate