EspTinyUSB icon indicating copy to clipboard operation
EspTinyUSB copied to clipboard

USB Writeblocker

Open lukasloetkolben opened this issue 3 years ago • 5 comments

I want to make a USB Stick Writeblocker.

Is it possible to plug a USB-Stick to ESP32-S2 and emulate a USB device with the content of the actual USB-Stick to make it read only?

lukasloetkolben avatar Nov 16 '21 18:11 lukasloetkolben

I think i dont understand what this means.

chegewara avatar Nov 16 '21 18:11 chegewara

Sorry. I want to make a Hardware Writeprotection. Is it possible to connect a USB-Stick to the ESP and then connect the ESP to the PC so that a user can only view the files on the Stick, but can not edit or delete something from the Stick.

lukasloetkolben avatar Nov 16 '21 18:11 lukasloetkolben

No, its not possible, because esp32 S2/S3 have only 1 USB port which can work as host or device, not both at the same time.

chegewara avatar Nov 16 '21 18:11 chegewara

Ok thank you for your response, do you have any ideas to make my project workable?

lukasloetkolben avatar Nov 16 '21 18:11 lukasloetkolben

Sure, use 2 esp32 S2/S3 connected with SPI. One would work as host the other as master. But it would also require some effort from you to write host and edit msc device part, both are mostly done. Most work, i think, would be to write SPI master to slave bridge.

chegewara avatar Nov 16 '21 18:11 chegewara