Wiki

Clone wiki

mobilityfirst / Network Service API Library Installation

The following instructions provide detail on how to install the MobilityFirst Network Service API Library in two different environments: Linux and Android.

1. Linux

1.1. Required Packages

The implementation has been tested on Ubuntu 10.04, 12.04 and 13.04, but it should work on basically any linux distribution. These are the required packages (for Ubuntu).

sudo apt-get update
sudo apt-get -y install git-core libpcap0.8-dev

1.2. Download MobilityFirst Sources

Git: The development versions of the prototype components can be checked out from the MobilityFirst git repository on BitBucket:

git clone https://username@bitbucket.org/nkiran/mobilityfirst.git

Set and export path of top-level folder to an env. variable 'MF_HOME'

export MF_HOME=/home/username/mobilityfirst

1.3. Compiling the Network Service API Library

cd $MF_HOME/netapi/c/
make

1.4. Installing the Network Service API Library (optional)

Install the compiled application running (from the same folder as before):

sudo make install

2. Android

2.1. Required Packages

The implementation should compatible with any ARM based device. To check out the MobilityFirst code git is required.

sudo apt-get update
sudo apt-get -y install git-core

Download the latest ndk distribution from the Android Developer website and make sure to add the folder containing the kit to the environment PATH variable:

export PATH=$PATH:/path/to/ndk/

Download the Android Developer Tools from the Android Developer website. Only the adb executable is necessary for the installation process.

Enable the read/write permissions on the root and system folders of your Android device. To do so you have two options, install the application [ES File Explorer])https://play.google.com/store/apps/details?id=com.estrongs.android.pop) from the Play Store and use its root explorer function to change permissions or you can run the following commands:

$ adb shell
$ su
$ mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system

(Replace /dev/block/mtdblock3 & /system with appropriate device path and mount point, as obtained from cat /proc/mounts)

Finally, to install the library the Android device will need to be rooted.

2.2. Download MobilityFirst Sources

Git: The development versions of the prototype components can be checked out from the MobilityFirst git repository on BitBucket:

git clone https://username@bitbucket.org/nkiran/mobilityfirst.git

Set and export path of top-level folder to an env. variable 'MF_HOME'

export MF_HOME=/home/username/mobilityfirst

2.3. Compiling the Network Service API Library

To run the compiling script provided, is necessary to add the ndk-build command contained in the ndk package to the system PATH variable.

PATH=$PATH:/path/to/ndk/folder/

Compile the Network Service API Library :

cd $MF_HOME/netapi/android/
./compile

2.4. Installing the Network Service API Library

Install the compiled libraries and executable found in the generated bin folder. To install the libraries is necessary to have write permissions on the Android root and system folders.

    adb push libmfapi.so /system/lib/

Updated