NAS325v2 CUPS server next to oryginal firmware

Options

Hello,

I use an old NSA325v2 and it meet everything I need except CUPS Server. I tried to install cups and hplip from Entware-ng repository (plug in from Mijzelf) but I cannot obtain web interface and configure my server. hp-setup give error

"warning: python-dbus not installed.
error: Unable to locate models.dat file

HP Linux Imaging and Printing System (ver. 0.0.0)
Printer/Fax Setup Utility ver. 9.0

Copyright (c) 2001-15 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

(Note: Defaults for each question are maked with a '*'. Press to accept the default.)

Using connection type: usb
error: No device selected/specified or that supports this functionality."

What is the next steps? I have no problem with this on Ubuntu Server but here in linux embedded device it is problematic form me

All Replies

  • Mijzelf
    Mijzelf Posts: 2,645  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    Options

    error: Unable to locate models.dat file

    That sounds like a printer database. You can try to locate that file on your Ubuntu server (probably in /usr/share/cups/, or something like that) and put it in the corresponding subdirectory in /opt on your NAS. If that doesn't stop this error, use strace to find out where cups searches for this file.

    Using connection type: usb

    It is an USB printer, I suppose? I wonder if some usb driver is needed. When you plugin the printer in your Ubuntu box you can use 'lsusb -t' to find out which driver is in use, and compare that to the NAS. It is possible that you have to load extra kernel modules.

  • Adam85
    Adam85 Posts: 11
    First Comment
    edited November 2023
    Options

    I searched /usr/share/cups/ on ubuntu but there is no "models.dat" file. Moreover in NAS in corresponding place /usr/local/zy-pkgs/opt/share/cups I've only few direcory : data, drv, mime, templates, usb whereas on ubuntu is much more.

    Finally I found models.dat here : /usr/local/zy-pkgs/opt/usr/share/hplip/data/models/models.dat but hp-setup command doesn't see this file.

    Yes, the printer is connected to USB and works fine with built-in print server in NAS 325v2 but I'd like to use IPP Everywhere protocool that's why I'd like to install cups.

    I even don't know how to start, stop and even check status of cups every command I tried is not recognized. Thank you for help. Ican only use few command like :

    Usage: cupsd [options]
    Options:
    -c cupsd.conf Set cupsd.conf file to use.
    -f Run in the foreground.
    -F Run in the foreground but detach from console.
    -h Show this usage message.
    -s cups-files.conf Set cups-files.conf file to use.
    -t Test the configuration file.

  • Mijzelf
    Mijzelf Posts: 2,645  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    Options

    Finally I found models.dat here :
    /usr/local/zy-pkgs/opt/usr/share/hplip/data/models/models.dat but
    hp-setup command doesn't see this file.

    That file is clearly installed in entware. (/opt is a symlink to /usr/local/zy-pkgs/opt). Which hp-setup do you run? What does 'which hp-setup' output?

  • Adam85
    Adam85 Posts: 11
    First Comment
    Options

    it gives /opt/bin/hp-setup

  • Mijzelf
    Mijzelf Posts: 2,645  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    Options

    That is in the entware installation. So why didn't is find models.dat? You can use strace to find out where it searches.

  • Adam85
    Adam85 Posts: 11
    First Comment
    edited November 2023
    Options

    it is strange that hp-setup looking for models.dat in /home/shares/data/model/models.dat but it depends on current directory (home/shares).

    Models.dat is found when I type hp-setup in /opt/share/hplip


    admin@NSA325-v2:/usr/local/zy-pkgs/opt/share/hplip$ su
    Password:

    BusyBox v1.17.2 (2017-06-23 10:40:08 CST) built-in shell (ash)
    Enter 'help' for a list of built-in commands.

    root@NSA325-v2:/usr/local/zy-pkgs/opt/share/hplip# hp-setup -i
    warning: python-dbus not installed.

    HP Linux Imaging and Printing System (ver. 0.0.0)
    Printer/Fax Setup Utility ver. 9.0

    Copyright (c) 2001-15 HP Development Company, LP
    This software comes with ABSOLUTELY NO WARRANTY.
    This is free software, and you are welcome to distribute it
    under certain conditions. See COPYING file for more details.

    (Note: Defaults for each question are maked with a '*'. Press <enter> to accept the default.)

    Using connection type: usb

    Setting up device: hp:/usb/HP_LaserJet_P2015_Series?serial=00CNBW8144HG

    | PRINT QUEUE SETUP |

    Please enter a name for this print queue (m=use model name:'HP_LaserJet_P2015'*, q=quit) ?
    Using queue name: HP_LaserJet_P2015
    Locating PPD file... Please wait.
    Traceback (most recent call last):
    File "/opt/bin/hp-setup", line 514, in <module>
    print_ppd = cups.getPPDFile2(mq, default_model, ppds)
    File "/usr/local/zy-pkgs/opt/share/hplip/prnt/cups.py", line 491, in getPPDFile2
    family_check=isfamilydrv(ppds)
    File "/usr/local/zy-pkgs/opt/share/hplip/prnt/cups.py", line 195, in isfamilydrv
    file_conf = open(filename_config,'r')
    IOError: [Errno 2] No such file or directory: '/etc/hp/hplip.conf'
    root@NSA325-v2:/usr/local/zy-pkgs/opt/share/hplip#

  • Mijzelf
    Mijzelf Posts: 2,645  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    Options

    it is strange that hp-setup looking for models.dat in
    /home/shares/data/model/models.dat but it depends on current directory
    (home/shares).

    Models.dat is found when I type hp-setup in /opt/share/hplip

    IOError: [Errno 2] No such file or directory: '/etc/hp/hplip.conf'

    Maybe it's not that strange. A quick google gave me https://github.com/rfabbri/hplip/blob/master/hplip.conf , a sample hplip.conf, and the directory containing models.dat is specified in that file. Maybe a bug in the hplip package. It shouldn't search in /etc. Does /opt/etc/hp/hplip.conf exist?

  • Adam85
    Adam85 Posts: 11
    First Comment
    edited November 2023
    Options

    Yes in /opt/etc/hp the configuration file exist but in /etc/hp also

    Now it looks like it works better because It recognize printer and even I can add PPD file but in the end it require a username and password but nothing is correct even when i create ‚lp’ and ‚lpadmin’ Group and add a proper username including root.

  • Mijzelf
    Mijzelf Posts: 2,645  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    Options

    Is the content of both configuration files the same? I wonder if the file /opt/etc/hp/hplip.conf is used by hplip, while hp-setup /creates/ /etc/hp/hplip.conf due to an package configuration error.

  • Adam85
    Adam85 Posts: 11
    First Comment
    edited November 2023
    Options

    Yes in /opt/etc/hp and in /etc/hp the configuration file looks the same → 980 bytes. Mayby delete a etc/hp and leave only one version. Is there any way to fix it or better give up and think about other solutions like Debian or openwrt in the future

Consumer Product Help Center