How To Install

From GeoSharing

Jump to: navigation, search
 
Line 1: Line 1:
-
This installation manual is divided into two parts. The first part presents preliminary configurations that must be done before starting any development on the Opemoko Neo FreeRunner (GTA02). The second part describes the technical steps to follow in order to install the GeoSharing project on the Neo FreeRunner.
+
This installation manual is divided into two parts. The first part presents preliminary configurations that must be done before starting any development on the [[FreeRunner|Opemoko Neo FreeRunner (GTA02)]]. The second part describes the technical steps to follow in order to install the GeoSharing project on the [[FreeRunner|Neo FreeRunner]].
All those steps have been tested on a Neo FreeRunner and on a laptop running Ubuntu 10.10 with access to root privileges.
All those steps have been tested on a Neo FreeRunner and on a laptop running Ubuntu 10.10 with access to root privileges.
Line 110: Line 110:
4) The computer have now to be rebooted.
4) The computer have now to be rebooted.
-
The internet connection of the computer is now shared with the Neo FreeRunner. In order to check if the sharing of the internet connection is well configured, from the Neo FreeRunner, perform a \texttt{ping} to \texttt{www.google.com} and the results should look like this:
+
The internet connection of the computer is now shared with the Neo FreeRunner. In order to check if the sharing of the internet connection is well configured, from the Neo FreeRunner, perform a '''ping''' to '''www.google.com''' and the results should look like this:
  root@om-gta02 ~ # ping www.google.com
  root@om-gta02 ~ # ping www.google.com
Line 118: Line 118:
  (...)
  (...)
-
== GeoSharing project installation} ==
+
== GeoSharing project installation ==
Since the GeoSharing project is based on the OLSRd Linux daemon and on tangoGPS, it is mandatory to compile and install those two applications as well as the GeoSharing application.
Since the GeoSharing project is based on the OLSRd Linux daemon and on tangoGPS, it is mandatory to compile and install those two applications as well as the GeoSharing application.
Line 125: Line 125:
  root@om-gta02 ~ # opkg update
  root@om-gta02 ~ # opkg update
  root@om-gta02 ~ # opkg upgrade
  root@om-gta02 ~ # opkg upgrade
-
  root@om-gta02 ~ # opkg install make gcc gcc-symlinks libc6 libc6-dev binutils binutils-symlinks coreutils kernel-module-tun kernel-module-tunnel4 mdbus libglib-2.0-dev libdbus-glib-1-dev gconf orbit2 libidl-2-0 policykit eggdbus libexif12 libgps gpsd-dev gtk+ gconf libxml2-dev libsoup-2.4-dev bluez4-dev curl curl-dev libexif-dev libconfig-dev
+
  root@om-gta02 ~ # opkg install make gcc gcc-symlinks libc6 libc6-dev binutils binutils-symlinks coreutils kernel-module-tun kernel-module-tunnel4 mdbus libglib-2.0-dev
 +
                  libdbus-glib-1-dev gconf orbit2 libidl-2-0 policykit eggdbus libexif12 libgps gpsd-dev gtk+ gconf libxml2-dev libsoup-2.4-dev bluez4-dev curl curl-dev
 +
                  libexif-dev libconfig-dev
Now that the needed packages are installed, OLSRd, tangoGPS and the GeoSharing application can be compiled and installed on the Neo FreeRunner.
Now that the needed packages are installed, OLSRd, tangoGPS and the GeoSharing application can be compiled and installed on the Neo FreeRunner.
Line 161: Line 163:
  $ scp -r olsrd-0.6.0 root@openmoko:/home/root/
  $ scp -r olsrd-0.6.0 root@openmoko:/home/root/
-
8) On the Neo FreeRunner running SHR-testing, open a terminal, go in the olsrd folder and install the compiled OLSRd d\ae mon.
+
9) On the Neo FreeRunner running SHR-testing, open a terminal, go in the olsrd folder and install the compiled OLSRd d\ae mon.
  root@om-gta02 ~ # cd olsrd-0.6.0
  root@om-gta02 ~ # cd olsrd-0.6.0
Line 174: Line 176:
  root@om-gta02 ~ # make install
  root@om-gta02 ~ # make install
-
The final configuration required for the daemon to be fully effective is a configuration file. This file is located at '''/etc/olsrd.conf. There are two things to adapt for the GeoSharing project:
+
The final configuration required for the daemon to be fully effective is a configuration file. This file is located at '''/etc/olsrd.conf'''. There are two things to adapt for the GeoSharing project:
 +
 
1) At the end of the file, the OLSRd interface must be specified. Since OLSRd must be running on the Wi-Fi interface of the Neo FreeRunner, the OLSRd interface should be '''eth0'''. On the Neo FreeRunner, the '''VI''' editor can be used to edit this file accordingly.
1) At the end of the file, the OLSRd interface must be specified. Since OLSRd must be running on the Wi-Fi interface of the Neo FreeRunner, the OLSRd interface should be '''eth0'''. On the Neo FreeRunner, the '''VI''' editor can be used to edit this file accordingly.
  Interface "eth0"
  Interface "eth0"
  {
  {
-
Mode "mesh"
+
Mode "mesh"
  }
  }
Line 186: Line 189:
  LoadPlugin "olsrd_bmf.so.1.7.0"
  LoadPlugin "olsrd_bmf.so.1.7.0"
  {
  {
-
# no option
+
# no option
  }
  }
Line 192: Line 195:
=== TangoGPS application ===
=== TangoGPS application ===
-
TangoGPS is provided in some editions of the SHR-testing version. But, as stated in Section~\ref{sec:choice+gui}, a modified version of tangoGPS has been developed in the scope of the GeoSharing project. This new version adds a plugins interface allowing plugins to easily interact with tangoGPS. The compilation and the installation of the modified version of tangoGPS is described in the following steps.
+
TangoGPS is provided in some editions of the SHR-testing version. But a modified version of tangoGPS has been developed in the scope of the GeoSharing project. This new version adds a plugins interface allowing plugins to easily interact with tangoGPS. The compilation and the installation of the modified version of tangoGPS is described in the following steps.
-
%% ===================================================================
+
1) Before going any further, make sure that the Neo FreeRunner is free of any version of tangoGPS. On the Neo FreeRunner, open a terminal and execute the following command:
-
\newpage
+
-
%% ===================================================================
+
-
\begin{enumerate}
+
root@om-gta02 ~ # opkg remove tangogps
-
\item Before going any further, make sure that the Neo FreeRunner is free of any version of tangoGPS. On the Neo FreeRunner, open a terminal and execute the following command:
+
-
\begin{lstlisting}
+
-
root@om-gta02 ~ # opkg remove tangogps
+
-
\end{lstlisting}
+
-
\item On the computer, download the latest version of tangoGPS-modified from \linebreak[4 ] \url{http://download.geosharing-project.org}.
+
2) On the computer, download the latest version of tangoGPS-modified from http://download.geosharing-project.org.
-
\item Extract the archive content on the computer filesystem and open a terminal pointing to the folder that has just been extracted.
+
3) Extract the archive content on the computer filesystem and open a terminal pointing to the folder that has just been extracted.
-
\item From the computer, copy the entire tangogps folder to the Neo FreeRunner.
+
4) From the computer, copy the entire tangogps folder to the Neo FreeRunner.
-
\begin{lstlisting}
+
$ scp -r tangogps root@openmoko:/home/root/
-
$ scp -r tangogps root@openmoko:/home/root/
+
-
\end{lstlisting}
+
-
\item On the Neo FreeRunner, open a terminal, go in the tangogps folder, compile and install the project. Pay attention to the third, fourth and fifth commands. They are really important to avoid compilation issues. This process may take a while.
+
5) On the Neo FreeRunner, open a terminal, go in the tangogps folder, compile and install the project. Pay attention to the third, fourth and fifth commands. They are really important to avoid compilation issues. This process may take a while.
-
\begin{lstlisting}
+
root@om-gta02 ~ # cd tangogps
-
root@om-gta02 ~ # cd tangogps
+
root@om-gta02 ~ # sh configure
-
root@om-gta02 ~ # sh configure
+
root@om-gta02 ~ # CFLAGS="-march=armv4t"
-
root@om-gta02 ~ # CFLAGS="-march=armv4t"
+
root@om-gta02 ~ # PACKAGE_CFLAGS="-lconfig"
-
root@om-gta02 ~ # PACKAGE_CFLAGS="-lconfig"
+
root@om-gta02 ~ # PACKAGE_LIBS="-lconfig"
-
root@om-gta02 ~ # PACKAGE_LIBS="-lconfig"
+
root@om-gta02 ~ # make
-
root@om-gta02 ~ # make
+
root@om-gta02 ~ # make install
-
root@om-gta02 ~ # make install
+
-
\end{lstlisting}
+
-
\end{enumerate}
+
TangoGPS is now ready to serve the GeoSharing objectives in terms of graphical display.
TangoGPS is now ready to serve the GeoSharing objectives in terms of graphical display.
-
\subsection{WEP security}\label{app:wep}
+
=== WEP security ===
-
On the Neo FreeRunner, the wireless interface is denoted as \texttt{eth0}. The following lines need to be added in the configuration file of the device interfaces in order to set the wireless network in ad hoc mode with the WEP security enabled. On the Neo FreeRunner, the \texttt{VI} editor can be used to edit the file located at \texttt{/etc/network/interfaces} accordingly.
+
On the Neo FreeRunner, the wireless interface is denoted as '''eth0'''. The following lines need to be added in the configuration file of the device interfaces in order to set the wireless network in ad hoc mode with the WEP security enabled. On the Neo FreeRunner, the '''VI''' editor can be used to edit the file located at '''/etc/network/interfaces''' accordingly.
-
\begin{lstlisting}
+
auto eth0
-
auto eth0
+
iface eth0 inet static
-
iface eth0 inet static
+
address 10.0.0.1
-
address 10.0.0.1
+
netmask 255.0.0.0
-
netmask 255.0.0.0
+
network 10.0.0.0
-
network 10.0.0.0
+
wireless-mode ad-hoc
-
wireless-mode ad-hoc
+
wireless-essid GeoSharing
-
wireless-essid GeoSharing
+
wireless-key F4C3DEB3BE  
-
wireless-key F4C3DEB3BE
+
-
\end{lstlisting}
+
Once the configuration file has been modified, the network interfaces have to be restarted. The simplest solutions are to restart the device or execute the following command in a terminal of the device:
Once the configuration file has been modified, the network interfaces have to be restarted. The simplest solutions are to restart the device or execute the following command in a terminal of the device:
-
\begin{lstlisting}
+
root@om-gta02 ~ # /etc/init.d/networking restart
-
root@om-gta02 ~ # /etc/init.d/networking restart
+
-
\end{lstlisting}
+
-
\subsection{GeoSharing}\label{app:geosharing+on+neo}
+
=== GeoSharing ===
-
Now that OLSRd Linux d\ae mon and tangoGPS are correctly installed, the main module of the GoeSharing project must be installed as well. This installation is detailed in the following steps.
+
Now that OLSRd Linux daemon and tangoGPS are correctly installed, the main module of the GoeSharing project must be installed as well. This installation is detailed in the following steps.
-
\begin{enumerate}
+
1) On the computer, download the latest version of the GeoSharing application from http://download.geosharing-project.org.
-
\item On the computer, download the latest version of the GeoSharing application from \linebreak[4] \url{http://download.geosharing-project.org}.
+
-
\item Extract the archive content on the computer filesystem and open a terminal pointing to the folder that has just been extracted.
+
2) Extract the archive content on the computer filesystem and open a terminal pointing to the folder that has just been extracted.
-
\item From the computer, copy the entire geo\_sharing folder to the Neo FreeRunner.
+
3) From the computer, copy the entire geo_sharing folder to the Neo FreeRunner.
-
\begin{lstlisting}
+
$ scp -r geo_sharing root@openmoko:/home/root/
-
$ scp -r geo_sharing root@openmoko:/home/root/
+
-
\end{lstlisting}
+
-
\item On the computer, download the latest version of the run\_geosharing.sh script from \linebreak[4] \url{http://download.geosharing-project.org}.
+
4) On the computer, download the latest version of the run_geosharing.sh script from http://download.geosharing-project.org.
-
\item From the computer, copy the run\_geosharing.sh script to the Neo FreeRunner.
+
5) From the computer, copy the run_geosharing.sh script to the Neo FreeRunner.
-
\begin{lstlisting}
+
$ scp run_geosharing.sh root@openmoko:/home/root/
-
$ scp run_geosharing.sh root@openmoko:/home/root/
+
-
\end{lstlisting}
+
-
\end{enumerate}
+
-
This script (shown in Listing~\ref{list:run}) is the entry point of the GeoSharing application. It first configures the wireless network interface. Then, it launches the OLSRd d\ae mon. Finally, it compiles the GeoSharing application if it is not already done and launches it.  
+
This script (shown in Listing~\ref{list:run}) is the entry point of the GeoSharing application. It first configures the wireless network interface. Then, it launches the OLSRd d\ae mon. Finally, it compiles the GeoSharing application if it is not already done and launches it.
-
As explained in Chapter~\ref{chap:GPS}, two methods for GPS data retrieval have been implemented. By default, the D-Bus method is used to retrieve GPS data. To use the TCP method instead, on the Neo FreeRunner, using \texttt{VI}, edit the script \texttt{run\_geosharing.sh} and replace the last line:
+
#!/bin/sh
-
\begin{lstlisting}
+
cd /home/root/
-
./geo_sharing -m dbus
+
CURRENT_STATE=`mdbus -s org.freesmartphone.ousaged /org/freesmartphone/Usage org.freesmartphone.Usage.GetResourceState WiFi`
-
\end{lstlisting}
+
 +
if [ $CURRENT_STATE = "False" ]; then
 +
echo WiFi is currently down ... Setting it up now ...
 +
mdbus -s org.freesmartphone.ousaged /org/freesmartphone/Usage org.freesmartphone.Usage.SetResourcePolicy WiFi enabled
 +
mdbus -s org.freesmartphone.ousaged /org/freesmartphone/Usage org.freesmartphone.Usage.RequestResource WiFi
 +
ifconfig eth0 up
 +
/etc/init.d/networking restart
 +
else
 +
echo WiFi is already up !
 +
fi
 +
 +
echo "0" > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
 +
 +
mkdir -p /dev/net
 +
mknod /dev/net/tun c 10 200
 +
chmod 0700 /dev/net/tun
 +
olsrd
 +
 +
cd /home/root/geo_sharing/
 +
make
 +
clear
 +
./geo_sharing -m dbus
-
by
+
Two methods for GPS data retrieval have been implemented. By default, the D-Bus method is used to retrieve GPS data. To use the TCP method instead, on the Neo FreeRunner, using '''VI''', edit the script '''run_geosharing.sh''' and replace the last line:
-
\begin{lstlisting}
+
./geo_sharing -m dbus
-
./geo_sharing -m tcp
+
-
\end{lstlisting}
+
-
%% ===================================================================
+
by
-
\newpage
+
-
%% ===================================================================
+
-
\begin{lstlisting}[label=list:run,caption=The run\_geosharing.sh script is the entry point of the GeoSharing application.]
+
./geo_sharing -m tcp
-
#!/bin/sh
+
-
cd /home/root/
+
-
CURRENT_STATE=`mdbus -s org.freesmartphone.ousaged /org/freesmartphone/Usage org.freesmartphone.Usage.GetResourceState WiFi`
+
-
if [ $CURRENT_STATE = "False" ]; then
+
This script eases the launch of the GeoSharing application. Besides, it can be executed for two different purposes.  
-
echo WiFi is currently down ... Setting it up now ...
+
-
mdbus -s org.freesmartphone.ousaged /org/freesmartphone/Usage org.freesmartphone.Usage.SetResourcePolicy WiFi enabled
+
-
mdbus -s org.freesmartphone.ousaged /org/freesmartphone/Usage org.freesmartphone.Usage.RequestResource WiFi
+
-
ifconfig eth0 up
+
-
/etc/init.d/networking restart
+
-
else
+
-
echo WiFi is already up !
+
-
fi
+
-
echo "0" > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
+
* The GeoSharing application can be launched by tangoGPS when an end-user clicks on the GeoSharing entry of the plugins menu. The interactions with the end-user takes place through the graphical interface provided by tangoGPS. In order to provide to tangoGPS the path to the run_geosharing.sh script, the tangoGPS configuration file (located at '''/etc/tangogps_plugins.conf''') has to be filled accordingly.
-
 
+
-
mkdir -p /dev/net
+
-
mknod /dev/net/tun c 10 200
+
-
chmod 0700 /dev/net/tun
+
-
olsrd
+
-
 
+
-
cd /home/root/geo_sharing/
+
-
make
+
-
clear
+
-
./geo_sharing -m dbus
+
-
\end{lstlisting}
+
-
 
+
-
This script eases the launch of the GeoSharing application. Besides, it can be executed for two different purposes.
+
-
\begin{itemize}
+
-
\item The GeoSharing application can be launched by tangoGPS when an end-user clicks on the GeoSharing entry of the plugins menu. The interactions with the end-user takes place through the graphical interface provided by tangoGPS. In order to provide to tangoGPS the path to the run\_geosharing.sh script, the tangoGPS configuration file (located at \texttt{/etc/tangogps\_plugins.conf}) has to be filled accordingly.
+
-
\begin{lstlisting}
+
# TangoGPS Plugins Interface
-
# TangoGPS Plugins Interface
+
nbr_plugins = 1;
-
nbr_plugins = 1;
+
-
 
+
Plugin1 = {
-
Plugin1 = {
+
name = "GeoSharing";
-
name = "GeoSharing";
+
path = "sh /home/root/run_geosharing.sh";
-
path = "sh /home/root/run_geosharing.sh";
+
options = "";
-
options = "";
+
running = "/tmp/geosharing.run";
-
running = "/tmp/geosharing.run";
+
};
-
};
+
-
\end{lstlisting}
+
-
 
+
-
 
+
-
\item The GeoSharing application can also be launched alone in a terminal. The interactions with the end-user takes place through messages displayed in the terminal.
+
-
\end{itemize}
+
-
 
+
-
%% ===================================================================
+
-
%% ===================================================================
+
-
 
+
-
\chapter{Licence}\label{app:sec:licence}\index{Licence}
+
-
GeoSharing is distributed under the ``Creative Commons BY SA''\footnote{~\url{http://creativecommons.org/licenses/by-sa/3.0/legalcode}}\index{Creative Commons}.
+
-
 
+
-
\begin{itemize}
+
-
\item You are free:
+
-
 
+
-
\begin{itemize}
+
-
\item to \textbf{Share} --- to copy, distribute and transmit the work
+
-
\item to \textbf{Remix} --- to adapt the work
+
-
\end{itemize}
+
-
 
+
-
\item Under the following conditions:
+
-
 
+
-
\begin{itemize}
+
-
\item \textbf{Attribution} --- You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).
+
-
\item \textbf{Share Alike} --- If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.
+
-
\end{itemize}
+
-
 
+
-
\end{itemize}
+
-
 
+
 +
* The GeoSharing application can also be launched alone in a terminal. The interactions with the end-user takes place through messages displayed in the terminal.
-
* http://itouchmap.com/latlong.html
+
Information about using the application can be found [[Run_GeoSharing|here]].

Latest revision as of 13:11, 13 June 2011

Personal tools
Namespaces
Variants
Actions
Navigation
GeoSharing
Misc
Toolbox