hardbyte / hardbyte/python-can
Scripts can.logger/can.viewer with peak-system over PCAN_USBBUS1
- Linguagem predominante
- Python
- Estrelas
- 1.6k
- Forks
- 697
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
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.
Guia de contribuição
Direção de pesquisa
Comece com can.viewer e can.logger e, em seguida, rastreie can.Bus até can/interfaces/pcan/pcan.py. Reproduza o KeyError com /dev/pcanusb32 e o log vazio com PCAN_USBBUS1, usando como contexto a saída reportada do driver pcan. Está concluído quando o canal documentado funciona com o PCAN-USB e viewer/logger recebem entradas CAN.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- python
- Domínio
- embedded-iot, networking
- Tipo de issue
- Bug
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100