* [Buildroot] [PATCH] package/python-can-isotp: new package
@ 2026-11-26 15:00 Sebastian Michel
2026-11-30 21:47 ` Julien Olivain via buildroot
0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Michel @ 2026-11-26 15:00 UTC (permalink / raw)
To: buildroot; +Cc: James Hilliard, Thomas Petazzoni, Sebastian Michel
Add the Python implementation of the ISO-TP transport protocol
(ISO 15765-2).
https://github.com/pylessard/python-can-isotp
Add a runtime test covering single-frame transmission using the pure Python transport layer.
Signed-off-by: Sebastian Michel <sebastian.michel@oss.othermo.de>
---
DEVELOPERS | 3 ++
package/Config.in | 1 +
package/python-can-isotp/Config.in | 6 +++
.../python-can-isotp/python-can-isotp.hash | 5 ++
package/python-can-isotp/python-can-isotp.mk | 14 ++++++
.../tests/package/sample_python_can_isotp.py | 48 +++++++++++++++++++
.../tests/package/test_python_can_isotp.py | 11 +++++
7 files changed, 88 insertions(+)
create mode 100644 package/python-can-isotp/Config.in
create mode 100644 package/python-can-isotp/python-can-isotp.hash
create mode 100644 package/python-can-isotp/python-can-isotp.mk
create mode 100644 support/testing/tests/package/sample_python_can_isotp.py
create mode 100644 support/testing/tests/package/test_python_can_isotp.py
diff --git a/DEVELOPERS b/DEVELOPERS
index 59fad7f26b..eb99e91107 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -3054,6 +3054,9 @@ N: Sebastian Michel <sebastian.michel@oss.othermo.de>
F: package/python-servestatic/
F: support/testing/tests/package/sample_python_servestatic.py
F: support/testing/tests/package/test_python_servestatic.py
+F: package/python-can-isotp/
+F: support/testing/tests/package/sample_python_can_isotp.py
+F: support/testing/tests/package/test_python_can_isotp.py
N: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
F: board/armadeus/
diff --git a/package/Config.in b/package/Config.in
index 49659b007e..3decbc6661 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1051,6 +1051,7 @@ menu "External python modules"
source "package/python-cachelib/Config.in"
source "package/python-cachetools/Config.in"
source "package/python-can/Config.in"
+ source "package/python-can-isotp/Config.in"
source "package/python-canopen/Config.in"
source "package/python-cbor/Config.in"
source "package/python-cbor2/Config.in"
diff --git a/package/python-can-isotp/Config.in b/package/python-can-isotp/Config.in
new file mode 100644
index 0000000000..56ceb0ab58
--- /dev/null
+++ b/package/python-can-isotp/Config.in
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_PYTHON_CAN_ISOTP
+ bool "python-can-isotp"
+ help
+ Module enabling the IsoTP protocol defined by ISO-15765.
+
+ https://github.com/pylessard/python-can-isotp
diff --git a/package/python-can-isotp/python-can-isotp.hash b/package/python-can-isotp/python-can-isotp.hash
new file mode 100644
index 0000000000..8622d08bc9
--- /dev/null
+++ b/package/python-can-isotp/python-can-isotp.hash
@@ -0,0 +1,5 @@
+# md5, sha256 from https://pypi.org/pypi/can-isotp/json
+md5 34f4038bfdd1a719573fb6e610d5d1f5 can_isotp-2.0.7.tar.gz
+sha256 4586ca62f8646da918df1d3ffd257c7e3532a4fbd138cebd8fe0777e3b94e361 can_isotp-2.0.7.tar.gz
+# Locally computed sha256 checksums
+sha256 aae122e22b842c7fe113e6968ff00a52619d3a11b37f7791eebecb7fc7042103 LICENSE.txt
diff --git a/package/python-can-isotp/python-can-isotp.mk b/package/python-can-isotp/python-can-isotp.mk
new file mode 100644
index 0000000000..3c8ce1a4bc
--- /dev/null
+++ b/package/python-can-isotp/python-can-isotp.mk
@@ -0,0 +1,14 @@
+################################################################################
+#
+# python-can-isotp
+#
+################################################################################
+
+PYTHON_CAN_ISOTP_VERSION = 2.0.7
+PYTHON_CAN_ISOTP_SOURCE = can_isotp-$(PYTHON_CAN_ISOTP_VERSION).tar.gz
+PYTHON_CAN_ISOTP_SITE = https://files.pythonhosted.org/packages/79/29/5a4bfa625254686ee2e6ce4e54530956d62af6e995b0588916b4caae4dc3
+PYTHON_CAN_ISOTP_SETUP_TYPE = setuptools
+PYTHON_CAN_ISOTP_LICENSE = MIT
+PYTHON_CAN_ISOTP_LICENSE_FILES = LICENSE.txt
+
+$(eval $(python-package))
diff --git a/support/testing/tests/package/sample_python_can_isotp.py b/support/testing/tests/package/sample_python_can_isotp.py
new file mode 100644
index 0000000000..b25f55514d
--- /dev/null
+++ b/support/testing/tests/package/sample_python_can_isotp.py
@@ -0,0 +1,48 @@
+# Example adapted from https://can-isotp.readthedocs.io/en/latest/isotp/examples.html#defining-custom-rxfn-and-txfn
+
+from collections import deque
+
+import isotp
+
+
+queue_a = deque()
+queue_b = deque()
+
+
+def rx_a(timeout):
+ return queue_a.popleft() if queue_a else None
+
+
+def rx_b(timeout):
+ return queue_b.popleft() if queue_b else None
+
+
+stack_a = isotp.TransportLayer(
+ rxfn=rx_a,
+ txfn=queue_b.append,
+ address=isotp.Address(
+ isotp.AddressingMode.Normal_29bits,
+ txid=0x123456,
+ rxid=0xabcdef,
+ ),
+)
+
+stack_b = isotp.TransportLayer(
+ rxfn=rx_b,
+ txfn=queue_a.append,
+ address=isotp.Address(
+ isotp.AddressingMode.Normal_29bits,
+ txid=0xabcdef,
+ rxid=0x123456,
+ ),
+)
+
+
+payload = bytes([0, 1, 2, 3])
+stack_a.send(payload)
+
+stack_a.process()
+stack_b.process()
+
+assert stack_b.available()
+assert stack_b.recv() == payload
diff --git a/support/testing/tests/package/test_python_can_isotp.py b/support/testing/tests/package/test_python_can_isotp.py
new file mode 100644
index 0000000000..8f592cd806
--- /dev/null
+++ b/support/testing/tests/package/test_python_can_isotp.py
@@ -0,0 +1,11 @@
+from tests.package.test_python import TestPythonPackageBase
+
+
+class TestPythonCanIsotp(TestPythonPackageBase):
+ __test__ = True
+ config = TestPythonPackageBase.config + \
+ """
+ BR2_PACKAGE_PYTHON3=y
+ BR2_PACKAGE_PYTHON_CAN_ISOTP=y
+ """
+ sample_scripts = ["tests/package/sample_python_can_isotp.py"]
--
2.56.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH] package/python-can-isotp: new package
2026-11-26 15:00 [Buildroot] [PATCH] package/python-can-isotp: new package Sebastian Michel
@ 2026-11-30 21:47 ` Julien Olivain via buildroot
0 siblings, 0 replies; 2+ messages in thread
From: Julien Olivain via buildroot @ 2026-11-30 21:47 UTC (permalink / raw)
To: Sebastian Michel; +Cc: buildroot, James Hilliard, Thomas Petazzoni
On 26/11/2026 16:00, Sebastian Michel wrote:
> Add the Python implementation of the ISO-TP transport protocol
> (ISO 15765-2).
>
> https://github.com/pylessard/python-can-isotp
>
> Add a runtime test covering single-frame transmission using the pure
> Python transport layer.
>
> Signed-off-by: Sebastian Michel <sebastian.michel@oss.othermo.de>
Applied to next, thanks.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-30 21:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-26 15:00 [Buildroot] [PATCH] package/python-can-isotp: new package Sebastian Michel
2026-11-30 21:47 ` Julien Olivain via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox