Skip to content

'ixxat' interface not detected #1164

@felixdivo

Description

@felixdivo

The 'ixxat' interface is not detected with python-can 3.3.4 :

import can

can.interface.detect_available_configs()

Kvaser canlib is unavailable.
fcntl not available on this platform
libc is unavailable
failed to fetch opened can devices: [WinError 2] Le fichier spécifié est introuvable
Failed to load NI-CAN driver: [WinError 126] Le module spécifié est introuvable
Failed to load IS-CAN driver: [WinError 126] Le module spécifié est introuvable
Could not import vxlapi: [WinError 126] Le module spécifié est introuvable
Cannot load SYSTEC ucan library: [WinError 126] Le module spécifié est introuvable.
The SYSTEC ucan library has not been initialized.

[{'interface': 'virtual', 'channel': 'channel-3439'},
 {'interface': 'neovi', 'serial': '120216'}]

If I loop on all interfaces, I can detect it though :

# List possible CAN adapters (from 'python-can')
l_dict_valid = {}
l_list_cards = list(can.interfaces.BACKENDS.keys())
l_list_cards.sort()

# Drivers for supported cards :
# 'canalystii'	: http
# 'iscan'		: http
# 'ixxat'		: https://www.ixxat.com/docs/librariesprovider8/ixxat-english-new/pc-can-interfaces/windows-drivers/vci-v4-windows-10-8-7.zip?sfvrsn=9ceb48d7_75
# 'kvaser'		: http
# 'neovi'		: https://cdn.intrepidcs.net/updates/files/RP1210KitInstall.zip
# 	old driver	 (https://cdn.intrepidcs.net/updates/files/ICSDrivers.zip)
# 'nican'		: http
# 'pcan'		: http
# 'serial'		: http
# 'slcan'		: http
# 'socketcan'	: http
# 'systec'		: http
# 'usb2can'		: http
# 'vector'		: http
# 'virtual'		: http

# Virtual in an useless stub
l_list_cards.remove('virtual')

print(f"=== Loading CAN drivers ===")
for loop_str_card in l_list_cards:
	# Try all l_list_cards
	print(f"\n... Loading '{loop_str_card}' ...")
	for loop_int_chan in range(4):
		# Try only first 4 channels
		for loop_str_baud, loop_int_baud in dict_CANP_CARD__BAUD.items():
			# Try all bauds (1m, 500k, 250k, 125k)
			try:
				# Try connecting
				with can.interface.Bus(
							bustype = str(loop_str_card),
							channel = str(loop_int_chan),
							bitrate = int(loop_int_baud)
						) as l_obj_bus:
					# Register the combination as valid
					try:
						l_dict_valid[loop_str_card]
						# - except KeyError -
						try:
							l_dict_valid[loop_str_card][loop_int_chan]
							# - except KeyError -
							try:
								l_dict_valid[loop_str_card][loop_int_chan][loop_str_baud]
								# - except KeyError -
								# Register baudrate
								raise KeyError
							except KeyError:
								l_dict_valid[loop_str_card][loop_int_chan][loop_str_baud] = loop_int_baud
						except KeyError:
							l_dict_valid[loop_str_card][loop_int_chan] = {loop_str_baud: loop_int_baud}
					except KeyError:
						l_dict_valid[loop_str_card] = {loop_int_chan: {loop_str_baud: loop_int_baud}}
			except:
				# Connection failed
				pass
C:\Program Files\Spyder\Python>enaml-run "c:\Users\dkoch\Downloads\CAN\canp\canp_card_view.enaml"
=== Loading CAN drivers ===

... Loading 'canalystii' ...

... Loading 'iscan' ...
Failed to load IS-CAN driver: [WinError 126] Le module spécifié est introuvable

... Loading 'ixxat' ...

... Loading 'kvaser' ...
Kvaser canlib is unavailable.

... Loading 'neovi' ...
Error: set_bit_rate(): icsneoSetBitRate() Failed
Error: set_bit_rate(): icsneoSetBitRate() Failed
Error: set_bit_rate(): icsneoSetBitRate() Failed
Error: set_bit_rate(): icsneoSetBitRate() Failed
Error: set_bit_rate(): icsneoSetBitRate() Failed
Error: set_bit_rate(): icsneoSetBitRate() Failed
Error: set_bit_rate(): icsneoSetBitRate() Failed
Error: set_bit_rate(): icsneoSetBitRate() Failed

... Loading 'nican' ...
Failed to load NI-CAN driver: [WinError 126] Le module spécifié est introuvable

... Loading 'pcan' ...

... Loading 'serial' ...

... Loading 'slcan' ...

... Loading 'socketcan' ...
fcntl not available on this platform
libc is unavailable

... Loading 'systec' ...
Cannot load SYSTEC ucan library: [WinError 126] Le module spécifié est introuvable.

... Loading 'usb2can' ...

... Loading 'vector' ...
Could not import vxlapi: [WinError 126] Le module spécifié est introuvable

Yet trying all channels and all baud-rates pretty much hurts the CAN bus a lot (if not resilient to such invasion).

Regards.

Originally posted by @Kochise in #303 (comment)

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions