Jul-06-2023, 03:36 PM
Hey all I am new to the Python world and need some help.
I have an HID device that I am needing to replace 0x00 with 0x01 and I have this example code to modify in order to do that (I think):
I have an HID device that I am needing to replace 0x00 with 0x01 and I have this example code to modify in order to do that (I think):
import pywinusb.hid as hid def readData(data): print(data) device = hid.HidDeviceFilter(vendor_id=0x5140).get_devices()[0] if not device: print ("No device found") else: print(device) device.open() report = device.find_output_reports() buffer = b'\x00\x00\x00\x00\x00' report[0].set_raw_data(buffer) report[0].send() device.set_raw_data_handler(readData) device.close()So would I replace the b'\x00\x00\x00\x00\x00' with b'\x00\x01' in order to change it in the HID device?