Python Forum
How to approach pyusb application arch
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to approach pyusb application arch
#1
Hello,

I have a question relating to python and USB functionality. Right now I have an embedded product with a USB 2.0 full speed HID interface. I talk to this device using a Python wx GUI and pywinusb. This is pretty simple and straightforward since everything is python and I don't have to fiddle with any drivers. I just import pywinusb and connect.

I want to upgrade this product to be a composite USB device allowing me to use both HID and some sort of BULK pipe as well. This way I can move larger amounts of data via bulk and HID can be my command and control.

My deployment will be on Windows10 and it seems that the most reasonable approach is to use the PyUSB->libusb1.0->winusb library/driver combo. At least from my research this is where I've ended up. One of my requirements is that I need the embedded product to plug in and "work" without the user installing more software or drivers after my application install. Right now I use PyInstaller to build my HID only application and this works great. But I have the following questions.

1. Is the PyUSB->libusb1.0->winusb a good approach for someone needing an embedded product with composite interface to plug in and work "out of the box" without installing any drivers?
2. If PyUSB->libusb1.0->winusb seems reasonable, how do I "include" the libusb1.0 driver files in my application and tell pyusb to use them from my application directory?
3. With this complexity, would it make sense to be deploying my software application a different way than Pyinstaller producing a ready to extract and run zip archive with EXE?

Long story short I am trying to upgrade my embedded device to be a composite device and have to interfaces. To do this I'm trying to figure out what USB approach (PyuSB-> libusb1.0 -> winusb) and which deployment method makes sense. My goals are that my python app contains everything the user needs to run the application after either one installation or as I'm doing now one zip extraction using PyInstaller. I'm not really sure how to integrate libusb1.0 into an application and whether I need a better way of deploying my application.

Any help is greatly appreciated!
Thanks!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Approach to coding, good/bad j.crater 27 15,928 Apr-29-2017, 03:32 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020