ZLGCAN驱动及集成到python-can(不支持32位)
-
准备
- 确保安装相关驱动(USBCAN-I/II驱动得额外安装)
- 确保安装相VC++运行环境
- 下载library文件夹(里面包含bitrate.cfg.yaml)
- 库文件示例:
library ├──bitrate.cfg.yaml ├──linux │ └─x86_64 └─windows └─x86_64
- 在初始化can.Bus的时候指定zlgcan库路径(0.2.x移除了
zcan.env配置), 默认为相对工程运行文件同级目录下librarylibpath=r"C:\your\library\path"
-
安装zlgcan(不建议使用低于0.2.0版本)
pip install zlgcan >= 0.2.0
-
使用:
import can from zlgcan.zlgcan import ZCanTxMode, ZCANDeviceType with can.Bus(interface="zlgcan", device_type=ZCANDeviceType.ZCAN_USBCANFD_200U, libpath="library/", configs=[{'bitrate': 500000, 'resistance': 1}, {'bitrate': 500000, 'resistance': 1}]) as bus: bus.send(can.Message( arbitration_id=0x123, is_extended_id=False, channel=0, data=[0x01, 0x02, 0x03, ], dlc=3, ), tx_mode=ZCanTxMode.SELF_SR) # time.sleep(0.1) _msg = bus.recv() print(_msg)
-
CAN测试列表:
- USBCAN-I-mini - ZCAN_USBCAN1, ZCAN_USBCAN2
- USBCAN-4E-U - ZCAN_USBCAN_4E_U
- USBCANFD-100U-mini - ZCAN_USBCANFD_MINI
- USBCANFD-100U - ZCAN_USBCANFD_100U
- USBCANFD-200U - ZCAN_USBCANFD_200U
- USBCANFD-800U - ZCAN_USBCANFD_800U
-
注意事项:
- ZCAN_USBCAN1及ZCAN_USBCAN2类型的设备无论是windows还是Linux, 波特率支持均在
bitrate.cfg.yaml中配置- 此时计算timing0及timing1请下载CAN波特率计算软件
bitrate.cfg.yaml文件中USBCANFD设备只配置了500k及1M的波特率, 如需使用其他波特率, 请自行添加
- 其他CANFD类型的CAN卡仅仅在Linux上使用时
bitrate.cfg.yaml中配置- 此时计算相关值可以通过
ZCANPRO软件
- 此时计算相关值可以通过
- 在Linux上使用ZCAN_USBCAN1衍生CAN卡时, 请在初始化时候设置
ZCanDeriveInfo信息 - 该库主要依赖rust-can,如有问题,请提issue
- ZCAN_USBCAN1及ZCAN_USBCAN2类型的设备无论是windows还是Linux, 波特率支持均在
-
官方工具及文档:
Metadata
Release files for zlgcan 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| zlgcan-0.3.0.tar.gz | 13.6 kB | Without provenance | Details for zlgcan-0.3.0.tar.gz |
Built distributions (wheels)
Total release size: 10.0 MB
Release files / zlgcan-0.3.0.tar.gz
| Download URL | zlgcan-0.3.0.tar.gz |
|---|---|
| Size | 13.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b169fceff9a2b35b4390f9cb795f7ed20a37df03f94e3f337891eeda874d141d
|
|
BLAKE2b-256 checksum How to use checksums |
af3a51478f7d44d651f9584331d236e0addf0416ca1e79aee78fa2d5ba8d3149
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / zlgcan-0.3.0-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl
| Download URL | zlgcan-0.3.0-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 489.2 kB |
| Tags | Linux glibc 2.28+ x86-64 PyPy 3.11 PyPy 3.11 7.3 |
|
SHA-256 checksum How to use checksums |
ef8552e37ed6e843dc92d53039b4c96fcb3ead733eccd11eb4a6f41b051d1f5e
|
|
BLAKE2b-256 checksum How to use checksums |
bdc3c78d6edce36eab5a21396bcc05878d2dcbdabc779c77b5c90b9a8c546348
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / zlgcan-0.3.0-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl
| Download URL | zlgcan-0.3.0-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 459.1 kB |
| Tags | Linux glibc 2.28+ ARM64 PyPy 3.11 PyPy 3.11 7.3 |
|
SHA-256 checksum How to use checksums |
dc3014db705fdf50c2f264ac01ad67fa735c04e7555f31afe1c269d081c675a7
|
|
BLAKE2b-256 checksum How to use checksums |
dbd5b80c2bf47578c458d9dcb0bd5c539f24e7c38ae66e2152570d67cd19dd59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / zlgcan-0.3.0-cp315-cp315-manylinux_2_28_x86_64.whl
| Download URL | zlgcan-0.3.0-cp315-cp315-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 484.3 kB |
| Tags | CPython 3.15 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
b286c1e107e9c97a03df0f889923f6a5e1e91aef262e2cabbacb862b25bd7bd4
|
|
BLAKE2b-256 checksum How to use checksums |
ff60673a108e5251ea2abf6669a10190e33356e1c664030a13e627a95567b03b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / zlgcan-0.3.0-cp314-cp314t-manylinux_2_28_aarch64.whl
| Download URL | zlgcan-0.3.0-cp314-cp314t-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 452.5 kB |
| Tags | CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
ecd427a7cf8adae2bc1079b222e2736ddafbc6cd0997034e1cc5dc2b15e96132
|
|
BLAKE2b-256 checksum How to use checksums |
e22667a01f7d4d133a3e40ec80a0101743747c523f87c77838f418d7b2f40be5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / zlgcan-0.3.0-cp314-cp314-win_amd64.whl
| Download URL | zlgcan-0.3.0-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 303.1 kB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
8cae9c00f6bc4554a0e436cb50b8c0c820d9fa39771115fe3249d0257bc28e64
|
|
BLAKE2b-256 checksum How to use checksums |
1443530567366874db1e5c3b1d16757dea5925f850d94680b6267adde309f9e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / zlgcan-0.3.0-cp314-cp314-manylinux_2_28_x86_64.whl
| Download URL | zlgcan-0.3.0-cp314-cp314-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 484.0 kB |
| Tags | CPython 3.14 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
cbfb5c6989865b1bda2b4737f6b3370a9d591b7b956baf31e01d3ae57c4b5189
|
|
BLAKE2b-256 checksum How to use checksums |
9dab976dedfbc847e1b9453ae32ab7fdc0ed0b78a0de86eb11a8b0d84ca16149
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / zlgcan-0.3.0-cp314-cp314-manylinux_2_28_aarch64.whl
| Download URL | zlgcan-0.3.0-cp314-cp314-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 454.8 kB |
| Tags | CPython 3.14 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
7095587e76803d6b3efd8489dcad6be4d862b91f1825f7d2dd90614e1e50c23f
|
|
BLAKE2b-256 checksum How to use checksums |
ee394f9ad566b484a5d6add0a5940b8d1a7bb8d9316d8f3bea03e77f14d7efd8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / zlgcan-0.3.0-cp313-cp313t-manylinux_2_28_aarch64.whl
| Download URL | zlgcan-0.3.0-cp313-cp313t-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 452.4 kB |
| Tags | CPython 3.13 CPython 3.13 free-threading Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
6e0b0a18aef04aa893d1081162abcf02c56cebec28407a66f8f57f5978f67186
|
|
BLAKE2b-256 checksum How to use checksums |
4b1b1022ff19688bfd01fcd7e222b20944e4587aa68b71543bdbc5cfb812d363
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / zlgcan-0.3.0-cp313-cp313-win_amd64.whl
| Download URL | zlgcan-0.3.0-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 302.3 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
68223c0190e6da27bf188673233a50527becc5c23369de55efb4534cd82193ca
|
|
BLAKE2b-256 checksum How to use checksums |
e6bd495938e245421a0efbb76d4369873d0e04306bfd5c26d949d6eb24e4fb98
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / zlgcan-0.3.0-cp313-cp313-manylinux_2_28_x86_64.whl
| Download URL | zlgcan-0.3.0-cp313-cp313-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 484.2 kB |
| Tags | CPython 3.13 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
b04a312ab62284ff63809a57af4fb8410747f113e19231be412ea265372e5f72
|
|
BLAKE2b-256 checksum How to use checksums |
72bbf0b730a713bf0f261670d1252cb018d2953ed7a41ab7ca411609152f39cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / zlgcan-0.3.0-cp313-cp313-manylinux_2_28_aarch64.whl
| Download URL | zlgcan-0.3.0-cp313-cp313-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 453.9 kB |
| Tags | CPython 3.13 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
7490a3231943c1035faf241aff09bcfab777b4fcfcdc14d518f5e47dc885f21d
|
|
BLAKE2b-256 checksum How to use checksums |
108758c6b5722823710ae696536a9d7a7a390d31bd7a9609f535423ca42e833c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / zlgcan-0.3.0-cp312-cp312-win_amd64.whl
| Download URL | zlgcan-0.3.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 302.9 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
56173773d78cc83627328bb519b8b07740cb5c10beb0055b7aad63f79bde7588
|
|
BLAKE2b-256 checksum How to use checksums |
98335558c3ada88f6a58d44b61a7e9a4dd73bd81ebef98506655b2040fe53961
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / zlgcan-0.3.0-cp312-cp312-manylinux_2_28_x86_64.whl
| Download URL | zlgcan-0.3.0-cp312-cp312-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 484.9 kB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
67567cf192e75bf1f2d34ffc10db212d00e0b8f63622343ce605cd98d995ee25
|
|
BLAKE2b-256 checksum How to use checksums |
74b2a0a8985dec82a9d012fad940ff851f11fe54052e8afe0b381097e21e05cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / zlgcan-0.3.0-cp312-cp312-manylinux_2_28_aarch64.whl
| Download URL | zlgcan-0.3.0-cp312-cp312-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 454.3 kB |
| Tags | CPython 3.12 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
ad08e46a22832d90d58b91b722d6ee68b07fd895e1dcd9a92e476263debd7d98
|
|
BLAKE2b-256 checksum How to use checksums |
08c902e1ec598d7ddc6ac2dc54a30e661c17bcfb5c1b6eed54110f72cbd64434
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / zlgcan-0.3.0-cp311-cp311-win_amd64.whl
| Download URL | zlgcan-0.3.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 304.9 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
21d503eb2eff9dcea98b7369c8fd9a723d3c251e96e115b9ded015cd66324b57
|
|
BLAKE2b-256 checksum How to use checksums |
4eb811d11f77e23178662813bf498bebd69ba119555db7221ee9162639473afa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / zlgcan-0.3.0-cp311-cp311-manylinux_2_28_x86_64.whl
| Download URL | zlgcan-0.3.0-cp311-cp311-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 487.5 kB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
de7412d055728ffe71698d9a36b2fe9b12078d588e97e524a6196594c0fd6190
|
|
BLAKE2b-256 checksum How to use checksums |
4a32e3db6b84efda8dc7cb3ea0f211af690c76742fed7542ebf0543128bbdf05
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / zlgcan-0.3.0-cp311-cp311-manylinux_2_28_aarch64.whl
| Download URL | zlgcan-0.3.0-cp311-cp311-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 458.6 kB |
| Tags | CPython 3.11 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
599aef66d6953b793915ed202f9a6a0678795faa83cbed0cbe9459f2d2afdfa9
|
|
BLAKE2b-256 checksum How to use checksums |
f8c93a9cf56194dbd7c7509d332e0aedeb714485a994963e45ce9962aed57a14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / zlgcan-0.3.0-cp310-cp310-win_amd64.whl
| Download URL | zlgcan-0.3.0-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 304.8 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
641d9cc4140705005bc52266e8c4bc81b57a803829567e083c0de7746d2d3680
|
|
BLAKE2b-256 checksum How to use checksums |
d4b326a86bcd8eff9f34657ec5274dc75f87a2cd5bac051177aa1a9a6e778a4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / zlgcan-0.3.0-cp310-cp310-manylinux_2_28_x86_64.whl
| Download URL | zlgcan-0.3.0-cp310-cp310-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 487.6 kB |
| Tags | CPython 3.10 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
a49fcf2c9965b0a34d77a55b7ab2709946a56db6ab8250c3f618e308437e639b
|
|
BLAKE2b-256 checksum How to use checksums |
b6478526deadf25ceb0464720fb929ee47d36b05b4c937c01dabed34c484de6c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / zlgcan-0.3.0-cp310-cp310-manylinux_2_28_aarch64.whl
| Download URL | zlgcan-0.3.0-cp310-cp310-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 458.5 kB |
| Tags | CPython 3.10 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
d8d9915161983ec86db4505f4bef5bdd930712dcfe3dc53c8e3f8e1947629192
|
|
BLAKE2b-256 checksum How to use checksums |
53fd0f53109f46829f0672b1a792a65efbc10565144bae1c1ae2c915088d796d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / zlgcan-0.3.0-cp39-cp39-manylinux_2_28_x86_64.whl
| Download URL | zlgcan-0.3.0-cp39-cp39-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 490.1 kB |
| Tags | CPython 3.9 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
ec3f5c5f8b6d045bfe828cb37b136404923186df787154207b31370fdc3aa7aa
|
|
BLAKE2b-256 checksum How to use checksums |
13b86f5df30695a4c42a68d832740eb8bce86426f08015eef3fee10dcfbf72cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / zlgcan-0.3.0-cp39-cp39-manylinux_2_28_aarch64.whl
| Download URL | zlgcan-0.3.0-cp39-cp39-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 461.8 kB |
| Tags | CPython 3.9 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
face3725f7111935c3dc3cf089fb5749991745d9ff26736396ac83a69b93ebc9
|
|
BLAKE2b-256 checksum How to use checksums |
30e68f54a25b049b7bd59568ce396888fa2763a2a0e66d7c93964bb3dacbcab6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / zlgcan-0.3.0-cp38-cp38-manylinux_2_28_aarch64.whl
| Download URL | zlgcan-0.3.0-cp38-cp38-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 462.4 kB |
| Tags | CPython 3.8 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
1ffc15cb2404ef25fa181296bd6939e87be9c374bd5d1b178dcaa468ba9fac68
|
|
BLAKE2b-256 checksum How to use checksums |
ee185f2d2c62944d2289282e5b85ce7a31b8177841abd907227949096eb381cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Security for zlgcan 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.