Announcement

Collapse
No announcement yet.

Anyone use DD-WRT? Need help with .ipk / .opk files

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Anyone use DD-WRT? Need help with .ipk / .opk files

    Hi,

    Hopefully, a few of you use DD-WRT on your routers (if you don't check it out here, it's really cool software).

    Recently, I had a stab at setting up /opt on a USB stick and was successful. My HP AIO printer/scanner is connected to the router via a USB data cable, and now any machine connected to the LAN can print wirelessly via the router.

    However, I can't get wireless scanning to work. I can scan if I plug the scanner into the laptop directly.

    A kind soul on the DD-WRT forums pointed out that the problem is the version of HPLIP. I need an .ipk (or .opk) of HPLIP > version 3.11.7 for the scanner to be supported, but 3.9.12 is the latest version in the repos.

    Based on information from here:
    Q. How similar is the ipk format, to the deb format? They look very similar; the data and control tar balls are identical as far as i can tell.

    A. Very similar. ipk files are basically deb files with documentation removed, and ipkg is even supposedly able to handle deb files. Opkg can install .deb packages directly, with no change. There may be issues with some packages, concerning preinst and postinst scripts
    A .deb file is available from here:
    http://ftp.uk.debian.org/debian/pool...13.8-1_all.deb

    I tried installing the .deb directly, but it didn't work.

    Any ideas on how to convert the .deb to an .ipk or .opk?

    If not, I'm interested in learning how these things work, so any info would be greatly appreciated.

    Feathers
    Last edited by Feathers McGraw; Sep 11, 2013, 11:47 PM.
    samhobbs.co.uk

    #2
    Originally posted by Feathers McGraw View Post
    but 3.9.12 is the latest version in the repos
    How old *buntu version are you using? Even Lucid 10.04 has 3.10.2 (and Precise 12.04 has 3.12.2) in the repos:
    https://launchpad.net/ubuntu/+source/hplip

    Comment


      #3
      Sorry that wasn't clear. My laptop has a new version of HPLIP. When the scanner is connected to the laptop directly, all is well with sane+HPLIP.

      My problem is with installing HPLIP on the router, which I'm using as a print/scan server.

      DD-WRT basically puts a Linux distribution inside a router. The repos for dd-wrt don't have a new enough version of HPLIP as an .ipk or .opk (the equivalent of .deb) that I can install.

      Feathers
      samhobbs.co.uk

      Comment


        #4
        However, I can't get wireless scanning to work. I can scan if I plug the router into the laptop directly.
        this makes no sence . do yo mean you can scan if you plug the printer into the laptop? if you on the network and you can scan it shouldn't matter what kind of connection you have.

        what errors did you get when you tried to install the deb file you linked above?
        Last edited by sithlord48; Sep 11, 2013, 07:29 PM.
        Mark Your Solved Issues [SOLVED]
        (top of thread: thread tools)

        Comment


          #5
          Originally posted by sithlord48 View Post
          do yo mean you can scan if you plug the printer into the laptop?
          Yep that's what I meant, have updated the OP. Thanks for pointing out the mistake.

          Code:
          Collected errors: 
           * satisfy_dependencies_for: Cannot satisfy the following dependencies for hplip-data: 
           *      xz-utils * 
           * opkg_install_cmd: Cannot install package hplip-data.
          I tried:
          Code:
          opkg list xz
          , which found the xz package, but when I installed it there was no change.

          I guess it's a different package with similar functionality (or the same package with a different name), but because the .deb is looking for xz-utils specifically it won't work.

          Feathers
          samhobbs.co.uk

          Comment


            #6
            Does hplip-data actually need xz-utils, or is it just compressed using xz compression?

            You could try rebuilding the package with your computer without xz-utils dependency and see if it'll install/work on the router:

            1. download the deb file to a directory, and cd into that directory
            2. make a subdirectory for the package: 'mkdir hplip-data_3.13.8-1_all'
            3. extract deb: 'dpkg-deb -x hplip-data_3.13.8-1_all.deb hplip-data_3.13.8-1_all'
            4. extract control: 'dpkg-deb -e hplip-data_3.13.8-1_all.deb hplip-data_3.13.8-1_all/DEBIAN'
            5. edit hplip-data_3.13.8-1_all/DEBIAN/control and remove xz-utils dependency on the "Depends:" line (alternatively you can change the dependency to "xz" if that is available and provides the same funtionality)
            6. install fakeroot if it's not installed 'sudo apt-get install fakeroot'
            7. rebuild package: 'fakeroot dpkg-deb -Z gzip -b hplip-data_3.13.8-1_all' (you may rename the original deb file prior to doing that)
            Last edited by kubicle; Sep 12, 2013, 01:37 AM.

            Comment


              #7
              Thanks for that, will try when I get home from work.

              Looks like a sensible option; I don’t see why HPLIP would need to compress/decompress files & folders once it is installed. I remember looking inside the .deb file and the contents were all compressed, so that’s probably it.

              One more thing to check is whether or not the .deb file contains everything I need - the only .deb file I could find was HPLIP-data. Do you think this is the whole lot, or are there other HPLIP .deb packages that contain the rest of the program? The HPLIP website pushes you to download an installer (not .deb), I remember rummaging for a while before I turned up that .deb file.

              Feathers
              samhobbs.co.uk

              Comment


                #8
                Well...

                There's good news and bad news.

                Good news is the .deb file installed without any errors! (I changed the control file to have xz as a dependency instead of xz-utils)

                Code:
                root@Turbo-Hub /opt $ opkg update
                Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/Packages.gz.
                Updated list of available packages in /opt/tmp/var/opkg-lists/snapshots.
                root@Turbo-Hub /opt $ opkg install hplip.deb
                Installing hplip-data (3.13.8-1) to root...
                Installing python (2.7.3-2) to root...
                Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/python_2.7.3-2_ar71xx.ipk.
                Installing libffi (3.0.11-1) to root...
                Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/libffi_3.0.11-1_ar71xx.ipk.
                Installing python-mini (2.7.3-2) to root...
                Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/python-mini_2.7.3-2_ar71xx.ipk.
                Configuring libffi.
                Configuring python-mini.
                Configuring python.
                Configuring hplip-data.
                Bad news is I still can't detect the printer properly.

                Code:
                root@Turbo-Hub root $ sane-find-scanner
                
                  # sane-find-scanner will now attempt to detect your scanner. If the
                  # result is different from what you expected, first make sure your
                  # scanner is powered up and properly connected to your computer.
                
                  # No SCSI scanners found. If you expected something different, make sure that
                  # you have loaded a kernel SCSI driver for your SCSI adapter.
                  # Also you need support for SCSI Generic (sg) in your operating system.
                  # If using Linux, try "modprobe sg".
                
                found USB scanner (vendor=0x03f0 [HP], product=0xa011 [Deskjet 3050A J611 series]) at libusb:001:003
                  # Your USB scanner was (probably) detected. It may or may not be supported by
                  # SANE. Try scanimage -L and read the backend's manpage.
                
                  # Not checking for parallel port scanners.
                
                  # Most Scanners connected to the parallel port or other proprietary ports
                  # can't be detected by this program.
                root@Turbo-Hub root $ scanimage -L
                
                No scanners were identified. If you were expecting something different,
                check that the scanner is plugged in, turned on and detected by the
                sane-find-scanner tool (if appropriate). Please read the documentation
                which came with this software (README, FAQ, manpages).
                Not really sure where to go from here!

                Feathers
                samhobbs.co.uk

                Comment


                  #9
                  Just found this:

                  http://packages.debian.org/unstable/allpackages

                  There are several packages listed: hplip, hplip-cups, hplip-data, hplip-dbg, hplip-doc, hplip-gui, and hplip-ppds.

                  I guess the original .deb wasn't the whole thing, and I probably need plain old hplip.deb

                  Plan is to try it out with no modifications, see what breaks, and try to fix it like before. So now I'm choosing which one to install...

                  Code:
                  root@Turbo-Hub /etc $ cat /proc/cpuinfo
                  system type             : Atheros AR9344 rev 1.2 (0x2122)
                  processor               : 0
                  cpu model               : MIPS 74Kc V4.12
                  BogoMIPS                : 278.93
                  CPUClock                : 560
                  wait instruction        : yes
                  microsecond timers      : yes
                  tlb_entries             : 32
                  extra interrupt vector  : yes
                  hardware watchpoint     : yes, count: 4, address/irw mask: [0x0000, 0x0ff8, 0x0ff8, 0x0ff8]
                  ASEs implemented        : mips16
                  shadow register sets    : 1
                  kscratch registers      : 0
                  core                    : 0
                  VCED exceptions         : not available
                  VCEI exceptions         : not available
                  Based on the above, I'm going to go with MIPS...
                  samhobbs.co.uk

                  Comment


                    #10
                    Code:
                    root@Turbo-Hub /opt $ opkg install /opt/hplip_3.13.8-1_mips.deb
                    Package hplip version 3.13.8-1 has no valid architecture, ignoring.
                    Package hplip (3.9.12-4) installed in root is up to date.


                    Any ideas what's going on here?
                    samhobbs.co.uk

                    Comment


                      #11
                      Originally posted by Feathers McGraw View Post
                      Any ideas what's going on here?
                      You could try mipsel (does the router have dpkg, you could check architecture with 'dpkg --print-architecture'...or maybe opkg has similar options).

                      You might get more/better feedback on wrt forums.

                      Comment


                        #12
                        Yeah I tried the mipsel one too (and every other package, just in case - even the ones that obviously weren't going to work like hurd!)

                        As to the WRT forums, I tried there and didn't get any responses when I asked about installing .deb files with opkg.

                        Glad I asked here because a lot of you seem to have really good general Linux knowledge, which has helped me understand what's going on a lot more, even though I haven't actually solved the problem.

                        I may just have to wait until someone releases a new HPLIP .ipk, though I have no idea how long that will take!

                        Feathers
                        samhobbs.co.uk

                        Comment


                          #13
                          I had trouble with DD-WRT on my Netgear WNDR37AV, I use OpenWRT

                          Sent from my XT901 using Tapatalk 2
                          Registered Linux User 545823

                          Comment


                            #14
                            Originally posted by jpenguin View Post
                            I had trouble with DD-WRT on my Netgear WNDR37AV, I use OpenWRT

                            Sent from my XT901 using Tapatalk 2
                            I'm using OpenWRT packages for optware, so I'm not sure if that would make a difference for me.

                            .opk files are sourced from here:

                            http://downloads.openwrt.org/snapsho...r71xx/packages

                            So I still have the problem that the HPLIP.opk is an old version compared to the ones in the Ubuntu repos.

                            Feathers
                            samhobbs.co.uk

                            Comment


                              #15
                              Did you get a new version of hplip installed on your router?
                              I am trying to scan from a hp 6100 AIO connected to an ASUS router and it requires hplip 3.12.4.

                              Comment

                              Working...
                              X