canIoCtlInit failes with canERR_PARAM (-1) on Kvaser Leaf Light v2 for Linux
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 68/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Tranquilla
- Stack tecnologico
- python
- Ambito
- backend, embedded-iot
Direzione di ricerca
Inizia in KvaserBus.init alla chiamata a canIoCtlInit per canIOCTL_SET_LOCAL_TXACK e confronta il comportamento con l’issue correlata #2051 mentre riproduci il problema con un Kvaser Leaf Light v2 e la configurazione Bus fornita. Il lavoro è completato quando il bus Kvaser si inizializza correttamente su Linux senza alterare il comportamento di local-TX-ack; verificalo tramite una riproduzione con il dispositivo.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Python
- Stelle
- 1.6k
- Fork
- 697
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di hardbyte/python-can
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
hardbyte/python-can#2103 ·
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
hardbyte/python-can#2077 · 1 commento · 1 reazione ·
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
hardbyte/python-can#1922 · 1 reazione ·
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
hardbyte/python-can#2102 ·
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
hardbyte/python-can#2092 ·
Tutte le issue di hardbyte/python-can
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
xinnan-tech/xiaozhi-fde-talk#263 ·
-
rules
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
huggingface/Repo2RLEnv#163 · 1 commento ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
huggingface/sentence-transformers#4074 ·
-
comp/dashboard invalid P3
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
NousResearch/hermes-agent#121143 ·