Skip to content

Commit

Permalink
updated license, readme, package info
Browse files Browse the repository at this point in the history
  • Loading branch information
ericevenchick committed Jan 27, 2015
1 parent dec6cb5 commit 5af163a
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 51 deletions.
33 changes: 12 additions & 21 deletions LICENSE.txt
@@ -1,21 +1,12 @@
The MIT License (MIT)

Copyright (c) 2014 Eric Evenchick

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
CANard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
9 changes: 0 additions & 9 deletions MANIFEST

This file was deleted.

63 changes: 46 additions & 17 deletions README.rst
Expand Up @@ -8,23 +8,30 @@ Python.
Using a CANtact
===============

The [CANtact](http://cantact.io) tool is directly supported by CANard. Using it
requires pySerial, which can be installed with `pip install pyserial`.
The CANtact_ tool is directly supported by CANard. Using it
requires pySerial, which can be installed with pip::

pip install pyserial

.. _CANtact: http://cantact.io/

Example
-------

This examples goes on bus and prints received messages::
This examples goes on bus and prints received messages:

.. code:: python
from canard import can
from canard.hw import cantact
dev = cantact.CantactDev("/dev/cu.usbmodem14511")
dev.start()
while True:
print(dev.recv())
print(dev.recv())
You will need to set the serial port (/dev/cu.usbmodem14511 in this example)
You will need to set the serial port (``/dev/cu.usbmodem14511`` in this example)
correctly.


Expand All @@ -36,20 +43,42 @@ functionality is only available on Linux

For kernels 3.6 and newer, skip to step 5.

1. Download the [Linux
driver](http://www.peak-system.com/fileadmin/media/linux/index.htm#download)
1. Download the Peak `Linux driver`_.

2. Install dependancies::

sudo apt-get install libpopt-dev

3. Build the driver::

cd peak-linux-driver-x.xx
make
sudo make install

4. Enable the driver::

sudo modprobe pcan

2. Install dependancies
`sudo apt-get install libpopt-dev`
5. Connect a Peak CAN tool, ensure it appears in ``/proc/pcan``. Note the network device name (ie, ``can0``)

3. Build the driver:
`cd peak-linux-driver-x.xx`
`make`
`sudo make install`
6. Bring the corresponding network up::

4. Enable the driver
`sudo modprobe pcan`
sudo ifconfig can0 up

5. Connect a Peak CAN tool, ensure it appears in `/proc/pcan`
Example
-------

The device can now be accessed as a ``SocketCanDev``. This examples goes on bus and prints received messages:

.. code:: python
from canard import can
from canard.hw import socketcan
dev = socketcan.SocketCanDev("can0")
dev.start()
while True:
print(dev.recv())
6. Set the bitrate
.. _`Linux driver`: http://www.peak-system.com/fileadmin/media/linux/index.htm#download
14 changes: 10 additions & 4 deletions setup.py
Expand Up @@ -2,13 +2,19 @@

setup(
name='CANard',
version='0.1-dev',
version='0.1.0',
author='Eric Evenchick',
author_email='eric@evenchick.com',
packages=['canard', 'canard.test', 'canard.hw'],
scripts=[],
url='http://pypi.python.org/pypi/CANard/',
license='LICENSE.txt',
description='Library for interacting with Controller Area Network (CAN).',
url='http://github.com/ericevenchick/CANard',
license='GPLv3',
description='Library for interacting with Controller Area Network (CAN)',
long_description=open('README.rst').read(),
classifiers=['Development Status :: 3 - Alpha',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Embedded Systems']


)

0 comments on commit 5af163a

Please sign in to comment.