hardbyte / hardbyte/python-can

Scripts can.logger/can.viewer with peak-system over PCAN_USBBUS1

Abierto
#933 2 comentarios 0 reacciones 0 asignados Ver en GitHub
backend:pcan
Lenguaje dominante
Python
Estrellas
1.6k
Forks
697
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

I am trying to use the script can.logger with the PCAN-USB from peak-system.
But it does not work unfortunately.
When I use the receivetest from Peak-system everything is running.
receivetest -f=/dev/pcanusb32 -b=0x852b -n=500.

When I call the can.logger script with
python -m can.viewer -b 83333 -c "/dev/pcanusb32" -i pcan
the following message pop up
```
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/airbus/.local/lib/python2.7/site-packages/can/viewer.py", line 502, in
main()
File "/home/airbus/.local/lib/python2.7/site-packages/can/viewer.py", line 493, in main
bus = can.Bus(parsed_args.channel, **config)
File "/home/airbus/.local/lib/python2.7/site-packages/can/interface.py", line 127, in __new__
return cls(channel, *args, **kwargs)
File "/home/airbus/.local/lib/python2.7/site-packages/can/interfaces/pcan/pcan.py", line 173, in __init__
self.m_PcanHandle = globals()[channel]
KeyError: '/dev/pcanusb32'
```

When I use
python -m can.logger -f /home/balumbo/canlog.txt -c PCAN_USBBUS1 -i pcan -b 83333
The logger started but with no entries in the log file.

> Connected to PcanBus: PCAN_USBBUS1
> Can Logger (Started on 2020-11-12 16:19:47.231058)

The same issue obtain with the can.viewer script.
Which channel has to be used?

> dmesg | grep pcan
> [ 4788.586812] pcan: loading out-of-tree module taints kernel.
> [ 4788.587792] pcan: Release_20200701_n (le)
> [ 4788.587793] pcan: driver config [mod] [isa] [pci] [pec] [dng] [par] [usb] [pcc]
> [ 4788.593143] pcan 3-1:1.0: PCAN-USB fw v8.4
> [ 4788.651123] pcan: - usb device minor 32 found
> [ 4788.651152] usbcore: registered new interface driver pcan
> [ 4788.651173] pcan: major 239.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.