-
Notifications
You must be signed in to change notification settings - Fork 0
/
get_started.html
148 lines (143 loc) · 7.89 KB
/
get_started.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<!DOCTYPE html>
<html>
<head>
<title>SWiFiIC Build and Deploy</title>
<meta charset="utf-8">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="./css/bootstrap.css">
<!-- Bootstrap theme -->
<link rel="stylesheet" href="./css/bootstrap-theme.min.css">
<!-- Minified JavaScript -->
<script src="./js/bootstrap.min.js"></script>
<!-- jQuery -->
<script src="./js/jquery-2.1.0.min.js"></script>
<style type="text/css">
body {
padding-top: 50px;
}
</style>
</head>
<body>
<header>
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="#">SWiFiIC</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li ><a href="./index.html">Home</a></li>
<li class="active"><a href="#">Get Started</a></li>
<li><a href="http://www.github.com/swifiic" target="_blank"><span class="glyphicon glyphicon-new-window"></span> Browse Code</a></li>
<li><a href="./publications/index.html">Papers Published</a></li>
<li><a href="./sambv/index.html">SAMBV Demo </a></li>
</ul>
<ul class="nav navbar-nav pull-right">
<li><a href="#contact">Contact Us</a></li>
</ul>
</div>
</nav>
</header>
<div id="main">
<div class="container">
<div class="row">
<h2>Building and Deploying SWiFiIC</h2>
Note that build system for SWiFiIC needs additional developer tools (like Android SDK etc.) while the deployment system has lesser needs.
<h3>Building SWiFiIC</h3>
<p>This Sub-section will guide you through the set up process for Development of SWiFiIC Apps</p>
<h4>Minimum System Requirements</h4>
<ul>
<li>Ubuntu 16.04 LTS <span class="text-muted">(Preffered, though you can work on Windows for development on android part making minor changes to the following instructions)</span></li>
<li>Tocmcat-8 and JDK 1.8 <span class="text-muted">OpenJDK is fine; use <code>sudo update-java-alternatives</code> to set it if default Java in not 1.8</span></li>
<li>Android SDK Command Line Tools - <a href="https://developer.android.com/studio/index.html#downloads" target="_blank"><span class="glyphicon glyphicon-new-window"></span> Get it here.</a></li>
</ul>
</div>
<div class="row">
<h4>The Build Setup</h4>
<p class="text-warning">The following instructions assume you are working on Ubuntu 16.04(64-bit), modify them accordingly for your operating system.</p>
<br>
<p>SWiFiIC applications are based on Java and tomcat-user- the "Swilets". For which you would need to install Java SDK. Android application would require this too.</p>
<code> sudo apt-get install tomcat8 tomcat8-user tomcat8-common </code>
<br>
<p>Next, you download the official Android SDK. You can work without an IDE if you so wish.<br>
<br> <br>
<p>To set up this up follow the instructions at <a href="https://developer.android.com/sdk/installing/index.html">Android Developers Website</a>, or proceed further if you downloaded the official Android SDK</p>
<p>Create a directory where you are going to download the source code and change into it:</p>
<code> mkdir workarea && cd workarea</code>
<br> <br>
<p>Download and build the source code:</p>
<code> git clone https://github.com/swifiic/repo.git</code><br>
<code> cd repo</code><br>
<code> bash build-all.sh build # or bash build-all.sh clean to remove output of old builds</code><br>
<br>
<p>Fix the android build dependencies if build fails </p>
<p>a. Ensure <code> ANDROID_HOME </code> is setto correct path </p>
<p>b. Update the target SDK levels in andorid projects as required.</p>
<p>c. To build a specific sub project you can just invoke <code> ./gradlew build </code> for android proejects and <code> ./gradlew all </code> for hub projects</p>
<br>
<p>After the build completes you should see <code>swifiic.tar.gz</code> in the repo folder. If errors are there, work on resolving them or contact the authors.</p>
<br>
</div>
<div class="row">
<h3>Deploying SWiFiIC</h3>
<h4>Minimum System Requirements</h4>
<ul>
<li>Ubuntu 16.04 LTS </li>
<li>Java Run Time (JRE) or JDK - 1.8 <span class="text-muted">OpenJDK is fine; use <code>sudo update-java-alternatives</code> to set it if default Java in not 1.8</span></li>
<li>Tomcat8-user and MySQL <code>sudo apt-get install tomcat8-user tomcat8-common mysql-server mysql-client</code></li>
<li>IBR-DTN see below. </li>
<li>Optionally you can have apache2, php and phpmyadmin for debugging.
<code> sudo apt-get install apache2 php5 mysql-server phpmyadmin</code>
</li>
<br> <br>
<p>Install IBR-DTN by following the instructions <a href="http://trac.ibr.cs.tu-bs.de/project-cm-2012-ibrdtn/wiki/download#DebianUbuntuRepository" target="_blank">here.</a></p>
<p></p>
<p>extract script/deployscript.sh and dist/scripts/check_deployment.sh from swifiic.tar.gz and copy swifiic.tar.gz + check_deployment.sh + deployscript.sh to a temporary folder.</p>
<p>Run <code>sudo bash check_deployment.sh</code> to check that deployment pre-requisites are met.</p>
<p>Run <code>sudo bash deployscript.sh</code> to install.</p>
<ul>
<li>You can ignore errors on "mkdir: cannot create directory ....: File exists" or user exists </li>
<li>You should not see any other Errors like access denied in above steps.</li>
</ul>
<p></p>
<p>After the above script completes, edit <code>/etc/ibrdtn/ibrdtnd.conf</code> for your environment</p>
<p>Following contents will already be there - you can modify if <b>wlan0</b> is not the actual WiFi interface on your machine</p>
<code>
local_uri = dtn://example-url.dtn # will be modified to PIN / area code<br>
# other values removed ..<br>
net_wlan0_interface = wlan0 # listen on interface eth0: Modify the value on RHS if needed<br>
# other values removed ..<br>
</code>
<br>
<div class="row">
<h3>The Execution of HUB Components</h3>
<p>use <code>cd /opt/swifiic; sudo scripts/runSoaHub.sh</code>.</p>
<p>The SOA (SWiFiIC Operator App) is a Tomcat based servlet. Look at logs under /opt/swifiic/HubSrvr/logs for troubleshooting.</p>
<p></p>
<p>use <code>cd /opt/swifiic; sudo scripts/runHublets.sh</code>.</p>
<p>The SUTA (SWiFiIC User Terminal App) is a Swilet for end user's to access SWiFiIC. </p>
<p>Msngr is another hublet to demo the messaging App.</p>
<p>To troubleshoot these apps look at logs under <code>/opt/swifiic/log</code>.</p>
<p class="text-warning">If errors like "Unsupported major.minor version 52.0" show up, look at setting for java-alternatives during build</p>
</div> <!-- Row -->
<div class="row">
<h3>The Mobile phone Components</h3>
<p>Install and run IBR-DTN service using Google's Play store.</p>
<p>The SOA (SWiFiIC Operator App) is a Tomcat based servlet for, editing and deleting the users to the SWiFiIC hub.and doing other management and monitoring activities.
It has an Android based package for the same (SOA-debug.apk). It is <b>only installed on Operator's device.</b></p>
<p>In settings update address for Hub to something like "192.168.xx.yy:18090". Use <code>ifconfig</code> on hub to get the ip address.</p>
<p>For SOA app default: login is 9876543210 and password is "simple".</p>
<p></p>
<p>The SUTA (SWiFiIC User Terminal App) is a Swilet for end user's to access SWiFiIC. Setup the hub adress and user name (not alias) in the SUTA App for each user's device.</p>
<p>The Messenger is a Swilet for end chat using SWiFiIC.</p>
</div> <!-- Row -->
</div> <!-- Container -->
</div> <!-- Main -->
<div class="container">
<footer>
<hr>
<p class="text-center">© SWiFiIC</p>
</footer>
</div>
</body>
</html>