Open xairy opened 3 months ago
Generally there are no transfer size limits in Facedancer as it packetizes all transfers except for CONTROL IN
transfers as this would require some fairly complex state synchronization between the Facedancer host code and the Facedancer device firmware.
On Cynthion, the firmware sets LIBGREAT_MAX_COMMAND_SIZE
to 1024 bytes as we only have 64 kB of RAM available to us on the Facedancer SoC. (!)
GreatFET does a little better and can handle up to 4096 bytes but it also suffers from the same inherent problem.
That said, it occurs to me that this limit was imposed before we moved the Facedancer firmware to the qspi flash which has freed up about 50% of the available RAM.
So you could try to also bump LIBGREAT_MAX_COMMAND_SIZE
a little higher in firmware/libgreat/src/gcp.rs.
We're also working on making the Cynthion HyperRAM available to the SoC which will allow us to greatly increase the transfer size.
Though ideally this is a limitation that needs to be removed from Facedancer itself.
The tracking issue for this is here: https://github.com/greatscottgadgets/facedancer/issues/114
With this fix applied, proxying a Logitech Webcam C110, which has a large configuration descriptor, fails with:
This appears to be caused by
LIBGREAT_MAX_COMMAND_SIZE
inpygreat
being only 1024.I tried increasing
LIBGREAT_MAX_COMMAND_SIZE
to 4096, but this soft-bricked my Cynthion. I had to reload the facedancer firmware into it to make it work again.