alexandreblin / python-can-monitor Goto Github PK
View Code? Open in Web Editor NEWA Python script to display data from a CAN bus
License: MIT License
A Python script to display data from a CAN bus
License: MIT License
Just an idea: Recently refreshed bytes/text could be highlighted.
(venv) jenkins@master:/tmp/python-can-monitor-master$ canmonitor
Traceback (most recent call last):
File "/tmp/venv/bin/canmonitor", line 9, in
load_entry_point('canmonitor', 'console_scripts', 'canmonitor')()
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 542, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2569, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2229, in load
return self.resolve()
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2235, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/tmp/python-can-monitor-master/canmonitor/canmonitor.py", line 9, in
from .source_handler import CandumpHandler, InvalidFrame, SerialHandler
File "/tmp/python-can-monitor-master/canmonitor/source_handler.py", line 81
raise InvalidFrame("Invalid frame {}".format(line)) from exc
^
SyntaxError: invalid syntax
Thank you for this project, it helped me a lot.
I ported it to python3, are you interested?
(This needed very few changes.)
My Chevy Colorado gives ID's that are 9 digits long in decimal. The ID's are being overlapped and so it looks like it's giving the wrong ID at first.
You might want to add some extra padding to the addstr() functions in the x parameter and also increase the column_width above 50. Here was my solution.
Change these lines of code in canmonitor.py:
I'm trying to use the can monitor
after successfully installing it (pip install -e .)
when I run the command canmonitor either for com port or from log file I get this error
canmonitor -f tests\data\test_data.log
Traceback (most recent call last):
File "C:\Python35\Scripts\canmonitor-script.py", line 11, in
load_entry_point('canmonitor', 'console_scripts', 'canmonitor')()
File "c:\python35\lib\site-packages\pkg_resources_init_.py", line 476, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "c:\python35\lib\site-packages\pkg_resources_init_.py", line 2700, in load_entry_point
return ep.load()
File "c:\python35\lib\site-packages\pkg_resources_init_.py", line 2318, in load
return self.resolve()
File "c:\python35\lib\site-packages\pkg_resources_init_.py", line 2324, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "e:\arduino and reversing\canbus\python arduino canbus\python-can-monitor-master\canmonitor\canmonitor.py", line 4, in
import curses
File "c:\python35\lib\curses_init_.py", line 13, in
from _curses import *
ImportError: No module named '_curses'
same one can help me i need to use adapter usb-can (sysWORXX USB-CANmodul1) in my pc (window 7) with code python witch library i use
When I run:
./canmonitor.py -f ../../engine-off-can0-only.log
absolutely nothing happens. No error/warnings in stdout.
I just see this screen:
my engine-off-can0-only.log
format (recorded with candump
):
$ head ../../engine-off-can0-only.log
(000.000000) can0 RX - - 581 [8] 00 00 FF FF FF FF FF FF '........'
(000.004943) can0 RX - - 07D [8] 00 20 00 00 00 00 00 00 '. ......'
(000.005920) can0 RX - - 11A [8] 00 00 00 00 00 00 00 00 '........'
(000.006901) can0 RX - - 230 [8] 05 FF 01 F6 0A D2 60 94 '......`.'
(000.007846) can0 RX - - 280 [8] 03 29 54 00 00 00 00 00 '.)T.....'
(000.008830) can0 RX - - 285 [8] 00 00 00 00 20 01 08 00 '.... ...'
(000.009790) can0 RX - - 440 [8] 00 05 50 00 02 09 00 AF '..P.....'
I tried it on couple of my systems with the same results.
(CentOS 7 x86_64 & Raspbian on ARM)
Working with this project, I have exported a cadump file and am now recieving this issue
Python 3.8
pip 19.2.3
canmonitor -f F:\WindowsShared\CanBus\candump-2020-03-03_232741.log
Traceback (most recent call last):
File "c:\python-can-monitor\canmonitor\canmonitor.py", line 26, in reading_loop
frame_id, data = source_handler.get_message()
File "c:\python-can-monitor\canmonitor\source_handler.py", line 115, in get_message
return self._parse_from_candump(line)
File "c:\python-can-monitor\canmonitor\source_handler.py", line 126, in _parse_from_candump
time.sleep((abstime - self.clock) / self.speed_scale)
OverflowError: sleep length is too large
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.