Score:1

Emulate USB drive in Linux for plugged-in USB devices

pl flag

I have a document management system and want to use my multi-function printer to directly scan into a directory in the Linux file system where my DMS can read from and processes the files automatically.

However, my multi-function printer is a bit older and only allows USB connections and I don't like it to always scan on a USB drive and re-plug it into my Linux machine afterwards.

Is there a possiblity to attach the printer to the Linux server, whereby the Linux server does not threat this device as a printer, but emulates a small USB drive for the multi-function printer, so my DMS can read from this emulated device after scanning documents? I currently use Debian 12, if relevant.

Nikita Kipriyanov avatar
za flag
In the ServerFault the proper answer could only be "buy a new printer". However, consider that your printer expects a *USB device* but your Linux system currently is a *USB host*. Device/OTG mode is not something you expect to be implemented on a PC. Rather, it is usually implemented in smaller devices. What you are asking is impossible to implement "directly", as it will also require various hacks (e.g. filesystem needs to be emulated too, plug/unplug the "flash" for the printer, receive notifications somehow which human normally receives visually on the printer LCD, and so on).
tsc_chazz avatar
vn flag
There are devices I've seen, years ago, that will supposedly allow connecting two USB hosts together, but I suspect they are Windows-only even if you can still find them.
Nikita Kipriyanov avatar
za flag
@tsc_chazz USB is strictly asymmetric protocol, peers are absolutely not equal, and e.g. downstream port of a USB hub (built into the motherboard) which drives physically accessible USB ports on a computer could not possibly work as an Device port. Devices you mention were two "USB devices" fused back-to-back together and having their Device ports facing outside, something like two USB-to-UARTs or USB-Ethernets, which renders them incapable to do anything else. There is nothing Windows-only in this and such things are still available (and easy to build yourself, by the way).
tsc_chazz avatar
vn flag
Fair enough. I didn't know whether those devices would model as back-to-back network or as a common data storage area, as I've never tried to use one.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.