I am using a Windows computer to communicate to four Komodo CAN Duo Interfaces through a USB hub. I am running eight separate targets. How do I know which Komodo interface is handling which target? My problem – the Windows device manager associates a different port number for each Komodo channel each time I plug in a new device. How can I identify which Komodo channel is transferring data?
Response from Technical Support:Thanks for your question! The latest Komodo CAN Duo Interface that is attached at with the host machine is allocated with USB port 0, and the original device is allocated the next port.
To have a consistent handle for each Komodo device, we recommend using Komodo Software API. Our API is compatible with Windows, Linux and MAC operating systems, and supports multiple programming languages. In addition, functional program examples are included, which you can use as is or modify for your specific requirements. There are two API commands for locating a device, km_find_devices and km_find_devices_ext.
For your requirements, to determine the ports to which the Komodo interfaces have been assigned, we recommend using the command km_find_devices_ext: it returns the unique ID of the Komodo interface and its allocated port number. With that information, you can then modify your code to select the handle of the specific target based on the unique ID of the channel Komodo interfaces. The other command, km_find_devices, only identifies the allocated port number. Here are the details of command km_find_devices_ext:
Find Devices (km_find_devices_ext)int km_find_devices_ext (int num_ports,
int num_ids,
u32 *unique_ids);
ports array into which the port numbers are returned
num_ids maximum number of unique IDs to return
unique_ids array into which the unique IDs are returned
For more information, please refer the API Documentation section of the Komodo CAN interface User Manual.
Additional resources that you may find helpful include the following:
Here are some articles about using API with the Komodo Interface:
We hope this answers your question. If you have other questions about our CAN interfaces or other Total Phase products, feel free to contact us at sales@totalphase.com . You can also request a demo that is specific for your application.