-
Notifications
You must be signed in to change notification settings - Fork 2
/
README.txt
125 lines (93 loc) · 4.06 KB
/
README.txt
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
TOSNET PROJECT
==============
Author: Andrea Crotti, Marius Grysla, Oscar Dustmann
Date: 2010-08-18 10:42:37 CEST
Goal
~~~~~
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.
How to use it
~~~~~~~~~~~~~~
- Attach the motes on two computers /A/, /B/, where /A/ has internet access while /B/ doesn't
- login as root (needed for tun device manipulation)
- check that the motes are connected (motelist)
- setup the TinyOS environment
+ setup TOSROOT and other useful variables, use [.bash\_tinyos] to do it automatically
+ follow the [blip tutorial] to compile the serialforwarder
- install the program on both motes with:
+ *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)
- compile the driver with
+ *make force*
- on /A/ run the gateway with *./gateway /dev/ttyUSB0 wlan0* (for example)
- on /B/ run the client with *make run*
Now B should also have internet access, try to ping outside to check if it works.
[.bash\_tinyos]: http://www.5secondfuse.com/tinyos/.bash_tinyos
[blip tutorial]: http://docs.tinyos.net/index.php/BLIP_Tutorial
Further documentation
~~~~~~~~~~~~~~~~~~~~~~
In *driver* you can run *make doc* to generate the doxygen documentation of the code, which you will find in *doc\_doxy*
Files
~~~~~~
This is the tree of files in our application
- *driver*
In this directory we have client and gateway program, written in C for Linux systems.
+ *reconstruct.c*
this module is in charge of reconstructing the chunks we get from from the network
+ *chunker.c*
functions to split the message into many chunks
+ *client.c*
start the client version of the program
+ *gateway.c*
start the gateway
+ *tunnel.c*
manage the tunnel (open close write read)
+ *setup.c*
all the functions used both by the client and the gateway
+ *structs.c*
contains some useful functions to manage our own data structures
+ *motecomm.c*
low level communication between motes and the driver program
+ *glue.c*
Wrapper for the select system call, glues several file descriptors together
+ *serialif.c*
Serial implementation for the pc side using the serial interface of blip
+ *serialforwardif.c*
Serial implementation using the serial forwarder for the pc side (not fully supported)
+ *util.c*
constructor/destructor for class-like types
- *motes-simple*
Contains the mote program that was used in the presentation.
+ *SimpleMoteAppC.nc*
The TinyOS configuration file.
+ *SimpleMoteAppP.nc*
Here the implementation is done.
+ *SimpleMoteApp.h*
Contains defines and data structures for the mote program
+ *SendQueueC.nc & SendQueueP.nc*
Contain a generic queue module for outgoing outgoing messages.
+ *gen\_network.py, listen.py, packet.py & simulation.py*
Some Python scripts that can be used for testing with TOSSIM
- *motes*
The structure for a mote program with support for 6lowpan packets.
Currently not in use, because of speed issues.
+ *MoteNetAppC.nc*
The configuration
+ *MoteNetAppP.nc*
Implementation of the mote program. Uses the handler stack.
+ *MoteNetApp.h*
Structs and defines for the program.
+ *SendQueueC.nc & SendQueueP.nc*
Contain a generic queue module for outgoing outgoing messages.
- *python*
Contains experimental python code creating structs, testing packets chunking and compression
- *talks*
- *slides.org*
org-mode source file of the presentation
- *slides.tex*
tex beamer generated file from slides.org
- *.svg*
images used
- *slides.pdf*
resulting slides