hardbyte / hardbyte/python-can

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

オープン
#933 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
backend:pcan
主要言語
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 はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。