-
Notifications
You must be signed in to change notification settings - Fork 141
Description
First of all, Cynthion and Facedancer are really an impressive achievement.
I have a trace from a USB device. When I try to emulate it with Facedancer, I can't get past a certain point.
The device has the following endpoint, which is called shortly after the entire configuration.
class Endpoint_4_IN(USBEndpoint):
number = 4
direction = USBDirection.IN
transfer_type = USBTransferType.INTERRUPT
synchronization_type = USBSynchronizationType.NONE
usage_type = USBUsageType.DATA
max_packet_size = 64
interval = 1
extra_bytes = bytes([])
There is no response, which is perfectly fine for interrupt transactions, as described here: https://www.beyondlogic.org/usbnutshell/usb3.shtml under NAK.
"NAK - Reports that the device temporary cannot send or received data. Also used during interrupt transactions to inform the host there is no data to send."
But NAK is also an entry point to intervene with Python. And since this probably takes some time and the interval is 1ms, it seems to be occupied solely with this interrupt transfer procedure.
I wish I could set a flag on the interrupt endpoint so that an empty response can be handled by the hardware. It would be great if I could switch this later when a response needs to be handled in python.
I have also tried slowing down the polling interval (interval = 100), but it seems the driver doesn't take it into account.
Maybe there's already something in Facedancer, but I can't find it. Any help is welcome :-) Thanks.