Questions tagged [pywinusb]

Pywinusb aims to be a simple USB/HID user application space (hence no system drivers needed) 100% python package (without C extensions).

Pywinusb aims to be a simple USB/HID user application space (hence no system drivers needed) 100% python package (without C extensions). Initially targeting simple HID devices management.

The vision for this project is to be something similar to PySerial or PyParallel but for USB/HID hardware enthusiasts.

25 questions
3
votes
1 answer

Is there a simple cross platform HID module for python?

I'm trying to write some code that will fetch receive data from usb HID devices like scales. I've used pywinusb for windows but I need it to be cross platform. pyhid says it's just for Mac OS X. The only cross-platform module I've found so far is…
user2543822
  • 39
  • 1
  • 1
  • 4
3
votes
2 answers

How to send hid data to device using python / pywinusb?

I'm trying to use pywinusb to send output report to a pic18f4550. The device can receive data, and I've tested it with a C# application, which worked fine. Also, I can read data from the device with pywinusb just fine, but I have a problem trying…
Ilyas
  • 327
  • 1
  • 3
  • 12
2
votes
0 answers

Pywinusb: handle events from multiple keyboards

I'm trying to handle events from multiple usb keyboards, so that the code knows from which keyboard an input is coming from. The code identify the different keyboards via the device instance id (they all have the same product and vendor id) but not…
qlt
  • 21
  • 1
2
votes
2 answers

Simple reading/writing from/to a USB HID device in Python?

I've got a fairly simple USB HID device that I've been trying to figure out how to read from and write to using Python. I've been able to read from it using PyWinUSB, but the problem comes in when I try to write to it. Trying to write to it makes…
Will
  • 281
  • 1
  • 6
  • 18
1
vote
0 answers

pywinusb cant read or write data

I have a custom HID device that, for testing pywinusb, returns anything that I send it. I think that I am sending the data correctly but I'm not receiving anything back. I tested the device with a terminal that can communicate with usb devices so, I…
user169808
  • 503
  • 1
  • 6
  • 27
1
vote
1 answer

How to send commands from Python 3.4 to a Motorized XY Microscope Stage with db15 input socket

I have a Motorized XY Microscope Stage which is currently controlled by a joystick, the joystick signals are transformed into data and sent to the motors in the XY Microscope Stage through a cable which is a db15. I need to move it with commands…
1
vote
1 answer

hid.find_all_hid_devices() in asyncio coroutine

In order to access a a USB HID device connected on my computer I use the function find_all_hid_devices()from the pywinusb package. Now I would like to access this HID device from an asyncio coroutine. With the following code @asyncio.coroutine def…
Namux
  • 305
  • 5
  • 17
1
vote
1 answer

Python + Tkinter: Reading data from HID and simultaneously updating tkinter labels

I am trying to simultaneously read data from a HID with pywinusb and then update a tkinter window with that data. When something happens on the HID side, I want my tkinter window to immediately reflect that change. Here is the code: import…
user2740614
  • 285
  • 3
  • 17
1
vote
1 answer

I can't get PyWinUSB examples to work

I'm trying to get the examples from pywinusb to work, but to no avail. My setup is: python3.3 on Windows7-64 bits pywinusb-0.3.2 installed with the "python setup.py install" script I get this output: E:\pywinusb-0.3.2\examples>python…
1
vote
1 answer

Receiving data from HID game controller in Python

I am trying to communicate with a game controller Human Interface Device (HID) with a Python script, but I'm having trouble receiving data from the controller. I am using pywinusb 0.3.2 and Python 3.3. The game controller is a Logitech Gamepad…
user2740614
  • 285
  • 3
  • 17
1
vote
1 answer

Retrieve data/exception from a handler function

I'm trying to use Python and pywinusb-0.3.2 to read data from a USB weighing scale when a valid request hits the web server (requested_serial_number is coming from the query string). So I have the following code inside my do_GET: all_hids =…
Alex
  • 3,029
  • 3
  • 23
  • 46
0
votes
1 answer

How to read input from multiple USB barcode scanners separately in Python?

I am working with two USB barcode scanners and I want to read the input from each scanner separately. I am using the pywinusb.hid library in Python to interact with these devices. I have written the following code to find the device path of each…
0
votes
0 answers

Reading data from HID devices

I am using pywinusb to read data from a device which is connected via usb. I have used the following code to read the data. https://github.com/rene-aguirre/pywinusb/blob/master/examples/raw_data.py Now the device is sending 3 packets of data but…
Akash Chakraborty
  • 57
  • 1
  • 2
  • 13
0
votes
1 answer

Trigger python script as soon as a specific USB device is attached to the system

I have a python script which has to be executed everytime using command line. What i want to try out is as soon as the windows detects a new USB device has plugged in with a specific vendor id and product id , i want to run the script , basically to…
ask_lot
  • 11
  • 3
0
votes
1 answer

How to simulate the usb keyboard to send commend to PC?

I've used wireshark and get the usb data packets about the "w" key press and on ,then I wanna send the same data packet to my computer usb, making the computer think that my keyboard really pressed the W key. My question: Firstly, how can I send the…
noir
  • 1
  • 1
1
2