DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

#1 2011-05-31 18:00:30

bellofresco
Member
Registered: 2011-05-30
Posts: 29

lsb sdk for ffp

Here I am again....

as I said in my other topic, I wish to use my Zyxel NSA-221 as a printer server.
Unlikely this nas doesn't support my printer that is a Canon MP830, also because there are not "official" linux drivers for it.

So, browsing the web, I found the www.openprinting.org where at this page

http://www.openprinting.org/printer/Can … PASS-MP830

I could find Gutenprint linux drivers for the Canon MP830.

But these drivers need that a compliant lsb linux version is installed. So I wish to install the lsb (sdk I suppose) package on my ffp
to be able then to install these drivers and make my printer work.

I tried to download and install the

lsb-sdk-4.1.1-1.ia32

after unzipping the tar.gz file and launching the install.sh script.

I read inside it (install.sh) that this script check if the system is a Debian or anotehr type, otherwise it exit telling you it is not possible to install lsb environment.
Here is the script install.sh:







#!/bin/sh

# Generic installer for LSB developer kits.
# Copyright 2006, 2007 The Linux Foundation.
# Written by Jeff Licquia <licquia@freestandards.org>

# This script automates some of the steps in getting a LSB environment
# installed.  It's intended to be shipped within a tarball as the
# install procedure for the pieces within the tarball.  Basically,
# this script reads a configuration file containing the list of
# packages to install, looks for those packages in the current
# directory, determines how to install them, and installs them.
#
# The tricky part is figuring out how to install LSB packages.
# Basically, this script uses the following algorithm:
#
# If the system has /etc/debian_version and the dpkg and alien
# binaries in the PATH, it's Debian (or a derivative), and we should
# use alien.  Otherwise, if the system has rpm in the PATH, then it's
# a RPM-based distribution, and we should just use rpm.  Otherwise,
# freak out, because we don't know how to install LSB packages.

# First, source our configuration.

if [ \! -e ./inst-config ]; then
    echo "error: could not find configuration" >&2
    exit 1
fi

. ./inst-config

# Sanity-check the configuration.

for pkg in ${PACKAGES}; do
    if [ \! -e ${pkg} ]; then
    echo "error: package ${pkg} missing" >&2
    exit 1
    fi
done

# Now figure out what kind of system we're running.

if [ -f /etc/debian_version ]; then
    # Debian
    cat <<EOF

This system appears to be a variant of Debian GNU/Linux, such as
Debian itself, Ubuntu, MEPIS, Xandros, Linspire, etc.

EOF
    RPM_INSTALL_CMD="alien -ick"
    which alien 2>&1 > /dev/null
    if [ $? -ne 0 ]; then
    cat >&2 <<EOF
However, the alien package (which is necessary to install LSB packages
on Debian-based systems) is not currently installed.  This is likely a
more serious problem, in that alien is required for your system to be
LSB-compliant.  You should install the "lsb" package, and try running
this script again.
EOF
    exit 3
    fi
else
    which rpm 2>&1 > /dev/null
    if [ $? -eq 0 ]; then
    # RPM-based distro
    cat <<EOF

This system appears to be a RPM-based distribution, such as those from
Red Hat, SuSE/Novell, Mandriva, Asianux, etc.

EOF
    RPM_INSTALL_CMD="rpm --quiet --nodeps --replacepkgs -i"
    else
    # Something else
    cat >&2 <<EOF

I cannot determine how to install LSB packages on your system.  You
may have luck unpacking the packages in this directory manually, using
tools such as rpm2cpio, but there is no guarantee that the packages
will work for their intended purpose.  If you think your system should
be able to install LSB packages, please contact the Free Standards
Group.
EOF
    exit 3
    fi
fi

# Now that we've printed what we think, check to make sure we're
# right.

echo -n "Is this correct? "
read answer
answer=`echo ${answer} | cut -c1`
if [ "${answer}" '!=' "y" -a "${answer}" '!=' "Y" ]; then
    exit 4
fi
echo

# Figure out how to get root if we need to.

if [ `id -u` -ne 0 ]; then
    cat <<EOF
In order to install these packages, you need administrator
privileges.  You are currently running this script as an unprivileged
user.

EOF

    SU_CMD="su root -c"
    which sudo 2>&1 > /dev/null
    if [ $? -eq 0 ]; then
    echo -n "You have sudo available.  Should I use it? "
    read answer
    answer=`echo ${answer} | cut -c1`
    if [ "${answer}" = "y" -o "${answer}" = "Y" ]; then
        SU_CMD="sudo /bin/sh -c"
    fi
    echo
    fi

    cat <<EOF
Using the command "${SU_CMD}" to gain root access.  Please type the
appropriate password if prompted.

EOF
else
    SU_CMD="/bin/sh -c"
fi

# Install the LSB packages.

echo "Installing packages..."
rm -f error-log.txt >/dev/null 2>&1
touch error-log.txt >/dev/null 2>&1
${SU_CMD} "${RPM_INSTALL_CMD} ${PACKAGES} 2>error-log.txt"

INSTALL_STATUS=$?
if [ -s error-log.txt ]; then
    cat <<EOF
There may have been problems with the package installation.  Check
error-log.txt for more information.
EOF
elif [ $INSTALL_STATUS -ne 0 ]; then
    cat <<EOF

The command "${SU_CMD} ..." failed.

EOF
else
    if [ -x ./post-install.sh ]; then
    ./post-install.sh
    fi
fi




and here is the install-config (where no path is set, but only the package names to be installed):





PACKAGES="lsb-build-base-4.1.4-1.i486.rpm \
lsb-build-c++-4.1.1-1.i486.rpm \
lsb-build-cc-4.1.4-1.i486.rpm \
lsb-build-desktop-4.1.4-1.i486.rpm \
lsb-build-qt3-4.1.0-1.i486.rpm \
lsb-build-qt4-4.1.0-1.i486.rpm \
lsb-makelsbpkg-4.1.0-2.i486.rpm \
lsb-runner-4.1.0-1.i486.rpm \
lsb-setup-4.1.0-1.noarch.rpm \
lsb-task-sdk-4.1.1-1.noarch.rpm \
lsb-xdg-utils-4.0.0-2.i486.rpm \
"



Now, my guess is: is the structure of ffp more similar to the debian one or more similar to a RPM-based distribution?
Is it possible to modify this script to make it work? It seems not to be very hard to edit, but I wouldn't know what to change....


maybe this line



which rpm 2>&1 > /dev/null



with something like



which rpm 2>&1 > /ffp/dev/null


after having created a symlink to the existing /mnt/dev/ directory?


can someone explain me what is the meaning of this instruction:

which rpm 2>&1 > /dev/null

???

thanks

Offline

 

#2 2011-05-31 20:34:50

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: lsb sdk for ffp

If LSB means "Linux Standard Base", forget it. ffp is different.

Offline

 

#3 2011-05-31 21:09:00

bellofresco
Member
Registered: 2011-05-30
Posts: 29

Re: lsb sdk for ffp

yes, I intended Linux Standard Base....:-(

you think there is no way to do it?

Offline

 

#4 2011-05-31 21:12:39

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: lsb sdk for ffp

if you create the chroot as in http://nas-tweaks.net/106/compiling-sof … fun_plug/, you can add all the links needed to make it look like lsb.
not sure, if it's worth the effort, though.

Offline

 

#5 2011-05-31 21:17:07

bellofresco
Member
Registered: 2011-05-30
Posts: 29

Re: lsb sdk for ffp

what do you mean with all the links? Once I have chrooted, should I be able to run the install.sh script? With wich version? Debian or rpm one? Thank you very much

Offline

 

#6 2011-05-31 21:35:20

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: lsb sdk for ffp

I don't think you can run the install.sh script. I think you need to "make it look like LSB" youself, manually.

Offline

 

#7 2011-05-31 22:11:13

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 688

Re: lsb sdk for ffp

The drivers you pointed to are binaries for the x86 platform. That won't work on your Arm. The sources can be found here (the .tar.bz2 file), and when you scroll down you can see what should be installed to get it working: CUPS (version 1.1.15 or above) or Foomatic (2.0 or above). I have no idea if that is problematic.
I also don't know if Samba will automagically recognize and share this printer, when Gutenprint and CUPS are loaded and configured.

Offline

 

#8 2011-05-31 23:36:03

bellofresco
Member
Registered: 2011-05-30
Posts: 29

Re: lsb sdk for ffp

Thank you again, but at the end of this page

http://www.openprinting.org/printer/Can … PASS-MP830

I read (written very little)....(How to install). This is a link to this page:

http://www.linuxfoundation.org/collabor … erpackages

where the first section tells about the need for LSB environment for these kind of drivers.
maybe I'm wrong (I hope so!), but following this link I think LSB is necessary to install this drivers.

Then it is also necessary cups and samba, but I think these are easier stuffs....


tomorrow I will try to follow the advise of fonz (I really need print), trying "make it look like LSB" by myself even if I think install.sh should install something, or does it just copy?
I subscribed to the LSB project to get help about. I will update if any progress comes

Offline

 

#9 2011-05-31 23:46:43

bellofresco
Member
Registered: 2011-05-30
Posts: 29

Re: lsb sdk for ffp

yes, after a quick reading of gutenprint manual, I don't read anywhere to install LSB environment. Tomorrow I will first try to install directly gutenprint drivers...

Offline

 

#10 2011-06-02 13:37:44

bellofresco
Member
Registered: 2011-05-30
Posts: 29

Re: lsb sdk for ffp

After some problems (yesterday when come back home I couldn'reach anymore my nas through ssh, so I reformatted the usb pen and installed again ffp), I'm trying to install the gutenprint drivers.
I have discovered that on nas NSA-221 cups is installed (version 1.1.2.3 - maybe I will try also to upgrade it as the new stable version is abou 1.4). Furthermore I have discovered that /ffp/etc/original/ folder is the same that the nas creates natively, that is reachable also from /tmp/etc.
I wanted to try to install gutenprint, as after reading the readme file, it seemed I was in the right requirements conditions.
I tried to compiling it rom the file Mijzelf linked. I extrcted them and launched the ./configure (first time only this, second time trying to add --prefix=/ffp).

Both times I got:


root@nas:/i-data/129b5666/photo/guten/gutenprint-5.2.7# ./configure
checking for a BSD-compatible install... /ffp/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... scripts/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... no
checking how to create a ustar tar archive... plaintar
checking build system type... armv5tejl-unknown-linux-gnueabi
checking host system type... armv5tejl-unknown-linux-gnueabi
checking for style of include used by make... none
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/mnt/HD_a2/photo/guten/gutenprint-5.2.7':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.


So I'm guessing: have I to install a C compiler? In the affirmative, could someone tell me which one is good, and/or maybe also packaged for ffp?
Thanks

Offline

 

#11 2011-06-02 15:16:09

bellofresco
Member
Registered: 2011-05-30
Posts: 29

Re: lsb sdk for ffp

....I'm experiencing again the same problem of yesterday.
I exit the putty session and when open again I can't connect to the nas:

I first have a message like:

server closed connection

If I restart the nas I get:

Connection refused


.....????????

Offline

 

#12 2011-06-02 16:44:37

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 688

Re: lsb sdk for ffp

Yes you'll have to install gcc, automake, autoconf, make and binutils (and maybe more) from fonz' repository.

bellofresco wrote:

....I'm experiencing again the same problem of yesterday.
I exit the putty session and when open again I can't connect to the nas:

I first have a message like:

server closed connection

If I restart the nas I get:

Connection refused

Can you post your ffpboot.log (especially the last part, where FFP is started?)

Offline

 

#13 2011-06-02 17:32:37

bellofresco
Member
Registered: 2011-05-30
Posts: 29

Re: lsb sdk for ffp

I was going to copy it through explorer, as I can't access via ssh, but I didn't find the USB mass storage that previously was shown as network resource, being it connected to the nas, but it isn't shown anymore. So I opened the Zyxel manager and also there, in the section "volume" it is no more where before was...

The usb adapter is new (bought when I started to deal with ffp, the same day I began to post here) and is connected to the nas and its light is on....

so I can't post the log as it is on the usb drive....I will try again to turn off the nas, disconnect and reconnect the drive and turn on the nas.
Yesterday I already did this, but without luck. I don't think the usb pen is faulty as when I connect it to my pc it has been recognized, I can format it, etc....

The only thing I have noticed, as it is a very small usb drive (it is a micro 4gb pen, more little than the its own usb connector) it is really hot.
I don't know if this can cause some problem.

Another thing is that when I try to connect via putty, if I addrees the connection to an inexisting server, the connection stop for time out, while if I address the connection
to the "ffp server" it answers me as I said above...maybe if the drive fails the kernel doesn't find anymore the ssh files? But shouldn't they be loaded on the ram of nas?

Offline

 

#14 2011-06-02 17:50:46

bellofresco
Member
Registered: 2011-05-30
Posts: 29

Re: lsb sdk for ffp

i did this:

I have disconnected and reconnected the usb pen without turning off the nas.

Now the nas recognize again the usb pen and I could access to ffpboot.log. SSH has still the problem....
The log is here:


Some logfile administration...
mv /mnt/parnerkey/ffpboot.log.1.gz /mnt/parnerkey/ffpboot.log.2.gz
cat /mnt/parnerkey/ffpboot.log | gzip -c >/mnt/parnerkey/ffpboot.log.1.gz
Script usb_key_func.sh version 20101109 running from /mnt/parnerkey
ffpstick started at Thu Jun 2 10:55:58 GMT 2011
Try to determine NAS type...
Type NSA221, fw V4.10(AFM.0)
Find the current usb device...
Current usb device is /dev/sdb1
No after_booting.sh in the root of the ffpstick found
This is not the first run, or FFP is supposed to run from a different place
Copy myself to /tmp...
And execute...
/tmp/usb_key_func.sh background_polling /dev/sdb1 NSA221 "V4.10(AFM.0)" &
Script usb_key_func.sh version 20101109 running from /tmp
Wait for the stick to be mounted again by the firmware...
Probe all mount points 000 seconds...
probe /proc/bus/usb...
probe /dev/pts...
probe /zyxel/mnt/info...
probe /zyxel/mnt/NAND...
probe /zyxel/mnt/sysdisk...
probe /usr/local/etc...
probe /usr/local/var...
probe /usr/local/dmsf...
probe /etc/zyxel...
probe /i-data/129b5666...
probe /e-data/4DE6-9C72...
found ffpstick on /e-data/4DE6-9C72, moving logfile
No /anymountpoint/ffproot/after_booting.sh found
Probe all mount points 010 seconds...
probe /proc/bus/usb...
probe /dev/pts...
probe /zyxel/mnt/info...
probe /zyxel/mnt/NAND...
probe /zyxel/mnt/sysdisk...
probe /usr/local/etc...
probe /usr/local/var...
probe /usr/local/dmsf...
probe /etc/zyxel...
probe /i-data/129b5666...
probe /e-data/4DE6-9C72...
probe /e-data/25184e13-e555-4738-ba15-126d7732ae5b...
found ffproot on /e-data/25184e13-e555-4738-ba15-126d7732ae5b/ffproot
probe /usr/local/zy-pkgs...
probe /etc/zyxel/zy-pkgs...
Starting /e-data/25184e13-e555-4738-ba15-126d7732ae5b/ffproot/after_booting.sh version 20110323 at Thu Jun 2 12:56:47 CEST 2011...
mount: mount point sys does not exist
Will chroot ffp on /e-data/25184e13-e555-4738-ba15-126d7732ae5b/ffproot
* /ffp/start/syslogd.sh inactive
* /ffp/start/SERVERS.sh inactive
* /ffp/start/portmap.sh inactive
* /ffp/start/unfsd.sh inactive
* /ffp/start/nfsd.sh inactive
* /ffp/start/ntpd.sh inactive
* /ffp/start/LOGIN.sh inactive
* /ffp/start/telnetd.sh inactive
* /ffp/start/sshd.sh ...
Starting /ffp/sbin/sshd
* /ffp/start/rsyncd.sh inactive
* /ffp/start/mediatomb.sh inactive
* /ffp/start/kickwebs.sh inactive
* /ffp/start/lighttpd.sh inactive
* /ffp/start/inetd.sh inactive



Than I have rebooted the nas through its native web interface:

new ffboot.log:


Some logfile administration...
mv /mnt/parnerkey/ffpboot.log.2.gz /mnt/parnerkey/ffpboot.log.3.gz
mv /mnt/parnerkey/ffpboot.log.1.gz /mnt/parnerkey/ffpboot.log.2.gz
cat /mnt/parnerkey/ffpboot.log | gzip -c >/mnt/parnerkey/ffpboot.log.1.gz
Script usb_key_func.sh version 20101109 running from /mnt/parnerkey
ffpstick started at Thu Jun 2 15:40:56 GMT 2011
Try to determine NAS type...
Type NSA221, fw V4.10(AFM.0)
Find the current usb device...
Current usb device is /dev/sdb1
No after_booting.sh in the root of the ffpstick found
This is not the first run, or FFP is supposed to run from a different place
Copy myself to /tmp...
And execute...
/tmp/usb_key_func.sh background_polling /dev/sdb1 NSA221 "V4.10(AFM.0)" &
Script usb_key_func.sh version 20101109 running from /tmp
Wait for the stick to be mounted again by the firmware...
Probe all mount points 000 seconds...
probe /proc/bus/usb...
probe /dev/pts...
probe /zyxel/mnt/info...
probe /zyxel/mnt/NAND...
probe /zyxel/mnt/sysdisk...
probe /usr/local/etc...
probe /usr/local/var...
probe /usr/local/dmsf...
probe /etc/zyxel...
probe /i-data/129b5666...
probe /e-data/4DE6-9C72...
found ffpstick on /e-data/4DE6-9C72, moving logfile
No /anymountpoint/ffproot/after_booting.sh found
Probe all mount points 010 seconds...
probe /proc/bus/usb...
probe /dev/pts...
probe /zyxel/mnt/info...
probe /zyxel/mnt/NAND...
probe /zyxel/mnt/sysdisk...
probe /usr/local/etc...
probe /usr/local/var...
probe /usr/local/dmsf...
probe /etc/zyxel...
probe /i-data/129b5666...
probe /e-data/4DE6-9C72...
probe /e-data/25184e13-e555-4738-ba15-126d7732ae5b...
found ffproot on /e-data/25184e13-e555-4738-ba15-126d7732ae5b/ffproot
probe /usr/local/zy-pkgs...
probe /etc/zyxel/zy-pkgs...
probe /usr/local/apache/htdocs/zyxel/pkg...
probe /usr/local/apache/web_framework/data/cache...
probe /usr/local/apache/web_framework/data/config...
Starting /e-data/25184e13-e555-4738-ba15-126d7732ae5b/ffproot/after_booting.sh version 20110323 at Thu Jun 2 17:41:46 CEST 2011...
mount: mount point sys does not exist
Will chroot ffp on /e-data/25184e13-e555-4738-ba15-126d7732ae5b/ffproot
* /ffp/start/syslogd.sh inactive
* /ffp/start/SERVERS.sh inactive
* /ffp/start/portmap.sh inactive
* /ffp/start/unfsd.sh inactive
* /ffp/start/nfsd.sh inactive
* /ffp/start/ntpd.sh inactive
* /ffp/start/LOGIN.sh inactive
* /ffp/start/telnetd.sh inactive
* /ffp/start/sshd.sh ...
Starting /ffp/sbin/sshd
* /ffp/start/rsyncd.sh inactive
* /ffp/start/mediatomb.sh inactive
* /ffp/start/kickwebs.sh inactive
* /ffp/start/lighttpd.sh inactive
* /ffp/start/inetd.sh inactive



Now ssh works, but......

it doesn't accept my login and password (sure to have written correct).
It doesn't also accept the standard login when the ffp is just installed, i.e.

root   root


????

Offline

 

#15 2011-06-03 21:22:00

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 688

Re: lsb sdk for ffp

Those logfiles look perfectly normal. I don't see any reason why SSH shouldn't work anymore. Do you have the possibility to try another stick?

Offline

 

#16 2011-06-06 15:26:10

bellofresco
Member
Registered: 2011-05-30
Posts: 29

Re: lsb sdk for ffp

After days of full working on NAs, past days I couldn't do a lot.

Last update is that for now I have no more problem using ssh, but when I try to open the administration utility of Zyxel on my browser, it can't open.
better, it opens but can't load its javascript services. I think I could have deleted, or removed some file....

It happened also when, I don't know how I did it, I corrupted in some way the cups.conf file.
Cups is native running as a Zyxel service. I downloaded from cups website the same version and re-put the cups-conf file in its location and that time the web utility of Zyxel
went back working.

In past days I succeeded in compiling the gutenprint package and tried also to compile the 1.4.6 cups also.
But when the source was being compiled, during or after the make issue (I'm referring to the make issue done inside the process started with the "sh Make.sh -package.tgz") it came out with a FATAL ERROR.
After this operation, if I asked the system which version of cups was running, I expected it gave me still the 1.2.x that is the one installed by tha Zyxel nas, but it returned the 1.4.6 as it was in some way installed the new version.....I really don't know why this happened (for sure I did some error).
Now if I try to restart cups it gives me an error and tells that it is unable to restart "Scheduler".

So I would like to uninstall every thing about cups and try to reinstall it (the update version). Now the problem is that, after reading a little of cups readme,it expects to find a
typical linux environment.
Now I don't know (as I told I'm a beginner in linux) if once passed the prefix "/ffp" everything else in the /ffp is similar to a typical linux installation or not.
Furthermore now I have some files of cups in several directory (found through the command "find / -name cups"). If I want to uninstall cups is it sufficient to delete all of them?

Last thing is that I couldn't find anymore informations about the LSB environment. I tell this as the initial topic was about LSB and ffp.
I haven't still understand if it is possible to install it and in the affirmative, what has to be installed. I found on lsb website several things and I thought the most reasonable one was the sdk. I think it is something like net framework in Microsoft. But on some forums I found people that told about lsb printer modules, or other modules to be installed through the package manager.
So first I don't still know what I would have to try to install, and, as fonz suggested to me above, if it is possible.

For the moment my printer doesn't work, and I'm guessing if all these things are necessary to make it work or not.
I try to explain.
I wish to use the nas as a print server, i.e. for me it would be sufficient it worked as a network port. So I don't know if it really needs drivers, as it were so, it means that it is the nas that prints. But I would like to print from my win xp workstation and I have drivers installed.

I also could find my printer as a shared one on the ip address of nas and could correctly connect to it and install a drivers on my workstation, but it didn't work. it crashes.
I'm guessing this, i.e., how it is the process of spooling from my workstation to the nas, so to understand if the nas really needs these drivers, because before using the Zyxel one
I used a small nas device (i.e. a little box where I could connect an usb drive and the printer). With this device I was able to print. It gave me just the problem that when the
pc was restarted, the printer went offline and I had to delete and reinstall it.
But this little nas connected my printer as it was on a network port. And I don't think it implemented gutenprint drivers...I don't know, it is possible that was a total different device, but it implements some feautures like this Zyxel nas, as bittorrent download, network file sharing, ftp server, etc...

I tried also to start this device with the ffp sticker so to try to see how its printer usb port was configured but without success. Telnet didn't start and I noticed that the ffp sticker was neither formatted as when it correctly starts.....

Offline

 

#17 2011-06-06 21:46:10

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 688

Re: lsb sdk for ffp

You've been busy.

First, as far as I know, the 221 will rebuild it's firmware filesystem on a factory reset. (There is a big compressed file in flashrom, which contains the main part of the filesystem).

FFP runs in a chrooted environment. This makes is a bit spooky to interact with the firmware. For instance, you cannot restart the firmware samba from within FFP. When you would do so, samba runs in the same chroot, and cannot find all it's files. Maybe this is also the problem you are facing when restarting cups.
When you have to do things in the firmware environment, you can try the backdoor.

I don't think you have to bother about LSB. LSB is only mentioned in the page with the pre-compiled gutenprint packages. The readme provided with the sources only mentions CUPS and/or Foomatic as requirement.

Some USB printers doesn't contain their own firmware, the USB driver is responsible for uploading the firmware on boot. In that case you'll definitely need some special drivers on the USB host. But your printer worked on some other NAS, so I suppose this is not the case on your box. Maybe you are searching for 'raw printing'. In that case the printserver is only a hatch, and doesn't need it's own drivers. Have a google on 'samba raw printing'

Am I correct that you tried to use your FFP stick on some other NAS? That is not supposed to work. The FFP stick is ZyXEL only. When you tell what kind of NAS it is, then maybe I know a way to get root access to it. (BTW, why did you exchange it?)

Offline

 

#18 2011-06-08 17:54:23

bellofresco
Member
Registered: 2011-05-30
Posts: 29

Re: lsb sdk for ffp

From time to time I have also to work....;-)

Anyway I tried to follow some tutorial about raw printing through cups and samba and I have noticed that configuration files of the Zyxel are natively configured
for this kind of service.
Unlikely, I can't print. I tried to set everything also in drivers of my printer trying to not spool and send the print process directly to the printer.
No luck.
I tried to use both configuration in the ip port settings, either as raw either as lpr (to print with the other nas, that is a mrt-communication r-104 - http://www.mrt-communication.com/NAS-R104.htm - I had to use the lpr more queue name setting. Yes, I tried to start ffp in it!!! ;-))) ), but without success.

Before surrendering and buying a dedicated mfp print server (but I suppose these kinds of devices are always linux boxes....so a way to make my nas work maybe exists...) I wish to be able to reinstall cups.

So I tried to reach the backup port but also following what written in that wiki article Mijelf linked, I couldn't reach it. The browser turns into a totally white page and stops.

My idea would be, as I discovered in the /tmp/etc/init.d directory (that comes from zyxel, as all the applications of zyxel are there) the script that make start cups when the nas starts, to edit this script and to make it point/link the cups binary I would install via ffp. But for the moment I haven't still been able to compile the cups 1.4.6 package for fonz...

Offline

 

#19 2011-06-09 11:04:08

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 688

Re: lsb sdk for ffp

When you connect your printer, do you see anything in dmesg? Have you tried another USB port (and especially the port for UPS)? The reason for this question is: the SoC (Oxnas 810) has 1 USB 2.0 port, and 2 1.1 ports. The 2.0 port is not downwards compatible, so a plugged in 1.1 device won't even be noticed. So *if* your printer is an USB 1.1 device, it might not be seen, when using the wrong port. (Some other guy had problems to get an UPS working on an Oxnas device. Using an USB 2.0 hub solved his problem.)

Nice little box, that r104. And no, I don't know how to get a shell.

Before surrendering and buying a dedicated mfp print server (but I suppose these kinds of devices are always linux boxes....so a way to make my nas work maybe exists...)

And what is the fun in that? wink
BTW, I've downloaded several firmwares for dedicated printservers, and they didn't run Linux. The firmware is way to small. (Only a few hundreds kB)

So I tried to reach the backup port but also following what written in that wiki article Mijelf linked, I couldn't reach it. The browser turns into a totally white page and stops.

So it does *something*. Have you tried on a cleanly booted system (without FFP stick)? Maybe FFP somehow interferes with the backdoor. That should be solved.

My idea would be, as I discovered in the /tmp/etc/init.d directory (that comes from zyxel, as all the applications of zyxel are there) the script that make start cups when the nas starts, to edit this script and to make it point/link the cups binary I would install via ffp.

That is the same directory as /etc/original/init.d. (/etc/original is the firmware /etc)
When you have a look in the after_booting.sh, then you see a line 'chroot ...' This is where ffp is started. You can add your own lines below, which will be executed in firmware space.
(BTW, maybe you could start a login-less backdoor here, by adding the line

Code:

telnetd -l /bin/sh &

)

Offline

 

#20 2011-06-15 14:16:13

bellofresco
Member
Registered: 2011-05-30
Posts: 29

Re: lsb sdk for ffp

I have tried to reach the backdoor, after extracting the usb pen with ffp and rebooting the nas, but without success.

I also checked my printer usb version and it is a 2.0. Yesterday, anyway, I tried, after a clean reboot without the ffp, to connect the printer using the usb port on the front of the nas, before one of the two ones on its back.
I reconnected the printer and reinstalled its drivers on my XP workstation and...it printed the test page and another one I needed. Well, I was almost happy (as I had to connect the printer on the front, while I preferred on back) and thought I could disconnect the old nas (rs-104). Today I had to print again, but...nothing to do...again no printing.
I disconnected the printer, rebooted the nas and reconnected the printer, but no luck.....
I really don't know where the problem is, I also thought it could be related to the speed of network as I work on a wireless g, so I connected my workstation to the router/switch with a ethernet cable...same result...

So I would really like to be able to have cups compiled and installed on my ffp and try what I wrote in previous message, but I can't compile cups....furthermore I read that it needs some library (jpeg, png, tiff and zlib). I saw that ffp provides all but not the tiff one. So I tried to compile also those but I get always the FATAL error that tells me the /ffp directory is not found in /mnt/HD_a2/ffpbuildenv/work/tiff-3.4/pkg/ path (and yes, it isn't there....)

Today, lookink on the web to see if someone other tried to compile cups for ffp I found this:

http://forum.dsmg600.info/viewtopic.php?pid=10825

and following it also this:

http://wiki.dns323.info/howto:chroot_debian,

I know it is for a different nas, but I was wondering if it would be possible to install also on a zyxel, through the ffp, a debian image, so to be able to
install applications I would need in a easier way (through apt get).

I would have still the problem that some services would be double, as cups or samba on the native zyxel firmware, but I think it would be possible as Mijzelf suggested to edit the after_booting.sh and stop the original ones and start my (updated) ones.... 
This scenario would be perfect for me also because I discovered that my ISP blocks my 445 port that I wanted to use with CIFS services to reach my files from anywhere, and I cannot do this. So I should find another way, maybe a vpn...

Offline

 

#21 2011-06-15 14:33:24

bellofresco
Member
Registered: 2011-05-30
Posts: 29

Re: lsb sdk for ffp

I found also this...I think I will do a try...

http://forum.dsmg600.info/viewtopic.php?pid=10825

Offline

 

#22 2011-06-15 19:27:37

bellofresco
Member
Registered: 2011-05-30
Posts: 29

Re: lsb sdk for ffp

i can't try what before as Canon (at least Canon Italia) doesn't provide any firmware (neither the actual neither an upgrade) for inkjet printers...

I'm still interested in understanding if it is possible to put a more typical debian system on the nas, so to install new software through the apt get command...

Offline

 

#23 2011-06-15 20:30:01

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 688

Re: lsb sdk for ffp

bellofresco wrote:

I know it is for a different nas, but I was wondering if it would be possible to install also on a zyxel, through the ffp, a debian image.

Unfortunaletly not. At least not Lenny or Squeeze. They need an EABI compatible kernel, an no zyxel nas has that. (For simplicity all zyxel kernels are compiled using the same compiler (MontaVista 3.4.3-25.0.70.0501961 2005-12-18) which doesn't support EABI). Maybe Etch will run, but that's a bit outdated.

because I discovered that my ISP blocks my 445 port that I wanted to use with CIFS services to reach my files from anywhere, and I cannot do this. So I should find another way, maybe a vpn...

CIFS over internet is not the most recommended way to share files. You'd better use (s)ftp, webdav, or indeed a vpn.

I also checked my printer usb version <snip> and reconnected the printer, but no luck...

Is it possible that you connected the printer the first time without unpowering the printer? In that case it could have kept it's firmware, if that has to be uploaded.

i can't try what before as Canon (at least Canon Italia) doesn't provide any firmware (neither the actual neither an upgrade) for inkjet printers...

I suppose you should extract the firmware from the driver. Does Canon provide Linux drivers? In that case you mght be able to install it, (on a virtual machine, if you prefer), and fetch the firmware from /lib/firmware.

I get always the FATAL error that tells me the /ffp directory is not found in /mnt/HD_a2/ffpbuildenv/work/tiff-3.4/pkg/ path (and yes, it isn't there....)

Just create it?

Offline

 

#24 2011-06-15 21:32:46

bellofresco
Member
Registered: 2011-05-30
Posts: 29

Re: lsb sdk for ffp

Unfortunaletly not. At least not Lenny or Squeeze. They need an EABI compatible kernel, an no zyxel nas has that. (For simplicity all zyxel kernels are compiled using the same compiler (MontaVista 3.4.3-25.0.70.0501961 2005-12-18) which doesn't support EABI). Maybe Etch will run, but that's a bit outdated.

:-(

I really hoped for a positive feedback.
I also contacted technical support of Zyxel asking if it was possible to compile directly some application for the Zyxel (as in one folder I see its packages in a format like phpmyadmin.pkgs) or if it was possible that Zyxel realesed drivers with new version of services that run on this nas (as cups, or mysql that is the version 5.1.3), but they didn't gave me any support. Just linked me to their firmwares repository and told me to check the compatibility list of supported printers. I discovered that this nas supports something like maybe less than 10 printers.
Obviously mine one is not listed there......


Is it possible that you connected the printer the first time without unpowering the printer? In that case it could have kept it's firmware, if that has to be uploaded.

I tried both way. Connecting the printer with and without unpowering it. No more luck as yesterday....

I suppose you should extract the firmware from the driver. Does Canon provide Linux drivers? In that case you mght be able to install it, (on a virtual machine, if you prefer), and fetch the firmware from /lib/firmware.

Canon provides only CUPS drivers for Mac OS X. I downloaded them and have a look as they are in a dmg format. I just found the ppd file, not firmware...


Just create it?

I tried to do it but it seems that everytime the Make.sh works, it deletes all what is in the ......./ffpbuildenv/work/<package> directory. I.e. i suppose that is a temporary directory used
by the script to compile the package. As a matter of fact I tried to creat it and run again the Make.sh script. I got the same error and when I listed the content of directory, the /ffp one created by me was no more...

Offline

 

#25 2011-06-17 23:29:09

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 688

Re: lsb sdk for ffp

I succeeded in compiling cups. Starting with a clean ffp-stick, I installed from fonz' repository

Code:

autoconf-2.61-2.tgz
kernel-headers-2.6.9.1-2.tgz
automake-1.10.1-2.tgz
libiconv-1.12-3.tgz
binutils-2.18.50.0.1-4.tgz   
gcc-4.1-2.tgz
make-3.81-3.tgz
grep-2.5.3-2.tgz
screen-4.0.3-2.tgz
uclibc-0.9.29-7.tgz

Further I downloaded cups-1.5rc1-source.tar.gz, and executed:

Code:

tar xzf cups-1.5rc1-source.tar.gz
cd cups-1.5rc1
export CPP=/ffp/bin/cpp
./configure --prefix=/ffp
make
make install

This worked fine. Then I could start it (after killing the firmware cupsd 'killall cupsd'):

Code:

/ffp/etc/rc.d/init.d/cups start

I don't know if it actually works, as I don't have a printer to connect. (I only have a network printer).

Further there are tons of options for configure which I didn't touch.
From ./configure --help:

Code:

Optional Features:
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-static         install static libraries
  --enable-mallinfo       build with malloc debug logging
  --enable-libpaper       build with libpaper support
  --enable-libusb         use libusb for USB printing
  --enable-tcp-wrappers   use libwrap for TCP wrappers support
  --enable-acl            build with POSIX ACL support
  --enable-dbus           build with DBUS support
  --enable-32bit          generate 32-bit libraries on 32/64-bit systems
  --enable-64bit          generate 64-bit libraries on 32/64-bit systems
  --disable-shared        do not create shared libraries
  --enable-libtool-unsupported
                          build with libtool (UNSUPPORTED!)
  --enable-debug          build with debugging symbols
  --enable-debug-guards   build with memory allocation guards
  --enable-debug-printfs  build with CUPS_DEBUG_LOG support
  --enable-unit-tests     build and run unit tests
  --enable-relro          build with the GCC relro option
  --enable-image          always build the image filters
  --disable-jpeg          disable JPEG support
  --disable-png           disable PNG support
  --disable-tiff          disable TIFF support
  --disable-slp           disable SLP support
  --disable-gssapi        disable GSSAPI support
  --disable-ldap          disable LDAP support
  --disable-threads       disable multi-threading support
  --disable-ssl           disable SSL/TLS support
  --enable-cdsassl        use CDSA for SSL/TLS support, default=first
  --enable-gnutls         use GNU TLS for SSL/TLS support, default=second
  --enable-openssl        use OpenSSL for SSL/TLS support, default=third
  --disable-pam           disable PAM support
  --disable-largefile     omit support for large files
  --disable-dnssd         disable DNS Service Discovery support
  --disable-launchd       disable launchd support
  --disable-browsing      disable Browsing by default
  --disable-browse-short-names
                          disable BrowseShortNames by default
  --disable-default-shared
                          disable DefaultShared by default
  --disable-implicit-classes
                          disable ImplicitClasses by default
  --enable-use-network-default
                          set UseNetworkDefault to Yes by default
  --disable-raw-printing  do not allow raw printing by default
  --enable-bannertops     always build the banner filter
  --enable-texttops       always build the text filter
  --enable-webif          enable the web interface by default, default=no for Mac OS X

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-cups-build       set "cups-config --build" string
  --with-dbusdir          set DBUS configuration directory
  --with-adminkey         set the default SystemAuthKey value
  --with-operkey          set the default operator @AUTHKEY value
  --with-components       set components to build:
                            - "all" (default) builds everything
                            - "core" builds libcups and ipptool
  --with-privateinclude   set path for private include files, default=none
  --with-rcdir            set path for rc scripts
  --with-rclevels         set run levels for rc scripts
  --with-rcstart          set start number for rc scripts
  --with-rcstop           set stop number for rc scripts
  --with-smfmanifestdir   set path for Solaris SMF manifest
  --with-xinetd           set path for xinetd config files
  --with-lpdconfig        set URI for LPD config file
  --with-smbconfig        set URI for Samba config file
  --with-cachedir         set path for cache files
  --with-icondir          set path for application icons
  --with-menudir          set path for application menus
  --with-docdir           set path for documentation
  --with-fontpath         set font path for pstoraster
  --with-logdir           set path for log files
  --with-optim            set optimization flags
  --with-archflags        set default architecture flags
  --with-ldarchflags      set program architecture flags
  --with-arch32flags      set 32-bit architecture flags
  --with-arch64flags      set 64-bit architecture flags
  --with-domainsocket     set unix domain socket name
  --with-openslp-libs     set directory for OpenSLP library
  --with-openslp-includes set directory for OpenSLP includes
  --with-gssservicename   set default gss service name
  --with-ldap-libs        set directory for LDAP library
  --with-ldap-includes    set directory for LDAP includes
  --with-openssl-libs     set directory for OpenSSL library
  --with-openssl-includes set directory for OpenSSL includes
  --with-pam-module       specify the PAM module to use
  --with-dnssd-libs       set directory for DNS Service Discovery library
  --with-dnssd-includes   set directory for DNS Service Discovery includes
  --with-languages        set installed languages, default=all
  --with-bundledir     set Mac OS X localization bundle directory
  --with-config-file-perm set default ConfigFilePerm value, default=0640
  --with-log-file-perm    set default LogFilePerm value, default=0644
  --with-fatal-errors     set default FatalErrors value, default=config
  --with-log-level        set default LogLevel value, default=warn
  --with-access-log-level set default AccessLogLevel value, default=actions
  --with-local-protocols  set default BrowseLocalProtocols, default="CUPS"
  --with-remote-protocols set default BrowseRemoteProtocols, default="CUPS"
  --with-cups-user        set default user for CUPS
  --with-cups-group       set default group for CUPS
  --with-system-groups    set default system groups for CUPS
  --with-printcap         set default printcap file
  --with-lpdconfigfile    set default LPDConfigFile URI
  --with-smbconfigfile    set default SMBConfigFile URI
  --with-max-copies       set default max copies value, default=9999
  --with-snmp-address     set SNMP query address, default=auto
  --with-snmp-community   set SNMP community, default=public
  --with-ipp-port         set port number for IPP, default=631
  --with-pdftops          set pdftops filter (gs,/path/to/gs,pdftops,/path/to/pdftops,none), default=pdftops
  --with-java             set Java interpreter for web interfaces
  --with-perl             set Perl interpreter for web interfaces
  --with-php              set PHP interpreter for web interfaces
  --with-python           set Python interpreter for web interfaces

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB