{ "info": { "author": "Kristian Sloth Lauszus", "author_email": "lauszus@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": "# Python CAN Viewer\n\n#### Developed by Kristian Lauszus, 2018\n\nThe code is released under the GNU General Public License.\n_________\n[![PyPI](https://img.shields.io/pypi/v/python_can_viewer.svg)](https://pypi.org/project/Python-CAN-Viewer)\n[![Build Status](https://travis-ci.com/Lauszus/python_can_viewer.svg?branch=master)](https://travis-ci.com/Lauszus/python_can_viewer)\n[![Build status](https://ci.appveyor.com/api/projects/status/r4xl2v4aeh350fpd/branch/master?svg=true)](https://ci.appveyor.com/project/Lauszus/python-can-viewer/branch/master)\n[![codecov](https://codecov.io/gh/Lauszus/python_can_viewer/branch/master/graph/badge.svg)](https://codecov.io/gh/Lauszus/python_can_viewer)\n\nA simple CAN viewer terminal application written in Python. Python 2, Python 3, pypy and pypy3 are supported.\n\n## Usage\n\nThe program can be installed via pip:\n\n```bash\npip install python_can_viewer\n```\n\nTo run the script simply execute:\n\n```bash\npython -m python_can_viewer\n```\n\nA screenshot of the application can be seen below:\n\n\n\nThe first column is the number of times a frame with the particular ID has been received, next is the timestamp of the frame relative to the first received message. The third column is the time between the current frame relative to the previous one. Next is the length of the frame and then the data.\n\nThe last two columns are the decoded CANopen function code and node ID. If CANopen is not used, then they can simply be ignored.\n\n### Command line arguments\n\nBy default it will be using the ```socketcan``` interface. All interfaces supported by [python-can](https://github.com/hardbyte/python-can) are supported and can be specified using the ```-i``` argument.\n\nThe full usage page can be seen below:\n\n```\nUsage: python -m python_can_viewer [-h] [--version] [-b BITRATE] [-c CHANNEL]\n [-d {:,:::...:,file.txt}]\n [-f {:,~}]\n [-i {iscan,ixxat,kvaser,neovi,nican,pcan,serial,slcan,socketcan,socketcan_ctypes,socketcan_native,usb2can,vector,virtual}]\n [--ignore-canopen]\n\nA simple CAN viewer terminal application written in Python\n\nOptional arguments:\n -h, --help Show this help message and exit\n --version Show program's version number and exit\n -b, --bitrate BITRATE\n Bitrate to use for the given CAN interface\n -c, --channel CHANNEL\n Most backend interfaces require some sort of channel.\n for example with the serial interface the channel\n might be a rfcomm device: \"/dev/rfcomm0\" with the\n socketcan interfaces valid channel examples include:\n \"can0\", \"vcan0\". (default: use default for the\n specified interface)\n -d, --decode {:,:::...:,file.txt}\n Specify how to convert the raw bytes into real values.\n The ID of the frame is given as the first argument and the format as the second.\n The Python struct package is used to unpack the received data\n where the format characters have the following meaning:\n < = little-endian, > = big-endian\n x = pad byte\n c = char\n ? = bool\n b = int8_t, B = uint8_t\n h = int16, H = uint16\n l = int32_t, L = uint32_t\n q = int64_t, Q = uint64_t\n f = float (32-bits), d = double (64-bits)\n Fx to convert six bytes with ID 0x100 into uint8_t, uint16 and uint32_t:\n $ python -m python_can_viewer -d \"100::,~}\n Comma separated CAN filters for the given CAN interface:\n : (matches when & mask == can_id & mask)\n ~ (matches when & mask != can_id & mask)\n Fx to show only frames with ID 0x100 to 0x103:\n python -m python_can_viewer -f 100:7FC\n Note that the ID and mask are alway interpreted as hex values\n -i, --interface {iscan,ixxat,kvaser,neovi,nican,pcan,serial,slcan,socketcan,socketcan_ctypes,socketcan_native,usb2can,vector,virtual}\n Specify the backend CAN interface to use. (default: \"socketcan\")\n --ignore-canopen Do not print CANopen information\n```\n\n### Shortcuts\n\n| Key | Description |\n|:--------:|:-----------------------:|\n| ESC/q | Exit the viewer |\n| c | Clear the stored frames |\n| SPACE | Pause the viewer |\n| UP/DOWN | Scroll the viewer |\n\n### Misc\n\nI would recommend the following board for testing on a Raspberry Pi: .\n\nThe CAN interface can be setup like so:\n\n```bash\nsudo apt-get -y install can-utils\nsudo raspi-config nonint do_spi 0\nsudo sh -c 'echo \"dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25\" >> /boot/config.txt'\nsudo sh -c 'echo \"dtoverlay=spi0-hw-cs\" >> /boot/config.txt'\n```\n\nFor more information send me an email at .\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Lauszus/python_can_viewer", "keywords": "", "license": "GPLv2", "maintainer": "", "maintainer_email": "", "name": "Python-CAN-Viewer", "package_url": "https://pypi.org/project/Python-CAN-Viewer/", "platform": "", "project_url": "https://pypi.org/project/Python-CAN-Viewer/", "project_urls": { "Homepage": "https://github.com/Lauszus/python_can_viewer" }, "release_url": "https://pypi.org/project/Python-CAN-Viewer/0.2.0/", "requires_dist": [ "python-can (>=2.0.0)", "six", "typing", "windows-curses; platform_system == \"Windows\"", "future; extra == 'test'", "mock; extra == 'test'", "pytest; extra == 'test'", "pytest-runner; extra == 'test'", "coverage; extra == 'test'", "codecov; extra == 'test'" ], "requires_python": ">=2.7", "summary": "A simple CAN viewer terminal application written in Python", "version": "0.2.0" }, "last_serial": 4160304, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "05ccd00bc560520118fd34f966abe590", "sha256": "2525f270c2cfe9f092810814d059bf65dec14bfacb318b7949b2ce3a36476791" }, "downloads": -1, "filename": "Python_CAN_Viewer-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "05ccd00bc560520118fd34f966abe590", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2.7", "size": 14956, "upload_time": "2018-07-17T15:35:05", "url": "https://files.pythonhosted.org/packages/5a/7e/905d5d4bb1a3978b0d5a5516cfef70dfc8df66b8cd29c57509afe0788091/Python_CAN_Viewer-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "484d58bb2a863648c9db29999ae9b8f7", "sha256": "16eacfbb85f05a9f34ed6f7a444654647cf2f2542eea3ed11177ad706c177aa2" }, "downloads": -1, "filename": "Python CAN Viewer-0.1.0.tar.gz", "has_sig": false, "md5_digest": "484d58bb2a863648c9db29999ae9b8f7", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 19216, "upload_time": "2018-07-17T15:35:06", "url": "https://files.pythonhosted.org/packages/97/60/51618e8160d0b75f66663d8e3946a3507d2a2b4997c288fe4fa8ee443950/Python%20CAN%20Viewer-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "28efe6546e4d9e313f3170aa6d796ab6", "sha256": "6dadee2cc045be13c49de95e165568e8483da6f95434fdbc64c5b86847ffae48" }, "downloads": -1, "filename": "Python_CAN_Viewer-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "28efe6546e4d9e313f3170aa6d796ab6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2.7", "size": 12216, "upload_time": "2018-08-11T20:24:52", "url": "https://files.pythonhosted.org/packages/39/c3/ce11ca45d6713a9658a262905bfddc98fa8e914db7a6418cc7c03159206e/Python_CAN_Viewer-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d669c137286a0e05d23c01e1ed2e2a38", "sha256": "7b198c22475c4d116f1882bd8c7391e43061dcbc98b30c2baab9bbfabaa98e6b" }, "downloads": -1, "filename": "Python CAN Viewer-0.2.0.tar.gz", "has_sig": false, "md5_digest": "d669c137286a0e05d23c01e1ed2e2a38", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 17787, "upload_time": "2018-08-11T20:24:53", "url": "https://files.pythonhosted.org/packages/e5/64/45adc0db555bc15ffc72c83ca5a3575661742064f6f9875e5174138407cf/Python%20CAN%20Viewer-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "28efe6546e4d9e313f3170aa6d796ab6", "sha256": "6dadee2cc045be13c49de95e165568e8483da6f95434fdbc64c5b86847ffae48" }, "downloads": -1, "filename": "Python_CAN_Viewer-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "28efe6546e4d9e313f3170aa6d796ab6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2.7", "size": 12216, "upload_time": "2018-08-11T20:24:52", "url": "https://files.pythonhosted.org/packages/39/c3/ce11ca45d6713a9658a262905bfddc98fa8e914db7a6418cc7c03159206e/Python_CAN_Viewer-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d669c137286a0e05d23c01e1ed2e2a38", "sha256": "7b198c22475c4d116f1882bd8c7391e43061dcbc98b30c2baab9bbfabaa98e6b" }, "downloads": -1, "filename": "Python CAN Viewer-0.2.0.tar.gz", "has_sig": false, "md5_digest": "d669c137286a0e05d23c01e1ed2e2a38", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 17787, "upload_time": "2018-08-11T20:24:53", "url": "https://files.pythonhosted.org/packages/e5/64/45adc0db555bc15ffc72c83ca5a3575661742064f6f9875e5174138407cf/Python%20CAN%20Viewer-0.2.0.tar.gz" } ] }