wiki:Internal/SystemPrototyping/Projects/MobilityStack
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 8 (modified by wontoniii, 11 years ago) ( diff )

--

Host Protocol Stack and Network Service API

0. Requirements

1. Mobility First API

2. Installation

In this section is explained how to install the system in two different environments: Linux and Android.

2.1 Linux

Manual installation

  • Compile:
    • Go to folder: mobilityfirst/trunk/code/prototype/client/api/
    • make -f makefile-linux
    • Go to folder: mobilityfirst/trunk/code/prototype/client/stack/Release/
    • make -f makefile-linux
    • Go to folder: mobilityfirst/trunk/code/prototype/client/api/java_api/
    • ...
  • Install:
    • Place the generated libraries under /usr/libs/
    • Create the folder /data/mfdemo/
    • Copy the executable mfandroidstack into the folder /data/mfdemo/
    • Place the interfaces.xml and policy.xml (with the proper values) into /data/mfdemo/
    • Check that all permissions are correctly set to let the files to be read
    • Import the jmfapi.jar library in your Android application by placing it in the libs folder

2.2 Android

There are two options to install all the necessary libraries and binaries in android: manual compilation and installation or use the provided application.

2.2.1 Manual installation

  • Dependencies:
    • Having command ndk-build (part of Android NDK) in your environment PATH
    • Root permissions for your Android device
    • Access to Mobility First repository
  • Compile:
    • Go to folder: mobilityfirst/trunk/code/prototype/client/c_android/
    • ./c_android
    • All generated files are going to be placed under the mobilityfirst/trunk/code/prototype/client/c_android/bin/ folder
  • Install:
    • Copy all libraries from the bin folder into /system/lib/ floder in your Android device (.so files)
    • Copy the executable mfandroidstack into the folder /system/bin/
    • Create the folder /data/mfdemo/ and the folder /sdcard/mfdemo/
    • Place the interfaces.xml and policy.xml (with the proper values) into /data/mfdemo/
    • Check that all permissions are correctly set to let the files to be read
    • Import the jmfapi.jar library in your Android application by placing it in the libs folder
    • If you are implementing applications for Android that uses the jmfapi.jar library, remember to assign them the following permission in the manifest file: WRITE_EXTERNAL_STORAGE

2.2.2 Automatic installation (not available yet)

  • Dependencies:
    • Root permissions for your Android device
  • Install:
    • Install this application
    • Open it and click the install button
    • Download the jmfapi.jar library or compile it following the "manual installation" instructions
    • Import the jmfapi.jar library in your Android application by placing it in the libs folder

3. Running Mobility First protocol stack

3.1 Linux

  • Go to folder /data/mfdemo/
  • Execute the following command: ./mfandroidstack -d -I /data/mfdemo/interfaces.xml 11 /data/mfdemo/policy.xml > /data/mfdemo/mflog 2> /data/mfdemo/mferr

3.2 Android

3.2.1 Manual

  • Open a shell in the device (adb shell)
  • Execute the following command: su -c /system/bin/mfandroidstack -d -I /data/mfdemo/interfaces.xml 11 /data/mfdemo/policy.xml > /data/mfdemo/mflog 2> /data/mfdemo/mferr

3.2.2 Automatic

  • Click the start button
  • To stop press the stop button

4. Performance

5. Known Issues

  • Link layer block id issue on host stack restarts: The Hop link layer data transport uses a monotonously increasing and unique id to identify data blocks. If upstream node (R) has seen a block id before from a host (H, identified by MAC), it simple acknowledges that it has received (and forwarded) the block before and will not forward again. This enables robustness to any misunderstandings whether block was reliably delivered when acks are lost. However, if the protocol stack on host H were to be restarted for some reason it resets block ids to begin from 1 and results in data blocks sent subsequently to node R to be ignored if those ids were used before.
    • Potential fix(es): 1. Use content hash as block id, rather than sequence number. 2.) Modify router to consider repeated sequence number as new if time from prior receive has exceeded a threshold.
    • Workaround: For experiments, restart router nodes when host stack is restarted. Note that all routers need restart and not only first upstream node R since the same Hop protocol is implemented across routers and host stacks.
    • Status: No fix implemented yet.
  • Issue X:
Note: See TracWiki for help on using the wiki.