OpenWrt Forum Archive

Topic: WifiDog problem

The content of this topic has been archived on 18 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I downloaded and installed wifidog_1.0.2_mipsel.ipk and when I run the wifidog binary I get these messages:
/usr/bin/wifidog: 117: /home/florian/dev/buildroot/build_mipsel/staging_dir/bin/sed: not found
/usr/bin/wifidog: 117: /home/florian/dev/buildroot/build_mipsel/staging_dir/bin/sed: not found
cd: 1: can't cd to /home/florian/dev/buildroot/build_mipsel/wifidog-1.0.2/src
eval: 1: /home/florian/dev/buildroot/build_mipsel/staging_dir/bin/mipsel-linux-uclibc-gcc: not found

Any idea what's happening?

Thanks,
Bill

are there any instructions/howtos available for the wifidog compilation process using the experimental version of openwrt? wifidog lacks a bit of support on the website and somehow it looks like there are some scripts missing in the wifidog source-tarball (e.g. autogen.sh)

are there any instructions/howtos available for the wifidog compilation process using the experimental version of openwrt? wifidog lacks a bit of support on the website and somehow it looks like there are some scripts missing in the wifidog source-tarball (e.g. autogen.sh)

It's easy to add new packages to the build process in experimental. Just grab the latest source snapshot, build it one time to get the toolchain working and to have the base packages compiled, then take a simple package (like strace), copy it over to a new directory, change stuff for the new package and then build it.
If you set the environment variable TOPDIR to your buildroot directory, you can go directly into the package directory and just type "make clean compile" to compile it. That should make testing easy. If you need additional documentation, just look at buildroot-documentation.html in the docs/ directory.

then take a simple package (like strace), copy it over to a new directory, change stuff for the new package and then build it.

to which directory should I copy the contents of the package and what "stuff" should I change? please be a bit more specific wink

Ok, I have now successfully compiled my own build of WifiDog. Well, the packaging process was interrupted by
some error I couldn't explain, but the binaries were already built at that time, so i could tar and gzip
them and send them to the router for manual installation.

I've already tested the binaries with the free auth server offered by ilesansfil (https://auth.ilesansfil.org)
and they are working perfectly, so I think the router is now set up for working with WifiDog.

Now comes the hard part installing the auth-server because it only works with PHP5 and PostgreSQL and I
don't have PHP5 and my build of PHP4 doesn't fully support PostgreSQL. Does anyone have a clue how to
convert the scripts, to work with PHP4 and MySQL again (I think removing all that OO stuff should help).

Some informations about  wifidog client running on openwrt can be found on the FAQ.

Now comes the hard part installing the auth-server because it only works with PHP5 and PostgreSQL and I don't have PHP5 and my build of PHP4 doesn't fully support PostgreSQL. Does anyone have a clue how to
convert the scripts, to work with PHP4 and MySQL again (I think removing all that OO stuff should help).

The Auth-server will be working soon with MySQL, but no date is planned at this time. I think it will not be easy to convert the OO code to be working with PHP4.
Also all new development (like newly radius code released last week) will be OO.

Try to install postgresql and php5. If you are using Apache  you can use this "pseudo" command to help you and use php4 and php5 at the same time:

wget http://www.postgresql.org/postgresql-source.tar.gz
tar -xzf postgresql-source.tar.gz
cd postgresql-source
./configure --prefix=/usr/local/postgresql8
make
make install
wget http://www.php.net/php5-source.tar.gz
tar -xzf php5-source.tar.gz
cd php5-source
./configure   (Remove/add to fit your needs)
        --prefix=/usr/local/php5 
        --with-gd 
        --with-zlib 
        --with-xml  
        --with-freetype-dir 
        --with-bz2 
        --with-zip 
        --with-openssl 
        --with-ttf 
        --with-tiff-dir 
        --with-pgsql=/usr/local/postgresql8
        --with-regex=system
make
make install
cp /usr/local/php5/bin/php /usr/local/apache/cgi-bin/php5

Add this to your apache config file (httpd.conf)

    AddType application/x-httpd-php5 .php .php5
    Action application/x-httpd-php5 /cgi-bin/php5

Rename all auth-server php files to end with .php5
Finally restart your apache server.

If you need more help ask on wifidog mailing list or go on PHP and Postgresql help sites.

The discussion might have continued from here.