# 8.1. No device found / Can’t open device¶

## 8.1.1. Connect via USB¶

XiLab or other software can not find the controller.

• The PC does not detect the controller via USB:

Comment to the diagram:

The most common cause for such type of problem is bad work of the usb-hub, cables or the virtual COM-port identification problem of the operation system on the used PC. Try to reproduce the problem on the another PC or another usb-hub if it is used.

Warning

“Can’t open device” error or “open_device()” function returns -1. Libximc library opens the controller in exclusive access mode. Any controller opened with libximc (XiLab also uses this library) needs to be closed before it may be used by another process. So at first check that you have closed XiLab or other software dealing with the controller before trying to reopen the controller.

The following decision maps show the actions for different operating systems.

Windows:

• Check whether the COM-port corresponding to your controller presents in the Device manager. It should be displayed as “XIMC Motor Controller (COMn)”. In case the controller has not been recognized, try to reinstall the driver for the controller manually.
• Try to open the COM-port of the controller in any simple serial emulator (Putty for example) and just send the simple command to the controller (like “stop”, “sstp”, “zero”). The connection parameters are described here. The absence of errors means that the controller is operating correctly and the problem should be caused by the used software.

Linux:

Comment to “Can’t open device” problem solution:

When working with USB-UART converter (as well as USB-Ethernet, USB-Bluetooth etc.) in Linux it appears as /dev/ttyUSB device. XiLab shows it in a list, but when you try to open it, an error “can’t open device” occurs due to the lack of permissions to the device.

To solve this problem, create a file: /etc/udev/rules.d/31-ximc.rules and add the next line into it:

SUBSYSTEM=="usb", ATTR{idVendor}=="067b", MODE="0666"


idVendor identifier can be found by executing lsusb command.

Note

Mac OS: