|
| 1 | +Installing pycanlib |
| 2 | +=================== |
| 3 | + |
| 4 | +This document assumes a workstation set up for development using Mercurial |
| 5 | +(i.e. Mercurial installed and set up correctly, with an SSH key for the user |
| 6 | +doing the install). Python 2.6 or later must be installed as well. |
| 7 | + |
| 8 | +1. Install Kvaser CANLIB SDK |
| 9 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 10 | + |
| 11 | +Windows XP |
| 12 | +`````````` |
| 13 | + |
| 14 | +Copy \\nz2ks32ch\Public\Install\Kvaser\CANLib\Version42\canlib.exe to your |
| 15 | +machine, execute it and follow the on-screen instructions to install the SDK. |
| 16 | + |
| 17 | +Linux |
| 18 | +````` |
| 19 | + |
| 20 | +NOTE: The Kvaser driver for the Leaf and USBCAN II doesn't work under Linux |
| 21 | +kernel versions earlier than 2.6. |
| 22 | + |
| 23 | +1. Make sure your system is set up for kernel compilation (i.e. has header |
| 24 | + packages installed). |
| 25 | +2. Extract \\nz2ks32ch\Public\Install\Kvaser\Drivers\Linux\linuxcan_beta.tar.gz |
| 26 | + to your machine and extract it. |
| 27 | +3. Correct the install scripts for USBCAN II and Leaf devices by changing line |
| 28 | + 17 of ``installscript_leaf_2.6.sh`` and ``installscript_usbcanII_2.6.sh`` |
| 29 | + from ``$UDEVCTRL reload_rules`` to ``$UDEVCTRL --reload-rules`` |
| 30 | +4. Do ``sudo make install`` to build and install the drivers. |
| 31 | + |
| 32 | +2. Install Python setuptools |
| 33 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 34 | + |
| 35 | +Windows XP |
| 36 | +`````````` |
| 37 | + |
| 38 | +Copy \\nz2ks32ch\Public\Install\Python\2.6.4\setuptools-0.6c11.win32-py2.6.exe |
| 39 | +to your machine, execute it and follow the on-screen instructions to install |
| 40 | +Python's setuptools package. |
| 41 | + |
| 42 | +Linux |
| 43 | +````` |
| 44 | + |
| 45 | +Do ``sudo aptitude install python-setuptools`` to install setuptools. |
| 46 | + |
| 47 | +3. Install hgversionutils |
| 48 | +~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 49 | + |
| 50 | +Windows XP |
| 51 | +`````````` |
| 52 | + |
| 53 | +1. Do ``hg clone ssh://hg.sw/user/bpowell/hgversionutils`` to clone the |
| 54 | + hgversionutils source to your machine. |
| 55 | +2. Do ``python setup.py install`` to install this package (the cloned |
| 56 | + repository may be deleted after the package is installed). |
| 57 | + |
| 58 | +Linux |
| 59 | +````` |
| 60 | + |
| 61 | +1. Do ``hg clone ssh://hg.sw/user/bpowell/hgversionutils`` to clone the |
| 62 | + hgversionutils source to your machine. |
| 63 | +2. Do ``sudo python2.6 setup.py install`` to install this package (the cloned |
| 64 | + repository may be deleted after the package is installed). |
| 65 | + |
| 66 | +3. Install pycanlib |
| 67 | +~~~~~~~~~~~~~~~~~~~~ |
| 68 | + |
| 69 | +Windows XP |
| 70 | +`````````` |
| 71 | + |
| 72 | +1. Do ``hg clone ssh://hg.sw/user/bpowell/pycanlib`` to clone the pycanlib |
| 73 | + source to your machine. |
| 74 | +2. Do ``python setup.py develop`` to do a "development" install of this package |
| 75 | + to your machine (this allows you to pull later updates of the pycanlib |
| 76 | + source from the Mercurial repo and use them without having to reinstall |
| 77 | + pycanlib). Note that the cloned repo should *not* be deleted after this step! |
| 78 | + |
| 79 | +Linux |
| 80 | +````` |
| 81 | + |
| 82 | +1. Do ``hg clone ssh://hg.sw/user/bpowell/pycanlib`` to clone the pycanlib |
| 83 | + source to your machine. |
| 84 | +2. Do ``sudo python2.6 setup.py develop`` to do a "development" install of this |
| 85 | + package to your machine (this allows you to pull later updates of the |
| 86 | + pycanlib source from the Mercurial repo and use them without having to |
| 87 | + reinstall pycanlib). Note that the cloned repo should *not* be deleted after |
| 88 | + this step! |
| 89 | + |
| 90 | +4. (OPTIONAL) Install IPython |
| 91 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 92 | + |
| 93 | +IPython is an extended command interpreter for Python, offering syntax |
| 94 | +colouring and tab-completion, among many other features. The pycanlib package |
| 95 | +includes some utilities that can be used to manipulate CAN traffic streams |
| 96 | +using the ipython interface. |
| 97 | + |
| 98 | +Windows XP |
| 99 | +`````````` |
| 100 | + |
| 101 | +1. Copy \\nz2ks32ch\Public\Install\Python\ipython-0.10.win32-setup.exe to your |
| 102 | + machine, execute it, and follow the on-screen instructions to install |
| 103 | + IPython. |
| 104 | +2. To check that the install worked, enter ``ipython -p pycanlib`` on the |
| 105 | + command line. You should see something like the following:: |
| 106 | + |
| 107 | + Importing ipipe library... |
| 108 | + Importing pycanlib IPython extensions... |
| 109 | + ReadCAN... |
| 110 | + WriteCAN... |
| 111 | + PrintCAN... |
| 112 | + ReadLog... |
| 113 | + WriteLog... |
| 114 | + AcceptanceFilter... |
| 115 | + ExtractTimeslice... |
| 116 | + |
| 117 | +Linux |
| 118 | +````` |
| 119 | + |
| 120 | +1. Do ``sudo aptitude install ipython`` to install IPython. |
| 121 | +2. To check that the install worked, enter ``ipython -p pycanlib`` on the |
| 122 | + command line. You should see something like the following:: |
| 123 | + |
| 124 | + Importing ipipe library... |
| 125 | + Importing pycanlib IPython extensions... |
| 126 | + ReadCAN... |
| 127 | + WriteCAN... |
| 128 | + PrintCAN... |
| 129 | + ReadLog... |
| 130 | + WriteLog... |
| 131 | + AcceptanceFilter... |
| 132 | + ExtractTimeslice... |
0 commit comments