Domanda

I was looking a way to prove my USB-SERIAL port and I found this code: http://www.digitalmihailo.com/usb-programming-with-python-on-linux-pyusb-version/, but I have a problem because when I run this program, then show me up this message:

Traceback (most recent call last):
   File "namefile.py", line 122 in <module>
     main()
   File "namefile.py", line 64, in main
     raise ValueError('Device not found')
ValueError: Device not found

I already install the PyUSB library, but the result does not change. Someone can help me with this little problem.

Thank you much in advance.

È stato utile?

Soluzione

If you are running your example in Linux you need to load the ACMtty module so you system makes a Serial USB device available for your user space.

As root and only if you have cdc-acm module compiled for your current kernel:

modprobe cdc-acm

Once this module is loaded and your device connected you should find a device named following this pattern: /dev/ttyACM*

You may have already installed the right user space tools and libraries but you also need to install the device.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top