wiki:Proto/cModules/d0NetworkServiceAPI/b0Installation
close Warning: Can't synchronize with repository "(default)" ("(default)" is not readable or not a Git repository.). Look in the Trac log for more information.

Version 2 (modified by wontoniii, 9 years ago) ( diff )

--

Installation

Pre-Compiled Debian Packages

Make sure you have appropriate package repository configured.

Configure Apt Repository

To begin we'll need to add the Orbit apt repository to the list of sources that our console will pull packages from. This is done by running the following two commands.

Note: It is assumed that you have root access and can run these commands as root if needed

The first installs the orbit repositories gpg-key into the consoles key-ring.

wget -qO - http://packages.orbit-lab.org/downloads/orbitapt.gpg.key | sudo apt-key add -

Next we download the source list for the repository.

wget -qO /etc/apt/sources.list.d/orbit.list http://packages.orbit-lab.org/downloads/orbit-precise.list

Once we have these changes in place, we need to update the repository list via

apt-get update

Configure OML apt Repository

OML libraries are required to proceed with the installation. They are installed automatically once the repositories list have been added correctly.

Note: It is assumed that you have root access and can run these commands as root if needed

First, append the following line to /etc/apt/sources.list, choosing the one appropriate for your Ubuntu version:

#Ubuntu 10.04
deb http://download.opensuse.org/repositories/home:/cdwertmann:/oml/xUbuntu_10.04/ ./
    
#Ubuntu 12.04
deb http://download.opensuse.org/repositories/home:/cdwertmann:/oml/xUbuntu_12.04/ ./

You also need to add the repository key before the actual download (requires curl or similar):

#Ubuntu 10.04
wget -qO- http://download.opensuse.org/repositories/home:/cdwertmann:/oml/xUbuntu_10.04/Release.key | sudo apt-key add -
        
#Ubuntu 12.04
wget -qO- http://download.opensuse.org/repositories/home:/cdwertmann:/oml/xUbuntu_12.04/Release.key | sudo apt-key add -

Once we have these changes in place, we need to update the repository list via:

sudo apt-get update

The MF host protocol stack is installed with:

sudo apt-get install mfclient

Compiling From Source

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 host on orbit-lab:

git clone ssh://username@external1.orbit-lab.org/common/git/mf

Note: cloning the git repository requires setting your ssh agent to use your orbit-lab key pair.

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/
Note: See TracWiki for help on using the wiki.