usbrply generates empty .py file
See original GitHub issueI’m interested in bus-3 / device-50 which is my USB mouse:
$ lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 005: ID 0d62:3740 Darfon Electronics Corp.
Bus 003 Device 004: ID 187c:0550 Alienware Corporation LED controller
Bus 003 Device 048: ID 050d:092a Belkin Components USB 2.0 BILLBOARD
Bus 003 Device 047: ID 05e3:0751 Genesys Logic, Inc. microSD Card Reader
Bus 003 Device 044: ID 1a40:0801 Terminus Technology Inc. USB 2.0 Hub
Bus 003 Device 041: ID 050d:092b Belkin Components USB2.0 Hub
Bus 003 Device 002: ID 0c45:6725 Microdia Integrated_Webcam_HD
Bus 003 Device 051: ID 06cb:0089 Synaptics, Inc.
Bus 003 Device 050: ID 17ef:608d Lenovo Optical Mouse
Bus 003 Device 049: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 003 Device 007: ID 8087:0026 Intel Corp. AX201 Bluetooth
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
I captured some packets through Wireshark and saved it as test.pcapng
file followed by running:
usbrply --device-hi -p ~/test.pcapng > ~/t.py
The issue here is that the t.py
file is empty and looks as follows:
# Generated by usbrply
# cmd: /usr/bin/usbrply --device-hi -p /home/thegeekylad/test.pcapng
# Generated by usbrply
# Source: Linux pcap (usbmon)
# cmd: /usr/bin/usbrply --device-hi -p /home/thegeekylad/test.pcapng
# PCapGen device hi: selected device 51
# PcapGen: generated 641 packets
# PcapGen device filter: dropped 632 / 641 packets
# SetupFilter: dropped 4 / 10 entries
I also tried:
usbrply --device 50 -p ~/test.pcapng > ~/t.py
i.e. by pointing it specifically to my device but couldn’t find a way to pass the bus in question.
Kindly help me out!
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (7 by maintainers)
Top Results From Across the Web
Create empty file using python [duplicate] - Stack Overflow
I'd like to create a file with path x using python. I've been using os.system(y) where y = 'touch %s' % (x) ....
Read more >How to create an empty file using Python? - Tutorialspoint
There are various ways to create a blank CSV file in Python. open operator is the simplest approach to create an empty csv...
Read more >Create an empty file using Python - GeeksforGeeks
It can be used for creating, deleting, moving files or to store application data, user configurations, videos, images, etc. Python too supports ...
Read more >JohnDMcMaster/usbrply: Replay USB messages ... - GitHub
Convert a .pcap file (captured USB packets) to Python or C code that replays the captured USB commands. Supported packet sources are: Linux...
Read more >Python, how to create an empty file - Flavio Copes
← flaviocopes.com. Python, how to create an empty file. Published in 2021. Psssst! The 2023 WEB DEVELOPMENT BOOTCAMP is starting in just 40...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Glad to hear you are working through the issues 😃 Yes, you might run into permission and/or kernel issues, as you’ve noticed. Hmm maybe I’ll add that note to the readme
However, I’m concerned with your overall project goal. You would only be able to send data to the mouse, not force the mouse to send data to the kernel. That is, you can do things like change led colors on the mouse (sent from the computer to the mouse) but not take mouse coordinates since those are sent from the mouse to the computer. It sounds like you want a Linux version of AutoHotkey?
It sounds like your original question is answered. Please open a new issue though if you have new questions.