1

I want my raspberry to be recognized as a printer by Windows when somebody connects it via usb.

I don't really want to print anything, I just need it to receive data when somebody selects it as a printer. For that I will listen later on the usb port.

I'm not sure how difficult the samba approach is: http://www.makeuseof.com/tag/make-wireless-printer-raspberry-pi/ But it is important, that there is no knowledge required for the windows user/the device is plug and play usable.

I guess the raspberry has a device descriptor, which I need to override.

The user will only use windows computers.

Questions

1) How can I get the raspberry be recognized as a printer

2) How can I let the raspberry send my driver, so that the user does not have to download and install it manually

3) Is there an easy tutorial for writing a printer driver, this is the closest and most descriptive I found so far: https://msdn.microsoft.com/en-us/library/windows/hardware/hh439665(v=vs.85).aspx

PS: I'm mostly used to JavaScript and have some experience in C and C++

EDIT: More samba ressources: http://www.tldp.org/LDP/LG/issue72/bright.html

Still I'm looking for a solution which also works without network connection as well

5
  • I know the duplicate was closed as a duplicate too, but this allows you to see several versions of more or less the same question which have the same answer: You cannot do this. Except with the pi zero -- but you do not mention the model in the question. If it is a zero, leave a comment and I will reopen this. The "host-to-host" cable option mentioned in the duplicates, BTW, is probably a bad one (but that is just a personal hunch opinion).
    – goldilocks
    Commented Jun 17, 2016 at 19:17
  • Ok thanks, wrong search keywords. I indeed planned it with a pi 3. This tutorials are for the pi zero: learn.adafruit.com/… & pi.gbaman.info/?p=699. No need to reopen now, I will try how far I can get with this tutorial and than add more specific questions to the problems I get along the way.
    – Andi Giga
    Commented Jun 19, 2016 at 10:30
  • Just in case you missed the point of the duplicates, USB is not a peer-to-peer relationship as in networking, where any node may act as a server or client or both. USB is a master-slave relationship. You cannot connect a master to a master or a slave to a slave and may cause physical damage to either or both systems if you try to do so. A normal computer has master ports, intended to be connected to slave devices such as printers. The pi is a normal computer in this sense. You cannot connect two normal computers with a USB cable. They are both masters. A printer is a slave.
    – goldilocks
    Commented Jun 19, 2016 at 12:37
  • Thank you, indeed I wasn't aware of that. One question to the pi zero, it has two mini usb ports. How it will work there? Don't they have the same only master/slave restriction? I would like to use one for data input + power and the other one to connect a wifi dongle then.
    – Andi Giga
    Commented Jun 19, 2016 at 12:43
  • The zero's USB port is a slave OTG, meaning it can be used as a master or slave. I think this requires a special cable, but these are simpler and cheaper than the USB host-to-host cables (allowing connection of a master to a master) mentioned in some of the answers to the duplicates. I don't recommend bothering with this as you are likely to end up just wasting your money -- host-to-host cables are seldom used and require special drivers; AFAIK most of them aren't supported under linux.
    – goldilocks
    Commented Jun 19, 2016 at 13:11

0

Browse other questions tagged or ask your own question.