I wanted to use my Raspberry Pi as USB bridge between multiple devices. We can assume that I want to connect my iPad which has POS software on it to my thermal printer. Most of star or Epson thermal printers can be recognized by iOS since they have MFi certification (It doesn't mean they have to be AirPrint compatible because they are not, they can be detected when they will be connected to iOS by lightning cable). I want to put my Raspberry Pi in the middle and act as they cannot see there is a device between them so technically iOS will detect printer as usual. In this case, I wanted to use USB monitoring packages to see what is happening between iPad and printer in terms of transferring data. I would be very happy if you can share your experience and ideas on this subject.
1 Answer
A Full sized Raspberry Pi ( not a Pi Zero or Pi A) with more than 1 USB port can not act as a USB device. This is because to get 4 USB ports the USB controller is hard wired to a USB hub on the board.
This means that when you plug the iPad into the Pi the iPad will act as the peripheral, not the host a it would when you plugged a printer directly into the iPad.
Pi Zero's (and Pi A's) can act as peripherals, but because that uses the only USB port they have this doesn't really help as there is no where to plug the printer in.
A better approach might be to look at using the Raspberry Pi as a AirPrint server and printing over Wifi from the iPad. A quick search suggests that it might be a bit flaky with anything other than straight A4/Letter style printing, but it might be worth having a try.
http://www.linux-magazine.com/Online/Features/AirPrint https://wiki.debian.org/AirPrint#Upstream_CUPS_and_Airprint
-
Thank you @hardillb for your detailed answer. I have tried other options like AirPrint but I wanted to know specifically about this solution. I'm using raspberry pi zero, do you think that maybe connecting OTG to Rpi USB port and then connecting both iPad and printer is something that would work? or maybe something like this? adafruit.com/product/… amazon.com/wawpi-Micro-Charge-Adapter-Connector/dp/B01AU8E25A/…– fafa92Sep 14, 2018 at 9:43
-
No that won't work, because you've added a USB hub back into the system, which is why the larger Pi's don't work.– hardillbSep 14, 2018 at 9:49