canIoCtlInit failes with canERR_PARAM (-1) on Kvaser Leaf Light v2 for Linux
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 68/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- Calme
- Stack technique
- python
- Domaine
- backend, embedded-iot
Piste de recherche
Commencez dans KvaserBus.init à l’appel de canIoCtlInit pour canIOCTL_SET_LOCAL_TXACK, et comparez le comportement avec l’issue associée #2051 tout en reproduisant le problème avec un Kvaser Leaf Light v2 et la configuration Bus fournie. C’est terminé lorsque le bus Kvaser s’initialise correctement sous Linux sans modifier le comportement de local-TX-ack ; vérifiez-le avec une reproduction sur l’appareil.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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
- Langage dominant
- Python
- Étoiles
- 1.6k
- Forks
- 697
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de hardbyte/python-can
-
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
hardbyte/python-can#2103 ·
-
bug
Difficulté 1/5 Moins d'une heure Accessibilité débutants 78/100
hardbyte/python-can#2077 · 1 commentaire · 1 réaction ·
-
bug
Difficulté 1/5 Moins d'une heure Accessibilité débutants 68/100
hardbyte/python-can#1922 · 1 réaction ·
-
enhancement
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 30/100
hardbyte/python-can#2102 ·
-
bug
Difficulté 3/5 1-2 jours Accessibilité débutants 68/100
hardbyte/python-can#2092 ·
Toutes les issues de hardbyte/python-can
Issues similaires
-
[Bug] reef-hermes tells me to resume with hermes --resume, which does not work from my shell Ouvertearea: harness bug status: needs-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
Human-Agent-Society/reef#625 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 80/100
learningequality/kolibri#15351 · 2 commentaires ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
-
Name consistency Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
eellak/triplestore#65 · 1 commentaire ·