Johann's Research: Difference between revisions

From WirelessAfrica
Line 5: Line 5:




== Voip - IP04 ==
== [[VOIP page]] ==
 


== [[High performance node page]] ==
== [[High performance node page]] ==

Revision as of 12:28, 27 November 2008


I'm not sure if my stuff is really research, but this is some of the stuff that I'm busy with:


VOIP page

High performance node page

Installing cacti on FreeBSD

Recipe to install FreeBSD, add ports mysql, php5 and cacti: http://wirelessafrica.meraka.org.za/wiki/index.php/Image:Installing_Cacti_on_FreeBSD.zip

If you intall it for the first time, you may have to follow this steps to make it work correctly:

1. Create the MySQL database:
# mysqladmin --user=root create cacti
2. Create a mysql user/password for cacti:
   (change user and/or password if requered)
# echo "GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'cactiuser'; F           LUSH PRIVILEGES;" | mysql
3. Import the default cacti database:
# mysql cacti < /usr/local/share/cacti/cacti.sql
4. Edit /usr/local/share/cacti/include/config.php.
5. Add a line to your /etc/crontab file similar to:
*/5 * * * * cacti /usr/local/bin/php /usr/local/share/cacti/poller.php > /dev/nu           ll 2>&1
6. Add alias in apache config for the cacti dir:
Alias /cacti "/usr/local/share/cacti/"
7. Be sure apache gives an access to the directory ('Allow from' keywords).
8. Open a cacti login page in your web browser and login with admin/admin.
Add the following line in the end of httpd.conf
vi /usr/local/etc/apache22/httpd.conf
Include etc/apache/Includes/*.conf 
vi /usr/local/etc/cacti.conf
Alias /cacti/ "/usr/local/share/cacti/"
<Location /cacti>
AddHandler php-script php
DirectoryIndex index.php
AllowOverride None
Order allow,deny
Allow from all
</Location>

Community wireless networks page

Putting FreeBSD onto my EeePC

OK, finally get around to it. First read John's info on the wiki: http://wiki.meraka.csir.co.za/wiki/index.php/Category:ASUS_eeePC

Then copy John's FreeBSD EeePC distribution (img.tgz) to my PC. Follow Werner's instructions to get the distro on USB memory stick

fdisk -I da0 fdisk -B da0 bsdlabel -w da0s1 auto bsdlabel -B da0s1 newfs /dev/da0s1a mount /dev/da0s1a /mnt tar -xvf img.tgz -C /mnt/ echo /dev/da0s1a / ufs rw 1 1 > /mnt/etc/fstab echo ifconfig_DEFAULT=DHCP > /mnt/etc/rc.conf echo hostname=demo >> /mnt/etc/rc.conf umount /mnt

Plug into USB port on EeePC. Select boot form USB (Press ESC at bootup to get menu) Boot FreeBSD Dump WinXP image on a USB disk

dd if=/dev/ad2 of=/dev/da2 bs=4k

Follow instructions above to get FreeBSD on ad2

fdisk -I ad2 fdisk -B ad2 bsdlabel -w ad2s1 auto bsdlabel -B ad2s1 newfs -U /dev/ad2s1a mount /dev/ad2s1a /mnt tar -cf - --exclude /mnt / | tar -xvpf - -C /mnt echo /dev/ad2s1a / ufs rw 1 1 > /mnt/etc/fstab

Enable ipv6, ssh and moused in /etc/rc.conf

ipv6_enable="YES" sshd_enable="YES" moused_enable="YES"

Shutdown and reboot.

Install Xorg and KDE

setenv PACKAGEROOT ftp://ftp2.za.freebsd.org pkg_add -r xorg pkg_add -r kde-lite

Enable and test sound. Add the following line in /boot/loader.conf

snd_hda_load="YES"


Search for app that can show the battery status in X. Install and test desktopbsd-tools. Battery status works. Test wifi install gui. Not impressed, it only supports WEP

pkg_add -r desktopbsd-tools

Battery status works. Test wifi install gui. Not impressed, it only supports WEP. Delete package and search for other battery apps. See that KDE has a package that can show battery status. Install klaptopdaemon.

pkg_add -r kdeutils-klaptopdaemon

Battle to get it to work. Eventually find out that you have to load AMP (advanced power management). Edit /etc/rc.conf and add the following lines.

amp_enable="YES" ampd_enable="YES"

Shutdown and reboot

Login and start KDE. Enable battery monitor under kde "Start" "Settings" "Power control" "Laptop Battery". Yes, I get a new battery icon. Remove power and test it. Battery shows power, but reporting of "time left" is broken.

Enable power manager to preserve power while running on battery. Add following to rc.conf

powerd_enable="YES"

and lower CPU speed. Add the following to /etc/sysctl.conf

dev.cpu.0.cx_lowest=C3

Try to get dstumbler to work so that we can use the EeePC as a wireless measurement PC. Install BSD-airtools (dstumbler part of it), but it looks like the package is broken. Search for other packages that we can use, but I can't find anything. Start looking at what command line stats available.

Try to enable virtual screen resolution in Xorg. Add the following in the Screen section of xorg.conf

SubSection "Display"

              Viewport   0 0
              Depth     24
              Virtual 1200 720

EndSubSection

Restart X, but it doesn't work. Do a lot of reading and playing, but I cannot get it to work.

Meraka wireless Network

We are making use of Linksys WRT54 wifi routers, re-flashed with dd-wrt software. We've also enabled WPA corporate mode, using a Radius server that verify users against the CSIR LDAP server.

Upgrading the dd-wrt firmware on a linksys.

Firmware upgrades are usually done via the WEB gui. Here is the instructions to do it on the command line. It's important to know how to do it, so that we can script it in future. Fist enable ssh via the WEB gui. You can find it under Administrator -> Services -> Secure Shell. Select SSHd en then add your ssh public key under the Authorized Keys section. Save settings. Now you can login without a password as well run remotes commands via ssh.

scp ftp/linksys/dd-wrt/dd-wrt.v24_std_generic.bin root@192.168.1.1:/tmp
ssh root@192.168.1.1 "write /tmp/dd-wrt.v24_std_generic.bin linux"
ssh root@192.168.1.1 reboot

Load WEB gui and verify if upgrade worked. Yes - all new.