OpenWrt Forum Archive

Topic: sane + cups + p910nd whiterussian HP PSC 1315/1310 asus wl500gP issues

The content of this topic has been archived on 25 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi All!

I have a few problems with my multifunctional HP PSC 1315 on whiterussian 0.9. i managed to set it up to print and scan but...

First i got the HPLIP sane plugin from this topic http://forum.openwrt.org/viewtopic.php?id=14831 by misha680. this had cups as dependency (which i tried to remove but it will break scanning too).

saned -d128 followed by scanimage -L in another window/computer would detect the correct scanner:

C:\sane\bin>scanimage.exe -L
device `net:192.168.1.1:hpaio:/usb/psc_1300_series?serial=XXXXXXXXXXXX' is a Hewlett-Packard psc_1300_series all-in-one

with same command saned -d128 and xsane on another windows machine i can scan just fine up to 600dpi.

however after installing xinetd and setting up saned there, i get this:

scanimage -L
[sanei_wire] sanei_w_array: DECODE: maximum amount of allocated memory exceeded (limit: 1048576, new allocation: 3720202640, total: 3721251216 bytes)
Segmentation fault

and the syslog:

Apr 20 01:47:37 ow01 kern.debug saned[3101]: quit: exiting
Apr 20 01:47:37 ow01 kern.debug saned[3101]: process_request: bad status 22
Apr 20 01:47:37 ow01 kern.info cupsd[900]: REQUEST localhost - - "POST / HTTP/1.1" 401 0
Apr 20 01:47:37 ow01 kern.err saned[3101]: io/hpmud/musb.c 1950: invalid serial id string ret=-1
Apr 20 01:47:37 ow01 kern.err saned[3101]: io/hpmud/musb.c 135: unable get_string_descriptor -1: Operation not permitted
Apr 20 01:47:37 ow01 kern.err saned[3101]: io/hpmud/musb.c 1945: invalid product id string ret=-1
Apr 20 01:47:37 ow01 kern.err saned[3101]: io/hpmud/musb.c 135: unable get_string_descriptor -1: Operation not permitted
Apr 20 01:47:37 ow01 kern.debug saned[3101]: init: access granted to root@127.0.0.1
Apr 20 01:47:37 ow01 kern.debug saned[3101]: check_host: access by remote host: 127.0.0.1
Apr 20 01:47:37 ow01 kern.debug saned[3101]: saned (AF-indep+IPv6) from sane-backends 1.0.18 ready


i understand that this is a failsafe to avoid bad memory allocations (only 1MB is allowed and this tries to get over 3 gigs of it)


secondly, i could not make cups work and getting rid of it kills my little saned/hplip functionality.

but i did make it print through p910nd - just set up the printer locally (because the 1315 doesnt show up in the drivers list i had to actually connect the USB and then after it was installed modify the printer and add a new port for RAW with the router's IP and port 9100).

however after scanning i can't print anymore because /dev/usb/lp0 disappears and that's smth hplip are aware of here: http://hplip.sourceforge.net/troublesho … nting.html in issue 4. even worse, running this command:
/usr/lib/cups/backend/hp - which appears to be the HPLIP printer driver for cups - will give me a Segmentation fault.

i'm not sure if the issues are from the compilation of the hplip package (appears to be compiled for kamikaze 7.09 not whiterussian 0.9) or if it's smth else i can't find.

i would compile it myself - but fiddling around with the packages and the toolchain/svn of whiterussian for a few days did not yield any results and i'm not a linux newbie either so it's even more frustrating...

Help is appreciated - maybe someone has a whiterussian compiled version of HPLIP or HPOJ or HPIJS to begin with...

Thanks!

fixed this. installed Kamikaze 7.09 (kernel 2.4 for my asus wl500gp) and misha's driver. saned works as a real daemon in xinetd and printing works using the cupsd (installed as a dependency to hplip). no need for p910nd.


here are the instructions for others:

install this: http://misha680.googlepages.com/hplip_2 … mipsel.ipk
- it will install lots of dependencies.


For SCANNER:

set up saned
add 192.168.1.0/24 in saned.conf

add "hpaio" in /etc/sane.d/dll.conf

test:
on your router: saned -d128

download xsane on windows, set up net.conf with server IP
C:\sane\bin>scanimage.exe -L
device `net:192.168.1.1:hpaio:/usb/psc_1300_series?serial=XXXXXXXXXXXX' is a Hewlett-Packard psc_1300_series all-in-one

Good. now set it up as daemon:

install xinetd, set up sane section, create /etc/services (same sane-port):

put  allowed IPs in /etc/sane.d/saned.conf (like 192.168.1.0/24)

create /etc/services with the line: sane-port       6566/tcp

create /etc/xinetd.d/sane:

service sane-port
{           
  socket_type = stream
  server = /usr/sbin/saned
  protocol = tcp
  user = root
  group = root
  wait = no     
  disable = no 
}


/etc/init.d/xinetd enable (so it starts up after reboot)

/etc/init.d/xinetd start

now you can once again try scanimage.exe -L or xsane on windows and it should scan.


PRINTER:

remove comments for application/octet-stream from mime.convs & mime.types (in /etc/cups)

try this: /usr/lib/cups/backend/hp - has to work and display your printer:

direct hp:/usb/psc_1300_series?serial=XXXXXXXXXXXX"HP psc 1300 series" "HP psc 1300 series USB XXXXXXXXXXXX HPLIP" "MFG:HP;MDL:psc 1300 series;CLS:PRINTER;DES:psc 1300 series;SN:XXXXXXXXXXXX;"

Great! now... start cupsd from init.d (./cupsd start)

go to the cups on the router:

http://192.168.1.1:631/

set up the printer (give it any name, i have psc1315), select the HP 1300 series from the dropdown, RAW printing, etc.

note that you cant print a test page from cups since it doesnt know how to translate to the printer (the driver is on windows and cups will just send the bytes to the printer)

set up driver in windows:
new network printer, select URL http://192.168.1.1:631/printers/psc1315 enter user/pass
select model (if not in list select any model, then printer properties update driver from advanced/driver)
you must have it already connected to PC once because the driver is not in list and that's the only way to be able to change it in advanced/driver.

note that you wont have lp0 or scanner0 in /dev/usb because this driver accesses the device directly - so dont try to troubleshoot that.

(Last edited by asuswrt on 26 Apr 2008, 23:08)

The discussion might have continued from here.