How to: Set fixed hardware handles (PCAN PCI/PCIe devices)

This forum covers issues concerning multiple hardware products.
Locked
M.Heidemann
Sales & Support
Sales & Support
Posts: 219
Joined: Fri 20. Sep 2019, 13:31

How to: Set fixed hardware handles (PCAN PCI/PCIe devices)

Post by M.Heidemann » Mon 13. Jul 2020, 15:39

HOW-TO: Setting fixed hardware handles on PCAN-PCI/PCIe based hardware

Due to the nature of PCI/PCIe some systems will discard the order in which PCI/PCIe devices are recognized at the previous boot,
which can be problematic in case you use fixed hardware channels for multiple hardware of the same type, for example in PCANBasic.

To set a fixed hardware-handle to your CAN-Channels on a PCI/PCIe based PCAN Interface device, please follow these steps:

Make sure your device has an unique device ID, which you can for example set with PCAN-View via the Hardware view.

Open up the Registry-Editor:

Look for the following registry path:

Code: Select all

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\pcan_pci

Add a new registry-key of type "string" with the following syntax :

The registry entry name represents the hardware-handle

Hardware1 = HardwareHandle1,
Hardware2 = HardwareHandle2
...
etc.

0x00,controllernr=x,devicenr=0xXX

- Hardware-Type
______________________________________________________________________________________________________________
Here a list of the device-type values for the PCAN PCI/PCIe devices:
PCI and PCIexpress based cards:
  • 0x103 = PCAN-PCI Express (current version)
  • 0x113 = PCAN-PCI Express FD
  • 0x107 = PCAN-PC/104-Express (current version)
  • 0x117 = PCAN-PC/104-Express FD
  • 0x108 = PCAN-miniPCIe
  • 0x118 = PCAN-miniPCIe FD
  • 0x10A = PCAN-ExpressCard 34
  • 0x109 = PCAN-Chip PCIe
  • 0x119 = PCAN-Chip PCIe FD
  • 0x11A = PCAN-M.2

- Controller-Number (Channel)
______________________________________________________________________________________________________________
Channel number in ascending order, starting at 0, so physical channel 1 is channel-number 0, physical channel 2 is channel-number 1, etc.

- Device-number
______________________________________________________________________________________________________________
User defined device id, 0x00 - 0xff

Below an example:
Shown in this picture: valid registry-entries for a fixed hardware handle
Shown in this picture: valid registry-entries for a fixed hardware handle
RegistryEntryHardwareHandle.PNG (29.31 KiB) Viewed 940 times




Reboot your PC after setting the entries in the registry.

Your hardware should now be accessible via the fixed hardware-handle.


Best Regards

Marvin

Locked