Zdravim, zkousel jsem postupovat podle navodu https://doc.turris.cz/doc/cs/howto/printer_sharing, povolil jsem ve sluzbach p910nd a dokonce ani po rebootu se mi nedari s tiskarnou spojit z OS X dle navodu, volba vyrobce a typu tiskarny nenasleduje ani pri protokolu HP Jet Direct - Socket. Pri generic to nic take nenajde. V dokumentaci bylo:
Zařízení, které má server spravovat ponechte na výchozí hodnotě (pokud tedy nepřipojujete tiskáren více). Jako Rozhraní zvolte lan, Port ponechte na výchozí hodnotě 9100.
Poradi mi nekdo jak konkretne se to da nastavit v LuCI nebo pres ssh? Dekuji moc.
se i objevila volba p910nd - Printer server ve sluzbach.
root@turris:/dev/usb# dmesg | grep printer
[ 16.593746] usblp 2-1:1.0: usblp0: USB Bidirectional printer dev 2 if 0 alt 0 proto 2 vid 0x03F0 pid 0x3D17
root@turris:/dev/usb# ls -l /dev/usb/
crw-r--r-- 1 root root 180, 0 Mar 18 23:29 lp0
root@turris:/dev/usb# lsusb
Bus 002 Device 002: ID 03f0:3d17 Hewlett-Packard LaserJet P1005
bohuzel ale netiskne, do tiskarny se odesle img ktery dam tisknout, zmizi z fronty jako by to melo byt ok, ale dal se nic nedeje…
In this printer you must send firmware over usb every time when you power on printer.
This process can be automated using hotplug.
I used the similar HP LJ1020 printer so if I find scripts and firmware I will give you a solution.
Firmware files you can download from my old site http://tomato.cmza.pl/hplj_fw/ (in this folder i compile usb_printerid program for turris omnia)
You need to compile the usb_printerid program which will check if the firmware is already loaded into the printer and prevents unnecessary sending of firmware (each time the firmware is sent to the printer, the device is restarted)
Create script /etc/hotplug.d/usb/20-hpljP1005
You must edit FIRMWARE, DEVICE and PROD_ID to corespond with yours settings
#!/bin/sh
FIRMWARE=/usr/lib/sihpP1005.dl.gz
DEVICE=/dev/usb/lp0
PROD_ID=3f0/3d17/100
if [ "$ACTION" = "add" ] && [ "$PRODUCT" = "$PROD_ID" ]; then
for i in $(seq 10); do
if [ -c $DEVICE ]; then
if [ $(usb_printerid $DEVICE | grep -c FWVER) == 0 ]; then
zcat $FIRMWARE > $DEVICE
exit
fi
else
sleep 3
fi
done
fi
If you run usb_printid /dev/usb/lp0 you can see similar log (printer hasn’t loaded firmware yet)
Sadly, the supplied binary refuses to work on Turris: ./usb_printerid: line 1: syntax error: unexpected “(”. Could someone please provide a compiled code that works? Preparing toolchain just to compile this single piece of code seems like unnecessary pain in a bum. Thanks in advance.
Set and export environment variables:
Add [path]/staging_dir/toolchain-powerpc_8540_gcc-4.6-linaro_uClibc-0.9.33.2/bin to PATH
Set STAGING_DIR to [path]/staging_dir/toolchain-powerpc_8540_gcc-4.6-linaro_uClibc-0.9.33.2
Use the compiler with prefix powerpc-openwrt-linux-uclibcspe- (i.e.powerpc-openwrt-linux-uclibcspe-gcc)
From my understanding the file you provided is tar.gz compressed .img file.
However in this guide we expecting .dl.gz file - which is gzipped (and then unzipped using zcat). So I found non gzipped .dl file, updated the script and it worked.
Using your tar.gz file it was not working, I tried to extract to tar.gz file to get more details about it and I found .img file. I think it’s the different format, but I’m not sure. For example here you can find gist which contains some conversion command from .img to .dl https://gist.github.com/sebastianwagner/8548683
For sure its not the correct cross-compiler. Omnia architecture for example is arm not powerpc. I tested (just to be sure) your binary and it doesnt work. Its compiled for other proccessor type.
Should be armv8 or some other naming convention like mvebu.
And it seems to work fine now to load firmware with hotplug.d script and all.
Did someone managed to advertise it on network so for example android phone, windows machine and linux box can find it without problems when connected to the network?
@AreYouLoco I forgot to mention I’m using old Turris 1.1, so I just used usb_printerid binary provided above.
And yes, after having a successful connection with loaded firmware I’m using p910nd print server provided for old Turris 1.1. Unfortunately I don’t know if this is suitable for Omnia, however you should be able to use any print server and just point it /dev/lp0 or similar device virtual file.
I reinstalled my router and try to apply the same process but compiled binary of usb_printerid provided by @petrpulc is no longer working. Can someone compile latest version of give me some instructions what to do?
Current version of binary is printing this problem with linked library
$ldd /tmp/usb_printid
/lib/ld-uClibc.so.0 (0xb7f0d000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7edc000)
libc.so.0 => /lib/ld-uClibc.so.0 (0xb7f0d000)
Error relocating /tmp/usb_printid: __uClibc_main: symbol not found
Error relocating /tmp/usb_printid: __uClibc_main: symbol not found
Or should I just install some packages? Thank you.