CAN-API Part 2: Installation Guide Software Manual CAN-API Installation Manual • Doc. No.: C.2001.21 / Rev. 3.0 • © 2000-2007 esd gmbh esd electronic system design gmbh Vahrenwalder Str. 207 • 30165 Hannover • Germany www.esd-electronics.
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.
Manual File: I:\texte\Doku\MANUALS\PROGRAM\CAN\Schicht2\ENGLISCH\Univers\CAN-API-Installation_30e.en9 Manual Order no.: 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: Changes in the Software and/or Documentation Chapter Alterations in this manual versus previous version Alterations in Alterations in software documentation 1 Tables 1. - 4. revised x x 2.
This page is intentionally left blank. Page 4 of 112 Manual • Doc. No.: C.2001.21 / Rev. 3.
Contents Page 1. Guide to Your Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2. Windows Operating Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1 Windows 2000 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1.1 Driver Installation of Plug-and-Play Capable CAN Modules . . . . . . . . . . . . . . . . . . 2.1.
4.2.1 Files of the LynxOS Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.2 Sequence of Installation Under LynxOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3 PowerMAX OS Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.1 Files of the PowerMAX OS Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.
Guide to Your Installation 1. Guide to Your Installation This document is valid for several esd-CAN boards. The boards are partly being sold installed into closed cases (e.g. CAN-USB-Mini), but sometimes also just as boards. In generally applicable contexts the term modules will therefore be used. The installation descriptions given in this appendix are dependent on the module and operating system used.
Guide to Your Installation The following tables shall be a guide to find the chapters that are important for your board and operating system: Corresponding Chapter for ... Real Time Windows OS Non Real Time Windows Operating Systems 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.
Guide to Your Installation Corresponding Chapter for Unix Operating Systems 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.
Guide to Your Installation Corresponding Chapter for Real Time Operating Systems 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.
Guide to Your Installation CAN Module PMC-CPU/405 CPCI-405 CPCI-CPU/750 Local Operating Systems (driver running locally at the CAN module) Linux 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 No implementation available at the moment Note: For these operating systems local drivers are available. Installation notes are not yet available.
Windows 2000 Installation 2. Windows Operating Systems 2.1 Windows 2000 Installation In order to install the device driver for Windows 2000 the user must have administrator privileges. For these Windows versions non plug-and-play capable CAN modules (ISA, PC104 and Parallel Port) are supported by installing the Windows NT driver which is described in chapter 2.1.2. 2.1.
Windows 2000 Installation Choose Search for a suitable driver for my device (recommended) and click the Next button. The reported device type in this and the following dialogues depends on the CAN module hardware. 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 Manual • Doc. No.: C.2001.21 / Rev. 3.
Windows 2000 Installation If you don’t install from the CAN driver CD you have to locate the driver files with the next step. 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 Manual • Doc. No.: C.2001.21 / Rev. 3.
Windows 2000 Installation If Windows is configured to warn when unsigned (non-WHQL certified) drivers are about to be installed, a Security Alert dialogue will appear. The Security Alert dialogue has to be a answered with Yes to continue the driver installation. For more details about device driver and software signing refer to chapter 2.4. Now all necessary driver files are copied to your system. Finally the Hardware Wizard should indicate the successful installation of the driver.
Windows 2000 Installation 2.1.2 Driver Installation of Non Plug-and-Play Capable CAN Modules Note: For ISA-/PC104-bus based CAN modules and the CAN-PCC the Windows NT drivers are used. Please refer to chapter 2.6.2 for installation instruction. 2.1.2.1 CAN-PCC only: Stopping the System Driver for the Parallel Interface The CAN-PCC-module is run via the parallel interface of the computer. The Windows 2000 driver accesses this interface.
Windows XP/Server 2003 Installation 2.2 Windows XP/Server 2003 Installation (32- and 64-Bit Version) In order to install the device driver for Windows XP and Windows Server 2003 (32-bit and 64-bit) the user must have Administrator privileges. For the 64-bit Windows versions only plug-and-play capable CAN modules (PCI, PCIe, CPCI, PMC, PCI104 and USB) are supported. For the 32-bit Windows versions the non Plug and Play capable modules are supported via the Windows NT driver. See chapter 2.1.2 for details.
Windows XP/Server 2003 Installation In the following dialogue box choose Install from a list or specific location (Advanced) before you click the Next button. The reported device type in this and the following dialogues depends on the CAN module hardware. 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.
Windows XP/Server 2003 Installation If Windows is configured to ignore file signature warnings the installation process is started and no further dialogue will appear. If Windows is configured to warn when unsigned (non-WHQL certified) drivers are about to be installed, a Security Alert dialogue will appear. The dialogue text depends on the Windows version (32- or 64-bit).
Windows Vista Installation 2.3 Windows Vista Installation (32- and 64-Bit Version) In order to install the device driver for Windows Vista the user must have administrator privileges. For Windows Vista only plug-and-Play capable CAN modules (PCI, PCIe, CPCI, PMC, PCI104 and USB) are supported. 2.3.1 Driver Installation for Plug-and-Play Capable CAN Modules. A non-USB module has to be plugged in before the Windows Vista startup, an USB-based CANmodule can also be plugged in while Windows Vista is running.
Windows Vista Installation Depending on the configuration of the Windows Update Driver Settings, which can be changed via the Hardware tab of the System Properties dialogue which is opened if you select Control Panel/System/Advanced System Settings, Windows Vista will ask you if you want to search for a suitable driver online. If such a dialogue appears choose Don’t search online, otherwise wait until the online search on Windows Update is completed which may take up to one minute.
Windows Vista Installation In the latter case choose Browse my computer for driver software (advanced) which is followed by a file dialogue to locate the driver files. 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 hasn’t been tampered.
Windows Vista Installation The CAN driver package for Windows Vista 32-bit isn’t digitally signed and you will see the dialogue box below. Select Install the driver software anyway to continue the installation. For more details about device driver and software signing refer to chapter 2.4. 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.
Driver Configuration 2.4 Driver Configuration This chapter is valid for the operating systems Windows 2000, Windows XP/Server 2003 and Windows Vista, described in the preceding chapters. To configure some settings of the device driver or check the installed version you have to open the Windows Device Manager. All device drivers for esd CAN modules are installed in the CAN Interface class as shown below.
Driver Configuration The dialogue box shows the following information:  Driver, firmware and hardware revision.  The serial number (if serial number access is supported by the hardware).  The timestamp frequency (if timestamping is supported by the hardware and the driver) and the information if this is a hardware (HW) or software (SW) applied timestamp.  The CAN module and driver related device capabilities.  The version of the libraries which are installed together with the driver.
Windows NT 4.0 Installation 2.5 Windows NT 4.0 Installation 2.5.1 Installation of Software Drivers for the Host CPU 2.5.1.1 Starting Installation When updating it is necessary to de-install the old driver version, as shown in section 2.5.1.5. Attention: The complete installation, configuration and starting the driver can only be done with administrator rights on the Windows NT computer! You will find the device driver on the CD-ROM in a corresponding sub-directory.
Windows NT 4.0 Installation 2.5.1.2 Calling Configuration Program CAN Control For the configuration of the driver the program CAN Control is part of the product package. It is called from the system control. 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.
Windows NT 4.0 Installation Under Interface you enter the number of the CAN module for which the settings are to be valid. In Base Net a base network number is assigned to the CAN module. If a module has got more than one physical CAN interface, the first gets the logical network number specified in Base Net, and the following are counted up from there.
Windows NT 4.0 Installation 2.5.1.3 CAN-PCC only: Stopping the Windows-NT Drivers for the Parallel Interface The CAN-PCC module is operated by the parallel interface of the computer. It is standard for the Windows-NT driver to access this interface. For a free access of the CAN driver to the parallel port, the Windows-NT driver has to be stopped before starting the CAN driver. For this, you have to proceed as follows: 1. Select System Control Panel under Settings. 2.
Windows NT 4.0 Installation 2.5.1.4 Starting the Driver In order to start the driver, the command net start xxxx is to be entered in the command line first.
Windows NT 4.0 Installation 2.5.1.5 De-Installation of Software Driver The driver is de-installed in three steps: Attention: Stopping the driver and the complete de-installation can only be done with administrator rights on the Windows NT computer! 1. Terminating all applications which use the services of the driver. 2. The driver has to be stopped in dialogue control panel/devices or by entering net stop xxxx in the command line.
Windows 95/98/ME Installation 2.6 Windows 95/98/ME Installation The Windows 95/98/ME software supports a maximum of 5 CAN modules of the same type within one system. The number of different CAN modules in one system is not limited. Note: The CAN-USB-Mini module does not run under Windows 95! 2.6.1 Installation of PCI-Bus Boards and CAN-USB-Mini 1. Install the board according to the hardware installation description. 2. After run-up Windows 9x/ME detects the board and opens an information window.
Windows 95/98/ME Installation 2.6.2 Installation of ISA-Bus Boards and CAN-PCC 2.6.2.1 Comment on the Hardware Installation of ISA-Boards Install the board only in the computer after you have determined the right configuration (address area) by means of the Windows-9x/ME system control. After the installation described below, you have also to install the SDK (see page 53). CAN-2.0B Support of the CAN-ISA/200 and CAN-PC104/200: Starting from driver revision 1.2.
Windows 95/98/ME Installation 2. The following window asks, if the hardware is to be searched for. Since the board is unknown to the system (no plug-and-play), No has to be selected. If Yes is selected, the computer will search for the board for a relatively long time and then report the discovery of an unknown board. 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.
Windows 95/98/ME Installation 4. In the window which opens after the hardware-type selection first Have Disk and then Next have to be clicked. 5. The following window appears. Click the button Find. 6. Now select the file canesd.inf and click OK. CAN-API Installation Manual • Doc. No.: C.2001.21 / Rev. 3.
Windows 95/98/ME Installation 7. 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.
Windows 95/98/ME Installation Click Next If the system does not propose settings: If the system says that it does not have any resources for the CAN-ISA board, the installation has to be completed nevertheless. In this case the resources in the system have to be distributed again manually by means of the device manager after the installation. 9. The successful installation of the software driver is shown by the following window: 10.
Windows 95/98/ME Installation 2.6.2.3 Starting the Device Drivers 2.6.2.3.1 ISA-Bus Boards Switch on the computer again after installation and restart Windows 9x/ME. The driver is automatically loaded and started by Windows 9x/ME. In the device manager there is now the new device class CAN Controller, under which all esd-CAN boards can be shown and configured. 2.6.2.3.2 CAN-PCC Switch on the computer again after installation and restart Windows 9x/ME.
Windows 95/98/ME Installation 2.6.2.4 Changing the Resource Settings by Means of the Device Manager 2.6.2.4.1 Overview Attention: 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.
Windows 95/98/ME Installation 2.6.2.4.2 Activating the Device Manager 1. Call Click icon of Device Manager in Settings under System Control Panel. or Click My Computer with right mouse button, click Properties in Context menu and then click the Device Manager. 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.
Windows 95/98/ME Installation 2.6.2.4.3 Changing the Resource Settings by Means of the Device Manager 1. Select the device class CAN Controller in the device manager by double clicking. The tree branches and shows all devices of this type available in your computer. 2. Double clicking a device opens up its property window. Click the Resources icon under the device properties. The Conflicting Device List shows the settings of other devices which are conflicting the current setting of the CAN-ISA board. 3.
Windows 95/98/ME Installation 2.6.2.4.4 Changing the Logical Network Number 1. Double click the device class CAN Controller in the device manager. The tree branches and all devices of this type available in your computer are shown. 2. Double clicking a device opens its property window. Click the Status icon in the property window. 3. In Physical Net Mapping logical network numbers can be assigned to the physical interfaces of the CAN board.
RTX Installation 2.7 RTX Installation RTX is a real-time extension for Windows NT/2000/XP that provides high-speed and deterministic real-time capabilities. The extension is developed and distributed by the company ‘Ardence’. 2.7.1 Implementation The support for an esd CAN module consists of a driver part and the NTCAN library part. The hardware specific driver part has to be loaded for each supported CAN module the library part has to be loaded once into the RTSS environment.
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).
RTX Installation Step 2: Starting the driver Next step is to start the driver. This can be performed with the command line version or the GUIversion of the RTX-tool RTSSStart. At the command line the following command has to be executed: rtssstart driver.rtss [Arguments] where driver.rtss has to be replaced with the name of the driver (e.g. c331.rtss).
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.
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.
Windows CE.NET Installation 2.8 Windows CE.NET Installation Sorry no installation notes available for Windows CE.NET at the moment. Page 48 of 112 Manual • Doc. No.: C.2001.21 / Rev. 3.
Installation of the CAN-Bluetooth Module Under Windows 2.9 Installation and Configuration of the CAN-Bluetooth Module The CAN-Bluetooth module runs under the operating systems Windows 2000 and Windows XP. This chapter explains the installation and general configuration of the module. The further configuration via the integrated Web-server is described in the CAN-Bluetooth manual.
Installation of the CAN-Bluetooth Module Under Windows 2.9.2 Configuration After the installation you will find in menu Start under Programs the configuration program esd Bluetooth CAN Interface Driver. Here you select CANBT Config and the window CAN Control Panel opens. Here the following settings can be made: Interface The software supports a maximum of five different esd-CAN Bluetooth interfaces. Here you select the interface that you want to configure.
Installation of the EtherCAN Module Under Windows 2.10 Installation and Configuration of the EtherCAN Module The EtherCAN client driver supports Windows NT, Windows 2000, Windows XP, Windows Server 2003 and Windows Vista (32- and 64-bit versions). This chapter explains the installation and general configuration of the module. Note: Before host software installation the EtherCAN module should be assigned an IP address within the subnet.
Installation of the EtherCAN Module Under Windows 2.10.2 Configuration The EtherCAN driver is implemented as a user mode driver which can be integrated with a logical net number as other CAN modules for NTCAN-API based applications. After the installation you will find the configuration dialogue in Start / Settings / System /CAN Control. You have to use this dialogue to create logical EtherCAN ports which link the remote EtherCAN module to a logical NTCAN net number.
Installing the SDK 2.11 Installing the SDK (Software Development Kit) After driver installation you can proceed with the installation of the CAN-SDK. It contains the necessary files, documentation and tools to develop, debug and test your own NTCAN-API based applications for all Windows versions. Note: If you have installed an older version (V 1.x) of the CAN SDK uninstall this version before you install this new version. If you have already installed a CAN SDK revision 2.
Firmware Update and CAN 2.0A/B Selection Under Windows 3. Firmware Update and CAN2.0A/B-Selection for Windows OS 3.1 Firmware Update 3.1.1 Overview The update function of the local firmware has no effect on the boards CAN-xxx/200 , CAN-PCI/266, CPCI-CAN/200 and PMC-CAN/266, because these boards do not have a local CPU. The module CANPCC also does not support the update function. The firmware of the EtherCAN modules can be updated by means of a standard FTP-client.
Firmware Update and CAN 2.0A/B Selection Under Windows 3.1.2 Checking the Firmware Version Number With the update program you can check the local firmware revision of the Flash EPROM and update the Flash EPROM, if necessary. It is recommended, to compare the revision number of the delivered firmware at the floppy disk with the firmware stored in the Flash EPROM after the host driver installation! 1.
Firmware Update and CAN 2.0A/B Selection Under Windows 3.1.3 Executing the Update 1. Calling canupd (or updxxx) with the logical net number (see above). 2. After the version control the user is asked, if the program is to be continued with the update or not. - 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.
Firmware Update and CAN 2.0A/B Selection Under Windows 3.2 Changing between CAN2.0A and CAN2.0B-Operation All CAN modules which support the update function under Windows also offer the possibility to choose between operating the driver with 11-bit CAN identifiers (CAN 2.0A) or 29-bit CAN identifiers (CAN 2.0B). Note: 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.
Linux Installation 4. Unix Operating Systems 4.1 Linux Installation Notes on the Linux Driver History: Driver versions from V3.x.x (compilation is executed by customer) In this driver package the customer executes the compilation of the driver. Therefore a flexible usage of different Linux kernels is possible. Driver versions up to V3.x.x (compilation is executed by esd) The Linux drivers with a version number smaller than V3.x.x are compiled for one specific Linux kernel version.
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.
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.
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 API = Application Program Interface ABI = Application Binary Interface Board Layer CAN Driver Fig.
Linux Installation 4.1.1.
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. Unpacking the Archive In order to unpack the tar-archive the file has to be unzipped and untarred: 1.1.1 Unzip the Archive unzip esdcan-crd-os-arch-ver-ext.zip with crd os arch ver ext = = = = = card-id (e.g.: crd=pci200 or crd =cpci405, see table on page 62) host-operating-system (e.g.
Linux Installation 2. Compiling the Driver cd ./esdcan-crd-os-arch-ver-ext In some cases you need to edit a configuration file for the compilation: In config.mk you need to set the variable KERNELPATH correctly. Normally the default path should be correct. If your Linux configuration differs from the standard, correct the line accordingly: KERNELPATH =  Note for Linux kernel > 2.6.0: On some systems you might need to be "root" to compile the driver.
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.
Linux Installation 4. Make the ‘inodes’ (as Superuser) cd /dev mknod --mode=a+rw can0 c xx 0 mknod --mode=a+rw can1 c xx 1 ==> as many as physical CAN nets provided by the modules with xx = major number of the driver (see table on page 62) 5. Load the Driver File (as Superuser) Syntax: insmod .
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 installation is only possible with superuser rights. - 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.
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 current notes and information e.g. ican4 dynamically loadable driver The letter combination ‘ican4’ signifies the files of the module ‘VME-CAN4.
Linux Installation 4.1.2.2 Sequence of Installation 1. Unpacking the Archive In order to unpack the tar-archive file or the tar-archive disk the following command has to be called: tar -xvf ican4-vx.y.z.tar or tar -xvf /dev/fd0 Note: ‘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.
Linux Installation 4. Checking the Installation Whether the installation has been successful or not, can be checked in the following file: /var/log/messages 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 Manual • Doc. No.: C.2001.21 / Rev. 3.
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! 4.1.3.1 Files of the Linux Package The software drivers for Linux are distributed on a CD-ROM, which contains the following files: File Description README.x.x current notes and information cantest.c source code of the example-application ‘cantest’ (located in subdirectory .
Linux Installation File Description psys_linux/include/psys.h psys_linux/include/ psyslinux.h Psys header files, esd System Abstraction Layer API (to be stored e.g. at. /usr/local/include) psys_linux/lib32/ libpsys.so.x.y.z 32-bit shared library, containing esd System Abstraction Layer (to be stored at e.g. under /usr/local/lib) psys_linux/lib64/ libpsys.so.x.y.z 64-bit shared library, containing esd System Abstraction Layer (to be stored e.g. at /usr/local/lib64) psys_linux/src/psysdrv.
Linux Installation 4.1.3.2 Installation 1. Unpacking the Archive In order to unpack the zipped tar-archive file the following command has to be called: tar xvfz ethercan-lx-2.0.10-ntcan-3.0.6- psys-1.3.0-gcc-3.3.1-glibc-2.3.2.tgz The unpacked files will be stored in a directory that carries the same name as the archive file. 2. Compile and Load Psys-Driver Therefore follow the installation instructions in psys_linux/README 3.
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] host name or IP-address of EtherCAN server Net[x] CAN net number assigned to EtherCAN server with above PeerName[x] ConnTimeout[x] Time to wait until connection to the EtherCAN server is established. If timeout exceeds, canOpen() returns NTCAN_SOCK_CONN_TIMEOUT.
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.
Installation Under LynxOS 4.2 LynxOS Installation Note: The ‘object mode’ of the CAN-API is not supported by LynxOS. 4.2.1 Files of the LynxOS Package The software drivers for LynxOS are contained on a 3.5”-disk with the following files: File Description instcan script for loading and unloading the driver README.c331 current information and notes c331 dynamically loadable driver c331.
LynxOS Installation 4.2.2 Sequence of Installation Under LynxOS 1. Unpacking the Archive In order to unpack the tar-archive the following command has to be called: tar -xvf c331-lynx-v1.0.0.tar Note: ‘c331’ has to be entered for the CAN-PCI/331 module.
PowerMAX OS Installation 4.3 PowerMAX OS Installation Note: The ‘object mode’ of the CAN-API is not supported by PowerMAX OS. 4.3.1 Files of the PowerMAX OS Package The software drivers for PowerMAX OS are on a 3.5”-disk, which contains the following files: File Description README.ican4 current notes and information e.g. ican4 dynamically loadable driver The letter combination ‘ican4’ signifies the files of the module VME-CAN4.
PowerMAX OS Installation 4.3.2 Sequence of Installation Under PowerMAX OS 1. Copy the tar-Archive vmecan4_v1.2.tar in the Home Directory 2. Unpacking the Archive In order to unpack the tar-archive the following command has to be called: tar xvf vmecan4_v1.2/ican4 Note: ‘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.
PowerMAX OS Installation 7. Change Directory: change to ~/4_2/vmecan4_v1.2 or ~/4_3/vmecan4_v1.2 for PowerMAX OS 4.2 for PowerMAX OS 4.3 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).
Solaris Installation 4.4 Solaris Installation Note: The ‘object mode’ of the CAN-API is not supported by Solaris. 4.4.1 Files of the Solaris Package The software drivers for Solaris are contained on a 3.5”-disk. This disk contains the following files: File Description install script for installation of driver README.c331 current notes and information c331 dynamically loadable driver c331.
Solaris Installation 4.4.2 Sequence of Installation Under Solaris 1. Unpacking the Archive In order to unpack the tar-archive you have to call the following command: tar -xvf c331-solaris-vx.x.x.tar (x.x.x = driver version number) Note: The entry ‘c331’ has to be made for the CAN-PCI/331 module.
Solaris Installation 3. Conforming the Configuration File 3.1 Conforming the Configuration File for CAN-ISA Modules: Before the driver is installed for the first time, its driver configuration file has to be conformed to the hardware configuration. The following properties have to be available in driver.conf, where driver has to be substituted by the according driver name. Only the properties printed in italics have to be conformed.
Solaris Installation 3.1 Conforming the Configuration File for the VME-CAN4 Module: Before the driver is installed for the first time, its driver configuration file has to be conformed to the hardware configuration. The following properties have to be available in driver.conf, where driver has to be substituted by the according driver name. Only the properties printed in italics have to be conformed.
Solaris Installation 4. Installing the CAN Driver In order to install the driver the script install has to be executed as superuser. It copies the driver files into the target directory, installs and starts the driver. From now on the driver will be automatically loaded and started with every system start. After it has been successfully installed, you can access the CAN bus via the NTCAN-API (including ‘ntcan.o’ into the application). 5. Checking the Installation 5.
SGI-IRIX6.5 Installation 4.5 SGI-IRIX6.5 Installation Note: The ‘object mode’ of the CAN-API is not supported by SGI-IRIX6.5 . 4.5.1 Files of the SGI-IRIX6.5-Package The software drivers for SGI-IRIX6.5 are shipped on a 3.5” disk. The disk contains the following files: File Description c331 CAN driver (object code) c331.master driver configuration file c331.sm driver configuration file The letter combination ‘c331’ indicates the files of module CAN-PCI/331.
SGI-IRIX6.5 Installation 4.5.2 Sequence of Installation Under SGI-IRIX6.5 1. Login as Root 2. Unpacking the Archive In order to unpack the tar-archive of the CAN modules CAN-PCI/331, CPCI-CAN/331 and PMC-CAN/331 you have to call the following command: tar -xvf c331-IPyy-vx.x.x.tar with x.x.x yy = software driver version (e.g. 2.1.0) = processor identification (e.g.
AIX Installation 4.6 AIX Installation 4.6.1 Special Features of the AIX Implementation - the CAN driver has been designed for operating system version AIX 4.2.1 - hardware platform: PowerPC - implemented esd-CAN modules: CAN-PCI/331, CPCI-CAN/331 - 29-bit identifiers are not yet being supported - the ‘object mode’ of the CAN-API is not supported by AIX 4.6.2 Files of the AIX Package The software drivers for AIX are contained on a 3.5” disk. The disk contains a tar-archive. File Description README.
AIX Installation 4.6.3 Installation Sequence under AIX 1. Login as Root 2. Unpacking the Archive In order to unpack the tar-archive the following command has to be called: tar -xvf c331-ppc-vx.y.z.tar (x.y.z = driver version number) 3. Copying the Files At unpacking the directory /c331-ppc-vx.y.z is created. Copy the files cfg_pci331 and ucfg_pci331 from this directory into the directory /usr/lib/methods/. Copy from this directory the file c331 into the directory /usr/lib/drivers/pci/. 4.
AIX Installation 7. Check Whether the Driver Runs With CAN tool ‘CANreal’ - Make sure that the wiring and terminations are correct and make sure that at least one other working CAN participant has been connected! - Start the monitor program CANreal: ./canreal & - Set the baud rate of your CAN network for network 0 in CANreal and click Init. ‘Init done’ appears in the window. - Click Add Id to select the identifier area of 0 to 2047. - Click Start to display the messages of the CAN bus. 8.
VxWorks Installation 5. Installation of Real Time OS (Non Windows) 5.1VxWorks Installation Each VxWorks CAN driver package contains a file relnotes.htm in HTML format which contains the revision history of the drivers and late-breaking information which did not make into one of the manuals. Please read this file before installing the driver. Note: The local CAN driver of the boards CPCI-405, PMC-CPU/405 and CPCI-CPU/750 is part of the BSP and is not deployed in a separate software package. 5.1.
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.
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 script for loading the driver c331i.sys CAN driver (binary code) c331iini example startup code for the driver (binary code) c331iini.
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.
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.
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.
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.
QNX4 Installation 5.2 Installation Under QNX4 and QNX6 The installation can only be made with superuser rights. The installation of QNX6 drivers is described from page 103 on. 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.
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.
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 Assigning the logical network number. net = 0...255 default: net = 0 -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 Setting the interrupt to be used by the board.
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.
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.
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 current notes and installation information CHANGELOG change list / driver history The character combination ‘pci331i20’ signifies files of the CAN-PCI/331 module.
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.
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.
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.
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.
Firmware Update for Non-Windows Operation Systems 6. Update of Local Firmware for Non-Windows Operating Systems 6.1 Overview The update program for the local firmware is implemented only for Linux, LynxOS, VxWorks and QNX operating systems at the moment. The update function is insignificant for the CAN-xxx/200 board and CPCI-xxx/200, because this boards do not have a local processor. The CAN-PCC module also does not support the update function.
Firmware Update for Non-Windows Operation Systems 6.2 Checking the Firmware Version Number With the update program you can check the local firmware revision of the Flash EPROM and update the Flash EPROM, if necessary.
Firmware Update for Non-Windows Operation Systems 6.3 Executing the Update 1. Calling canupd or updxxx with desired logical network number (see above). 2. After the version has been checked, you will be asked, whether the program is to carry on with the update or not. - 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.
References 7. References [1] CAN-API Manual, Part 1: Function Description esd electronic system design gmbh CAN-API Installation Manual • Doc. No.: C.2001.21 / Rev. 3.
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.