no response from Kvaser after a long delay between messages
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 38/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- python
- Bereich
- embedded-iot
Rechercherichtung
Beginne damit, das Problem mit einem Kvaser Leaf Light v2 oder U100 über die kvaser-Schnittstelle zu reproduzieren, und untersuche dann den Empfangspfad rund um bus.recv() sowie die gemeldeten Werte von canGetBusStatistics/canReadStatus. Vergleiche das Verhalten vor und nach 1–5 Minuten Inaktivität. Die Aufgabe ist erledigt, wenn eingehende ECU-Frames nach der Verzögerung empfangen werden oder anstelle von None ein klarer Empfangsfehler gemeldet wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Describe the error
When using the Kvaser interface via python-can, the CAN bus can automatically stop transmitting received frames (bus.recv() returns None) after a long period of downtime, even if:
- The CAN bus is still physically active,
- ECU responses are present on the wire (externally verified),
- "bus.send()" continues to run successfully without errors,
- Kvaser driver statistics report
status=okand no bus shutdown status.
As a result, python-can reports false “no response” timeouts, while valid responses exist on the CAN bus.
This happens without causing an exception and does not require a forced reinitialization of the bus to recover.
For playback
-
Use python-can with Kvaser leaf light v2 or Kvaser U100.
-
Open the CAN bus and connect to it in the normal mode (sending a request → receiving a response).
-
Leave the system in standby mode for a long time (about 1-5 minutes):
- The application is running,
- the tire is open,
- The Kvaser is connected,
- The control unit is connected and turned on.
- After the waiting period has expired, send a new CAN request.
Observed behavior:
bus.send()completed successfully.bus.recv(timeout)returns the valueNoneuntil the timeout expires.- Python exception is not generated.
- External monitoring confirms that ECU responses are present on the bus.
The problem occurs periodically, but can be fixed after sufficient downtime.
Expected behavior
bus.recv() must continue to return incoming CAN frames after periods of downtime until:
- the tire is open,
- The hardware is connected,
- The driver does not report a bus shutdown or a passive status with an error.
At a minimum, python-can must either:
- automatic recovery or
- returns a clear error indicating that the reception descriptor has become invalid.
Additional context
This is apparently due to ** inactivity of the Kvaser receive descriptor or internal buffering behavior** after a long downtime.
Observed characteristics:
-
Kvaser Driver Statistics Report ('canGetBusStatistics', `canReadStatus'):
status=ok
-
"Bus load=0.0%"
-
no overspending, no bus shutdown
-
However, the function
bus.recv()does not return any frames. -
Forced bus shutdown and reinitialization restore normal operation.
Operating system and version:
Windows 10 / Windows 11 (x64) (tested on both)
Python version:
Python 3.9
python-can version:
4.5.0/4.6.1 (tested on both)
python-can interface/s:
kvaser
The Python feedback function does not start.
Example of a diagnostic log collected after the timeout:
[KvaserSnap:frame_write]
statistics=std_data: 0, std_remote: 0, ext_data: 0, ext_remote: 0,
err_frame: 0, bus loading: 0.0%, overspending: 0 status=ok
Additional note:
bus.recv(timeout=0)returns the value "None" again- An external CAN analyzer confirms that the ECU responses are simultaneously present on the bus
- Vorherrschende Sprache
- Python
- Sterne
- 1.6k
- Forks
- 697
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus hardbyte/python-can
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
hardbyte/python-can#2103 ·
-
bug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 78/100
hardbyte/python-can#2077 · 1 Kommentar · 1 Reaktion ·
-
bug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 68/100
hardbyte/python-can#1922 · 1 Reaktion ·
-
enhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 30/100
hardbyte/python-can#2102 ·
-
bug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
hardbyte/python-can#2092 ·
Alle Issues in hardbyte/python-can
Ähnliche Issues
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
stephrobert/dsoxlab#238 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
sublimehq/package_control#1780 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
nwg-piotr/nwg-displays#145 ·