hardbyte / hardbyte/python-can
Scripts can.logger/can.viewer with peak-system over PCAN_USBBUS1
- 主要语言
- Python
- 星标
- 1.6k
- 派生
- 697
- PR 合并指标
- 30 天内没有已合并 PR
描述
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.
贡献指南
评估
这个 Issue 还没有评估数据。