Closed eaglesharkmayonnaise closed 4 years ago
such as that the api like this :send_usb_packet(handle,packet,packetLen)
I don't think there is any API to send USB packet to system. Every packet is sent by a USB device, so you can either write your own virtual driver which I don't know how to, or use a microcontroller that has USB device hardware resource to do so. Both way are not easy.
@whc2001 is correct. To add on the technical side, the packet captured was sent from device to host. It was interrupt type, and thus most likely it was USB HID device (title suggest it was from USB mouse). The HID reports (interrupt transfers) are actually meaningless without accompanying USB HID Report Descriptors that are sent from device to host during enumeration.
https://stackoverflow.com/questions/47942366/windows-virtual-mouse-driver contains some information how to achieve what @xoraxrax wants.
i already use wireshark capture this packet:
i wanna use c/c++ api sent this packet again now.
is there any examples to test this idea?
best regards.