LinuxQuestions.org

LinuxQuestions.org (http://www.linuxquestions.org/questions/index.php)
-   Linux - Hardware (http://www.linuxquestions.org/questions/forumdisplay.php?f=18)
-   -   HP Officejet T45 Scanner on Ubuntu 10.04 Lucid Lynx LTS (http://www.linuxquestions.org/questions/showthread.php?t=4175442733)

TheOneAndOnlySM 12-23-2012 06:35 PM

HP Officejet T45 Scanner on Ubuntu 10.04 Lucid Lynx LTS
 
Hey everyone,

I'm having trouble getting the scanner on my HP OfficeJet T45 to work in Ubuntu 10.04 Lucid Lynx LTS. The device is attached via a parallel port and is seen according to this dmesg output:


[ 24.487138] parport_pc 00:09: reported by Plug and Play ACPI
[ 24.487259] parport0: PC-style at 0x378 (0x778), irq 7, dma 3 [PCSPP,TRISTATE,COMPAT,EPP,ECP,DMA]
[ 24.612857] parport0: Printer, Hewlett-Packard OfficeJet T Series
[ 24.613567] lp0: using parport0 (interrupt-driven).


I have printing setup via cups, noted in this printers.conf file entry:


<Printer Hewlett-Packard-OfficeJet-T-Series>
Info Hewlett-Packard OfficeJet T Series
Location infinite
MakeModel HP Officejet T Series hpijs, 3.10.2rc1.9
DeviceURI parallel:/dev/lp0
State Idle
StateTime 1353822635
Type 8425484
Filter application/vnd.cups-raw 0 -
Filter application/vnd.cups-postscript 100 foomatic-rip-hplip
Filter application/vnd.cups-pdf 0 foomatic-rip-hplip
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy retry-job
</Printer>


However, when I run xsane, it does not detect any printers. Running hp-probe -bpar does not detect any printers. Of note, there is an error message from hp-probe that says: error: Unable to locate models.dat file , however the file exists at /usr/share/hplip/data/models/models.dat .

Not sure how to proceed - any advice? Thanks in advance!

tronayne 12-24-2012 01:29 PM

Have you added the scanner group to your userid? That might help.

Too, I believe that model is support in HPLIP -- have you tried setting it up with hp-setup (and add the scanner group)?

TheOneAndOnlySM 12-24-2012 02:35 PM

The closest group in /etc/group is saned. Haven't messed with users/groups just yet. Instead did chmod 777 /dev/parport0 (owned by root.lp, permissions set to 777) and ran sudo sane-find-scanner -v -p only to get this output:

checking parport0... failed to open (Invalid argument)
checking parport0 (SCSI emulation)... failed to open (Device busy)

This is true even when cups is turned off.

hp-setup -bpar gives me this output:

error: No device selected/specified or that supports this functionality.


I'm pretty sure I've had this scanner working on an older Slackware (9.1?) install. I wouldn't be surprised if these newer distros have allowed parallel port functionality to break.

tronayne 12-24-2012 05:00 PM

Perhaps one of these might help (from hp-setup --help:
Code:

  Parallel:                  $ hp-setup -i /dev/parport0
  USB or parallel, using    $ hp-setup -i US12345678A
  serial number:
  USB, automatic:            $ hp-setup -i --auto 001:002
  Parallel, automatic, no    $ hp-setup -i -a -x /dev/parport0
  testpage:
  Parallel, choose device:  $ hp-setup -i -b par

I think I'd try the first example, $ hp-setup -i /dev/parport0 and, possibly, the fourth, $ hp-setup -i -a -x /dev/parport0 but I would also think about /dev/lp0 (that shows up in your first listing).

I have to admit it's been at least 20 years since I've dealt with anything parallel (and I've forgotten everything I never knew about parallel) but it seems to me that printer and the like get mapped to /dev/lp-something; the scanner may not, though, so perhaps that's why the /dev/parport0 is used above. You nay need to "walk" the port numbers, just in case; e.g., /dev/parport1 or /dev/lp1 and the like. I dunno but I remember having to do things like that.

Ubuntu may not include or even need a scanner group (Ubuntu is another one of those thing I know nothing about); in Slackware 14.0 (the newest stable release), the scanner group is 93 but that may not be relevant to your needs.

Anyway,best of luck with and best wishes for the season.

Hope this helps some.

TheOneAndOnlySM 12-27-2012 01:22 AM

Thanks for your help. For whatever reason, it seems that Ubuntu 10.04 LTS has a broken version of HPLIP packaged, such that the commands above aren't recognized or in some way don't work.

So I built HPLIP using their tarball and excellent instructions for Ubuntu per their website http://hplipopensource.com/hplip-web...os/ubuntu.html , being sure to run the configure with --enable-pp-build , as per the instructions here http://hplipopensource.com/node/217 . These instructions also added my user to the lp group as you previously suggested.

Got hp-setup to finally work (and with a gui), which installed my HP Officejet T45 printer at the address hp:/par/OfficeJet_T_Series?device=/dev/parport0 (had to specify the correct driver in CUPS) and successfully prints apparently through /dev/parport0 .

hp-check demonstrates it does detect my scanner ...

device `hpaio:/par/OfficeJet_T_Series?device=/dev/parport0' is a Hewlett-Packard OfficeJet_T_Series all-in-one

... and shows no other errors (for dependencies, permissions, configuration settings).

However running xsane or hp-scan errors out with this:

Using device hpaio:/par/OfficeJet_T_Series?device=/dev/parport0
.
.
.
error: SANE: Device busy (code=3)

sudo sane-find-scanner -p -v shows (even with /dev/parport0 set to 777 permissions):

checking parport0... failed to open (Invalid argument)
checking parport0 (SCSI emulation)... failed to open (Device busy)


Not sure what to do from here. The parallel port is set to ECP mode in my BIOS. Printing through /dev/parport0 appears to work. Not sure why accessing the device from sane is causing issues.

I think the best thing LQ can do to help right now is if anyone with Ubuntu on a computer with a parallel port could run sudo sane-find-scanner -p -v and post the output relevant to the parallel port (along with Ubuntu version).

Thanks in adavnce!

TheOneAndOnlySM 12-27-2012 01:49 AM

1 Attachment(s)
attached is my hp-check.log


All times are GMT -5. The time now is 03:37 PM.