| 1 | = Installation = |
| 2 | |
| 3 | == Pre-Compiled Debian Packages == |
| 4 | |
| 5 | [[CollapsibleStart(Make sure you have appropriate package repository configured.)]][[Include(Documentation/Other/RepositoryConfig)]][[CollapsibleEnd]] |
| 6 | |
| 7 | The MF host protocol stack is installed with: |
| 8 | {{{ |
| 9 | sudo apt-get install mfclient |
| 10 | }}} |
| 11 | |
| 12 | == Compiling From Source == |
| 13 | |
| 14 | === 1.1. Required Packages === |
| 15 | |
| 16 | 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). |
| 17 | |
| 18 | {{{ |
| 19 | sudo apt-get update |
| 20 | sudo apt-get -y install git-core libpcap0.8-dev |
| 21 | }}} |
| 22 | === 1.2. Download MobilityFirst Sources === |
| 23 | |
| 24 | Git: The development versions of the prototype components can be checked out from the [https://bitbucket.org/nkiran/mobilityfirst/wiki/Home MobilityFirst git repository on BitBucket]: |
| 25 | |
| 26 | {{{ |
| 27 | git clone https://username@bitbucket.org/nkiran/mobilityfirst.git |
| 28 | }}} |
| 29 | Set and export path of top-level folder to an env. variable 'MF_HOME' |
| 30 | |
| 31 | {{{ |
| 32 | export MF_HOME=/home/username/mobilityfirst |
| 33 | }}} |
| 34 | === 1.3. Compiling the Network Service API Library === |
| 35 | |
| 36 | {{{ |
| 37 | cd $MF_HOME/netapi/c/ |
| 38 | make |
| 39 | }}} |
| 40 | === 1.4. Installing the Network Service API Library (optional) === |
| 41 | |
| 42 | Install the compiled application running (from the same folder as before): |
| 43 | |
| 44 | {{{ |
| 45 | sudo make install |
| 46 | }}} |
| 47 | == 2. Android == |
| 48 | |
| 49 | === 2.1. Required Packages === |
| 50 | |
| 51 | The implementation should compatible with any ARM based device. To check out the MobilityFirst code git is required. |
| 52 | |
| 53 | {{{ |
| 54 | sudo apt-get update |
| 55 | sudo apt-get -y install git-core |
| 56 | }}} |
| 57 | Download the latest ndk distribution from the [http://developer.android.com/tools/sdk/ndk/index.html Android Developer website] and make sure to add the folder containing the kit to the environment PATH variable: |
| 58 | |
| 59 | {{{ |
| 60 | export PATH=$PATH:/path/to/ndk/ |
| 61 | }}} |
| 62 | Download the Android Developer Tools from the [http://developer.android.com/tools/index.html Android Developer website]. Only the ''adb'' executable is necessary for the installation process. |
| 63 | |
| 64 | 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: |
| 65 | |
| 66 | {{{ |
| 67 | $ adb shell |
| 68 | $ su |
| 69 | $ mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system |
| 70 | |
| 71 | (Replace /dev/block/mtdblock3 & /system with appropriate device path and mount point, as obtained from cat /proc/mounts) |
| 72 | }}} |
| 73 | Finally, to install the library the Android device will need to be rooted. |
| 74 | |
| 75 | === 2.2. Download MobilityFirst Sources === |
| 76 | |
| 77 | Git: The development versions of the prototype components can be checked out from the [https://bitbucket.org/nkiran/mobilityfirst/wiki/Home MobilityFirst git repository on BitBucket]: |
| 78 | |
| 79 | {{{ |
| 80 | git clone https://username@bitbucket.org/nkiran/mobilityfirst.git |
| 81 | }}} |
| 82 | Set and export path of top-level folder to an env. variable 'MF_HOME' |
| 83 | |
| 84 | {{{ |
| 85 | export MF_HOME=/home/username/mobilityfirst |
| 86 | }}} |
| 87 | === 2.3. Compiling the Network Service API Library === |
| 88 | |
| 89 | To run the compiling script provided, is necessary to add the ''ndk-build'' command contained in the ndk package to the system PATH variable. |
| 90 | |
| 91 | {{{ |
| 92 | PATH=$PATH:/path/to/ndk/folder/ |
| 93 | }}} |
| 94 | Compile the Network Service API Library : |
| 95 | |
| 96 | {{{ |
| 97 | cd $MF_HOME/netapi/android/ |
| 98 | ./compile |
| 99 | }}} |
| 100 | === 2.4. Installing the Network Service API Library === |
| 101 | |
| 102 | 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. |
| 103 | |
| 104 | {{{ |
| 105 | adb push libmfapi.so /system/lib/ |
| 106 | }}} |