Add New Page: You are not allowed to add pages Select section/namespace. New page title.

Linux Client dev notes

Status as of July 31st, 2013

The current implementation of the Linux client does not actually add new mesh network profiles to the system, but simply detects when the user is trying to connect to a mesh network, and then fires up olsrd to support that action. *In other words, configuration information for mesh networks must be set manually within network-manager; the data pulled from files in /etc/nm-dispatcher will not actually make it into the system's connection list without manual intervention.*

As a result of the applet's heavy dependence on network-manager, the capabilities of the mesh applet on any given system are defined and limited by the capabilities of the version of network-manager that is running on that system. The functionality offered by network-manager is in turn constrained by the version of wpa_supplicant present on the system.

Why does any of this matter? Because versions of wpa_supplicant older than v. 1.0 do not really support IBSS-RSN (mesh encryption), which is a standard feature of Commotion networks as of DR1. Fortunately, version 13.04 of Ubuntu includes a version of wpa_supplicant that does support IBSS_RSN, but all versions of the OS prior to that do not.

Consequently, getting a Linux PC to mesh with a current Commotion network *can* be as simple as clicking on the appropriate mesh network icon in network-manager, and then entering in the necessary configuration information (ie, static IP addressing)–as long as one is working with a machine running 13.04 or later. One caveat: for unknown reasons, this only seems to work *immediately* following a restart of wpa_supplicant. If you have been connected to a mesh network, and then try to reconnect, the connection will fail due to a bizarre wpa_supplicant error. Simply issue pkill -9 wpa_supplicant to do this; network-manager will automatically restart the killed process.

However, getting any older version of the OS to connect to an encrypted mesh will require a re-compiled version of wpa_supplicant, which for whatever reason refuses to play nicely with network-manager. Accordingly, you'll have to handle *ALL* of the network configuration on such a system without the help of network-manager. Here's a rough outline of the entire process, from compilation through execution:

apt-get source wpasupplicant
echo CONFIG_IBSS_RSN=y >> wpasupplicant-<old version>/debian/config/wpa_supplicant/linux
If version < 1.0
tar -xzf wpa_supplicant-2.0
cd wpasupplicant-<old version>
rm wpa_supplicant src patches
cd ../wpa_supplicant-2.0
cp -ra wpa_supplicant,src,patches wpa-<old version>
cd build/wpa-*ver*
sudo dpkg-buildpackage -rfakeroot -uc -b

Once the build has completed, you can issue:

./wpasupplicant-<old version>/wpa_supplicant/wpa_supplicant -Dnl80211 -iwlan0 -cwpa_supplicant.conf 

where wpa_supplicant.conf contains all of the configuration information you need to connect and authenticate to the network of interest. Once this has completed, issue

ifconfig wlan0 up <ip addr>
olsrd -i wlan0 -f /etc/nm-dispatcher-olsrd/

And you should be all set!

Fallback implementation for OSes with wpa_supplicant v. < 1

In choose_profile:

wpa_ver =  get wpa_supplicant version #
if wpa_ver < 1:
os.system("service network-manager stop")
os.system("pkill -9 wpa_supplicant")
os.system("./custom_wpa_supplicant -Dnl80211 -i" + dev.Interface + "-c<chosen profile>" + " -dd")
os.system("ifconfig wlan0 up" + <ip addr> + "")
os.system("olsrd -i"  + dev.Interface + " -f /etc/nm-dispatcher-olsrd/")
<wait for exit/disconnect signal>
os.system("service network-manager start")

Feature roadmap

Stage 0 *DONE*: List available mesh networks and profiles. Offer binary options - Connect Disconnect. Connect is a call to the commotion/olsrd binary to either start or restart, using the default config files.

Stage 1 *Partly done*: Add support for scanning & ID available mesh networks in vicinity - Show mesh network nodes only in mesh networking section; remove from regular AP listing Add optional bridging to wired connection Add support for splitting antenna accross two wireless APs, where available Add items to “Active network connections”

Stage 2: Allow for user-defined parameters; GUI entry SSID Channel IP Shared secret Encryption off/on Allow/disallow gateway access/bridging - Logic: Bridge if secondary interface is present AND allow = yes Execute binary/start service Options handled by config file

Stage 3: Application server integration Serval integration Full network visualizer


olsrd and the ubuntu package (Deprecated)

olsrd dev lives in the git repo, master branch

there's an outdated version of the ubuntu package right in the olsrd repo, but the more up-to-date one lives on launchpad:

heard from hans that the github version of jsoninfo has some fixes, will build pkg w/ that!

useful links for ubuntu packaging:

to do this,

# install build deps
sudo apt-get install dh-make lintian debhelper bison libgtk2.0-dev python-gtk2-dev
# compile the latest release
apt-get source olsrd --compile

to build debian package from olsrd git:

cd olsrd
chmod 755 debian/rules
sudo ./debian/rules binary-arch

this will spit out some .debs in the parent directory!


to build plugins, go to lib/[pluginname] and make/make install

same goes for the linux-gtk client