canIoCtlInit failes with canERR_PARAM (-1) on Kvaser Leaf Light v2 for Linux
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- python
- 領域
- backend, embedded-iot
調査の方向性
KvaserBus.init の canIOCTL_SET_LOCAL_TXACK に対する canIoCtlInit 呼び出しから開始し、提供された Bus 構成と Kvaser Leaf Light v2 を使って再現しながら、関連する 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
- フォーク
- 697
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
hardbyte/python-can のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
hardbyte/python-can#2103 ·
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
hardbyte/python-can#2077 · コメント 1 件 · リアクション 1 件 ·
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
hardbyte/python-can#1922 · リアクション 1 件 ·
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
hardbyte/python-can#2102 ·
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
hardbyte/python-can#2092 ·
hardbyte/python-can の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
xinnan-tech/xiaozhi-fde-talk#263 ·
-
rules
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
huggingface/Repo2RLEnv#163 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
huggingface/sentence-transformers#4074 ·
-
comp/dashboard invalid P3
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
NousResearch/hermes-agent#121143 ·