I might end up using pyserial.
It can find the VID/PID of CDC virtual serial ports.
That said, I'd still like to be able to use pyusb.
More information on my level of experience
and the current situation seems to be in order.
Until recently, the only USB-specific code
I'd written, was a CDC device using LUFA.
At about the same time, I struggled to get
avrdude, winAVR and AVR-studio 4 to use USB.
Didn't know what I was doing even at the time.
My current targets are avrdude, Atmel Studio 7
and a CDC device for which I have no source,
but suspect of being an Arduino thing.
When, as is usual, an Arduino tool can see it,
its menu listing mentions 2560 and Leonardo.
Finding a CDC virtual serial port is one of the examples I found,
but it does not work for me.
At the suggestion of a colleague,
I used zadig to get avrdude to work,
Didn't really know what I was doing.
Just followed directions.
At one time, I had avrdude and Atmel Studio working,
but I do not know what I did.
My effort to get pyusb to work seems to have damaged AS7.
It can no longer use the Atmel ICE.
One of the things I struggle with is that "install"
can mean at least three different things:
Put it where the OS will use it
Put it where user applications generally can use it.
Put it where a specific application will use it.
I've never seen the distinction made explicitly.
My guess is that zadig does the first.
I did the last with libusb1.
How many drivers are called libusb?
My zadig knows of two named winusb.
Xiaofan Chen wrote:
> libusb is mainly meant for generic usb device, so it means
> that you should not really use libusb/pyusb with your mouse
> or serial port device.
It has code specifically ignore mice and virtual serial ports?
> If you use libusb-1.0 API (libusb Windows), then its supported
> driver are WinUSB, libusbK.sys (better not use libusb0.sys),
> usbdk and generic HID (not mouse/keyboard). So unless you
> use the supported driver together with your mouse and your
> CDC device, they will not be really usable by libusb and pyusb.
libusb-1.0 is a dll that applications, e.g. python can open?
WinUSB, libusbK.sys, usbk and generic HID are used by the OS?
> But if you really want to try, you can try libusb usbdk backend,
> which may work with your CDC device. It acts as a filter driver.
usbdk is a dll that applications, e.g. python can open?
https://github.com/libusb/libusb/wiki/Windows#How_to_use_libusb_on_Windows:
> HID keyboards and mice cannot be accessed using the native HID driver as
Windows reserves exclusive access to them.
No user application can see either HID mice or HID keyboards as USB things?
Presumably an application can see the keyboard as a file it can open.
What can see a mouse? As what?
Thank you for your attention.
I hope it doesn't seem too much like irrigating a rock.
On Sat, Mar 3, 2018 at 11:04 PM, Xiaofan Chen <xiaof...@gmail.com> wrote:
> On Fri, Mar 2, 2018 at 10:10 AM, Michael Hennebry
> <michael.henne...@rivieranexus.com> wrote:
> > I have three USB devices connected,
> > an Atmel ICE, a mouse and a CDC device.
> > usb.core.find(find_all=True)
> > finds the Atmel ICE twice, but not the others.
> >
> > I'm stuck on Windows 10.
> > The device manager lists the CDC device under
> > Ports (COM & LPT)
> > Arduino Mega 2560 (COM6)
> > The Arduino serial monitor has no trouble finding it.
> > The device manager lists the mouse under
> > Human Interface Devices
> > Microsoft USB Wheel Mouse Optical
> >
> > ATmega2560's do not do USB natively.
> > A chip that does is between the ATmega2560 and the USB cable.
> >
> > Is there some trick to get pyusb to notice
> > the mouse and the CDC device?
> >
>
> pyusb is based on libusb, so you will inherit the limitation
> of libusb under Windows.
>
> libusb is mainly meant for generic usb device, so it means
> that you should not really use libusb/pyusb with your mouse
> or serial port device.
>
> If you use libusb-win32, its supported drivers are
> libusb0.sys and libusbk.sys, so only those device using
> these two drivers will be usable for libusb-win32 and pyusb.
>
> If you use libusb-1.0 API (libusb Windows), then its supported
> driver are WinUSB, libusbK.sys (better not use libusb0.sys),
> usbdk and generic HID (not mouse/keyboard). So unless you
> use the supported driver together with your mouse and your
> CDC device, they will not be really usable by libusb and pyusb.
>
> But if you really want to try, you can try libusb usbdk backend,
> which may work with your CDC device. It acts as a filter driver.
>
> Ref: https://github.com/libusb/libusb/wiki/Windows
> Ref: https://github.com/daynix/UsbDk
>
> --
> Xiaofan
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users