Ad-hoc networking with low-cost devices: how to do it right Olsonet Communications

Ad-hoc
Ad-hoc networking
networking with
with low-cost
low-cost devices:
devices:
how
how to
to do
do itit right
right
Pawel Gburzynski & Wlodek Olesinski
Olsonet Communications
1
What is wrong?
Industry
Industry has
has been
been making
making aa lot
lot of
of noise
noise (and
(and we
we
are
arealready
alreadyblessed
blessedwith
withZigBee®)
ZigBee®)
Lots
Lots of
of academic
academic work:
work: “problems”
“problems” identified,
identified,
“solutions”
“solutions”abound
abound
So
Sowhere
whereare
arethose
thosemesh
meshnetworks?
networks?Have
Haveyou
youseen
seen
one
onelately?
lately?
2
What is the goal?
application
application
protocols
protocols
OS
OS
hardware
hardware
3
What is the goal?
application
application
protocols
protocols
This is what appears to be
exciting research-wise
OS
OS
hardware
hardware
4
What is the goal?
application
application
protocols
protocols
OS
OS
hardware
hardware
This is what you have to
build, if you are serious
5
What is the goal?
application
application
protocols
protocols
OS
OS
This has the largest and
direct impact on unit
cost and feasibility
hardware
hardware
6
What is the goal?
application
application
protocols
protocols
OS
OS
This determines how
much you can do (and
how easily)
hardware
hardware
7
What is the goal?
application
application
protocols
protocols
OS
OS
But again, this is what
you have to build: the
WHOLE thing
hardware
hardware
Here
Here we
we have
have it:
it: the
the notorious
notorious (although
(although not
not often
often
realized)
realized) layering
layering problem
problem inin the
the standard
standard
approach
approachto
tosolutions:
solutions:
8
What is wrong with academic research:
Most
Mostresearch
researchignores
ignoresmundane
mundaneaspects,
aspects,like:
like:
device
devicefootprint
footprintand
andend
endcost
cost
realistic
realisticproperties
propertiesof
ofwireless
wirelesschannels
channels
ease
easeof
ofapplication
applicationdevelopment
development
portability
portability
maintenance
maintenance
9
What is wrong with the industry:
standards
standardsand
andlayers
layersstructured
structuredby
byconsortia,
consortia,
i.e.,
i.e.,the
thelarger
largerthe
thebetter
better
trying
trying to
to solve
solve general
general problems
problems with
with
conflicting
conflicting specs:
specs: you
you cannot
cannot produce
produce
anything
anythingtruly
trulysimple
simpleand
andsmall
smallthis
thisway
way
no
no early
early view
view of
of the
the actual
actual software:
software: itit will
will
be
beoutsourced;
outsourced;design
designand
andimplementation
implementationare
are
two
twocompletely
completelydifferent
differentthings
things
the
the application
application isis just
just aa layer
layer on
on top
top of
of aa
large
largemess
messof
ofvarious
various“stacks”
“stacks”
10
Our holistic ideas
Simple
Simple isis beautiful,
beautiful, e.g.,
e.g., the
the word
word “stack”
“stack” has
has been
been
removed
removedfrom
fromour
ourdictionary
dictionary
AA flexible
flexible plug-in
plug-in model:
model: tools
tools facilitating
facilitating
structured
structured interplay
interplay of
of modules
modules without
without
restricting
restrictingtheir
theirreach
reach
Ease
Easeof
ofaccommodating
accommodatingnew
newdevices
devices
AAsimple,
simple,auto-scalable,
auto-scalable,stage-less
stage-lessrouting
routingscheme
scheme
Authoritative
Authoritative product
product development
development and
and testing
testing
without
truly
without hardware
hardware deployment!
deployment!
truly rapid
rapid
development!
development!
11
The principle of collaboration
Nodes
Nodescome
comeand
andgo,
go,nothing
nothingisisever
everguaranteed.
guaranteed.
The
Themore
morenodes
nodesare
are involved
involved ininsome
someaction,
action, the
the more
more
likely
likelythat
thatsome
someof
ofthem
themwill
willfail
failto
tokeep
keeptheir
theirend
endup.
up.
Do
Do not
not use
use contrived
contrived schemes,
schemes, i.e.,
i.e., ones
ones that
that break
break
irreparably
irreparablywhen
whenone
oneof
ofthe
thecollaborating
collaboratingnodes
nodesfails.
fails.
AA node
node should
should idempotently
idempotently push
push the
the system
system towards
towards
the
the goal.
goal. It
It should
should never
never be
be aa critical
critical member
member of
of the
the
team,
team,unless
unlessthe
theteam
teamisissmall
smalland
andthe
theaction
actionisisshort.
short.
12
The principle of participation
Your
Yourresources
resourcesare
arelimited.
limited.
You
You should
should be
be able
able to
to tailor
tailor the
the extent
extent of
of your
your
participation
participationinincollaborative
collaborativetasks
tasksto
toyour
yourresources.
resources.
The
The collaborative
collaborative schemes
schemes should
should be
be scalable
scalable to
to the
the
amount
amountof
ofresources
resourcesof
ofthe
theteam
teammembers.
members.
Say,
Say, aa node
node with
with small
small memory
memory should
should be
be able
able to
to
contribute,
contribute, too,
too, albeit
albeit at
at proportionately
proportionately reduced
reduced
quality
qualitycompared
comparedto
toaaresourceful
resourcefulnode.
node.
13
These principles are mostly violated
E.g.,
E.g., popular
popular ad-hoc
ad-hoc routing
routing protocols
protocols operate
operate inin two
two
phases
phaseswhereby:
whereby:
paths
pathsare
areidentified,
identified,maintained,
maintained,recovered
recovered
actual
actualhop-by
hop-byhop
hopforwarding
forwardingtakes
takesplace
place
Don't
Don't be
be fooled!
fooled! Even
Even ifif the
the two
two phases
phases are
are
interleaved
interleaved and
and not
not blatantly
blatantly visible,
visible, they
they are
are still
still
there.
there.
Those
Thosepaths
pathsemulate
emulatewires
wires(in
(inaapathetic
patheticsort
sortof
ofway).
way).
The
The collaboration
collaboration isis contrived:
contrived: every
every node
node along
along aa
path
pathisisaacritical
criticalmember
memberof
ofaapotentially
potentiallylarge
largeteam.
team.
14
Mesh networking
P->P
P->P
?
This is how everybody
(including Zigbee®)
does it
Where
Where should
should II send
send
the
the packet
packet on
on its
its way
way
to
tothe
thedestination?
destination?
15
Mesh networking: TARP
P->P
P->P
?
TARP
TARP
?
?
?
?
Where
Where should
should II send
send Should
Should II rebroadcast
rebroadcast the
the
the
the packet
packet on
on its
its way
way received
received packet?
packet? Will
Will II help
help
to
when
tothe
thedestination?
destination?
whenIIdo
dothat?
that?
16
Flooding controlled by a chain of rules
am
amIIthe
the
recipient?
recipient?
YES
NO
too many
hops?
rule
rule11
fail
rule
rule22
seen
already?
receive
receiveand
and
forget
forget
Suboptimal Path Discard
drop
drop
fail
rule
rulenn
drop
fail
rebroadcast
rebroadcast
17
Path convergence
D
S
18
Path convergence
D
S
19
Path convergence
D
D
S
S
20
Don't let them fool you!
This
This isis not
not fundamentally
fundamentally worse
worse than
than point-to-point
point-to-point
forwarding!
forwarding! Flooding
Flooding may
may have
have negative
negative connotations,
connotations,
so
socall
callititsomething
somethingelse,
else,e.g.,
e.g.,re-casting.
re-casting.
All
Allthose
those“sophisticated”
“sophisticated”point-to-point
point-to-pointschemes
schemesmust
must
at
atleast
leaststart
startthis
thisway,
way,i.e.,
i.e.,from
fromflooding.
flooding.
Everything
Everything isis broadcast
broadcast inin wireless:
wireless: there
there isis no
no such
such
thing
thingas
aspoint-to-point;
point-to-point;they
theycan
canonly
onlypretend.
pretend.
In
In TARP
TARP the
the “paths”
“paths” can
can converge
converge to
to essentially
essentially the
the
same
same narrow
narrow stripe
stripe of
of nodes
nodes as
as inin AODV,
AODV, DSR,
DSR, ...... ifif
you
youREALLY
REALLYwant
wantthem
themto.
to.You
Youdon't!
don't!
21
Advantages
No
No need
need for
for data-link
data-link encapsulation:
encapsulation: packets
packets are
are
forwarded
forwardedinintheir
their“original”
“original”shape.
shape.
Rules
Rulesare
arecache-driven
cache-drivenand
andfailsafe:
failsafe:ififthe
thecache
cacheisis
too
too short,
short, the
the packet
packet will
will not
not be
be dropped
dropped on
on the
the
rule's
rule'sbehalf.
behalf.
This
This makes
makes the
the rules
rules scalable
scalable to
to resources:
resources:
preserving
preservingthe
theprinciple
principleof
ofparticipation.
participation.
Tuneability:
Tuneability:easy
easyto
totrade
tradebandwidth
bandwidthfor
forreliability
reliability
(PDF)
(PDF)ininthe
theface
faceof
ofmobility.
mobility.
Single
Single phase,
phase, automatic
automatic redundancy,
redundancy, no
no critical
critical
nodes:
nodes:follows
followsthe
theprinciple
principleof
ofcollaboration.
collaboration.
22
Node software layout
praxis
(application)
other
plugins
TARP
API
plugs
VNETI
phy
PicOS kernel
driver
driver
microcontroller
UART
...
GPIO, ADC, DAC
RF
module
other
network
devices
23
2
VUE : the same thing run virtually
praxis
(application)
other
plugins
TARP
API
plugs
VNETI
Channel
model
phy
Virtual
network
VUEE = Virtual Underlay Emulation Engine
Virtual
I/O pins
Virtual
UART
Interface daemon
Other
virtual
hardware
Virtual
RF module
Remote agents
24
SMURPH -> PicOS -> VUE
2
SMURPH
SMURPH==
==simulation
simulationand
andspecification
specificationsystem
system
SIDE
SIDE==
==SMURPH
SMURPH++interface
interfaceto
toreal-life
real-life
reactive
reactiveenvironment
environment
PicOS
PicOS==
==SMURPH
SMURPHlingo
lingoused
usedas
asthe
thethread
thread
paradigm
paradigmininour
ourmicroscopic
microscopicOS
OS
2
VUE
VUE2==
==macros
macrosand
andfunctions
functionsturning
turningaaPicOS
PicOS
application
application(praxis)
(praxis)into
intoaaSMURPH
SMURPHmodel
model
25
A PicOS thread
fsm hrate {
state HR_INIT:
delay (3 * 1024, HR_SEND);
Release;
state HR_SEND:
if ((HeartRate = hrc_get ()) > 255)
HeartRate = 255;
if (XWS == 0) {
// Don't do this if a sample is being sent
address packet = tcv_wnp (HR_SEND, BSFD, 2);
put1 (packet, PT_HRATE);
put1 (packet, HeartRate);
tcv_endp (packet);
}
proceed HR_INIT;
}
26
A PicOS thread
fsm hrate {
INIT
INIT
state HR_INIT:
delay (3 * 1024, HR_SEND);
Release;
33sec
sec
SEND
SEND
calculate
calculate
HR
HR
state HR_SEND:
if ((HeartRate = hrc_get ()) > 255)
HeartRate = 255;
yes
if (XWS == 0) {
XWS?
// Don't do this if a sample is being sentXWS?
address packet = tcv_wnp (HR_SEND, BSFD, 2); no
put1 (packet, PT_HRATE);
get xmt
put1 (packet, HeartRate);
tcv_endp (packet);
buffer
}
proceed HR_INIT;
send
send
HR
HR
}
27
What does it buy us?
x
code
code
shared,
shared,ROM
ROM(flash)
(flash)
data
data
needed
neededanyway
anyway(small,
(small,
mostly
mostlyglobal)
global)
stack
stack
unacceptable
unacceptable
28
What does it buy us?
x
1
code
code
shared,
shared,ROM
ROM(flash)
(flash)
data
data
needed
neededanyway
anyway(small,
(small,
mostly
mostlyglobal)
global)
stack
stack
unacceptable
unacceptable
Multiple
Multiple threads
threads (FSM's)
(FSM's) operating
operating as
as
coroutines
coroutines with
with implicit
implicit control
control transfer
transfer and
and
multiple
multipleentry
entrypoints.
points.They
Theyall
allexecute
executeon
onthe
the
same
same single
single stack
stack within
within aa trivial
trivial prerequisite
prerequisite
amount
amountof
ofRAM
RAM(like
(like20
20bytes
bytesper
perthread).
thread).
29
Summary
Something
Something simple
simple that
that works
works wins
wins with
with anything
anything
complex
complexthat
thatisismerely
merelysupposed
supposedto
towork.
work.
We
We only
only demonstrate
demonstrate whole
whole solutions,
solutions, not
not their
their parts
parts
of
ofallegedly
allegedlysuperb
superb(albeit
(albeitisolated)
isolated)quality.
quality.
1000+
1000+ nodes
nodes industrial
industrial grade
grade ad-hoc
ad-hoc setup
setup based
based on
on
node
nodewith
withcomponent
componentcost
costbelow
below$20.
$20.
An
An IL
IL (Independent
(Independent Living)
Living) monitoring
monitoring system
system inin aa
leading
leadingIL
ILfacility
facilityininNJ.
NJ.
30