CANAL Driver: canusbdrv.dll(win32)
Include library for msvc: canusbdrv.lib
Also try Lawiel's beta driver with built in CANAL support http://www.canusb.com/beta/
This is a device driver for the Lawicel CANUSB adapter (http://www.canusb.com/). It is the propery of Lawicel AB and source is therefore not available. The driver can be downloaded from the above site or requested from Lawicel AB (http://www.lawicel.se)
Note that before you use this driver the ftdi dxx libraries must be installed. Information about how to install them is available on the canusb site or on the ftdi site (http://www.ftdichip.com). We recommend using the combined VCI + DXX driver which also is available on the CANUSB site in the download section.
The driver string has the following format (note that all values can be entered in either decimal or hexadecimal form (for hex precede with 0x).
To use default values just skip parameters. adapter-code is the only mandatory but can be set as “NULL” to use the first found adapter on the system. To find the adapter-code use the adaptercheck.exe program that is part of the CANUSB installation. A typical looking adapter code is “LWNQ06ES”.
This is the speed for the CAN bus. It can be given as
Is the hardware dependent filter for this board hardware. Note that this filter work in a different way than the CANAL filter. Check the CANUSB documentation.
0x00000000 is the default. Let all messages true.
Is the hardware dependent mask for this board hardware. Note that this filter work in a different way than the CANAL filter. Check the CANUSB documentation.
0xffffffff is the default. Let all messages true.
For the CANUSB adapter use
which says to use the CANUSB adapter with adaper-od LWNQ06ES and 500 kbps. You get the same result with
which will use 500 kbps as default.
CANUSB_FLAG_TIMESTAMP - Timestamp will be set by adapter. If not set timestamp will be set by the driver.
CANUSB_FLAG_QUEUE_REPLACE Normally when the input queue is full new messages received are disregarded by setting this flag the first message is the queue is removed to make room for the new message.
CANUSB_FLAG_BLOCK Can be set to make Read and Writes blocking.
This bit must be set if the CANAL blocking methods should be used.
CANUSB_FLAG_SLOW This flag can be used at slower transmission speeds where the data stream still can be high. Every effort is made to transfer the frame even if the adapter reports that the internal buffer is full. Normally a frame is trashed if the hardware buffer becomes full to promote speed.
The CanalGetStatus call returns the status structure with the channel_status member having the following meaning:
This driver is proprietary and is not included in the VSCP & Friends distribution. It can be gotten from Lawicel AB, http://www.canusb.com. CANAL support is only available from version 0.1.7 of the driver and is missing from earlier releases.
The driver is included in the installation of the VSCP and friends. Source for the driver is available in the source distribution or from CANAL/VSCP CVS VSCP CVS
<canaldriver> <!-- Information about CANAL drivers --> <driver> <!-- Lawicel driver --> <name>Lawicel USB adapter</name> <parameter>LWNQ06ES;500</parameter> <path>c:\winnt\system32\canusbdrv.dll</path> <flags>4</flags> </driver> <driver> <!-- Logger driver --> <name>logger</name> <parameter>c:\canallog.txt</parameter> <path>c:\winnt\system32\canallogger.dll</path> <flags>1</flags> </driver> </canaldriver>