/*
** Copyright 2002-2012 KVASER AB, Sweden.  All rights reserved.
*/


- Linux drivers for Kvaser PCIcan, PCIcan II, USBcanII, Leaf and Mhydra -

  Interface   Product                  Driver Name  
 -----------+------------------------+-------------
  USB         Leaf Light               leaf         
              Leaf SemiPro                          
              Leaf Professional                     
              Memorator Professional                
              BlackBird                             
 -----------+------------------------+-------------
  USB         Eagle                    mhydra         
              BlackBird v2                            
 -----------+------------------------+-------------
  USB         USBcanII                 usbcanII     
              Memorator                             
 -----------+------------------------+-------------
  PCI         PCIcan                   pcican       
              PCIcanx                               
              PCIEcan                               
 -----------+------------------------+-------------
  PCI         PC104                    pcicanII     
              PC104+                                
              PCIcan II                             
              PCIcanx II                            
 -----------+------------------------+-------------


System requirements:

* Linux 2.6 or later
* Header files and compiler for kernel compilation.
  In Ubuntu 12.04 e.g. this is accomplished by issuing the command:
  
    "sudo apt-get install build-essential"
  
NOTE! Read ReleaseNotes before using the driver.


Compilation:

* To build all drivers:

    "make"
    
  To install all drivers:

    "sudo make install"

* To build just a single driver, go to the corresponding subdirectory:

    "make"
    "sudo ./installscript.sh" 

* To build with debug printouts:

    "make KV_DEBUG_ON=1"

Debug levels and some other settings may be changed in config.mak.


Usage:

* "modprobe pcican" or "modprobe pcicanII" to load driver.
* "modprobe -r pcican" or "modprobe -r pcicanII" to unload driver.
* USBcanII, Leaf and Mhydra will load/unload when inserting/removing the device.
* Try examples in /usr/doc/canlib/examples/.




Installed Files:

* Driver modules
----------------------------------
/lib/modules/`uname -r`/kernel/drivers/char/kvpcican.ko (PCIcan)
/lib/modules/`uname -r`/kernel/drivers/char/kvpcicanII.ko (PCIcanII)
/lib/modules/`uname -r`/kernel/drivers/char/kvvirtualcan.ko (Virtualcan)
/lib/modules/`uname -r`/kernel/drivers/usb/misc/usbcanII.ko (USBcanII)
/lib/modules/`uname -r`/kernel/drivers/usb/misc/leaf.ko (Leaf)
/lib/modules/`uname -r`/kernel/drivers/usb/misc/mhydra.ko (Mhydra)

* Module setup
----------------------------------
The following lines are added to /etc/modprobe.conf for PCIcan:

    alias pcican kvpcican
    install kvpcican /usr/sbin/pcican.sh start
    remove kvpcican /usr/sbin/pcican.sh stop

The following lines are added to /etc/modules.conf for PCIcan II:

    alias pcicanII kvpcicanII
    install kvpcicanII /usr/sbin/pcicanII.sh start
    remove kvpcicanII /usr/sbin/pcicanII.sh stop

The following lines are added to /etc/modules.conf for Virtualcan:

    alias virtualcan kvvirtualcan
    install virtualcan /usr/sbin/virtualcan.sh start
    remove kvvirtualcan /usr/sbin/virtualcan.sh stop


* Module loading
----------------------------------
/usr/sbin/pcican.sh      (start/stop pcican driver;      by modprobe or manually)
/usr/sbin/pcicanII.sh    (start/stop pcicanII driver;    by modprobe or manually)
/usr/sbin/virtualcan.sh  (start/stop virtualcan driver;  by modprobe or manually)
/usr/sbin/usbcanII.sh    (start/stop usbcanII driver;    by udev or manually)
/usr/sbin/leaf.sh        (start/stop leaf driver;        by udev or manually)
/usr/sbin/mhydra.sh      (start/stop mhydra driver;      by udev or manually)

* Module hotplug support
----------------------------------
If /etc/hotplug exists:
/etc/hotplug/usbcanII.usermap
/etc/hotplug/usb/usbcanII
/etc/hotplug/leaf.usermap
/etc/hotplug/usb/leaf
/etc/hotplug/mhydra.usermap
/etc/hotplug/usb/mhydra

/etc/udev/rules.d/10-kvaser.rules

* Include files for canlib library
----------------------------------
/usr/include/canlib.h
/usr/include/canstat.h

* Canlib library and links
----------------------------------
/usr/lib/libcanlib.so
/usr/lib/libcanlib.so.1.1.0
/usr/lib/libcanlib.so.1

* Canlib documentation
----------------------------------
/usr/doc/canlib/HTMLhelp

* Canlib examples
----------------------------------
/usr/doc/canlib/examples

* Canlib Makefile template
----------------------------------
/usr/doc/canlib/examples/Makefile
