I have a USB-Device that I would like to send some bytes to.
lsusb
Bus 001 Device 005: ID 04b4:0a0a Cypress Semiconductor Corp.
With Wireshark and usbmon, I figured, that a certain byte sequence leads to the desired behaviour(it unlocks a physical lock). Now I would like to copy this and send it myself. Therefore I tried to create a binary file and write it on the bus like this:
cat byteFile > /dev/bus/usb/001/005
But I get the following error:
cat: write error: Invalid argument
Now it seems that it is not possible to write bytes on "raw" USB-Devices, but I did not find the correct(or generic) approach to do this. How can I send the byte sequence from the file to the USB-Device? I would be happy to get this running in python/java or bash if possible. Such that I can later use it in my program. -> No GUI-application ;-)