wiki:Proto/cModules/d0NetworkServiceAPI/c0Applications
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.

1.Linux

A few example applications and utilities are available both pre-compiled and in the source repository.

Pre-Compiled Applications via 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 mfapps

The package contains the following applications:

  • mfping: an application that behaves like ICMP's ping.
  • file mfsender/mfreceiver: a basic file sender and receiver.
  • iperf: a Mobilityfirst port of the original iperf application.

1.2. Download Application 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.

2. Android Development

2.1. Android Requirements

All the following sections assume that the jmfapi.jar file (JFMAPI library) has been already created following the instructions found in the Library Installation section.

Only the aspects concerning the usage of the MobilityFirst libraries will be covered in this documentation page. Additional information regarding setting up and Android Development environment can be found at the Android Developer Page.

2.2. Android Studio Setup

Create a new Android Project following the wizard.

Copy the jmfapi.jar that you created into the libs folder that you will find inside the folder named after the module you just created.

In the project manager on the left, right click on the jar file and select Add As Library.... The current version of Android Studio (0.5.1) will report an error. If this happens close and reopen the project and it will be solved.

Now you can import the classes you need to use from the JMFAPI library by doing:

import edu.rutgers.winlab.jmfapi.*;
Last modified 7 years ago Last modified on Dec 2, 2014, 3:03:04 AM
Note: See TracWiki for help on using the wiki.