Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

no response from Kvaser after a long delay between messages

Abierto
#2,017 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
38/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
python
Área
embedded-iot

Línea de trabajo

Empieza reproduciendo el problema con un Kvaser Leaf Light v2 o U100 usando la interfaz kvaser y, después, inspecciona la ruta de recepción alrededor de bus.recv() y los valores reportados de canGetBusStatistics/canReadStatus. Compara el comportamiento antes y después de 1–5 minutos de inactividad. Se considera completado cuando se reciben tramas ECU entrantes después del retraso, o cuando se informa de un error claro de recepción en lugar de None.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug
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=ok and 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
  1. Use python-can with Kvaser leaf light v2 or Kvaser U100.

  2. Open the CAN bus and connect to it in the normal mode (sending a request → receiving a response).

  3. 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.
  1. After the waiting period has expired, send a new CAN request.

Observed behavior:

  • bus.send() completed successfully.
  • bus.recv(timeout) returns the value None until 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


Feedback and logs

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
Lenguaje dominante
Python
Estrellas
1.6k
Forks
697
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de hardbyte/python-can

Todos los issues de hardbyte/python-can

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.