CAN-API Part2 Installation Manual
CAN-API Part2 Installation Manual
Part 2:
Installation Guide
Software Manual
CAN-API Installation
Page 1 of 112
NOTE
The information in this document has been carefully checked and is believed to be entirely reliable. esd
makes no warranty of any kind with regard to the material in this document, and assumes no
responsibility for any errors that may appear in this document. esd reserves the right to make changes
without notice to this, or any of its products, to improve reliability, performance or design.
esd assumes no responsibility for the use of any circuitry other than circuitry which is part of a product
of esd gmbh.
esd does not convey to the purchaser of the product described herein any license under the patent rights
of esd gmbh nor the rights of others.
+49-511-372 98-0
+49-511-372 98-68
info@esd-electronics.com
www.esd-electronics.com
USA / Canada:
esd electronics Inc.
525 Bernardston Road
Suite 1
Greenfield, MA 01301
USA
Phone:
Fax:
E-mail:
Internet:
Page 2 of 112
+1-800-732-8006
+1-800-732-8093
us-sales@esd-electronics.com
www.esd-electronics.us
CAN-API Installation
Manual File:
I:\texte\Doku\MANUALS\PROGRAM\CAN\Schicht2\ENGLISCH\Univers\CAN-API-Installation_30e.en9
C.2001.21
This order no. covers the two parts of the API manual:
Part 1: CAN API, Function Description and
Part 2: CAN API, Installation Guide (this manual).
2007-07-27
Date of Print:
Alterations in Alterations in
software
documentation
Tables 1. - 4. revised
2.
4.1
Chapter revised
5.1
CAN-API Installation
Page 3 of 112
Page 4 of 112
CAN-API Installation
Contents
Page
12
12
12
16
17
17
20
20
24
26
26
31
32
32
33
43
43
43
44
46
48
49
49
50
51
51
52
53
53
53
53
54
54
54
55
56
57
58
58
59
67
71
76
CAN-API Installation
Page 5 of 112
76
77
78
78
79
81
81
82
86
86
87
88
88
88
89
108
108
109
110
7. References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Page 6 of 112
CAN-API Installation
For installation, please follow the steps below (except CAN-Bluetooth and EtherCAN module):
1. Installation of driver
Look for the column with your operating system in the applicable table on the following pages.
In the lines of the table you will find your CAN module. These two points lead you to the field
which lists the chapters you need for your installation.
The first chapters describe the installation of the driver.
If you have a Windows operating system, you also have to carry out the second step and install
the SDK. For all other operating systems this is not required.
2. Installing the SDK (Software Development Kit - for Windows operating systems only)
After the driver has been installed, proceed to the installation of the SDK. This is described in
the chapter starting on page 53. The SDK installation is only required for Windows operating
systems.
Attention:
The installation of the CAN Bluetooth driver is an exception of these rules! The CAN
Bluetooth driver must always be installed last, that means after the installation of
possible other CAN drivers and after the installation of the CAN-SDK!
The installation of the EtherCAN driver can be executed at any time.
CAN-API Installation
Page 7 of 112
CAN Module
CAN-ISA/200
CAN-PC104/200
(SJA1000 version)
CAN-ISA/331
below
called
ISA-Bus
Boards
CAN-PC104/331
CAN-PCI104/200
Windows
NT
Windows
2000
Windows
Server 2003,
Windows XP
(32-, 64-bit)
2.5,
2.11
2.1.2
2.11
2.5,
2.11, 3.
2.1.2,
2.11, 3.
Windows
Vista
Windows
95/98/ME
Windows
CE.NET
Windows
RTX
2.6.2,
2.11
2.6.2,
2.11, 3.
2.7,
2.11
(32-, 64-bit)
CAN-PCIe/200
CAN-PCI/200
2.1.1, 2.4,
2.11
CPCI-CAN/200
2.2, 2.4,
2.11
2.3, 2.4,
2.11
2.6.1, 2.11
2.5, 2.11
CAN-PCI/266
PMC-CAN/266
CAN-PCI/331
CPCI-CAN/331
PMC-CAN/331
below
called
PCI-Bus
Boards
2.8,
2.11, 3.
2.5,
2.11, 3.
2.1.1, 2.4,
2.11, 3.
2.2, 2.4,
2.11, 3.
2.3, 2.4,
3.
2.6.1,
2.11, 3.
CAN-PCI/360
CPCI-CAN/360
only 32-bit
drivers:
2.1.1, 2.4,
2.11
only 32-bit
drivers:
2.1.1, 2.4,
2.11
2.7,
2.11, 3.
CAN-PCI/405
only 32-bit
drivers:
2.1.1, 2.4,
2.11
CAN-USB-Mini
2.1.1, 2.4,
2.11, 3.
2.2, 2.4,
2.11, 3.
2.3, 2.4,
2.11, 3.
2.6.1,
2.11, 3.
2.8,
2.11, 3.
CAN-USB/2
2.1.1, 2.4,
2.11, 3.
2.2, 2.4,
2.11, 3.
2.3, 2.4,
2.11, 3.
CAN-Bluetooth
2.9, 2.11
2.9, 2.11
2.10, 2.11
2.10, 2.11
2.6.2,
2.11
EtherCAN
CAN-PCC
2.5,
2.11
2.1.2,
2.11
Table 1: Guide to find the relevant chapters for the Windows software installation
Page 8 of 112
CAN-API Installation
CAN Module
Linux
LynxOS
PowerMAX OS
Solaris
SGIIRIX6.5
AIX
4.1.1
4.1.1,
6.
4.2,
6.
4.4
4.1.1
4.1.1
4.1.1
4.4
4.5
4.6
CAN-ISA/200
CAN-PC104/200
(SJA1000 version)
CAN-PC104/200
(82527 version)
below called
ISA-Bus
Boards
CAN-ISA/331
CAN-PC104/331
CAN-PCI104/200
CAN-PCIe/200
CAN-PCI/200
CPCI-CAN/200
CAN-PCI-/266
PMC-CAN/266
CAN-PCI/331
below called
PCI-Bus
Boards
4.2,
6.
CPCI-CAN/331
PMC-CAN/331
CAN-PCI/360
4.1.1,
6.
CPCI-CAN/360
CAN-PCI/405
4.5
CAN-USB-Mini
4.1.1
6.
CAN-USB/2
4.1.1
6.
EtherCAN
4.1.3
CAN-PCC
VME-CAN2
4.1.2
4.2
4.3
VME-CAN4
4.1.2
4.2
4.3
4.4
CAN-Bluetooth
Table 2: Guide to find the relevant chapters for the Unix operating systems
CAN-API Installation
Page 9 of 112
CAN Module
VxWorks
QNX4
QNX6
5.2.1
5.2.2
RTOS-UH
CAN-ISA/200
CAN-PC104/200
(SJA1000 version)
CAN-PC104/200
(82527 version)
below
called
ISA-Bus
Boards
CAN-ISA/331
CAN-PC104/331
5.1
5.1,
6.
5.2.1,
6.
5.2.2,
6.
5.1
CAN-PCI104/200
CAN-PCIe/200
CAN-PCI/200
5.2.2
CPCI-CAN/200
CAN-PCI-/266
PMC-CAN/266
CAN-PCI/331
CPCI-CAN/331
below
called
PCI-Bus
Boards
5.1,
6.
5.2.1,
6.
5.2.2,
6.
PMC-CAN/331
CAN-PCI/360
CPCI-CAN/360
CAN-PCI/405
5.1, 6.
-
5.2.2, 6.
-
5.2.2
5.2.2, 6.
CAN-USB-Mini
CAN-USB/2
CAN-Bluetooth
EtherCAN
CAN-PCC
VME-CAN2
*)
VME-CAN4
5.1
*)
- ...
*)
Table 3: Guide to find the relevant chapters for the Real Time operating system
Page 10 of 112
CAN-API Installation
VxWorks
(5.4, 5.5.x, 6.x)
QNX6
RTOS-UH
*)
5.1
5.2.2
*)
4.1.1
5.1
5.2.2
*)
*)
*)
EPPC-405
EPPC-405-HR
EPPC-405-UC
- ...
*)
5.1
Table 4: Guide to find the relevant chapters for the host boards and embedded systems
CAN-API Installation
Page 11 of 112
Page 12 of 112
CAN-API Installation
Check the box CD-ROM drives if you have the CAN driver CD inserted into your optical drive
otherwise check Specify a location. Click Next to proceed with the driver installation.
CAN-API Installation
Page 13 of 112
The New Hardware Wizard automatically selects the correct INF file, which again depends on the
CAN module hardware. Click Next to start the installation process.
Page 14 of 112
CAN-API Installation
Now all necessary driver files are copied to your system. Finally the Hardware Wizard should indicate
the successful installation of the driver. Click Finish to complete the installation.
After the driver installation has been completed, you may open the device manager to verify the correct
installation and configure driver settings. Refer to chapter 2.4 for details.
CAN-API Installation
Page 15 of 112
before calling the CAN driver Disable parallel port services (Windows 2000) has to be called and
the computer has to be rebooted
if the parallel port is to be used for other matters (e.g. as print port), the CAN driver has to be
stopped first and Enable parallel port services (Windows 2000) has to be called and then the
computer has to be rebooted
Note:
If starting the CAN driver has been changed in the Device Manager from Manual to
Automatic, this has to be re-changed, if the parallel port is to be used for other
applications again and not for the CAN driver anymore.
Page 16 of 112
CAN-API Installation
CAN-API Installation
Page 17 of 112
Select Search for the best driver in these locations and choose Search removable media if you install
from the CAN driver CD or choose Include this location in the search and browse for the location of
the driver files. By pressing the Next button the Wizard starts installing the device driver.
Page 18 of 112
CAN-API Installation
After copying the necessary driver files to the system Windows displays a message indicating that the
installation was successful. Click Finish to complete the installation.
After the driver installation has been completed, you may open the device manager to verify the correct
installation and configure some driver parameter. Refer to chapter 2.4 for details.
CAN-API Installation
Page 19 of 112
Choose Locate and install driver software to continue the device driver installation. As driver
installation requires administrator privileges the UAC (User Account Control) opens the dialogue
below, which has to be accepted.
Page 20 of 112
CAN-API Installation
Insert your esd CAN driver disc and the installation process will continue. If the driver files are located
on your hard disc choose I dont have the disc. Show me other options.
CAN-API Installation
Page 21 of 112
The following Windows Security dialogue depends on the Windows Vista (32- or 64-bit) version. The
complete CAN driver package for Windows Vista 64-bit is digitally signed and you will see the
dialogue box below, which indicates that Windows Vista has verified that the device driver is released
by esd and hasnt been tampered. You may select the Always trust software from ... check before
selecting the Install button to prevent this dialogue installing other signed driver packages by esd.
Page 22 of 112
CAN-API Installation
After copying the necessary driver files to the system Windows displays a message indicating that the
installation was successful. Click Close to complete the installation.
After the driver installation has been completed, you may open the device manager to verify the correct
installation and configure some driver parameter. Refer to chapter 2.4 for details.
CAN-API Installation
Page 23 of 112
Driver Configuration
To configure the driver you have to double-click the device instance to open the Properties dialogue
of the device. Select the Feature tab.
Page 24 of 112
CAN-API Installation
Driver Configuration
CAN-API Installation
Page 25 of 112
Description
Typical
Compact
Custom
User-defined configuration.
Table 5: Configuration selection
After the installation and before the start of the driver, the computer has to be re-booted. This can be
done directly from the setup program after the installation is finished.
Continue with the installation of the SDK, as described on page 53.
Page 26 of 112
CAN-API Installation
The following figures show a system with four esd-CAN modules (CAN-ISA/331, CAN-PCI/331,
CAN-PCI/200 and CAN-PCC) exemplary. CAN Control only displays the esd-CAN modules which
are installed in the system. If you have only installed one CAN module, only one file card is shown.
The following figure shows the setting options for CAN-ISA modules:
The following figure shows the setting options for the CAN-PCC module.
CAN-API Installation
Page 27 of 112
The following figure shows the setting options for CAN-PCI modules. Here, only logical CAN
networks are assigned:
Page 28 of 112
CAN-API Installation
3. In this window you now have to cancel the device Parport. The system now tells you that the
devices Parallel and ParVdm are also cancelled.
4. In order to prevent having to repeat this procedure with every system run-up, Startup has to be set
to Manual for all three devices Parallel, Parport and ParVdm. With this setting the devices are not
started automatically with every system run-up.
CAN-API Installation
Page 29 of 112
CAN-ISA/200
CAN-PC104/200
(SJA1000 version)
CAN-ISA/331
CAN-PC104/331
CAN-PCI/200
CAN-PCI/266
CPCI-CAN/200
PMC-CAN/266
CAN-PCI/331
CPCI-CAN/331
PMC-CAN/331
CAN-PCI/360
CPCI-CAN/360
CAN-PCC
Page 30 of 112
CAN-API Installation
CAN-ISA/200
CAN-PC104/200
(SJA1000 version)
CAN-ISA/331
CAN-PC104/331
CAN-PCI/200
CAN-PCI/266
CPCI-CAN/200
PMC-CAN/266
CAN-PCI/331
CPCI-CAN/331
PMC-CAN/331
CAN-PCI/360
CPCI-CAN/360
CAN-PCC
CAN-API Installation
Page 31 of 112
Page 32 of 112
CAN-API Installation
After that the start window of the hardware wizard has to open:
CAN-API Installation
Page 33 of 112
3. Then the window for the selection of the type of hardware to be installed appears.
Here Other devices has to be selected and then Next has to be clicked. (Only if already an esd-CAN
driver had been installed, the selection CAN Interface would appear. It is not shown before or during
the installation.)
If you haven't already done so, you should now put the data carrier (disk or CD-ROM),
contained in the product package, into your drive.
Page 34 of 112
CAN-API Installation
CAN-API Installation
Page 35 of 112
The following window, which displays all esd-CAN drivers, has to open (this example only
shows the ISA/331 driver). Select the driver of your board and click Next.
8.
(Only for CAN-ISA boards, otherwise continue with step 9) Windows 9x/ME installs the driver,
checks the system resources, compares them to the configurations possible for the CAN-ISA
board and offers a possible configuration for the board in the following window:
The Input/Output range proposed by the system control does not have to correspond to the
default-I/O range which is set on board by means of jumpers or coding switches.
Attention: Therefore it is absolutely necessary to compare the jumper (or coding switch)
position on the CAN-ISA board to the I/O-address space selected by the
system, and change the jumpers/coding switches, if required.
Page 36 of 112
CAN-API Installation
The successful installation of the software driver is shown by the following window:
10.
In order to complete the software installation you have to shut down your computer after
terminating all applications which are still open!
Then switch off the computer and install the hardware now as described in the hardware
manual! Compare the default setting to the setting selected under point 8 and change the
jumpers (or coding switches, depending on board type), if necessary.
11.
Switch on the computer again after the installation and restart Windows 95. The driver is
automatically loaded by Windows 95. The device manager now has the new device class CAN
Controller under which all esd CAN boards can be shown and configured.
Now install the SDK, as described on page 53. The SDK contains the files that are necessary
for the development of your own applications and it contains the monitor program CANreal.
CAN-API Installation
Page 37 of 112
Page 38 of 112
CAN-API Installation
Changing the default settings by the device manager or the registry editor can cause
conflicts so that one or more devices are not recognized by the system anymore!
The device manager and the registry editor are configuration tools for advanced users
who are familiar with the parameter configuration and know that changes can have
various effects.
The CAN-ISA boards have fixed resource settings which are either distributed by the hardware assistant
during the Windows setup or which can be configured later by the device manager.
It might occur that Windows 9x/ME is unable to configure the CAN-ISA board, because it gets into
conflict with other devices. Should this be the case the board has to be configured again.
In order to change the device setting manually, the Device Manager, which is called via Settings under
System Control Panel, can be used. By using the device manager errors can be prevented which are
likely to occur when editing the registry entries directly.
If you want to solve the device conflicts manually by means of the device manager, you can use
following strategies, for instance:
Distribute the resources which are used by other devices again in order to release resources for the
conflict device.
Change the jumpers (or coding switches, depending on the board type) on the CAN-ISA board in
order to adjust the board to the new settings.
CAN-API Installation
Page 39 of 112
2. Double clicking the desired device type in the list with the left mouse button lists all devices of this
type in the computer.
3. Select the device to be configured by double clicking. Or else mark the device and click the
Properties icon.
Page 40 of 112
CAN-API Installation
The Conflicting Device List shows the settings of other devices which are conflicting the current
setting of the CAN-ISA board.
3. Select the setting which is to be changed, for instance the interrupt level, under resource type. Click
the Change setting icon in order to keep the changed values.
Changes can only be made, if the option Use automatic settings has been deactivated.
The Interrupt and Input/Output-range (address space) settings can be changed independently.
The dialogue box Input/Output range shows the various settings which are supported. An interrupt
which is marked by an asterisk (*) signifies that this interrupt is already used by another device.
After clicking the Change setting icon an error message might appear which states that the resource
setting cannot be changed. In this case you have to select other settings until the system accepts one
of the chosen settings.
4. Select settings which are not conflicting other devices and click OK. Remember that the I/Orange setting by jumper (or coding switches, depending on the board type) has to comply with
the selected setting!
5. Finish Windows 9x/ME, then change the hardware settings of devices which have been configured
again and restart Windows 9x/ME.
CAN-API Installation
Page 41 of 112
3. In Physical Net Mapping logical network numbers can be assigned to the physical interfaces of the
CAN board. By means of the network numbers the CAN board can be addressed by the software.
When starting the driver for the first time, logical network numbers starting from 0 are assigned to
boards supported by the driver. If more than one esd CAN board of various types (e.g. CANPCI/331 and CAN-ISA/331) are used in a computer, overlapping network numbers cannot be
avoided and therefore have to be set manually.
4. A change in logical network numbers remains invalid until the computer is restarted.
Page 42 of 112
CAN-API Installation
RTX Installation
CAN-API Installation
Page 43 of 112
RTX Installation
2.7.3 Installation
In order to support the CAN modules in the RTSS environment it is necessary to make RTX manage
these devices. For Windows NT the device has to be disabled through the Windows control panel
because there are no Plug and Play or Power Management concerns with Windows NT (skip Step 1
below). Managing devices on Windows 2000 or Windows XP requires converting a Windows device
into an RTX device (see RTX Runtime Documentation for details).
Step 1: Converting to RTX device
Before the RTSS device driver can control the device the CAN module has to converted into a RTX
controlled device. This is performed using the RTX Properties control panel applet.
Select the Devices Tab (RTX 5.x) or Plug and Play Tab (RTX 6.x). In this applet under Devices the
CAN module has to be selected and assigned to the RTX driver according to the following figure:
If there has already been installed a driver under Windows 2000/XP for this CAN module it will be
listed as CAN-Interface. If not, it will be listed as Other PCI Bridge Device.
After the conversion the CAN module has to be removed by means of the device manager and the
computer has to be rebooted. You will find detailed information on this procedure e.g. in the release
notes of RTX 5.0 in the chapter Managing RTX Devices in Windows 2000.
After reboot the CAN modules has to listed in the device manager as shown in the following figure:
Page 44 of 112
CAN-API Installation
RTX Installation
If an error occurs at start the numeric error code is displayed in the RTX-text console and the RTSSprocess is terminated. In this case the driver can be started with the option -v to submit the RTX-text
console more tips to the source of the error.
If an error occurs in the start sequence it can be checked with the RTX-task manager, respectively the
RTX-object viewer, if the driver is active.
CAN-API Installation
Page 45 of 112
RTX Installation
Step 3: Loading the NTCAN API library
Next step is to load the NTCAN API library. This can be performed with the command line version or
the GUI-version of the RTX-tool RTSSStart. At the command line the following command has to be
executed:
rtssstart ntcan.rtss [Arguments]
If an error occurs at start the numeric error code is displayed in the RTX-text console and the RTSSprocess is terminated.
If an error occurs in the start sequence it can be checked with the RTX-task manager, respectively the
RTX-object viewer, if the driver is active.
2.7.4 Command Line Parameter for RTSS Device Driver
There are several command line options to configure the driver startup:
Option
Argument
Description
-V
After the start the driver returns the version number in the RTX-console
and terminates immediately.
-v
mask
-h
-p
prio
This option configures the priority of the IST thread that processes the
CAN messages. The default value for prio is 127.
baudrate
net number
This option configures the logical base net number which is assigned to
the first physical port of the CAN module. The logical net numbers are
incremented by one for each additional physical port. The default value
for net number is 0.
-b
-n
Page 46 of 112
CAN-API Installation
RTX Installation
Example:
The call
c405.rtss -v0xFF -n2 -p118
- starts the driver with additional outputs and
- assigns the logical base-net number 2 and an IST (interrupt service thread) priority of 118 to the
first CAN module and
If the driver is started without any command line options the logical net number 0 is assigned to the first
physical CAN port, all IST threads get a priority of 127 and the CAN modules remain off-bus until a
baudrate is explicitly assigned by the application.
CAN-API Installation
Page 47 of 112
Page 48 of 112
CAN-API Installation
2.9.1 Installation
1. Call installation program canbtdrv.exe.
2. After the window esd Bluetooth
CAN Interface Driver has opened,
click
Install.
3. Start Installation
CAN-API Installation
Page 49 of 112
Base Net
Here the logical CAN network number is entered. Values between 0 and 255 are
permissible.
Virtual COM
Page 50 of 112
CAN-API Installation
Before host software installation the EtherCAN module should be assigned an IP address
within the subnet.
The description of the IP-address assignment and the further configuration via the
integrated Web-server are described in the manual EtherCAN, Hardware Manual.
2.10.1 Installation
1. Start the installation program setup.exe which is located in the directory EthetCAN/Win32
of the CAN driver CD
2. Follow the instructions of the
installation program.
3. When the Setup Type is requested,
please choose Typical.
4. The success or failure of the
installation will be displayed at the
end of installation.
CAN-API Installation
Page 51 of 112
The Default button restores all client driver defaults for the timeout parameter.
Page 52 of 112
CAN-API Installation
CAN-API Installation
Page 53 of 112
CAN-ISA/331
CAN-PC104/331
updc331i
CAN-PCI/331
CPCI-CAN/331
PMC-CAN/331
updc331
CAN-PCI/360
CPCI-CAN/360
updc360
CAN-PCI/405
CAN-USB-Mini
CAN-USB/2
1*)
updusb331
updusb2292
Page 54 of 112
CAN-API Installation
CAN-API Installation
Page 55 of 112
If y for YES is typed, the Flash EPROM will be reprogrammed regardless of the
firmware version which is more up-to date !
If n for NO is typed, the program is interrupted. The old firmware remains unchanged in the
Flash-EPROM.
3. To activate the new firmware the local microprocessor has to be reset. This is done by stopping and
restarting the software driver of the host CPU, e.g. by the command line:
net stop xxxx
net start xxxx
At Windows XP systems this is executed if the device is enabled or disabled at the device manager
or via a restart of the computer.
CAN Module
CAN-ISA/331
CAN-PC104/331
CAN-PCI/331
CPCI-CAN/331
PMC-CAN/331
c331
CAN-PCI/360
CPCI-CAN/360
c360
CAN-USB-Mini
usb331
CAN-USB/2
usb2292
Page 56 of 112
CAN-API Installation
If the 29-bit option shall be used at a module (CAN2.0B), this must be state in order
(order no. C.1102.01).
When shipped the default setting of the modules is 11-bit CAN identifier (CAN
2.0A). Only at modules that have been ordered with the option C.1102.01 the default
setting is 29-bit CAN identifier.
CAN-ISA/331
CAN-PC104/331
CAN-PCI/331
CPCI-CAN/331
PMC-CAN/331
CAN-PCI/360
CPCI-CAN/360
CAN-USB-Mini
CAN-USB/2
CAN Module
The logical net number is has to be set with this parameter (0, 1, 2, ..). The
parameter has to be set mandatory! The value has to be entered separated by an
blank from the preceding characters.
Attention:
The operating mode selected for one net is valid for all other nets
of the module, too!
In order to activate the new setting the local processor has to be reset. Resetting and rebooting are
described above under step 3.
CAN-API Installation
Page 57 of 112
Linux Installation
Page 58 of 112
CAN-API Installation
Linux Installation
4.1.1 Linux Driver Installation (from V3.x.x on, except EtherCAN)
Note:
- On most Linux installations the driver installation is only possible with superuser rights.
- Please read the current README file that comes with the software!
- Please note the drivers delivered on the CD are most likely outdated. The increasing speed in
Linux kernel development makes it almost impossible for us to provide you with drivers on CD,
which work with all Linux versions and distributions. Thus we installed a download site on our
website. In order to circumvent any problems before they occur, we advise you to visit this site
before actually installing a driver from this CD.
The latest driver archives can be found here: "http://www.esd-electronics.com/german/candriver"
- Please note: In order to provide the Linux CAN-drivers from our website, we needed to change
the archive format to encrypted ZIP.
The password can be received from our CAN-CD or via email from our support.
Description
current notes and information
Makefile
config.mk
libntcan.a
libntcan.so
ntcan.h
cantest.c
cantest
CAN-API Installation
Page 59 of 112
Linux Installation
File
xxxx.o
xxxx.c
xxxx.h
Description
source- and object-files (located in subdirectory ./src)
This driver is released as a combination of binary-objects (*.o) and
source-files (*.c and *.h). This way esd can provide a CAN-driver working
with many different Linux-kernels. The source files are NOT under the GPL
(GNU Public Licence)! You are not allowed to modify, redistribute or sell the
files! They are intellectual property of esd-electronics gmbh.
BEWARE: Do not try to use any defines or data-structures located in these
files in your own sources. This will lead to non-working
applications in the future.
This tool is only delivered with CAN modules that are equipped with a local
processor (e.g. CAN-PCI/331). (located in subdirectory ./bin *) )
This tool can be used to switch the firmware of such a card between
CAN 2.0A-firmware (used for reception of CAN-messages with 11-bitidentifier) and CAN-2.0B-firmware (used for additional reception of CANmessages with 29-bit identifier).
updcrd
Syntax:
Parameter: crd: CAN module ID, e.g. pci331, usb331 (see table on
page 62)
x:
a, if CAN 2.0A firmware
b, if CAN 2.0B firmware
net: Net number of the CAN interface in the system
(0, 1, 2, ...)
*) Note: In driver archives for x86_64-Linux the path for libraries and binaries exists twice: Once for 32-bit (./lib32
and ./bin32) and once for 64-bit (./lib64 and ./bin64).
Page 60 of 112
CAN-API Installation
Linux Installation
Operating System
User Space
Application Program
NTCAN-API
NTCAN Library
Kernel Space
Driver Interface
OS-Layer
Shipped as Source
Legend:
CAN Nucleus
- API (changing with kernel versions)
- OS-dependent
- API + ABI (constant over several kernel versions)
- OS-independent
- API + ABI (constant over several kernel versions)
- OS-dependent
Board Layer
CAN Driver
CAN-API Installation
Page 61 of 112
Linux Installation
4.1.1.2 CAN-Module-ID and Default Parameters of the Driver
Default Values *)
Module ID
crd
major
Address
io
Interrupt
irq
isa200
53
0x1E8
CAN-ISA/331
CAN-PC104/331
isa331
52
0x1E0
CAN-PCI104/200
CAN-PCI/200
CAN-PCIe/200
CPCI-CAN/200
CAN-PCI/266
PMC-CAN/266
pci200
54
CAN-PCI/331
CPCI-CAN/331
PMC-CAN/331
pci331
50
CAN-PCI/360
CPCI-CAN/360
pci360
51
CAN-USB-Mini
usb331
50
CAN-USB/2
usb2292
50
CAN-PCI/405
pci405
53
cpci405
53
CPCI-CPU/750
(local driver)
cpci750
53
VME-CAN2
VME-CAN4
CAN Module
CAN-ISA/200
CAN-PC104/200
(SJA1000 version)
*) The default values can be overwritten by the command insmod (see following chapter).
Page 62 of 112
CAN-API Installation
Linux Installation
4.1.1.3 Installation
Note: It is absolutely necessary to install the kernel sources and configure them to comply with
the running kernel, before installing the CAN-driver!
1.
=
=
=
=
=
=
=
=
=
=
Page 63 of 112
Linux Installation
2.
CAN-API Installation
Linux Installation
3.
File Locations
It is recommended to store the driver module in the following directory:
/lib/modules/kernel-version/
The variable kernelversion has to be replaced by the according string of the system. The
string (it should be equivalent to the os-string in the driver's name (see above)) is returned, if
the following command is called:
uname -r
The dynamic shared library libntcan.so should be placed in the directory
/usr/local/lib/ or an equivalent path, which is contained in the LD_LIBRARY_PATH
env-variable.
Note: On 64-bit systems, there are two versions of libntcan.so. One in ./lib32 and
one in ./lib64. The first belongs into /usr/local/lib on most Linux
distributions. The later should be kept together with other 64-bit libraries, e.g. in
/usr/local/lib64.
The static version of the library libntcan.a can be kept wherever you want. Here at esd we
prefer to keep it with the sources of a project, on the other hand, one might like to install it with
the shared-lib at /usr/local/lib/ .
Installation-note:
The shared library should belong to user and group root with the following file access
permissions: u=rwx, g=rx, o=rx
After installation of the library, the root-user should call:
ldconfig -n /usr/local/lib (if installed to this directory)
Afterwards there is a link libntcan.so.v --> libntcan.so.v.mv.r .
For your own convenience it is advised to generate another link in your library-directory:
libntcan.so --> libntcan.so.v
The static-library, if installed in /usr/local/lib/, should also belong to user/group
root, but it does not need (and should not have) the executable-flag.
Leading to the following file access permissions: u=rw, g=r, o=r
CAN-API Installation
Page 65 of 112
Linux Installation
4.
==>
with
xx = major number of the driver (see table on page 62)
5.
m = non-default major
The naming of the kernel module is equivalent to the naming of the driver archive as printed
on page 62 (exception: kernel 2.6.x).
Note:
6.
With the module CAN-PCI/405 this call returns after approx. 5 seconds!
esd
esd
esd
esd
CAN
CAN
CAN
CAN
driver:
driver:
driver:
driver:
pci405
baudrate not set
mode=0x00000000, major=53, 4 nodes on 1 cards
version 0.3.1 14:36:35 Feb 13 2003: successfully
After a successful installation, the CAN bus can be accessed by means of the NTCAN-API.
The application has to be linked to the library libntcan.a (static) or libntcan.so
(shared).
Note:
If the example application cantest is called, the available CAN nets are displayed.
7.
Kernel 2.6.x:
rmmod esdcan-crd.ko
Page 66 of 112
CAN-API Installation
Linux Installation
4.1.2 Linux Driver Installation (drivers before version V.3.x.x. only)
Note:
The installation of drivers with version numbers V3.x.x is described from page 59 on.
-
The object mode of the CAN-API is not supported by Linux CAN drivers before version
V3.x.x!
If the CAN-USB-Mini module is used with the Linux driver with version number < 3.x.x, it
is not allowed to remove it from the USB bus while a handle is opened! It is recommended to
update such a driver.
CAN-API Installation
Page 67 of 112
Linux Installation
4.1.2.1 Files of the Linux Package
The software drivers for Linux are distributed on CD-ROM or delivered as archive via e-mail. The
following files are contained:
File
Description
README.ican4
e.g.
ican4
File Name
VME-CAN2
ican2
VME-CAN4
ican4
updican4
libntcan.a
ntcan.h
cantest.c
source code of example program cantest (see CAN-API manual part 1 [1])
cantest
Page 68 of 112
CAN-API Installation
Linux Installation
4.1.2.2 Sequence of Installation
1.
ican4 has to be entered for the VME-CAN4 module. For other modules
the character combination shown in the following table has to be entered.
The same applies to the following commands.
CAN Module
Entry Syntax
VME-CAN2
ican2
VME-CAN4
ican4
3.
can0
can1
can2
can3
c
c
c
c
50
50
50
50
0
1
2
3
Page 69 of 112
Linux Installation
4.
After a successful installation, the CAN bus can be accessed by means of the NTCAN-API
(integration of libntcan.o into the application).
Page 70 of 112
CAN-API Installation
Linux Installation
4.1.3 Linux Driver Installation of the EtherCAN-Module
Note:
- The installation is only possible with superuser rights (user: root).
- Please read the current README file that comes with the software!
Description
README.x.x
cantest.c
cantest
makefile.ethercan
installEthercanLibs
etc/esd-plugin
pdf/CAN-API_Part1_
Function_e.pdf
pdf/CAN-API_Part2_
Installation_e.pdf
pdf/psys.pdf
include/ntcan.h
lib/libntcan.so.x.x.x
lib/ntcanEthPlugin.so.x.x.x
CAN-API Installation
Page 71 of 112
Linux Installation
File
Description
psys_linux/include/psys.h
psys_linux/include/
psyslinux.h
psys_linux/lib32/
libpsys.so.x.y.z
psys_linux/lib64/
libpsys.so.x.y.z
psys_linux/src/psysdrv.c
psys_linux/src/psysdrv.h
Psys-driver header
psys_linux/src/Makefile
psys_linux/Makefie
psys_linux/README
psys_linux/LICENSE
Page 72 of 112
CAN-API Installation
Linux Installation
4.1.3.2 Installation
1.
The unpacked files will be stored in a directory that carries the same name as the archive file.
2.
3.
4.
Adapt /etc/esd-plugin
See chapter Configuration on page 74
5.
After successful installation you can access the CAN-Bus via the esd NTCAN API (link libntcan
with your application). For an API documentation see the standard esd NTCAN API (ntcan.pdf)
documentation.
CAN-API Installation
Page 73 of 112
Linux Installation
4.1.3.3 Configuration
All user configurable stuff concerning EtherCAN can be found in the file /etc/esd-plugin.
List of available keywords in /etc/esd-plugin (with 0 < x < 4):
Keyword
Description
Default Value
PeerName[x]
Net[x]
ConnTimeout[x]
2500 ms
CmdTimeout[x]
2500 ms
KeepAliveTime[x]
2500 ms
TCPNoDelay[x]
0:
1:
50 + x
"10.0.16.58"
30
Example 2: EtherCAN configured as CAN net 20 and, with increased timeouts, because it is located
outside the company network.
PeerName[0]=
Net[0]=
KeepAliveTime[0]=
ConnTimeout[0]=
CmdTimeout[0]=
Page 74 of 112
"134.66.177.1"
20
10000 # increase keep-alive timeout
25000 # increase connection timeout
5000 # increase command timeout
CAN-API Installation
Linux Installation
4.1.3.4 Linking Against libntcan (gcc-Option -rdynamic)
Attention! It is mandatory to use the option -rdynamic when linking against libntcan,
because the dynamically loaded library ntcanEthPlugin.so (beside delivering
some new functionality) itself needs some symbols from within libntcan.
Without -rdynamic this does not work!
If your application (on runtime) complains about ntcanEthPlugin.so:
undefined symbol: openRegistryCanIf Ether the option
-rdynamic is still missing in your makefile.
CAN-API Installation
Page 75 of 112
Description
instcan
README.c331
c331
c331.info
c331dbg
CAN Module
File name
VME-CAN2
ican2
VME-CAN4
ican4
CAN-ISA/331
CAN-PC104/331
c331i
CAN-PCI/331
CPCI-CAN/331
PMC-CAN/331
c331
ntcan.o
ntcan-API
ntcan.h
canupd
cantest.c
source code of the example program cantest (see CAN-API manual part 1
[1])
cantest
Page 76 of 112
CAN-API Installation
LynxOS Installation
4.2.2 Sequence of Installation Under LynxOS
1.
c331 has to be entered for the CAN-PCI/331 module. For other modules the
character combination shown in the following table has to be entered:
CAN Module
Entry
VME-CAN2
ican2
VME-CAN4
ican4
CAN-ISA/331
CAN-PC104/331
c331i
CAN-PCI/331
CPCI-CAN/331
PMC-CAN/331
c331
CAN-API Installation
Page 77 of 112
PowerMAX OS Installation
Description
README.ican4
e.g.
ican4
dynamically loadable
driver
File Name
VME-CAN2
ican2
VME-CAN4
ican4
libntcan.o
ntcan-API
ntcan.h
cantest.c
cantest
Page 78 of 112
CAN-API Installation
PowerMAX OS Installation
4.3.2 Sequence of Installation Under PowerMAX OS
1.
2.
ican4 has to be entered for the VME-CAN4 module. For other modules the
character combination shown in the following table has to be entered. The same
applies to the following commands.
CAN Module
Entry Syntax
VME-CAN2
ican2
VME-CAN4
ican4
4.
(AVB+0x12)
(AVB+0x13)
5.
6.
Installation
- in case of first installation:
./install -f
with following reboot
- in case of an update:
./install -u
CAN-API Installation
Page 79 of 112
PowerMAX OS Installation
7.
Change Directory:
change to
~/4_2/vmecan4_v1.2
or
~/4_3/vmecan4_v1.2
8.
Start Driver:
After calling
modadmin -l ican4
the driver displays his start message.
9.
Starting cantest:
After starting cantest with
./cantest
the program shows four accessible CAN nets (net 0...3)
After a successful installation, the CAN bus can be accessed by means of the NTCAN-API
(integration of libntcan.o into the application).
Page 80 of 112
CAN-API Installation
Solaris Installation
Description
install
README.c331
c331
c331.conf
File Name
CAN-ISA/331
CAN-PC104/331
c331i
CAN-PCI/331
CPCI-CAN/331
PMC-CAN/331
c331
VME-CAN4
ican4
ntcan.o
ntcan-API
ntcan.h
canupd
cantest.c
cantest
CAN-API Installation
Page 81 of 112
Solaris Installation
4.4.2 Sequence of Installation Under Solaris
1.
The entry c331 has to be made for the CAN-PCI/331 module. Please specify
the corresponding letter combination shown in the table below for other modules:
CAN Module
Entry Syntax
CAN-ISA/331
CAN-PC104/331
c331i
CAN-PCI/331
CPCI-CAN/331
PMC-CAN/331
c331
VME-CAN4
ican4
\M0
When installing the driver for the first time, the files /dev/canx should be automatically
created now, x indicating the (hexadecimal) network number.
Page 82 of 112
CAN-API Installation
Solaris Installation
3.
3.1
Parameter
Meaning
name
String
Driver name
class
String
Bus type
interrupts
Numeric
Interrupt vector
interruptpriorities
Numeric
reg
Numeric
3.2
CAN-API Installation
Page 83 of 112
Solaris Installation
3.1
Parameter
Meaning
name
String
class
String
interrupts
Numeric
reg
Numeric
Contains six values separated by commas, that define the address range
of the VME-CAN4:
- The first value defines the 1. address range: 0xad => A16
- The second value defines the board address within the 1. address
range that is used to initialize the address registers of the VMECAN4:
0xe000 + (coding_switch_setting 0x100)
(only, if the geographical addressing is inactive, please refer
hardware manual of VME-CAN4)
- The third value defines the size of the 1. address range in bytes and
thus the offset to the next board within the A16-address range of the
system: always 0x100
- The fourth value defines the 2. address range: 0x4d => A32
- The fifth value defines the A32-address of the VME-CAN4 board:
e.g. 0x10000000
- The sixth value defines the size of the 2. address range in bytes:
always 0x00100000
Note: Due to reasons of the address coding the offset to the next
board within the A32-address range in the system is
0x00200000!
Page 84 of 112
CAN-API Installation
Solaris Installation
4.
5.
5.1
5.2
34d9 132
6.
CAN-API Installation
Page 85 of 112
SGI-IRIX6.5 Installation
Description
c331
c331.master
c331.sm
File Name
CAN-PCI/331
CPCI-CAN/331
PMC-CAN/331
CAN-PCI/405
c331
pci405
makefile
ntcan.o
ntcan-API
ntcan64.o
ntcan.h
cantest.c
source code of the example program cantest (see CAN-API manual part 1
[1])
cantest
Page 86 of 112
CAN-API Installation
SGI-IRIX6.5 Installation
4.5.2 Sequence of Installation Under SGI-IRIX6.5
1.
Login as Root
2.
In order to unpack the tar-archive of the CAN module CAN-PCI/405 you have to call the
following command:
tar -xvf esdcan-pci405-irix-mips-x.x.x-IPyy-z.z
with
x.x.x
yy
z.z
3.
4.
5.
Load Driver
smake load
CAN-API Installation
If the driver has been installed and loaded correctly, a message of the driver
has to appear on the screen now.
Page 87 of 112
AIX Installation
Description
README.c331
c331
ntcan.o
ntcan-API
ntcan.h
nttest.c
File Name
c331
Page 88 of 112
CAN-API Installation
AIX Installation
4.6.3 Installation Sequence under AIX
1.
Login as Root
2.
3.
4.
5.
6.
CAN-API Installation
Page 89 of 112
AIX Installation
7.
8.
Page 90 of 112
CAN-API Installation
VxWorks Installation
5.5.x
6.x
386/486
PowerPC
486/
Pentium
PowerPC
Pentium
(I -IV)
PowerPC
CAN-ISA/200
CAN-PC104/200
(SJA1000 version)
CAN-ISA/331
CAN-PC104/331
CAN-PCI104/200
CAN-PCI/200
CAN-PCI/266
CPCI-CAN/200
PMC-CAN/266
CAN-PCI/331
CPCI-CAN/331
PMC-CAN/331
CAN-PCI/360
CPCI-CAN/360
VME-CAN4
Host CPU
CAN-Module
no driver available at the moment (please ask our support for the current development status)
CAN-API Installation
Page 91 of 112
VxWorks Installation
5.1.1.2 Local CAN Drivers for CAN Modules that Act as Hosts Themselfs
Compared to the modules described in the previous chapter these modules come with a complete
VxWorks BSP containing a local CAN driver. Using these modules as target is not supported at the
moment.
CAN Module
PMC-CPU/405
included in BSP
CPCI-405
included in BSP
CPCI-CPU/750
included in BSP
not scheduled
EPPC-405
included in BSP
n.a.
EPPC-405-HR
included in BSP
n.a.
EPPC-405-UC
included in BSP
n.a.
Table 28: CAN modules with local VxWorks operating system and local CAN driver
Description
doc\
src\
target\
This directory contains all necessary files to integrate and configure the driver. For
driver installation and integration with the WindRiver Workbench the
complete folder has to be copied into the target directory of your VxWorks 6.x
installation keeping the directory hierarchy. The CAN driver support will be
available with the next start of the Workbench.
Table 29: Directory hierarchy of the VxWorks 6.x package
Page 92 of 112
CAN-API Installation
VxWorks Installation
5.1.2.2 Content of the driver package for VxWorks 5.x
The driver software for VxWorks 5.x comes as a CAN hardware specific package with the directory
structure /VxWorks-Version/CPU-Architecture/. Supported VxWorks versions are 5.4 and 5.5.1.
Each directory contains the following files:
File
Description
ldc331i
c331i.sys
c331iini
c331iini.c
File Name
CAN-ISA/200
CAN-PC104/200
c200i
CAN-ISA/331
CAN-PC104/331
PMC-CAN/331
c331i
CAN-PCI/200
CPCI-CAN/200
c200
CAN-PCI/331
CPCI-CAN/331
PMC-CAN/331
c331
CAN-PCI/360
CPCI-CAN/360
c360
VME-CAN4
can4
ntcan.o
ntcan-API
ntcan.h
cantest.c
source code of example program cantest (see CAN-API manual part 1 [1])
cantest
CAN-API Installation
Page 93 of 112
VxWorks Installation
5.1.3 Driver Configuration
5.1.3.1 Configuration of the VxWorks 6.x Driver
The integration of the CAN driver in your application and the configuration of the driver parameter is
done with the WindRiver Workbench. After the driver installation you will have a new node in your
Workbench VxWorks kernel parameter tree with the name esd gmbh Driver, Protocol Stacks and
Software.
Below this entry you will find the node CAN Fieldbus which contains the configuration of esd CAN
drivers.
Below CAN Fieldbus there is a node CAN board drivers where you can add the driver for the CAN
modules you want to support in your project. Every driver support consists of a node XXX Board
Configuration to include and configure board specific parameter and XXX Device Driver to configure
driver specific parameter.
Below CAN Fieldbus there is a node CAN support components to include additional components of the
CAN support.
For configuration option and details please refer to property description of the configuration parameter
in the Workbench.
Page 94 of 112
CAN-API Installation
VxWorks Installation
5.1.3.2 Configuration of the VxWorks 5.x Driver
Driver for VxWorks 5.x are configured calling the driver start with a pointer to an initialized structure
of the type CAN_INFO. This can be either performed modifying the code of the example startup file
caninit.c (recommended) or by calling the driver start routine from within your own application. In
either case please take a look into the caninit.c to see configuration examples for several target
architectures.
The following text describes the member of the CAN_INFO structure:
struct CAN_INFO
{
unsigned long
unsigned char
unsigned char
unsigned char
unsigned char
};
base;
net[4];
prio;
irq;
reserved[6];
base
CAN-ISA modules:
I/O-address of the CAN-ISA module.
base has to be set to the value configured on the hardware via jumpers or coding
switches. If base is set to 0, the driver terminates the search for further CAN
interfaces.
CAN-PCI modules:
For x86 host CPU architectures the base address of the CAN hardware is configured
usually by a BIOS. In order to tell the device driver to use this address you have to
set the parameter base to -1. You have to make that your BSP got enough unused
entries in the MMU-Memory Descriptor table to enter the PCI-address area of the
CAN module there (this is usually the case).
For PPC host CPU architectures where the BSP or a bootloader performs the PCI
bus configuration you have to set the parameter base to -1. In this case the PCIaddress space is accessed with the common VxWorks offset of 0xC0000000. The
offset value of the address area is set in the driver.
For PPC host CPU architectures without PCI bus configuration by the BSP or
bootloader you have to find a 3 MB free page size aligned physical address area
which address is used for the parameter base .
net[0]
Logical network number which is to be assigned to the first physical CAN port in this
module. If a module has got more than one CAN port, the ports get consecutive numbers
starting with this number.
The values of net[1] to net[3] are ignored by the driver.
The user has to make sure that all logical CAN network numbers are only assigned once
in a system, otherwise the driver might not be initialized correctly.
prio
Priority of back-end task, which is, depending on the hardware, started for each physical
interface or module.
CAN-API Installation
Page 95 of 112
VxWorks Installation
irq
CAN-ISA modules:
Interrupt vector for this CAN-ISA module
CAN-PCI modules:
For x86 host CPU architectures the interrupt of the CAN hardware is configured
usually by a BIOS. In order to tell the device driver to use this address you have to
set the parameter irq to -1.
For PPC host CPU architectures where the BSP or a bootloader performs the PCI
bus configuration you have to set the parameter irq to -1.
For PPC host CPU architectures without PCI bus configuration by the BSP or
bootloader you have to find out the interrupt used by your target for the PCI slot of
the corresponding CAN module in your host hardware manual and set the parameter
irq to this value regarding an BSP specific interrupt vector offset.
Entry Syntax
CAN-ISA/200
CAN-PC104/200 (SJA1000 version)
c200i
CAN-ISA/331
CAN-PC104/331
c331i
CAN-PCI/200
CPCI-CAN/200
c200
CAN-PCI/331
CPCI-CAN/331
PMC-CAN/331
c331
CAN-PCI/360
CPCI-CAN/360
c360
VME-CAN4
can4
CPCI-405
CPCI-CPU/750
PMC-CPU/405
EPPC-405
EPPC-405-HR
EPPC-405-UC
Table 31: Entry syntax for starting the driver
Page 96 of 112
CAN-API Installation
VxWorks Installation
5.1.4.2 Start of the VxWorks 5.x Driver
If you use a modified caninit.c to start your driver you should call xxxStart() otherwise you have
to call the xxx_install() routine which is exported by the driver with an initialized CAN_INFO
structure. In both cases xxx is the driver specific prefix as described above.
5.1.5 Test Application
The driver package comes with the test program canTest which can be either optionally configured
to your application via the Workbench (VxWorks 6.x) or can be linked to your application or loaded
via a target shell (VxWorks 5.x). With the help of this program you can check the function of the CAN
interface. canTest is described in the chapter Test program cantest in CAN-API manual part 1 [1].
Since VxWorks allows less parameters in the command line as required by canTest, the parameters
have to be entered as string - in apostrophes. The string is evaluated by the test program. Default values
are used for all parameters which are not included in the string.
operating mode
If 0 is entered for op, the current operating mode is shown. If 1 is entered, the firmware
recognizes the new operating mode, but only switches to it after the following boot-up.
CAN-API Installation
Page 97 of 112
QNX4 Installation
5.2.1 QNX4
5.2.1.1 Files of the QNX4 Packages
The software drivers for the QNX package are shipped on a 3.5 disk. The disk contains the following
files:
File
Description
current notes and installation
information
readme
c331
File Name
CAN-ISA/200
CAN-PC104/200
c200i
(SJA1000 version)
CAN-ISA/331
CAN-PC104/331
c331i
CAN-PCI/331
CPCI-CAN/331
PMC-CAN/331
c331
updc331
libntcan3s.lib
libntcan3r.lib
ntcan.h
cantest.c
cantest
Page 98 of 112
CAN-API Installation
QNX4 Installation
5.2.1.2 Sequence of Installation Under QNX4
5.2.1.2.1 Installation of ISA-Boards
First install the hardware of the module. When installing ISA boards, please make sure to set the board
address correctly. The address corresponding to the standard configuration (e.g. 0x1E8 for CANISA/200) should be set before shipping already.
Calling the Resource Manager
Log in as root.
Start the resource manager (e.g. for QNX4, CAN-ISA/200): c200i &
After this call an output similar to the following is to appear on the screen:
C200i[0x1e8]:
C200i[0x1e8]:
C200i[0x1e8]:
C200i[0x1e8]:
C200i[0x1e8]:
C200i[0x1e8]:
C200i[0x1e8]:
Note: Depending on the module the resource manager is called by means of different commands. The
character combination c200i for QNX4 shown in the example above, has to be substituted
for other modules as follows:
CAN Module
CAN-ISA/200
CAN-PC104/200
(SJA1000 version)
CAN-ISA/331
CAN-PC104/331
c200i
c331i
CAN-API Installation
Page 99 of 112
QNX4 Installation
Command Line of the Resource Manager for ISA Boards
The resource manager can be configured by means of the parameters explained below.
Parameter
-h
Function
Showing a help text
-n net
-p port
Selecting the ISA board in the system by means of the port address set via the
hardware (see also hardware manual of the module).
-i irq
Function
CAN-API Installation
QNX4 Installation
5.2.1.2.2 Installation of PCI-Boards
First install the module hardware.
Log in as root.
Start the resource manager (example CAN-PCI/331): c331 &
Now an output similar to the one below has to appear on the screen:
C331[0]:
C331[0]:
C331[0]:
C331[0]:
C331[0]:
C331[0]:
C331[0]:
Using Interrupt 12
"CAN_PCI331" with 2 Nets identified
Hardware-Version=1.1.00
Firmware-Version=0.c.00
Driver-Version =1.0.00
Net 0: Successfully created
Net 1: Successfully created
Note: Depending on the module the resource manager might be called by means of different
commands. The character combination c331 , as shown in the example above, has to be
substituted for other modules as shown below:
CAN Module
CAN-PCI/200
CPCI-CAN/200
CAN-PCI/266
CAN-PCI/331
CPCI-CAN/331
PMC-CAN/331
c331
Table 36: Input syntax when calling the resource manager on PCI boards
CAN-API Installation
QNX4 Installation
Command Line of the Resource Manager for PCI Boards
The resource manager can be configured by means of the parameters described below.
Parameter
-h
-n net
-p index
Function
Showing a help text.
Assigning the logical network number.
net = 0...255
default: net = 0
Selecting the esd-CAN-PCI boards in the system.
The boards are numbered starting with 0. The assignment of numbers and boards
is determined by the plug-and-play controller. In case of doubt, the assignment
should be checked by means of a test.
Table 37: Parameters of the resource manager on PCI boards
Function
The CAN network numbers 0 and 1 are assigned to the CANPCI/331 module with the PCI number 0.
The CAN network numbers 2 and 3 are assigned to the CANPCI/331 module with the PCI number 1.
CAN-API Installation
QNX6 Installation
5.2.2 QNX6
5.2.2.1 Files of the QNX6 Package
The software drivers for the QNX package are shipped on a 3.5 disk. The disk contains the following
files:
File
Description
readme
CHANGELOG
devcan-pci331-i20
upd-isa331
upd-pci331
upd-pci360
Code
CAN-ISA/200
...isa200-sja1000
CAN-PC104/200
(SJA1000 version)
CAN-PCI/200
CAN-PCI/104/200
...pci200-sja1000
CAN-PCIe/200
CPCI-CAN/200
CAN-PCI/266
PMC-CAN/266
CAN-ISA/331
CAN-PC104/331
...isa331-i20
CAN-PCI/331
CPCI-CAN/331
PMC-CAN/331
...pci331-i20
CAN-PCI/360
CPCI-CAN/360
...pci360-i20
CPCI-405
...cpci405pcimsgx
libntcan.so.x
ntcan.h
header of CAN-API
cantest.c
cantest
CAN-API Installation
QNX6 Installation
5.2.2.2 Sequence of Installation Under QNX6
5.2.2.2.1 Installation of ISA-Boards
First install the hardware of the module. When installing ISA boards, please make sure to set the board
address correctly. The address corresponding to the standard configuration (e.g. 0x1E8 for CANISA/200) should be set before shipping already.
Calling the Resource Manager
Log in as root.
Start the resource manager (e.g. for CAN-ISA/200):
devcan-isa200-sja1000 -v &
After this call an output similar to the following is to appear on the screen:
CAN_ISA_200 version 3.3.0 build 17:03:04 Dec 15 2004
Card[0]: Baud=0x7fffffff Mode=0x00000000 Nodes=can0
Card[0]: Hardware-version 1.0.0
Depending on the module the resource manager is called by means of different commands. The code
isa200-sja1000 in the character combination devcan-isa200-sja1000 shown in the
example above, has to be substituted for other modules as described in table 39 on page 103.
CAN-API Installation
QNX6 Installation
Command Line of the Resource Manager for ISA Boards:
With the command
devcan-isa200-sja1000 -h
the input syntax of all available parameters (here CAN-ISA/200) is listed:
devcan-isa200-sja1000 [-b baudrate][-m mode][-n net][-v[v..]][-c card-options] &
The resource manager can be configured by means of the parameters explained below.
Parameter
Function
-b baudrate
-m mode
-n net
-v[v...]
Verbose level
-p prio
-h
-c card_options
Attention! Make sure that your module is correctly wired! A second CAN participant is required
to make the module work correctly, because otherwise the CAN controller creates error
messages. Make also sure that the bus is correctly terminated.
CAN-API Installation
QNX6 Installation
5.2.2.2.2 Installation of PCI-Boards
First install the module hardware.
Log in as root.
Start the resource manager (example CAN-PCI/331):
devcan-pci331-i20 -v &
Now an output similar to the one below has to appear on the screen:
pci331 version 3.3.1 build 17:01:52 Dec 15 2004
Card[0]: Baud=0x7fffffff Mode=0x00000000 Nodes=can0 can1
Card[0]: Hardware-version 1.1.4 Firmware-version 0.12.30
Note: Depending on the module the resource manager might be called by means of different
commands. The code pci331-i20 in the character combination devcan-pci331-i20,
as shown in the example above, has to be substituted for other modules as described in table 39
on page 103.
CAN-API Installation
QNX6 Installation
Command Line of the Resource Manager for PCI Boards:
With the command
devcan-pci331-i20 -h
the input syntax of all available parameters (here CAN-PCI/331) is listed:
devcan-pci331-i20 [-b baudrate][-m mode][-n net][-v[v..]][-c card-options] &
The resource manager can be configured by means of the parameters described below.
Parameter
Function
-b baudrate
-m mode
-n net
-v[v...]
Verbose level
-p prio
-h
-c card_options
sdid = id
Attention! Make sure that your module is correctly wired! A second CAN participant is required
to make the module work correctly, because otherwise the CAN controller creates error
messages. Make also sure that the bus is correctly terminated.
CAN-API Installation
VxWorks,
QNX4
LynxOS
Linux
QNX6
CAN-ISA/331
CAN-PC104/331
updc331i
updisa331
upd-isa331
CAN-PCI/331
CPCI-CAN/331
PMC-CAN/331
updc331
updpci331
upd-pci331
updpci360
upd-pci360
updc360
CAN-PCI/360
n.a.
CAN-PCI/405
n.a.
1*)
CPCI-CAN/360
n.a.
USB-Mini
n.a.
2*)
updusb331
n.a.
Attention!
CAN-API Installation
CAN-API Installation
If you enter y for YES, the Flash-EPROM is then being programmed again, regardless of the
firmware version which is more up-to-date.
n for NO cancels the procedure. The firmware in the Flash-EPROM remains unchanged.
3. In order to activate the new firmware, the local processor has to be reset. This can be achieved by
stopping and restarting the software driver of the host-CPU.
The following table shows the command entries which are required for this procedure:
CAN Module
CAN-ISA/331
CAN-PC104/331
Stopping and Restarting the CAN Driver with Operating System ...
LynxOS
VxWorks
stop:
instcan -u c331i
stop:
terminate system
restart:
instcan c331i
restart:
c331iStart()
QNX
Linux
stop:
terminate shell by
Ctrl-C
or
terminate process by
kill process
restart: c331i &
CAN-PCI/331
stop:
instcan -u c331
stop:
terminate system
restart:
instcan c331
restart:
c331Start()
CPCI-CAN/331
PMC-CAN/331
CAN-PCI/360
stop:
terminate shell by
Ctrl-C
or
terminate process by
kill process
restart: c331 &
stop:
terminate system
restart:
c360Start()
stop:
terminate shell by
Ctrl-C
or
terminate process by
kill process
stop syntax:
see Linux installation
description on page 66
*)
restart syntax:
see Linux installation
description on page 66
*)
Table 43: Commands for stopping and restarting the CAN drivers
CAN-API Installation
References
7. References
[1]
CAN-API Installation
Index
Index
A
AIX 9, 10, 88
L
Linux 9, 108
LynxOS 9, 76, 108
B
Base Net 25, 28
M
matrix 8
C
CAN 2.0B 57
CAN Control 27
CAN-Bluetooth 8-10, 49
CAN-ISA/200 8-10
CAN-ISA/331 8-10
CAN-PC104/200 8-10
CAN-PC104/331 8-10
CAN-PCC 8-10
CAN-PCI/200 8-10
CAN-PCI/266 8-10
CAN-PCI/331 8-10
CAN-PCI/360 8-10
CAN-PCI/405 8-10
CAN-USB-Mini 8-10, 12
CPCI-405 Host 11
CPCI-CAN/200 8-10
CPCI-CAN/331 8-10
CPCI-CAN/360 8-10
CPCI-CPU/750 11
P
parallel interface 29
Parport 29
ParVdm 29
PCI 27
Physical Net Mapping 42
PMC-CAN/331 8-10
PMC-CPU/405 11
PowerMAX OS 9, 78
D
de-installation 31
E
ECP 38
EtherCAN 8-10, 51, 71
F
firmware version 55, 109
H
hardware wizard 33
I
I/O-Port 28
Input/Output range 36
Interface 28
ISA 8-10
Q
QNX4 10, 98, 108
QNX6 10, 98
R
registry 39
resources 38
RTX 8, 43
S
SDK 7, 53
SGI-IRIX6.5 9, 86
Solaris 9, 81, 108
U
update 54
V
VME-CAN2 9, 10
VME-CAN4 9, 10
VxWorks 10, 92, 93, 108
W
Windows2000/XP 8
Windows95/98/ME 8
WindowsNT 8, 26
CAN-API Installation