User Tools

Site Tools


Sharing printer in LAN network

Why we're going to share printer in LAN?

- We can print from all device in your LAN network. No one will anymore interupt you, when you're doing something and he/she needs to print it on device, when you have connected printer to only one device.

Nowadays some printers offers WiFi sharing, but there is no reason to buy new printer if our is working and usually is cheaper to fill cartridge or buy refilled cartridge from 3rd parties

What you will need to do it?

  • You will need to check first, if your printer has drivers for Linux and also for devices, where will you print
  • free USB port on your Turris Omnia
  • web interface Foris
  • SSH

Installation

Before installation I will show you the way, how to check if your printer has drivers for Linux.

They're two ways:

  • You will look on the internet and see if already published know how for your printer.
  • Connect your printer to Turris Omnia and dont forget to turn on your printer.

Now you will need to your router via SSH and write there this command:

lsusb -t

Printer should be and if you're not sure how it should look then here is my output for my printer.

        |__ Port 2: Dev 14, If 2, Class=Printer, Driver=usblp, 480M
        |__ Port 2: Dev 14, If 0, Class=Vendor Specific Class, Driver=, 480M
        |__ Port 2: Dev 14, If 1, Class=Printer, Driver=usbfs, 480M

Because you need to bude sure if your printer was recognized by Linux you need to open file messages, which is located in /var/log

There should be something like this:

[  897.930224] usb 1-2.2: new high-speed USB device number 9 using xhci_hcd
[  898.036173] usb 1-2.2: New USB device found, idVendor=04a9, idProduct=1728
[  898.036178] usb 1-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  898.036182] usb 1-2.2: Product: MX310 series
[  898.036185] usb 1-2.2: Manufacturer: Canon
[  898.036188] usb 1-2.2: SerialNumber: ******
[  898.067202] usblp 1-2.2:1.1: usblp1: USB Bidirectional printer dev 9 if 1 alt 0 proto 2 vid 0x04A9 pid 0x1728
[  898.068370] usblp 1-2.2:1.2: usblp2: USB Bidirectional printer dev 9 if 2 alt 0 proto 2 vid 0x04A9 pid 0x1728
[  898.068420] usbcore: registered new interface driver usblp
[  899.212342] usblp1: removed
[  899.216411] usblp 1-2.2:1.1: usblp1: USB Bidirectional printer dev 9 if 1 alt 0 proto 2 vid 0x04A9 pid 0x1728
[  899.216797] usblp2: removed
[  899.226216] usblp 1-2.2:1.2: usblp2: USB Bidirectional printer dev 9 if 2 alt 0 proto 2 vid 0x04A9 pid 0x1728

If there is only:

2017-06-24T19:52:08+02:00 info kernel[]: [165073.384676] usb 4-1: new full-speed USB device number 3 using xhci-hcd

It could means:

  • You forget to turn on your printer
  • Faulty cable or you can try to different port on Turris Omnia

If both possibilities doesn't work it could only means:

  • Printer requires to install additional driver or firmware for Linux
  • Printer doesn't have drivers for Linux
  • Printer has only drivers for Windows and there we can also set sharing.

When you can see your printer and it has drivers, then you can continue on your reading!

In Foris web interface you will go to tab Updater and check there Print server and then save changes.

Web interface for printing (CUPS)

Now you need to check if CUPS is installed through SSH connection. By these commands:

opkg update
opkg install cups

If CUPS is installed you should see this output:

Package cups (2.1.4-5) installed in root is up to date.

Now I will show you how to start CUPS after each startup of Turris:

/etc/init.d/cupsd enable

Because it didn't start it and it will start it only on boot, we need manually to start it right now:

/etc/init.d/cupsd start

You can find web interface on this address: http://192.168.1.1:631

It is very possible that it will requires login. It wants same credentials as you used for SSH or for LuCI

How to setup printer on clients

Windows

In Windows you can find printer automatically, but it can happened that you need it add manually. Sometimes it could be little more problematic, when you dont have official drivers for Windows 10.

Windows 10:

There so many options, how to add printer and I will show you one of them:

Control panel - Hardware and soundDevices and Printers

You will need to click on button: Add a printer or press right button of your mouse and from menu click to Add a printer

Now you can see this window:

## if sense probably bad

If Windows failed to find printer automatically, now you would need to add it manually.

Click on this sentence: Požadovaná tiskárna není v seznamu and choose second option: Vybrat sdílenou tiskárnu podle názvu

To the empty field you will address, which you would get from CUPS (http://192.168.1.1:631) from tab Printers Click right button of your mouse to yours printer and choose from menu: “Copy URL” and this you will put to field.

## if clause If it couldn't find driver then you would need to pick it manually from the list or you can try “Windows Update”

If you couldn't find driver for printer in v průvodci pro přidání tiskárny and Windows Update didn't help us, then it is possible that manufacturer of your printer didn't release driver for Windows 10. In my case it was possible to use driver from Windows 7/8 through backwards compatibility. After that you will need run again: průvodce přidání tiskárny.

On each computer is required to add printer manually.

Windows 8: Same method as for Windows 10 or Windows 7.

Windows 7:

There again many ways how to add printer in Windows 7 and I will show you two of them:

Start → Control panel under category Hardware and Sound click there on Devices and Printers

or you can use this way, too: Start → Devices and printersAdd printerPřidat síťovou tiskárnu, bezdrátovou tiskárnu nebo tiskárnu s technologií Bluetooth

Now you have two options, how to add printer.

1) from upper bar click there on Add a printer

2) click right button and from menu choose Add a printer

Now you can see this window Add a printer, where you should choose Přidat síťovou tiskárnu, bezdrátovou tiskárnu nebo tiskárnu s technologií Bluetooth.

Windows 7 now will try to find available printer.

If printer wasn't detected automatically you need to click on button: Požadovaná tiskárna není v seznamu

After you clicked you should see this window Najit tískárnu podle názvu nebo ICP/IP adresy

You should choose opinion Vybrat tiskárnu podle názvu

To the empty field you will address, which you would get from CUPS (http://192.168.1.1:631) from tab Printers Click right button of your mouse to yours printer and choose from menu: “Copy URL” and this you will put to field.

Driver should be available from menu or you can install it from disk (ale pouze za předpokladu, že máme stažený ovladač).

If you could find driver in menu:

After you successfully added printer you should see this:

Now you should click on button Next and after it to Finish

How to is behind us right now! Congratulations to you, if you finished reading.

Linux

V Ubuntu a jiných derivací je velice snadné přidat síťovou tiskárnu.

MacOS (Apple)

Převzato z původního článku. Nutno ověřit funkčnost.

Předvolby systémuTiskárny a skeneryTlačítko +Přidat tiskárnu nebo skenerIkonka IP → Jako Adresu zadejte adresu routeru a Protokol nastavte na HP Jet Direct - Socket; následuje volba výrobce a typu tiskárny

Android

Skenování

v přípravě

Fax

v přípravě