PCAN fails when PCAN_ERROR_ILLDATA is read via ReadFD

Aperta
#1,849 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
embedded-iot

Direzione di ricerca

Inizia individuando il codice dell’interfaccia PCAN che chiama ReadFD e verifica come viene gestito PCAN_ERROR_ILLDATA. Riproduci il problema con un PCAN-USB FD su Windows usando un frame CAN FD non valido, quindi verifica che il frame di errore successivo venga ancora rilevato senza un’eccezione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
Describe the bug

When there is an invalid frame on CAN bus (in our case CAN FD), PCAN first reports result PCAN_ERROR_ILLDATA and then it send the error frame. If the PCAN_ERROR_ILLDATA is not ignored, python-can throws an exception.

To Reproduce

A packet like the one in this screenshot has to be received.
image

Expected behavior

python-can should ignore the PCAN_ERROR_ILLDATA because it carries no useful information. The error can be then detected by the error frame which PCAN generates right after.

Additional context

OS and version: Windows 11
Python version: Python 3.12
python-can version: Latest commit in main - c7121310253c42c6410a70bc8b4f27a51b8b4411
python-can interface/s (if applicable): PCAN-USB FD (using pcan interface)

Lingua principale
Python
Stelle
1.6k
Fork
715
Merge medio
2g 4h
PR unite (30g)
42

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di hardbyte/python-can

Tutte le issue di hardbyte/python-can

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.