-
Notifications
You must be signed in to change notification settings - Fork 2
/
README.tex
157 lines (130 loc) · 5.07 KB
/
README.tex
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
149
150
151
152
153
154
155
156
157
% Created 2010-08-18 Mer 10:40
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fixltx2e}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{soul}
\usepackage{t1enc}
\usepackage{textcomp}
\usepackage{marvosym}
\usepackage{wasysym}
\usepackage{latexsym}
\usepackage{amssymb}
\usepackage{hyperref}
\tolerance=1000
\providecommand{\alert}[1]{\textbf{#1}}
\title{TOSNET PROJECT}
\author{Andrea Crotti, Marius Grysla, Oscar Dustmann}
\date{18 Agosto 2010}
\begin{document}
\maketitle
\section*{Goal}
\label{sec-1}
The goal of this project is to create a network between motes.
Supposing we have mote A attached to a computer with an internet connection and mote B is attached to a computer without internet connection.
Then traversing a theoretically arbitrary network of motes we can let B connect to the internet through the network.
\section*{How to use it}
\label{sec-2}
\begin{itemize}
\item Attach the motes on two computers \emph{A}, \emph{B}, where \emph{A} has internet access while \emph{B} doesn't
\item login as root (needed for tun device manipulation)
\item check that the motes are connected (motelist)
\item setup the TinyOS environment
\begin{itemize}
\item setup TOSROOT and other useful variables, use \href{http://www.5secondfuse.com/tinyos/.bash_tinyos}{.bash\_tinyos} to do it automatically
\item follow the \href{http://docs.tinyos.net/index.php/BLIP_Tutorial}{blip tutorial} to compile the serialforwarder
\end{itemize}
\item install the program on both motes with:
\begin{itemize}
\item \textbf{cd motes-simple \&\& make telosb install.\$1 /dev/ttyUSB0,1}
where \$1 is the preferred mote ID (254 for the gateway, 1 for the client)
\end{itemize}
\item compile the driver with
\begin{itemize}
\item \textbf{make force}
\end{itemize}
\item on \emph{A} run the gateway with \textbf{./gateway /dev/ttyUSB0 wlan0} (for example)
\item on \emph{B} run the client with \textbf{make run}
\end{itemize}
Now B should also have internet access, try to ping outside to check if it works.
\section*{Further documentation}
\label{sec-3}
In \textbf{driver} you can run \textbf{make doc} to generate the doxygen documentation of the code, which you will find in \textbf{doc\_doxy}
\section*{Files}
\label{sec-4}
This is the tree of files in our application
\begin{itemize}
\item \textbf{driver}
In this directory we have client and gateway program, written in C for Linux systems.
\begin{itemize}
\item \textbf{reconstruct.c}
this module is in charge of reconstructing the chunks we get from from the network
\item \textbf{chunker.c}
functions to split the message into many chunks
\item \textbf{client.c}
start the client version of the program
\item \textbf{gateway.c}
start the gateway
\item \textbf{tunnel.c}
manage the tunnel (open close write read)
\item \textbf{setup.c}
all the functions used both by the client and the gateway
\item \textbf{structs.c}
contains some useful functions to manage our own data structures
\item \textbf{motecomm.c}
low level communication between motes and the driver program
\item \textbf{glue.c}
Wrapper for the select system call, glues several file descriptors together
\item \textbf{serialif.c}
Serial implementation for the pc side using the serial interface of blip
\item \textbf{serialforwardif.c}
Serial implementation using the serial forwarder for the pc side (not fully supported)
\item \textbf{util.c}
constructor/destructor for class-like types
\end{itemize}
\item \textbf{motes-simple}
Contains the mote program that was used in the presentation.
\begin{itemize}
\item \textbf{SimpleMoteAppC.nc}
The TinyOS configuration file.
\item \textbf{SimpleMoteAppP.nc}
Here the implementation is done.
\item \textbf{SimpleMoteApp.h}
Contains defines and data structures for the mote program
\item \textbf{SendQueueC.nc \& SendQueueP.nc}
Contain a generic queue module for outgoing outgoing messages.
\item \textbf{gen$_{\mathrm{network}}$.py, listen.py, packet.py \& simulation.py}
Some Python scripts that can be used for testing with TOSSIM
\end{itemize}
\item \textbf{motes}
The structure for a mote program with support for 6lowpan packets.
Currently not in use, because of speed issues.
\begin{itemize}
\item \textbf{MoteNetAppC.nc}
The configuration
\item \textbf{MoteNetAppP.nc}
Implementation of the mote program. Uses the handler stack.
\item \textbf{MoteNetApp.h}
Structs and defines for the program.
\item \textbf{SendQueueC.nc \& SendQueueP.nc}
Contain a generic queue module for outgoing outgoing messages.
\end{itemize}
\item \textbf{python}
Contains experimental python code creating structs, testing packets chunking and compression
\item \textbf{talks}
\begin{itemize}
\item \textbf{slides.org}
org-mode source file of the presentation
\item \textbf{slides.tex}
tex beamer generated file from slides.org
\item \textbf{.svg}
images used
\item \textbf{slides.pdf}
resulting slides
\end{itemize}
\end{itemize}
\end{document}