canIoCtlInit failes with canERR_PARAM (-1) on Kvaser Leaf Light v2 for Linux
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 68/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 冷清
- 技術堆疊
- python
- 領域
- backend, embedded-iot
研究方向
從 KvaserBus.init 中針對 canIOCTL_SET_LOCAL_TXACK 的 canIoCtlInit 呼叫開始,並在使用 Kvaser Leaf Light v2 和提供的 Bus 設定進行重現的同時,將行為與相關 issue #2051 進行比較。當 Kvaser 匯流排能在 Linux 上成功初始化且不破壞 local-TX-ack 行為時即表示完成;透過裝置重現進行驗證。
由索引模型根據 Issue 內容生成。
描述
Describe the bug
Creating a bus fails during initialization. I'm using the Kvaser backend under Linux with a Kvaser Leaf Light v2. Using the Leaf Light v2 on Windows the same function is successful
import can
bus = can.Bus(
interface="kvaser",
channel=0,
bitrate=500000,
)
raises
can.interfaces.kvaser.canlib.CANLIBOperationError:
Function canIoCtl failed - Error in parameter [Error Code -1]
To Reproduce
- Attach a Kvaser Leaf Light dongle (I used the Leaf V2)
- initialize the bus with
can.interface.Bus(interface='kvaser', channel=0, bitrate=500000)
Expected behavior
The bus will initialize without any errors thrown
Additional context
OS and version: Fedora 44
Python version: 3.14.6
python-can version: 4.6.1
python-can interface/s (if applicable): Kvaser Leaf Light v2 and Kvaser Linux SDK 5.52
Investigateion
I verified that...
can.detect_available_configs()correctly discovers the device.canOpenChannel()succeeds- the Channel can be opened directly using the CANlib bindings
- the failure occurs during the initialization of
canIoCtlInit()calls inKbaserBus.__init__()
The failure occurs on canIOCTL_SET_LOCAL_TXACK or specifically...
canIoCtlInit(
self._read_handle,
canstat.canIOCTL_SET_LOCAL_TXACK,
ctypes.byref(ctypes.c_byte(local_echo)),
1,
)
Work-Around
commenting out this section of code allows me to continue initializing the bus and my program runs smoothly.
Potentially related Issue
#2051
- 主要語言
- Python
- 星號
- 1.6k
- 分支
- 701
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
hardbyte/python-can 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 88/100
hardbyte/python-can#2103 ·
-
Unhashable type for Systec interface errors可能已有人在做 @giri256 於 77 天前認領。 未關閉bug
難度 1/5 1 小時以內 新手友好度 78/100
hardbyte/python-can#2077 · 1 則留言 · 1 個 reaction ·
-
bug
難度 1/5 1 小時以內 新手友好度 68/100
hardbyte/python-can#1922 · 1 個 reaction ·
-
Make socket binding exceptions more debugable可能已有人在做 @vonpanda 於 6 天前認領。 未關閉enhancement
難度 3/5 1-2 天 新手友好度 75/100
hardbyte/python-can#2104 ·
-
enhancement
難度 5/5 一週以上 新手友好度 30/100
hardbyte/python-can#2102 ·
查看 hardbyte/python-can 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 70/100
-
good first issue No-AI
難度 2/5 1-3 小時 新手友好度 69/100
-
documentation
難度 2/5 1-3 小時 新手友好度 78/100
-
🐛 Bug: Calendar work items cannot be opened on mobile可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉
難度 1/5 1 小時以內 新手友好度 75/100
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 2 天內回覆