TheBB Posted April 13 Share Posted April 13 (edited) http://bin.entware.net/aarch64-k3.10/test/airprint/ http://bin.entware.net/mipselsf-k3.4/test/airprint/ http://bin.entware.net/mipssf-k3.4/test/airprint/ 1. установить пакеты: avahi-dbus-daemon cups cups-filters ghostscript libnss-mdns python3-cups opkg install http://bin.entware.net/mipselsf-k3.4/test/airprint/libcups_2.2.12-3_mipsel-3.4.ipk opkg install http://bin.entware.net/mipselsf-k3.4/test/airprint/cups_2.2.12-3_mipsel-3.4.ipk opkg install http://bin.entware.net/mipselsf-k3.4/test/airprint/libnss-mdns_0.15.1-1_mipsel-3.4.ipk opkg install avahi-dbus-daemon cups-filters ghostscript python3-cups остальные зависят от модели устройства (напр., для SCX-4220 - `opkg install splix`) 2. добавить группы "lpadmin sys" или удалить записи из файла "/opt/etc/cups/cups-files.conf" echo "lpadmin:x:122:" >> /opt/etc/group echo "sys:x:3:" >> /opt/etc/group для avahi echo "nogroup:x:65535:" >> /opt/etc/group 3. для настройки через web отредактировать файл "/opt/etc/cups/cupsd.conf": в строке "Listen localhost:631" удалить запись "localhost" ( Listen localhost:631 => Listen 631) добавить в конец каждой секции " <Location />" и "<Location /admin>" - "Allow @Local" 4. заметить стартовый скрипт "/opt/etc/init.d/S42avahi-daemon", присвоив другой номер (чтоб не переписывался при переустановке), типа; /opt/etc/init.d/S43avahi-daemon #!/bin/sh # avahi-daemon init script PROCS="avahi-daemon" PROGS="/opt/sbin/$PROCS" ARGS="" DESC="$PROCS" do_start() { $PROGS -c || $PROGS -D $ARGS } do_stop() { $PROGS -c && $PROGS -k } do_reload() { $PROGS -c && $PROGS -r $ARGS } case "$1" in start) do_start ;; stop) do_stop ;; reload) do_reload ;; restart) do_stop sleep 1 do_start ;; *) echo "Usage: $0 {start|stop|reload|restart}" >&2 exit 1 ;; esac exit 0 5. запустить сервисы /opt/etc/init.d/S20dbus start /opt/etc/init.d/S43avahi-daemon start /opt/etc/init.d/S60cupsd start и настроить устройство через "морду" IP:631 6. создать 2 (два) файла (или забрать готовые) "/opt/share/cups/mime/airprint.convs" # # "$Id: $" # # AirPrint # Updated list with minimal set 25 Sept image/urf application/pdf 100 pdftoraster # # End of "$Id: $". # wget http://bin.entware.net/mipselsf-k3.4/test/airprint/airprint.convs -P /opt/share/cups/mime/ "/opt/share/cups/mime/airprint.types" # # "$Id: $" # # AirPrint type image/urf urf string(0,UNIRAST<00>) # # End of "$Id: $". # wget http://bin.entware.net/mipselsf-k3.4/test/airprint/airprint.types -P /opt/share/cups/mime/ 7. забрать генератор (curl/wget/копипаста) https://raw.github.com/tjfontaine/airprint-generate/master/airprint-generate.py или wget http://bin.entware.net/mipselsf-k3.4/test/airprint/airprint-generate.py 8. создать файл сервиса устройства для avahi python ./airprint-generate.py -d /opt/etc/avahi/services/ 9. перезапустить сервисы /opt/etc/init.d/S43avahi-daemon restart /opt/etc/init.d/S60cupsd restart 10. пытать ипон(ц)а --- из неявного: имя хоста должно быть с суффиксом .local Edited April 13 by TheBB url 2 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.