RobinMosedale
Posts: 44
Joined: Tue Jan 29, 2013 10:55 am

Printer installation - should it be this difficult

Thu Feb 14, 2013 9:16 pm

I'm afraid that my patience is being stretched.

I've had this thing for a few weeks now, and have been using the time to refresh my stale knowledge of UNIX.

The first thing was to ensure that the image was up to date, and used apt-get and so on.

However, despite having two Linux reference books, together with the Rapsberry Pi User Guide (not much cop) I'm finding almost invariably that commands don't behave as specified, or refuse to be recognised.

I've found that I'm wasting more and more time researching what packages are necessary, understanding the terminology, and still not making headway.

This thing is for inspiring young people? Really.

.... and no, I don't think I'm dumb, and should have enough knowledge of operating systems to get even a George III to bend to my will.

My first attempt was to install my printer using CUPS.

I'm still at it.

I used the alternative LP something, but having ploughed through reams of commands, I just can't remember.

Let's start this off.

It's a Canon PIXMA MX350, on the hardwired private network.

I've followed the trails through trying to install the Canon Linux driver (failed to install), downloading the source (failed to build the package due to bad dependencies), followed all the advice I can find on installing network printers.

So, as a last ditch before I give up wasting endless hours, is there anyone here, or is there a book that can specify in terms that can be be understood without referring to Linux dictionaries, or other termiaology that hasn;t first been defined?

Some info:-
Local network is all 192.168 based,
with a PC on 192.168.2.1, with a hostname that I recognise
raspberrypi on 192.168.2.14
Canon printer (without a host name) on 192.168.2.12
the printer is wired LAN IPv4 with a printername of 0000008A62DD and a MAC, it is Bonjour enabled with a servicename of Canon MX350 series_E55B658A62DD
My Router has something called a DNS Suffix FDBlahDiBlah

CUPS won't find it.
I can successfully ping the printer
Under what regime should I add the printer in CUPS?
HPLIP, IppSocket, or ipps, or SAMBA?
If so what is the form of the address
e.g. when in the SAMBA option the input box has the text smb there. Should it be left?
the examples of URI (Goodness what is that and why are there reams of pages that still don't adequately define it?)
http://hostname:631/ipp/
ipp://hostname/ipp/
lpd://hostname/que
socket://hostname

What is the hostname I'm supposed to use?
The printer under the DNS list doesn't have one. It's there on 192.168.2.12.
I've tried the following (literal text):-
http://localhost:631/192.168.2.12/
http://localhost:631/ipp/
ipp://localhost:631/192.168.2.12/
ipp://localhost:631/ipp/

similarly with localhost replaced by 'raspberrypi'
attempted just employing:-
http://192.186.2.12

I can then follow the remainder of the CUPS installation and select the correct driver, but a test print reveals an invalid address.

Should it be this obscure to do something so simple?

Anybody help?

Thanks in advance

Robin

Spid
Posts: 525
Joined: Sat Jan 19, 2013 12:47 pm

Re: Printer installation - should it be this difficult

Thu Feb 14, 2013 10:01 pm

Thank you for the diatribe, may I presume you are using Raspbian "wheezy" version 2013-02-09-wheezy-raspbian.zip

http://www.raspberrypi.org/downloads

If so you need to be a member of the LPAdmin Group to install a Printer, at the Command Prompt type

usermod -a -G lpadmin pi

You should only need to install CUPS and SAMBA from the Repositories, if you are using the GUI LXDE Desktop install the Synaptic GUI Package Manager to see what software is available. Double click on theDesktop LX Terminal Icon and on the command line type the following, pressing the enter key after each entry this can also be done from the Command Line):

sudo su
apt-get update
apt-get install synaptic


Though you may have read reams about Linux, you must remember that the Pi uses ARMv6 architecture and any software must be from the correct repository.

Maybe it is time to bite the bullet and start afresh with the latest IMAGE ?


I found this blog, one of many on the internet http://debianarmpi.blogspot.co.uk
I will always assume you are running Raspbian for desktop and Raspbmc for XMBC !

RobinMosedale
Posts: 44
Joined: Tue Jan 29, 2013 10:55 am

Re: Printer installation - should it be this difficult

Thu Feb 14, 2013 11:41 pm

"Thank you for the diatribe, may I presume you are using Raspbian "wheezy" version 2013-02-09-wheezy-raspbian.zip"

You're most welcome, and yes.

"If so you need to be a member of the LPAdmin Group to install a Printer, at the Command Prompt type

usermod -a -G lpadmin pi"

That's already done.

"You should only need to install CUPS and SAMBA from the Repositories, if you are using the GUI LXDE Desktop install the Synaptic GUI Package Manager to see what software is available. Double click on theDesktop LX Terminal Icon and on the command line type the following, pressing the enter key after each entry this can also be done from the Command Line):"

Already have Synaptic

"Though you may have read reams about Linux, you must remember that the Pi uses ARMv6 architecture and any software must be from the correct repository. "

Like this one, you mean.

"Maybe it is time to bite the bullet and start afresh with the latest IMAGE ?"

It was installed earlier this week on a new larger memory card, and updated immediately.

"I found this blog, one of many on the internet http://debianarmpi.blogspot.co.uk"

Thanks, found that some time ago, and followed the advice.

.....and so, what is the form of the URI that is to be used?

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: Printer installation - should it be this difficult

Fri Feb 15, 2013 6:22 am

I suspect printers didn't enter into the thinking to any extent when they put the Pi distros together. If you use a modern disto on a PC (Ubuntu is a good example) printers are usually a lot less painful than Windows. In the most part, you plug the printer in, the OS finds it and it prints straight off. The Linux on the Pi is of necessity a poor reflection of what Linux can and does do on more powerful hardware. Life is too short to have the Pi burdened with printing IMO.

Like my signature says.....
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

Spid
Posts: 525
Joined: Sat Jan 19, 2013 12:47 pm

Re: Printer installation - should it be this difficult

Fri Feb 15, 2013 7:52 am

Cups Page you will need to Login when asked with the same credentials you use, default is pi and raspberry:

http://localhost:631

Network Printers how-to...

http://localhost:631/help/network.html

PIXMA MX350 https://www.openprinting.org/printer/Ca ... IXMA_MX350
I will always assume you are running Raspbian for desktop and Raspbmc for XMBC !

RobinMosedale
Posts: 44
Joined: Tue Jan 29, 2013 10:55 am

Re: Printer installation - should it be this difficult

Fri Feb 15, 2013 12:10 pm

pluggy wrote:I suspect printers didn't enter into the thinking to any extent when they put the Pi distros together. If you use a modern disto on a PC (Ubuntu is a good example) printers are usually a lot less painful than Windows. In the most part, you plug the printer in, the OS finds it and it prints straight off. The Linux on the Pi is of necessity a poor reflection of what Linux can and does do on more powerful hardware. Life is too short to have the Pi burdened with printing IMO.

Like my signature says.....
Thanks, Pluggy, and your assessment seems about right.
I'm familiar with other Linux packages, particularly RedHat, and have been involved with writing or using operating systems of various types and levels of sophistication since 1978. This variant is proving frustrating in it opacity.

" Life is too short to have the Pi burdened with printing IMO."

Well, that may be so, but I need to print off a programme listing. First attempt with Python revealed that it's not very 'strong typed' and I must have abused its flexibility. Then discovered that the debugger isn't very helpful in describing how to set triggers for tracing at various points in the code, so while putting that investigation on the back track, the easiest thing is to resort to printing hardcopy and doing a manual scrutiny.

Well, blow me, that wouldn't work either.

In any event, the aim was twofold with this Pi.
1. Writing some control code for some external hardware, and
2. taking advantage of the open source compilers in order to resurrect some ab-initio Self Consitent Hatree-Fock Quantum Mechanical Calculations that I did a long time ago, and now are embedded in theoretical physics programmes like GAMES and its derivatives. Not simple one page programmes.

Debugging's proving a bit difficult without a reasonable debugger, and scrutiny on screen is unecessarily tedious , so it looks as though I'll be repartitoning the PC and re-installing a PC Based Linux image there, and probably use the Pi as a target slave processor.

Thanks anyway.

RobinMosedale
Posts: 44
Joined: Tue Jan 29, 2013 10:55 am

Re: Printer installation - should it be this difficult

Fri Feb 15, 2013 12:14 pm

Spid wrote:Cups Page you will need to Login when asked with the same credentials you use, default is pi and raspberry:

http://localhost:631

Network Printers how-to...

http://localhost:631/help/network.html

PIXMA MX350 https://www.openprinting.org/printer/Ca ... IXMA_MX350
Thanks SPID,

If you look at the opening post you'll see that all that has been done.

Thanks for pointing me to the Cannon driver site, but that was the first place I went to, and if you recall the original post stated:-
"I've followed the trails through trying to install the Canon Linux driver (failed to install), downloading the source (failed to build the package due to bad dependencies), followed all the advice I can find on installing network printers."

Any advice on the format of the URI anyone?

Cloudcentric
Posts: 982
Joined: Fri Sep 14, 2012 9:13 am

Re: Printer installation - should it be this difficult

Fri Feb 15, 2013 12:35 pm

Yes tried to read original post :mrgreen:

1) Buy an HP Wireless ePrinter ?

2) Maybe get rid of CUPS and try the lpr/lpd route ? http://en.wikipedia.org/wiki/Line_Print ... n_protocol

lpr & lprng are in repositories
I know everything about nothing"

User avatar
jojopi
Posts: 3085
Joined: Tue Oct 11, 2011 8:38 pm

Re: Printer installation - should it be this difficult

Fri Feb 15, 2013 12:40 pm

RobinMosedale wrote:http://localhost:631/192.168.2.12/
http://localhost:631/ipp/
ipp://localhost:631/192.168.2.12/
ipp://localhost:631/ipp/
http://192.186.2.12
CUPS needs to know how to send stuff to your printer. The hostname should be the printer's address, or the address of a print server (another CUPS/IPP, Windows/Samba, or LPD) that is always on and already knows about the printer. Sending prints to localhost rarely makes sense.

In your last attempt you have mistyped the IP address. Also you have not specified a port. The default port for http may be a printer's web user interface, not its internet printing protocol service.

Most network printers will support AppSocket/HPJetDirect with URI socket://192.168.2.12:9100 or
Internet Printing Protocol, ipp://192.168.2.12:631 . However, I see some references to Canon Network InkJets using a proprietary cnijnet:// protocol. If that is true of yours it may be easier to configure forwarding to a Windows/Samba shared print queue instead of to the printer directly.

Incidentally, if you install package nmap, then "nmap 192.168.2.12" should tell you which ports the printer has open.

RobinMosedale
Posts: 44
Joined: Tue Jan 29, 2013 10:55 am

Re: Printer installation - should it be this difficult

Fri Feb 15, 2013 12:57 pm

Thanks, Jojopi, that's most helpful.
Thanks for clarifying the format and use of the URI.
I'll try those suggestions especially nmap.

RobinMosedale
Posts: 44
Joined: Tue Jan 29, 2013 10:55 am

Re: Printer installation - should it be this difficult

Fri Feb 15, 2013 7:58 pm

nmap 192.168.2.12 results in:-

PORT STATE SERVICE
80/tcp open http
139/tcp open netbios-ssn
515/tcp open printer

How are these used in the CUPS URI?

Robin

kpalling
Posts: 2
Joined: Fri Mar 01, 2013 11:09 pm

Re: Printer installation - should it be this difficult

Sat Mar 02, 2013 1:46 am

I have successfully added a Canon MG-3250 multifunction Wireless printer to my Pi, using Wifi.
The printer was already wifi-attached to my LAN router, shared, and used by other PCs/Macs/SmartPhones in my house.

CUPS is already in the standard Pi system, and I added a WiFi usb dongle to the Pi myself (not as easy as I thought!).

This is how I defined the printer.

Add your username (pi) to the LPAdmin Group
sudo usermod -a -G lpadmin pi

Make sure your wireless network is working - I actually use mine to connect my Pi to my LAN, and that the printer in question is either alive on your LAN or, if not wireless but attached to another Computer, switched on and shared.

Open Midori web browser, go to http://localhost:631 (the CUPS system on the Pi)
(on my pi, CUPS responds quite slowly to the "Continue / Next" buttons, so be patient.

Under CUPS for Administrators select Adding printers and Classes

Select Add printer, enter your username & password

The next screen lists all the local, network and other printers discovered by your pi.
I selected my networked Canon printer.

Fill in the next screen name, location, etc, and the share box if you are attaching a local printer and want to share it.

Select your printer "Model" (actually the driver). There wasn't an MG-3200 series in the list so I selected the 3100 series as closest, but you can provide your own PPD file if you know how to make one, or can get one off the net.

Select Add printer, then modify any of the options you want to change, explore the Administration and Maintenance pulldown options.

The first time I printed it took a long time, but worked perfectly.
Keith Palling

RobinMosedale
Posts: 44
Joined: Tue Jan 29, 2013 10:55 am

Re: Printer installation - should it be this difficult

Sat Mar 02, 2013 12:08 pm

Thanks, Keith,

But I've done all that. CUPS or whatever just won't detect it.

I've manually configured the address and ports in many combinations, but a print job just sits there remarking, printer is busy.

Thanks anyway

Robin

Spid
Posts: 525
Joined: Sat Jan 19, 2013 12:47 pm

Re: Printer installation - should it be this difficult

Sun Mar 03, 2013 9:59 am

If CUPS will not achieve what you wish http://www.cups.org

The only alternative I am aware of is LPRng http://www.lprng.org

It is in the Raspbian "wheezy" repository......
I will always assume you are running Raspbian for desktop and Raspbmc for XMBC !

User avatar
Jim JKla
Posts: 2218
Joined: Sun Jan 29, 2012 11:15 pm
Location: Newcastle upon Tyne UK

Re: Printer installation - should it be this difficult

Sun Mar 03, 2013 10:11 am

If all you want is a hardcopy printout of a listing then there is a work around using ftp (ok you need to set up ftp) download your listing to a networked computer that has printer support and dump your print.

Ok this is not an elegant solution but if getting the printout is distracting you from your programming project it's probably a quick fix. ;)

I aploogise if this was mentioned earlir in the thread I just thought it worth a mention. ;)
Noob is not derogatory the noob is just the lower end of the noob--geek spectrum being a noob is just your first step towards being an uber-geek ;)

If you find a solution please post it in the wiki the forum dies too quick

DIYKiwi
Posts: 18
Joined: Wed Dec 19, 2012 10:33 pm

Re: Printer installation - should it be this difficult

Sun Mar 17, 2013 3:48 am

Hi There

I just a few minutes ago was successful in getting my Canon PIXMA MX436 printer to print using the RaspberryPi! What elation!

My printer is connected straight into the RPI powered USB hub and is therefore localhost.

Well, that was after many weeks of mucking around with Canon's downloadable linux drivers (no good as they support only i386 architecture, not the Pi's ARMv6 chipset; in any case, in an email they stated categorically that they do not support the Linux OS apart from what's on their website).

I also used this learning time with downloading & installing Gutenprint and CUPS as separate packages, configuring & installing them separately, playing with cups.conf file, etc. uninstalling, updating, upgrading the OS, Googling the topics.

I can understand Robin's initial frustration, but I thank Spid for the suggestion to do apt-get update again and then install Synaptic Package Manager. This is what led to my success. What Synaptic does is hunt for related software for CUPS & Gutenprint that I couldn't have known about, and it installs that along with CUPS/Gutenprint. During the installation it asked if I wanted to replace files that I had modified myself with new ones - I said yes.

I had also earlier done apt-get upgrade and had to create the lpadmin group as LXTerminal said that there was no lpadmin group. Perhaps this was necessary, not sure.

This all done, there is no need to worry about what URI to type as the print software brings up the Canon printer as USB connected - localhost - and I went through the steps to select the printer driver (MX430 series).

It is quite slow to print, though, as you would expect from a 700-950MHz chip as opposed to the usual 2-3GHz jobs. It takes about 1min to spool the job, then about a minute to print a page of text through the machine, going in regular stop-start fashion. But it works!

It works! It works!

So don't get rid of CUPS or buy an HP wireless printer... :)

-DIYkiwi

RobinMosedale
Posts: 44
Joined: Tue Jan 29, 2013 10:55 am

Re: Printer installation - should it be this difficult

Sun Mar 17, 2013 9:27 pm

Thanks, DIYKiwi, you certainly have perseverance.

Unfortunately, I'd already pursued the advice concerning CUP, Lpadmin, and update with apt, including installing the synaptic package manager, together with endless searches on Linux forums, all to no avail.

Such was this simple task, together with several other seemingly unfathomable but astonishingly basic needs detracting from the original endeavour, that it was more expedient to install the GNU compilers under the boring old Windows environment.

As a result I'm pleased with my progress of revision of several languages, and can see the end result of some resurrection of implementing some of the SCF techniques that sparked all of this.

So the Pi and Linux are slumbering in a drawer somewhere.

However, you offer a further possibility which I haven't tried, " Gutenprint ", of which I too was unaware.

So, if and only if my mind turns toward resurrecting the little Pi, and to ensure that I replicate exactly the circumstance of your success, I'll ensure that the attempt coincides with an exactly similar proximity to the next equinox as yours, together with any other nuances which positively perturb probability of success that anyone might care to contribute, either rational or incomprehensible, I'll gladly have another go.

I think I'll stick to quantum mechanics, it's much more deterministic.................?

Thanks anyway, very much tongue in cheek, Robin

DIYKiwi
Posts: 18
Joined: Wed Dec 19, 2012 10:33 pm

Re: Printer installation - should it be this difficult

Mon Mar 18, 2013 6:53 am

Hi Again

I look forward to hearing any success you have, stars & planets allowing.

I did forget to add to my post above - and you've probably already done this - that in Synaptic Package Manager you need to click the 'architecture' tab and select 'arch: armhf' so that the versions of CUPS, Gutenprint, etc. are compatible with the Pi's ARMv6 chip. I chose the package labelled 'CUPS' (not its related namesakes) and when I marked just this for installation the package manager also marked all the related software - including Gutenprint - for installation also.

As I said, you probably did this, but it may be useful for other newcomers/newbies.

Did I also forget to state that I'm using Raspbian Wheezy OS? Downloaded Dec 2012.

-DIYkiwi

efflandt
Posts: 359
Joined: Mon Dec 03, 2012 2:47 am
Location: Elgin, IL USA

Re: Printer installation - should it be this difficult

Sat Mar 23, 2013 1:14 am

Assuming cups was installed, your user has been added to lpadmin group (beginning with small L) as mentioned earlier, and it is a regular network printer (not a Windows shared printer):

Point a web browser on the Pi at http://localhost:631/

Chose Administration tab, then Add Printer button (log in)

Under Other Network Printers I usually just select AppSocket/HP JetDirect (even though JetDirect is an HP trademark, most print servers can do it, and it is simple)

Connection: socket://ip_address:9100 (where ip_address is actual IP address of printer). The :9100 is the JetDirect port for the default queue on the printer.

Fill in fields of next screen (Name: cannot contain spaces)

Pick brand name of your printer, then after Continue, the model or closest to it, then Add Printer, and set default options.

If that was all successful it should end up saying something like my LexmarkC543 (Idle, Accepting Jobs, Not Shared), unless you checked the Shared box in one of the previous screens.

cups has been around for a long time and has support for quite a few printers. But I have only used it for network printers (and long ago for parallel port printers), I have never used it for directly connected USB printers or Windows shared printers (which may require configuring something with samba).

RobinMosedale
Posts: 44
Joined: Tue Jan 29, 2013 10:55 am

Re: Printer installation - should it be this difficult

Sat Mar 23, 2013 11:09 am

efflandt said:-
"Connection: socket://ip_address:9100 (where ip_address is actual IP address of printer). The :9100 is the JetDirect port for the default queue on the printer."

Thank you sincerely efflandt. An answer that addresses the question of ip subaddress at last.

Yes it is a network printer.

Many thanks, I'll give it a go, and report back.

Robin

Benny_Mac
Posts: 2
Joined: Tue Apr 05, 2016 10:49 am

Re: Printer installation - should it be this difficult

Tue Apr 05, 2016 11:10 am

It's an old post, but I thought I'd follow up as I could be the first to directly answer the OP's question.

First off, I'm completely new to the Pi, and virtually new to Linux. Yes, I'm a big-time Windows guy. But the Pi finally caught my attention, and I took the plunge.

I realise it's meant to be a tinkering experience, and the (deliberate?) lack of guis mean you're meant to get stuck in and figure stuff out for yourself. But after two full-on days of trying to print a single page from my Canon Pixma MP 560 network printer I have to admit it's a lot harder than I expected.

Advice I've seen along the way is:
  • You should have bought a HP and not a Canon
  • Set up a Samba share to your Windows PC and print through that
  • Connect it directly to the Pi - don't try and print over the network
  • A friend of mine tried this and gave up after a week. Just sayin'.
  • Add this random repository and untar the source and compile with these flags and ...
  • Yeah, sorry, printers have always been hard in Linux
And to top it all off, almost all the tutorials start by saying "Download the driver from Canon's website". Well, try as a might (and I must have visited at least 6 regional sites) there are no Linux drivers to be had.

Enough ranting; here's how I finally got it working.
  • Make sure printer-driver-gutenprint is installed with apt-get. This will be used instead of the (missing) Canon driver.
  • Also use apt-get to install cups-backend-bjnp. This is the secret sauce that allows cups to communicate with the Canon over the network.
  • After that just follow the standard Cups tutorial. Due to cups-backend-bjnp being installed the Canon Pixma will be automatically listed in the Discovered Network Printers section. There's no need to add an explicit entry in the bottom section.
  • Just for reference, the automatically generated URI is bjnp://192.168.0.20:8611
. Interestingly, even an nmap scan doesn't pick up open port 8611, so I guess it's something fairly non-standard.

I want to like the Pi, and I'm not giving up yet, but if everything is this hard I'm not sure I'll have the staying power to see it through to the end.

mathboy4life
Posts: 197
Joined: Fri Jan 08, 2016 7:29 pm

Re: Printer installation - should it be this difficult

Tue Apr 05, 2016 2:20 pm

The only way I got my cannon printer to actually print something was with chromium and that was by using the cloud print.

Benny_Mac
Posts: 2
Joined: Tue Apr 05, 2016 10:49 am

Re: Printer installation - should it be this difficult

Wed Apr 06, 2016 6:49 pm

I should follow-up my post with a rather more positive experience. After the two days to get a test page from my Canon Pixma MP 560, I read a tutorial that showed how to enable Apple Airprint on printers that don't otherwise support it.

And that took all of 10 minutes to get working. Wow. Quite the opposite experience to before.

There are loads of tutorials around on how to do it, but basically you just need to share CUPS, share the printer and then

Code: Select all

apt-get install avahi-discover
If only everything was this easy :-)

iancvt55
Posts: 6
Joined: Wed Jan 31, 2018 10:43 am

Re: Printer installation - should it be this difficult

Wed Mar 14, 2018 1:12 pm

This is what worked for me on a Canon MP560 series printer.

use apt-get to install cups-backend-bjnp

In CUPS set the printer as:
bjnp://192.168.1.xx:8611 where xx is the ip address of your Canon Printer.
when prompted install the appropriate driver, in my case, Canon MP560 series - CUPS+Gutenprint v5.2.11. If you installed the cups-backend-bjnp you will see more Canon Printers than you ever thought existed.

Edit the cupsd.conf file so that the default port is 8611

Restart Raspberry Pi and for me wireless printing is now alive and well.

There may be neater ways of doing this but I got there.

Return to “Beginners”