Thursday, April 14, 2011

How to compile a kernel

Very useful post
http://linuxtweaking.blogspot.com/2010/05/how-to-compile-kernel-on-ubuntu-1004.html

Tuesday, April 5, 2011

Synchronize 2 computers

Quite useful for some applications
msntp -S???? on the server
sudo msntp -r?? server_address??? on the client

Wednesday, March 9, 2011

OLSR - the fight

To start OLSR on Android is not straightforward. Once you have it running chances are that multihop would not be working.

Necessary and important steps: you have to change the order of the routing tables. In particular "main" should come before "wifi"
-- put the local table at the end
ip rule add pref 1000 lookup main

that did the trick....

to check the content of the routing tables:
ip route show table

Tuesday, February 15, 2011

OLSR on Android

The current firmware does not support broadcast and multicast.
Fortunately, there exists a firmware on Android that allows the cellphone to work on Infrastructure and hence, allows to work on Ad hoc mod.

The two commands to issue:
1. rmmod bcm4329
2. insmod /system/lib/modules/bcm4329.ko firmware_path=/etc/firmware/fw_bcm4329_apsta.bin
and that's it

To install OLSR, make sure to use the latest version. (6.1)

PS: edit as well /data/misc/wifi/wpa_supplicant.conf with the proper essid

Monday, February 7, 2011

VOIP quality of service

To measure the VOIP quality of service, the metric to use iS PESQ (Perceptual Evaluation of Speech Quality)
Code can be downloaded there

To compile: gcc -o pesq *.c -lm

Wednesday, November 10, 2010

Tcpstat

Finally I succeeded to compile tcpstat for Android. Follow the same steps as for tcpdump:
#CC=arm-angstrom-linux-gnueabi-gcc ac_cv_linux_vers=2 ./configure --host=arm-linux --with-pcap=linux --with-pcap-include=/path/to/libpcap-1.1.1 LDFLAGS="-L/path/to/libpcap-1.1.1" CFLAGS="-static"
#make

Tcpdump for Android

So I have decided to crosscompile Tcpdump for Android 2.2.
This guy has done it, but I figured as well as I should try.

I also used the openmoko toolchain after failing miserably with the Android one.
So the summary of all the steps:
Get the latest source for libpcap and tcpdump from http://www.tcpdump.org

Compile libpcap
$ tar zxvf libpcap.tar.gz
$ cd libpcap/
$ CC=arm-angstrom-linux-gnueabi-gcc ac_cv_linux_vers=2 ./configure --host=arm-linux --with-pcap=linux
$ make

Compile tcpdump
$ tar zxvf tcpdump-xx.tar.gz
$ cd tcpdump-xx/

$ CC=arm-angstrom-linux-gnueabi-gcc ac_cv_linux_vers=2 ./configure --host=arm-linux --with-pcap=linux
Edit the makefile, remove the -O2 flag and add the -static flag to the linker (LD_FLAGS += -static)

$ make

If you get the following error: undefined reference to `__isoc99_sscanf'
add #define _GNU_SOURCE in the faulty .c files.