Table o Con en s
Chap e 1 - In oduc ion................................................................................................................. 2
1.1 Mo i a ion...........................................................................................................2
1.2 Objec i es...........................................................................................................2
1.3 Me hodology.......................................................................................................2
1.4 Documen a ion....................................................................................................3
1.5 Blue oo h............................................................................................................3
Chap e 2 - PCWin32 Pla o m......................................................................................................... 8
2.2 In oduc ion........................................................................................................8
2.3 Blue oo h adap e s..............................................................................................8
2.4 Blue oo h lib a ies...............................................................................................9
2.5 Summa y o Blue oo h Compa ibili ies.................................................................12
2.6 Blue oo h clien -se e applica ion......................................................................12
2.7 Se ial communica ion.........................................................................................14
Chap e 3 - In el iMo es and Tiny OS............................................................................................. 16
3.1 In oduc ion......................................................................................................16
3.2 In el iMo es.......................................................................................................16
3.3 TinyOS..............................................................................................................17
3.4 Comunica ions on iMo es...................................................................................17
3.4.1 Se ial.............................................................................................................17
3.4.2 Blue oo h.......................................................................................................20
Conclusion............................................................................................................................20
Chap e 4 - Mobile pla o ms......................................................................................................... 22
4.1 In oduc ion......................................................................................................22
4.2 Mobile de ice....................................................................................................22
4.3 De elopmen pla o ms o Mobile De ices .........................................................23
4.4 Re e ences........................................................................................................24
Chap e 5 - Benchma k Applica ions............................................................................................... 25
5.1 In oduc ion......................................................................................................25
5.2 Summa y o es s pe o med..............................................................................25
5.3 Silen P esence con ol.......................................................................................25
5.4 Remo e iMo e moni o .......................................................................................29
Chap e 6 - Conclusions................................................................................................................ 33
6.1 In oduc ion......................................................................................................33
Chap e 7 - P ojec Managemen ................................................................................................... 35
7.1 In oduc ion......................................................................................................35
Annexes...................................................................................................................................... 40
Blue oo h add esses lis ...........................................................................................44
Ge ing s a ed wi h a eLink BT SDK o Ja a............................................................46
Ge ing s a ed wi h A en ana..................................................................................52
Ge ing s a ed win iMo es and TinyOS.....................................................................54
Ge ing s a ed wi h Symbian...................................................................................64
1
Chap e 1 - In oduc ion
1.1 Mo i a ion
Pe asi e compu a ion is he in eg a ion o he compu e in he daily pe son li e, in a way ha compu e s
a e no pe cei ed as di e en ia ed objec s. The objec i e is inse “in elligen de ices” in he en i onmen
and in he objec s ha we can use e e y day, in o de ha he pe sons could in e ac wi h hem in a na u al
way, in all si ua ions and ci cums ances.
Those “in elligen de ices” a e special-pu pose compu e sys em designed o pe o m a dedica ed unc ion.
Unlike a gene al-pu pose compu e , such as a pe sonal compu e , an embedded sys em pe o ms one o a
ew p e-de ined asks, usually wi h e y speci ic equi emen s, and o en includes ask-speci ic ha dwa e and
mechanical pa s no usually ound in a gene al-pu pose compu e . Since he sys em is dedica ed o speci ic
asks, design enginee s can op imize i , educing he size and cos o he p oduc . Embedded sys ems a e
o en mass-p oduced, bene i ing om economies o scale.
This echnology is implan ed in educed placed whe e a pe son can no access in, o educed dimensions o
o being a dange ous o human heal h. Fo example, i we we e in e es ed in measu e an o en
empe a u e in an indus ial en i onmen . Ou “in elligen de ice” will be placed inside he o en and will
send he empe a u e o a main compu e using a wi eless communica ion p o ocol. F om he main
compu e i will be moni o ized he eme a u e o he mos c i ical pa s o he ac o y.
F om o he side, he e a e Handheld de ices (also known as handheld compu e o simply handheld). A
handheld is a pocke -sized compu ing de ice, ypically using a small isual display sc een o use ou pu and
a minia u ised keyboa d o use inpu . Almos all hose de ice p o ides mechanism o wi eless
communica ion.
In he example shown in he p e ious pa ag aphs he main compu e is a “di e en ia ed objec ” in he
sys em. This con adic s, he de ini ion o a pe asi e sys em. Bu i we eplace a main compu e o one o
se e al handhelds o moni o ing he empe a u e. The human esponblie o checking ha all he sys em is
wo king, will no need be in he same oom han he main compu e . He checks om i s handheld and
isualy i he o en is wo king p ope ly o no . Now he example ma ches wi h he de ini ion o a pe asi e
sys em.
The mo i a ion o ealize his p ojec is co e he necessi y ha exis s on a pe asi e sys em o con olling
and e ie e in o ma ion om i s “in elligen de ices” om any poin o i s in luence a ea. Fo his PFC he
“in elligen de ices” will be an In el iMo e and he handheld will be a sma -phone.
1.2 Objec i es
The objec i e o his PFC will be build a pe asi e sys em. In o de o do ha , we will ha e o s udy which
a e he communica ions mechanism ha a e p o ided in he In el iMo e pla o m and in he sma -phone
pla o m.
2
I will be added an ex a PCWin32 pla o m, because he e a e ools ha help us o moni o ize he
communica ions.The applica ions o he iMo e and he sma phone a e de eloped and downloaded om
he PCWin32 pla om. Du ing he p ojec i we de eloped se e al applica ions ha will es he pla o ms
communica ions capabili ies and depending on he esul s ob ained i will be designed he inal pe asi e
sys em.
We will ocus on in e connec he di e en pla o ms wi h blue oo h p o ocol. Because i is a wi eless
p o ocol, wide ange (up o 100m.), low powe consump ion, i is in eg a ed in almos all sma phones and
in some Mo es. So he i s hing ha will do, i is s udying blue oo h, because his p o ocol has been
designed o building pe asi e sys ems and exis s in he h ee pla o ms.
In he nex sec ion, i will be s udied he beha io o Blue oo h p o ocol on he pla o m PCWin32. I will be
analized he di e en lib a ies a ailable on he ma ke o his pla o m.
In he second chap e a e p esen ed he blue oo h de ices and lib a ies o be es ed. F om his chap e we
will conclude which lib a y is compa ible wi h which blue oo h de ice and he lib a ies limi a ions. Fo he
inal applica ion we need o know which lib a ies and which blue oo h de ices can be used. Due o he ac
ha he iMo es ha e a se ial po i will be es ed a se ial communica ions lib a y.
On he hi d chap e , i is p esen ed he iMo e and i s ope a ing sys em TinyOS. How o de elop applica ions
on his pla o m and will de eloped iMo e applica ions o es ing i s communica ions capabili ies (Se ial and
Blue oo h).
On he ou h, i will be shown applica ion de elopmen o mobile de ices on Mobile de elopmen pla o ms
(J2ME and Symbian). I will be de eloped a es applica ion o checking i s communica ion capabilie es
(Blue oo h)
Finally on he ou h chap e , depending on he esul s aken on he h ee pa s i will de eloped a sample
applica ion ha will show up he in e connec ion among he h ee pla o ms.
1.3 Me hodology
Fo knowing he in e connec ion possibili ies ha each pla o m o e us, we will s udy each pla o m
independen ly.
Fo each pla o m we will ake a look i s o he physical in e aces ha we ha e (Blue oo h, Se ial, USB....).
A e ha we will ake a look a he di e en possibili ies ha Blue oo h p o ocol b ing us on he ocused
pla o m s udied. Depending on he esul s ob ained i will be c ea ed a sample applica ion ha shows up
he esul s ob ained on he s udy.
Wi h his me hodology di e en in e connec ion possibili ies aises. And i is mo e easible o ind he
co ec in e connec ion o mula among he di e en pla o ms in ol ed.
Once inalized he s udy on each pla o m and depending on he esul s ob ained we will in e connec he
di e en pla o ms.
3
Illus a ion 1: P ojec a chi ec u e
All documen a ion ela ed wi h he Con igu a ion Managemen has been collec ed in he Annex because I
conside ha kind o documen a ion can dis ac om he objec i es o he s udy. Ne e heless his
documen a ion sa es a lo o ime in case ha you we e in e es ed in ins all he ools in ano he compu e
o sol e known p oblems when you wo k wi h he ools.
1.5 Blue oo h
Blue oo h is a wi eless p o ocol ha o i s cha ac e is ics: wi eless p o ocol, low powe consump ion, wide
ange (100 m) and p o ided in almos all he sma phones and in some Mo es. Use blue oo h p o ocol will
help us o in eg a e all di e en elemen s ha a e pa o ou pe asi e sys em. In his sec ion a e
explained he main ips o blue oo h p o ocol.
1.5.1 His o y
Old Ha ald Blue oo h uni ed Denma k and No way. Blue oo h o oday
will uni e he wo lds o compu e s and elecomunica ions (hope ully
longe han he ew yea s Ha ald's Viking kingdom su i ed). In 1994
E icsson Mobile Communica ions ini ia ed a s udy o in es iga e he
easibili y o a low-powe low-cos adio in e ace be ween mobile
phones and hei accesso ies. In Feb 1998, i e companies E icsson,
Nokia, IBM, Toshiba and In el o med a Special In e es G oup (SIG)
[1]. The g oup con ained he necessa y business sec o membe s - wo
ma ke leade s in mobile elephony, wo ma ke leade s in lap op
compu ing and a ma ke leade in digi al signal p ocessing echnology.
I was es ima ed ha be o e yea 2002, Blue oo h will be a buil -in
ea u e o mo e han 100 million mobile phones and se e al million
communica ion de ices anging om handse s and po able PCs o
desk op compu e s and no ebooks.
1.5.2 Desc ip ion
Blue oo h o e s a wi eless in e connec ion among di e en de ices ha has his echnology, like mobiles,
PDA, digi al came as, lap ops, p in e s, o simpy any ha any de ice ha i s manu ac u e wan s, using
always a sa e adio connec ion. The ange ha use o ha e hose de ices a e 10 me e s o sa ing ene gy,
because almos all hose de ices use ba e ies. The ange can be inc eased o 100 me e s ( e y close o Wi-
Fi) bu inc easing i s consump ion [3]. Fo imp o ing he communica ion i s desi able ha no big physical
objec will in e pose, o ins ance a wall.
The bandwid h depends on i s ke nel e sion:
Ve sion 1.1 723.1 Kbps
Ve sion 1.2 1 Mbps
Ve sion 2.0 + EDR: 2.1 ~ 3 Mbps
Table 1: Blue oo h e sion and i s bandwi h
4
Illus a ion 2: Roskilde Domki ke /
RoskildeCa hed al - The bu ial
place o Danish kings and queens.
The ansmi ion powe is di ided in 3 ca ego ies:
Class Maximum Pe mi ed Powe
(mW)
Maximum Pe mi ed
Powe
(dBm)
Range
(app oxima e)
Class 1 100 mW 20 dBm ~100 me e s
Class 2 2.5 mW 4 dBm ~10 me e s
Class 3 1 mW 0 dBm ~1 me e s
Table 2: Blue oo h classes
1.5.3 Topology
The big di e ence wi h o he wi eless ne s, like IEEE 802.11 (Wi-Fi), designed o de ices ha a e inside a
building o in i s nea abou ; is ha hose de ices ha use wi eless PANs IEEE 802.15, including Blue oo h,
will be able o communica e in any poin o he plane , e en inside a plane o ship wi hou he help o any
access poin .
The blue oo h a chi ec u e is o ganized in
picone s
, ha a e wo o mo e de ices sha ing one channel; one
o he ac s as mas e , and he es as sla e. A
sca e ne
is made o se e al picone s.
1.5.4 Blue oo h s ack
The main p inciple in mind when de eloping he Blue oo h P o ocol A chi ec u e has been he maximiza ion
and he e-use o exis ing p o ocols o di e en pu poses a he highe laye s. The one main ad an age is
ha exis ing (legacy) applica ions can be adap ed o wo k wi h he Blue oo h Technology. The Blue oo h
P o ocol A chi ec u e also allows o he use o commonly used applica ion p o ocols on op o he Blue oo h-
Speci ic p o ocols. In simple e ms, his pe mi s new applica ions o ake ull ad an age o he capabili ies o
he Blue oo h echnology and o many applica ions ha a e al eady de eloped by endo s; hey can ake
immedia e ad an age o ha dwa e and so wa e sys ems, which a e also complian wi h he Speci ica ion
[2].
5
Illus a ion 3: Picone wi h one sla e (P2), wi h se e al (P3)
and sca e ne (P1+P2+P3)
1.5.4.1 HCI
The HCI p o ides a command in e ace o he baseband con olle and link manage , and access o
ha dwa e s a us and con ol egis e s. Essen ially his in e ace p o ides a uni o m me hod o accessing he
Blue oo h baseband capabili ies. The HCI exis s ac oss 3 sec ions, he Hos - T anspo Laye - Hos
Con olle . Each o he sec ions has a di e en ole o play in he HCI sys em.
1.5.4.2 SDP (Se ice Disco e y P o ocol) p o ocol
The Se ice Disco e y P o ocol (SDP) p o ides he means o clien applica ions o disco e he exis ence o
se ices p o ided by se e applica ions as well as he a ibu es o hose se ices. The a ibu es o a
se ice include he ype o class o se ice o e ed and he mechanism o p o ocol in o ma ion needed o
u ilize he se ice.
SDP in ol es communica ion be ween a SDP se e and a SDP clien . The se e main ains a lis o se ice
eco ds ha desc ibe he cha ac e is ics o se ices associa ed wi h he se e . Each se ice eco d con ains
in o ma ion abou a single se ice. A clien may e ie e in o ma ion om a se ice eco d main ained by he
SDP se e by issuing a SDP eques . I he clien , o an applica ion associa ed wi h he clien , decides o use
a se ice, i mus open a sepa a e connec ion o he se ice p o ide in o de o u ilize he se ice. SDP
p o ides a mechanism o disco e ing se ices and hei a ibu es, bu i does no p o ide a mechanism o
u ilizing hose se ices.
No mally, a SDP clien sea ches o se ices based on some desi ed cha ac e is ics o he se ices. Howe e ,
he e a e imes when i is desi able o disco e which ypes o se ices a e desc ibed by an SDP se e 's
se ice eco ds wi hou any a p io i in o ma ion abou he se ices. This p ocess o looking o any o e ed
se ices is called
b owsing
.
1.5.4.3 SPP (Se ial Po P o ocol) p o ocol
The Se ial Po P o ile de ines he equi emen s o Blue oo h de ices necessa y o se ing up emula ed
se ial cable connec ions using RFCOMM be ween wo pee de ices. The equi emen s a e exp essed in e ms
o se ices p o ided o applica ions, and by de ining he ea u es and p ocedu es ha a e equi ed o
in e ope abili y be ween Blue oo h de ices.
Essen ially, he Se ial Po P o ile de ines he p o ocols and p ocedu es ha shall be used by de ices using
Blue oo h o RS232 (o simila ) se ial cable emula ion.The scena io co e ed by his p o ile deals wi h legacy
6
I
llus a ion 4: Basic
Blue oo h s ack
applica ions using Blue oo h as a cable eplacemen , h ough a i ual se ial po abs ac ion (which in i sel
is ope a ing sys em-dependen ).
1.5.4.4 L2CAP p o ocol
Logical Link Con ol and Adap a ion P o ocol (L2CAP) p o ides connec ion-o ien ed and connec ionless da a
se ices o uppe laye p o ocols wi h p o ocol mul iplexing capabili y and segmen a ion and eassembly
ope a ion. L2CAP pe mi s highe le el p o ocols and applica ions o ansmi and ecei e L2CAP da a packe s
up o 64 kiloby es in leng h.
L2CAP is based a ound he concep o
channels
. Channel is a logical connec ion on op o baseband
connec ion. Each channel is bound o a single p o ocol in a many- o-one ashion. Mul iple channels can be
bound o he same p o ocol, bu a channel canno be bound o mul iple p o ocols. Each L2CAP packe
ecei ed on a channel is di ec ed o he app op ia e highe le el p o ocol. Mul iple channels can sha e he
same baseband connec ion.
1.5.5 Blue oo h API
F om he HCI and lowe laye s a e implemen ed by he blue oo h ha dwa e manu ac u e . Fo dealing wi h
uppe HCI laye s he e a e wo big pla o ms Symbian and J2ME (Sun Mic osys ems api's). Fo De eloping
applica ions o Symbian and J2ME pla o m you can see in he annex o his documen a ion wo a icles ha
alks abou i .
Depending on he abs ac ion le el ha he applica ion wo ks wi h wi h he da a ans e ed and he need
o con oling he communica ions p o ocol i will be mo e adequa ed one o ano he laye . Fo con olling
he communica ions is mo e adequa ed HCI, and o sending by es like in a se ial line is would be RFCOMM.
Symbian api's only a e implemen ed on mobile de ices ha use Symbian OS. Wi h Symbian you can wo k
wi h OBEX, SDP, RFCOMM, L2CAP and HCI laye s.
I J2ME suppo s JSR082 hen i will be possible o deal wi h he blue oo h APIs. JSR082 can deal wi h SDP,
L2CAP and OBEX. JSR82 is in all mobiles ha ha e blue oo h and wo ks wi h J2ME pla o m, bu o J2SE
(lap ops and desk ops) is no included in he pla o m and i s needed an ex a lib a y o wo king wi h. On
he ollowing able he e a e some o he lib a ies a ialable o J2ME pla o m.
Lib a y License
BlueCo e LGPL
A ina T ial 15 days
A en ana T ial 15 days
Table 3: Blue oo h lib a ies es ed
1.5.5.1 JSR082 – Blue oo h lib a y o Ja a
The o e all goal o his speci ica ion is o de ine a s anda d se o APIs ha will enable an open, hi dpa y
applica ion de elopmen en i onmen o Blue oo h wi eless echnology. The API is a ge ed mainly a
de ices ha a e limi ed in p ocessing powe and memo y, and a e p ima ily ba e y-ope a ed.
7
The main ad an age o using a .ja lib a y ha implemen s js 082 is ha he sou ce code ha uses his
lib a y is able o wo k in ano he ope a ing sys ems (MAC, Linux, Windows) and e en in ano he ha dwa e
a chi ec u es mobile de ices. In o he implemen a ions we depend on he ope a ing sys em [3] o he
ha dwa e a chi ec u e [4].
As we a e going o use a mobile J2ME compa ible wi h blue oo h i will be e y use ull o use his lib a y, in
o de o use applica ion wi h di e en pla o ms.
1.6 Re e ences
[1] Blue oo h speci icaions - h p://www.blue oo h.o g
[2] Blue oo h s ack - h p://www.secuwiki.com/ iki/ iki-index.php?page=Blue oo h
[3] Wikipedia - h p://en.wikipedia.o g/wiki/Blue oo h
8
Chap e 2 - PCWin32 Pla o m
2.1 Mo i a ion
We a e going o s udy he Blue oo h and Se ial communica ion p o ocol on PCWin32 because his pla o m
will be he esponsible o in e connec ing indi ec ly he mobile pla o m and iMo e pla o m.
2.2 In oduc ion
In his chap e we will s udy he communica ions mechanism exis ing o PCWin32 pla o m. Mainly ocusing
on Blue oo h, bu se ial p o ocol is shown as well.
I will p esen ed he blue oo h adap e s ha ha e been used o es ing he blue oo h communica ion in he
PCWin32 pla o m. Fo each one I p esen i s mos signi ican ea u es. On he ollowing sec ion a e es ed
h ee lib a ies ha wo ks wi h blue oo h p o ocol and one lib a y ha wo ks wi h he se ial line. On he es
pe o med we will see he compa ibili ies wi h he blue oo h adap e s.
F om he esul ing es we will see he ma ches be ween lib a ies and communica ion de ices and wha kind
o p o ocol we can wo k wi h.
2.3 Blue oo h adap e s
The use o se e al Blue oo h adap e s is due o he ac ha each js 82 blue oo h lib a y implemen a ion
wo ks wi h a conc e e Blue oo h adap o . We will use mo e han one adap o o unning clien -se e
applica ions wi hin he same lap op.
Pic u e Comme cial name Fea u es
Toshiba PA3455U -
1BTM
Blue oo h e sion 2.0
Class II
P o ocols SDP, SPP, DUN, FAX, LAP, OPP,
FTP, HID, HCRP, PAN,
BIP,HSP,A2DP,AVRCP,GAVDP
T us BT-220TP Blue oo h e sion 2.0
Class II
P o ocols SDP, SPP, DUN, FAX, LAP, OPP,
FTP, HID, HCRP, PAN,
BIP,HSP,A2DP,AVRCP,GAVDP
9
2.7 Se ial communica ion
E en ha he ocus o his p ojec is s udy he ocus is s udy he blue oo h p o ocol. I is in e es ing wo k
wi h o he known p o ocols in he case ha he blue oo h communica ion could no be achi ed.
In elecommunica ions, RS-232 is a s anda d o se ial bina y da a in e connec ion be ween a
DTE
(Da a
e minal equipmen ) and a
DCE
(Da a Ci cui - e mina ing Equipmen ). I is a wi ed p o ocol.
2.7.1 Lib a ies
The mos adequa ed o wo king a e
ja acomm
[10] because a e implemen ed in ja a. So i will be mo e
adequa ed in case ha an applica ion ha e o wo k also wi h a js 82 blue oo h lib a y and.
The Ja a Communica ions 3.0 API is a Ja a ex ension ha acili a es de eloping pla o m-independen
communica ions applica ions o echnologies such as Sma Ca ds, embedded sys ems, and poin -o -sale
de ices, inancial se ices de ices, ax, modems, display e minals, and obo ic equipmen .
You can download he lib a ies om h p://www. h-bochum.de/ b3/me a-lab/ ools/.Fo ins alling i , un
comp ess i and lea e he .ja lib a y in o he .lib olde o you cu en p ojec and copy win32com.dll in o
c: windows sys em32.
In he ollowing chap e i is de eloped a sample applica ion ha communica es ia se ial po PCWin32 wi h
iMo e pla o m.
2.8 Re e ences
[1] JSR 082 - h p://jcp.o g/en/js /de ail?id=82
[2] Blue o h Speci ica ion - h p://www.blue oo h.o g
[3] Windows Embedded Sou ce Tools o Blue oo h Technology
[4] P og amación de aplicaciones clien e/se ido blue oo h en Symbian -
h p://www. odosymbian.com/seca 44.h ml
[5] A ina js 082 lib a y - h p://www.a elink.com/Blue oo h/P oduc s/JSR-82/index.h m
[6] Eclipse – h p://www.eclipse.o g
[7] An - h p://an .apache.o g/
[8] A en a - h p://www.a e ana-gmbh.de/a e ana-gmbh/p oduk e/Readme.xml
[9] Blueco e - h p://blueco e.sou ce o ge.ne /
[10] Ja aComm - h p://ja a.sun.com/p oduc s/ja acomm/
16
Chap e 3 - In el iMo es and Tiny OS
3.1 In oduc ion
In his chap e we will be p esen ed he iMo es ha dwa e and i s ope a ing sys em TinyOS. A e wa ds i will
be s udied he di e en ways ha we ha e o communica ing wi h he iMo es. I will de eloped sample
applica ions o es i s communica ion capabili ies. The con igu a ion managemen o wo king wi h he
iMo es ead he a icle
Ge ing s a ed wi h iMo es and TinyOS
included in he annex.
3.2 In el iMo es
The In el Mo e [2], [3], [4] is an enhanced senso ne wo knode pla o m ha is a ge ed o a a ie y o
esea ch and comme cial applica ions. The ocus o his pla o m de elopmen is o build a small, modula
uni ha can easily be cus omized o a a ie y o usages by snap-on expansion boa ds. The ope a ing
sys em so wa e is based on TinyOS, which is a componen based ope a ing sys em speci ically designed o
senso ne wo k applica ions by he Uni e si y o Cali o nia in Be keley and he a ached In el Resea ch Lab.
The In el Mo e p o ides enhanced compu a ion and communica ion esou ces ha allow mo e demanding
senso ne wo k applica ions o be suppo ed. In pa icula , he use o he Blue oo h* adio p o ocol p o ides
inc eased link eliabili y and secu i y op ions. Blue oo h also p o ides a synch onized TDMA access scheme
which allows he sende and ecei e o a communica ions link o be powe ed down in-be ween ac i e slo s,
he eby educing he a e age powe consump ion.
17
Illus a ion 13: In el iMo e componen s
I
llus a ion 12: iMo e size is qui e simila
o hose e e yday objec s
I
llus a ion 11: iMo e has
se e al s ackable de ices and
senso s
3.3 TinyOS
TinyOS[1] is an
open-sou ce ope a ing sys em
designed o
wi eless embedded senso ne wo ks
. I ea u es
a
componen -based a chi ec u e
which enables apid inno a ion and implemen a ion while minimizing code
size as equi ed by he se e e memo y cons ain s inhe en in senso ne wo ks. TinyOS's
componen lib a y
includes ne wo k p o ocols, dis ibu ed se ices, senso d i e s, and da a acquisi ion ools – all o which can
be used as-is o be u he e ined o a cus om applica ion. TinyOS's e en -d i en execu ion model enables
ine-g ained powe managemen ye allows he scheduling lexibili y made necessa y by he unp edic able
na u e o wi eless communica ion and physical wo ld in e aces.
TinyOS has been po ed o o e a dozen pla o ms and nume ous senso boa ds. A wide communi y uses i
in simula ion o de elop and es a ious algo i hms and p o ocols. New eleases see o e 10,000
downloads. O e 500 esea ch g oups and companies a e using TinyOS on he Be keley/C ossbow Mo es.
Nume ous g oups a e ac i ely con ibu ing code o he sou ce o ge si e and wo king oge he o es ablish
s anda d, in e ope able ne wo k se ices buil om a base o di ec expe ience and honed h ough
compe i i e analysis in an open en i onmen .
3.4 Comunica ions on iMo es
The in el iMo es ha e wo in e aces o communica ing: Blue oo h and Se ial (RS232). In he ollowing
sec ions i will be de eloped applica ions o es ing h iMo e communica ions capabili ies.
3.4.1 Se ial
The se ial communica ion is used by he iMo e o ans e ing TinyOs applica ions in o he iMo e. I can be
use as well o ans e ing da a o any TinyOS applica ion. In he ollowing sec ion is p esen ed a sample
TinyOS ha eads and w i es om he Se ial line.
3.4.1.1 EchoSe ial es (iMo e side)
The po pouse o his es he se ial communica ion wi h he iMo e, in o de o see wha is going on in and
18
Illus a ion 15: In el iMo e Ha dwa e
a chi ec u e
Illus a ion 14: iMo e-
TinyOs laye s
send some o he commands o he imo e. The oo imo e will be linked o he PCWin32 h ough a se ial po
(simula ed by a usb connec ion).
The iMo e applica ion will:
•Echo any cha ac e ha will be sen by he se ial po , in o de , o check ha se ial communica ion
wo ks.
•Each 10 secs. Will send a message by he se ial po , in o de , o see ha he iMo e is ali e.
Build and loading
Open a cygwin window and om /op / inyos-1.x/con ib/imo e/apps/EchoSe ial olde ype make ins all
imo e, and ollow he window ins uc ions.
Open Hyp e e minal, c ea e a new connec ion wi h he ollowing cha ac e is ics:
Click on call bu on, ese he iMo e and wai o he esponses...
3.4.1.2 EchoSe ial es (PCWin32 side)
The po pouse o his ead he se ial po 2 and send some da a. In one iMo e will be loaded he EchoSe ial
applica io and om EchoSe ial es we will e ie e all he in o ma ion sen by he iMo e and we will be able
o send da a o he iMo e.
The iMo e applica ion will:
•Echo any cha ac e ha will ecei e om he se ial po
•Send i s in e nal coun e alue..
19
Illus a ion 16: Hype e minal
con igu a ion
Build and execu ing
F om eclipse impo he p ojec om C: p ojec s inal Se ialEcho lib and un he p ojec s. The iMo e echoes
i s in e nal coun e h ough he Se ial po .
Conclusions
F om a ja a applica ion we a e able o ead and w i e om he se ial po .
In he hype e minal log i is p esen ed he iMo e in e nal coun e and echoed he cha ac e s om he keys
p essed.
3.4.2 Blue oo h
The iMo e has a blue oo h de ice o communica ing wi h o he iMo es and pe haps ano he blue oo h
20
Illus a ion 18: Hype e minal epo window
Illus a ion 17: Console window epo s wha is ecei ed om he se ial po .
de ices. In he ollowing sec ions will be implemen ed TinyOS applica ions ha will es se e al pa s o he
blue oo h unc ionali y.
3.4.2..1 OneTimeInqui y es
The pu pose o his es he blue oo h inqui y unc ionali y. Look up o he blue oo h de ices.
The iMo e applica ion will:
•Will de ec any blue oo h de ice on he su onding a ea.
•Once de ec ed will p in ou i s blue oo h add ess.
Build and loading
Open a cygwin window and om /op / inyos-1.x/con ib/imo e/apps/OneTimeInqui y olde and ype make
ins all imo e, and ollow he window ins uc ions.
Conclusion
Only had been de ec ed he iMo es, he o he blue oo h de ices no .
3.4.2.2 Connec ion es
The po pouse o his es he blue oo h communica ion among he iMo es
The iMo e applica ion will:
•Will de ec any blue oo h de ice on he su onding a ea.
•Once oo de ec s ano he iMo e, sends a message.
•The iMo e ha ecei es he incomming message will show a g een lig h.
Build and loading
Open a cygwin window and om /op / inyos-1.x/con ib/imo e/apps/Connec ion olde and ype make
ins all imo e, and ollow he window ins uc ions.
Conclusion
The oo imo e de e c s he emo e iMo e, es ablishes connec ion, sends a message, bu he emo e iMo e
does no ecei e he message.
21
3.4.2.3 PingPong demo
The po pouse o his demo is o know i he blue oo h communica ion wo ks. This demo is p o ided in he
iMo es de elopmen ki . The main objec i e is check i blue oo h communica ion eally wo ks.
The code has been upda ed o unning on iMo e 86505 and 86460.
Build and loading
Open a cygwin window and om /op / inyos-1.x/con ib/imo e/apps/Connec ion olde and ype make
ins all imo e, and ollow he window ins uc ions.
Conclusion
The mas e iMo e when de ec s he sla eone sends a message, bu he sla e does no ecei e i .
3.5 Re e ences
[1] h p://www. inyos.ne
[2] h p://www.in el.com/ esea ch/explo a o y/mo es.h m
[3] h p://www.g i wason.com/gw_pages/in el_imo e1.h m
[4] h p://www.mi a.sd.keio.ac.jp/news/wo kshop/p oceedings/Kling.pd
22
Chap e 4 - Mobile pla o ms
4.1 In oduc ion
In his chap e we will see he ha dwa e ha we will use o de eloping his p ojec . A e wa ds we will see
he a ailable pla o ms o de eloping applica ions o his e minal. And i will be de eloped a sample
applica ion on he chosen applica ion.
4.2 Mobile de ice
The mobile de ice use has been he Nokia 6630. The cha ac e is ics [1] in which we a e in e es ed a e:
Ope a ing Sys em:
Symbian OS 8.0a
De elope Pla o m:
S60 2nd Edi ion, Fea u e Pack 2
Ja a Technology:
FileConnec ion and PIM API (JSR-75)
Nokia UI API
CLDC 1.1
Blue oo h API (JSR-82 No OBEX)
Mobile 3D G aphics API (JSR-184)
MIDP 2.0
Mobile Media API (JSR-135)
Wi eless Messaging API (JSR-120)
Any mobile ha ul ills (o imp o e) hose cha ac e is ics can be used as well. Take a look ha Blue oo h
23
Illus a ion 19: Nokia 6630 mobile
phone
wi h Obex p o ocol can no be used, bu o he pu poses o his p ojec i does no ma e .
4.3 De elopmen pla o ms o Mobile De ices
The mos known a ialable pla o ms o mobile de ices a e Symbian [2] and J2ME [3]. Symbian i is a
pla o m ha only wo ks on Mobile de ices, i s p og amming language i is C++ wi h se e al limi a ions.
Suppo s blue oo h p og amming o OBEX, SDP, RFCOMM, L2CAP and HCI laye s. Symbian applica ion has
all he ad en ages and dissa en ages as na i e applic ions.
J2ME i implemen s JSR082 can also wo k wi h blue oo h. The main ad an age is ha any ja a applica ion
ha wo ks o J2ME can wo k wi h J2ME. I s p og amming language is Ja a. I J2M2 suppo s JSR082, hen
suppo s blue oo h p og amming o SDP,SPP L2CAP and OBEX.
Keep in mind as well ha bo h pla o ms can exis s on he same mobile i s a chi ec u e is he ollowing.
Fo de eloping Midle s and Symbian applica ions ake look he a icles:
Ge ing s a ed wi h J2ME
and
Ge ing s a ed wi h Symbian
bo h placed on he annex.
4.3.1 Symbian and J2ME
Fo debeloping a blue oo h applica ion is no manda o y wo k wi h one speci ic pla o m. Ne e heless J2ME
has g ea ad an ages. As we saw in he p e ious chap e we can de elop J2SE applica ions ha wo ks wi h
blue oo h p o ocol. So we can build (and debug) an applic ion wi h J2SE
4.3.2 The J2ME Applica ion
The aim o his applica ion is o s ablish a blue oo h communica ion be ween a J2ME mobile and a PCWin32
lap op. In his Clien -Se e applica ion he PCWin32 will ac as se e and he J2ME will ac as clien .
The PCWin32 clien will:
•Will connec wi h he J2ME mobile se e
•Send/ ecei e da a
24
Illlus a ion 20: Symbian and J2ME midle s can un
on he same OS.
The J2Me se e will:
•Wai o cus ome connec ion.
•Send/ ecei e da a
Build and loading
F om eclipse impo he p ojec om C: p ojec s build Clien SPP.j2me and un he p ojec .
Conclusions
The clien de ec s he J2ME mobile es ablishes he connec ion, sends he da a “I'm he se e ”. Bu no da a
is ecei ed om he cus ome and om he mobile side he connec ion is pe o med bu no-da a is ecei ed.
4.4 Re e ences
[1] h p:// o um.nokia.com/de ices/6630
[2] h p://www.symbian.com/
[3] h p://ja a.sun.com/ja ame/index.jsp
25
Illus a ion 21: Cus ome PCWin32 console window
g een, magen a o ed. And Re i e he in e nal coun e alue.
The ollowing low cha pic s he low diag am ha ollows he iMo e Moni o Se e (le ) and he iMo e
Moni o Clien ( ig h).
5.4.2 The GUI's
The cus ome GUI has a ool ba o s a and close applica ion. The Blue oo h se e ame shows he
se e URL whe e he se ice holds on and wha kind o se ices a e o e ed by he se e .
32
Illus a ion 31: Applica ion se e (le ) and cus ome ( ig h) low diag ams
Illus a ion 32: iMo e Moni o clien GUI
On Blue oo h key de ice i he ex box p in s ou he key de ice blue oo h add ess. I he ex box
backg ound is ed, he key de ice has no been ound and he applica ion can no con inue. I he ex box is
g een he key de ice has been ound and he cus ome can inqui y o he se e se ices.
On he iMo e ame appea s he las iMou e coun e alue and he las iMo e colo eques ed o he se e .
The p og ess ba i o showing he use ha he applica ion is ali e. A he bo om ame is shown all
logging in o ma ion.
The se e GUI has a oolba o s a and close he applica ion. On he iMo e ame is shown he las iMo e
coun e alue. The p og ess ba is o showing ha he applica ion is ali e. The bo om ame shows all
logging in o ma ion.
5.4.2 Execu ion P ocessing
The le window is he Se e GUI, on he bo om o he window appea s he communica ions log and he
eques s ha ecei es. The igh window is he Clien GUI, i shows he blue oo h add es om he blue oo h
key de ice; he URL and he Se ices ha a e o e ed by he Se e . Finally, he colo ha is eques ing, in
33
Illus a ion 34: Scena io I. The cus ome shows up he se ices o e ed
and o de o u n on he o ange lig h.
Illus a ion 33: Illus a ion 32: iMo e Moni o se e GUI
his case is yellow.
Now, he cus ome ask o ligh on he g een ligh .
And inally he colo eques ed is ed.
34
Illus a ion 35: Scena io I. The cus ome eques o u n on he g een
lig h.
Illus a ion 36: Scena io III. The cus ome eques o u n on he ed lig h.
Chap e 6 - Conclusions
6.1 In oduc ion
In his chap e I desc ibe he conclusions o his p ojec s. The conclusions a e di ided in wo main blocks he
me hodology used du ing he p ojec , and he echnologies used.
6.2 Me hodology
I is a g ea me hodology pe o m se e al es on he di e en pla o ms ha checks he di e en issues ha
a e ela ed wi h he PFC. Depending on he esul s, you can de ine wi h mo e p ecision he applica ion/s ha
will ep esen he PFC. Ano he g ea ad an age is ha you can de ec w ong de elopmen s be o e s a ing
he inal applica ion.
A g ea p ac ice is documen ing while he Con igu a ion Managemen asks a e pe o med and make egula
backups om he sys em.
6.3 Technologies
6.3.1 In el iMo es and TinyOs
The e is a lo o in o ma ion abou TinyOS. Bu ega ding In el iMo es he e is no in o ma ion a all, only a
ew p esen a ion documen s ha in oduce you on his kind o mo es.
Rega ding o he Con igu a ion Managemen is e y unes able o se e al easons: I is e y complica ed
unins all i , he oolchain linke is unde license and he build p ocess is unde cygwin.
6.3.2 Mobile pla o m
On he web he e a e a lo o well w i en documen a ion ha alks abou con igu a ion managemen and
sample applica ions o J2ME and Symbian.
The elec ion o he mobile o use is e y impo an , because he way ha you download he applica ions in o
he e minal is qui e di e en om one e minal o ano he .
6.3.3 PCWin32
The main di icul y is make he ma ching be ween he blue oo h physical in e ace and he ja a js 82 lib a y
ha deals wi h.
Ano he o he limi a ion is ha he e is only one Open Sou ce lib a y o win32 and i is qui e limi ed. The e
a e o he implemen a ions ha a e unde 15-day e alua ion.
35
6.4 Fu u e ex ensions
Wi h a op-down me hodology and all he ba e y o es s pe o med you ha e a clea pic u e om he s a e
o each echnologies. F om my poin o iew he co e age o he p ojec is qui e co ec , ne e heless some
o he es we e no success ul due o he ac ha he iMo es ha dwa e p o ided we e a p o o ipe and some
o js 82 lib a ies we e a be a e sion.
As a ex ension o ob aining a ealiable communia ion be ween he di e en pla o ms I will p opose epea
he same s udy bu wi h o he TinyOS mo es and wi h o he s able lib a ies o pcwin32 ha implemen s
js 082. I wi h hose changes he es we e success ul, I would p opose ho emo e PCWin32 pla o m and
communica e di ec ly J2ME pla o m wi h iMo e-TinyOS pla o m.
F om Silence P esence Con ol can be c ea ed de i a ed applica ion ha I call “P e e ence T a ic Lig h”. Fo
his applica ion we will ins all a blue oo h scane in a a ic ligh and he iMo es, o o he blue oo h de ice
will be ins alled in public anspo ehicles. When he public anspo ehicle app oaches he a ic ligh will
de ec i s p esence and will y o le him pass.
36
Chap e 7 - P ojec Managemen
7.1 In oduc ion
In his chap e a e desc ibed he ime dis ibu ion du ing he p ojec , he cos s o he p ojec and he
conclusions o ake in coun i in u u e you wan o use he same echnology.
7.2 Planning
Fo his p ojec he accoun ing will be in days, we will conside ha a jou ney (1 day) has 8 wo king hou s.
This ac is qui e impo an when he p ojec is pe o med in (o wi h) o he coun ies. E.g. In some ench
and ge man companies he 1 jou ney a e 7 hou s.
I is also e y con enien keep in mind he s a dedica ion. In he case o his p ojec we had hose non-
wo king days due o easons like: pe sonal holidays, bank holidays and o he p ojec s dedica ion.
Reason Ini. Da e End. Da e Days
Holidays 12.8.06 27.8.06 10
Bank day 11.9.06 11.9.06 1
Bank day 12.10.06 12.10.06 1
Bank day 1.11.06 1.11.06 1
Ch ismas holidays 23.12.06 1.1.07 10
23
Table 6: Non-wo king days summa y
On he ollowing Gan cha is shown he p ojec planni ica ion based on ime.
37
38
7.3 Roles
The e a e h ee oles on his p ojec : P ojec Leade , So wa e Designe and So wa e p og amme .
Depending on he complexi y o he p ojec hose oles can be pe o med o only one pe son, o a pe son
can pe o m wo oles, o e en se e al people can deal wi h a unique ole. Fo his p ojec he all he oles
will be collec ed in one pe son.
The P ojec Leade ole will be he con ac pe son who will collec all he equi emen s ela ed wi h he cos
in ime and in money om he cus ome . I will con ol ha he p ojec is on ime and in he budge .
So wa e designe will be esponsible o collec ing all echnological equi emen s om he cus ome . He will
o ganize he s uc u e o he so wa e and will decide which es s pe o m in each pla o m.
So wa e p og amme is he pe son who will pe o m all he con igu a ion managemen , will implemen he
es and he inal applica ions.
In he ollowing able a e desc ibed he cos o each ole. The o each ole ha e been ex apola ed om [1].
Role P ice (hou )
P ojec Leade 100 €
So wa e Designe 80 €
So wa e P og amme 65 €
Table 7: Role cos s
7.3 Cos
In he ollowing able shows he ime in days and in PM (pe son-mon h) spen in each ask.
39
F om he cos in days o each ole we can sol e ou he human esou ce cos .
Role Cos day (€) Days To al (€)
P ojec Leade 800 2 1.600
So wa e Designe 640 6 3.840
So wa e P og amme 520 83 43.160
48.600
Table 8: S a cos
40
Illus a ion 37: Cos in ime
iMo es
Tes s Analisys 1 0,05
Con igu a ion Managemen 15 0,75
Imo e es applic ions 10 0,5
Documen a ion 3 0,15
PCWin32
Tes s Analisys 1 0,05
1 0,05
15 0,75
3 0,15
Documen a ion 4 0,2
Mobile
Tes s Analisys 1 0,05
5 0,25
3 0,15
Documen a ion 3 0,15
Final Applica ions
De elopmen analysis 2 0,1
Imo e De elopmen 3 0,15
PCWin32 De elopmen 15 0,75
Documen a ion 3 0,15
O he
Mee ings 1 1 0,1
Bu eouc acy 1 0,05
2 6 83 4,55
PL
(Days)
Des
(Days)
P og
(Days)
PM's
(1pm -20 days)
Con igu a ion Managemen
lap op
Con igu a ion Managemen
and es o Blue oo h lib a ies
Con igu a ion Managemen and
es o Se ial communica ion
lib a ies
Con igu a ion Managemen and
es o Symbian OS De . En .
Con igu a ion Managemen and
es o J2ME De . En .
7.3.2 Ma e ial
The ollowing ables shows he cos o he esou eces employed in his p ojec .
Cos (€)
Ha dwa e
Lap op Toshiba 830
In el iMo es 3.000
Nokia 6630 150
Ezu io PCMCIA blue oo h de ice 45
Toshiba USB Blue oo h de ice 35
T us USB Blue oo h de ice 30
So wa e
A ina Blue oo h lib a y 650
A en a Blue oo h lib a y 350
BlueCo e Blue oo h lib a y LGPL
5.090
Table 9: Economic cos
7.5 Summa y
The o al cos s o he p ojec is:
Concep Cos (€)
S a 48.600
Ma e ial 5.090
53.090
Table 10: To al cos
Up o his poin we ha e jus i ied all cos , bu wha he cus ome wan s o hea is:
The p ojec will begin on 1.9.2006 , will inish on 2.1.2007, and i will cos
52.090 €
7.6 Re e ences
[1] www.in ojobs.es
41
48
Ge ing s a ed wi h a eLink BT SDK o Ja a
The aim o his documen is explain all he hings ha a e no co e ed in he ins alla ion documen a ion o
he lib a y.
1. Ha dwa e
Toshiba USB blue oo h adap o
2. Lib a y
Fi s o all i is necesa y being egis e ed no be able o download he lib a y. You can do a
h p://www.a elink.com/asp/indexB.asp?sui e=B. I is a eno able ial e sion o ou een days.
Uncomp ess i can execu e Ins all.ba o ins alla ion. The ins alla ion olde will be C: ools A ina . Follow
e y ca e ully wha i s explained C: ools A ina J2SE USB ReadMe. x .
3. Tes p ojec
Build an eclipse p ojec wi h he ollowing cha ac e is ics.
Take a look ha ou pu olde will be: /build
49
Illus a ion 38: Eclipse p ojec p ope y window
I is qui e possible ha he CLASSPATH a iable could no be ini ialized wi h a olde name, in his case
ini ialize o any .ja ile ha holds om he olde you wan deal wi h. Close he o m. And now upda e he
CLASSPATH alue go oWindow|P e e ences...|Ja a|Build Pa h|Classpa h a iable and edi he classpa h
alue wi h he olde ha con ains he lib a y and he license
Finally execu e:
50
Illus a ion 39: Eclipse p ojec p ope y window
Illus a ion 40: Eclipse en i onmen a iable con igu a ion window
In he console window a e p in ed ou he add esses o all su ounding blue oo h de ices.
4. P oblems ound
4.1 Issue 1
P oblem: License expi ed
Solu ion: Download i again! And eplace he Ce i ica e ile
4.2 Issue 2
P oblem:
51
Illus a ion 41: Push "play" bu on o launch he applica ion
Illus a ion 42: I all wo ks ine, he console window will epo o he blue oo h de ices ha a e in he su ounding
a ea
Canno ge local de ice: ja ax.blue oo h.Blue oo hS a eExcep ion: 1021001 : 10131421093105 : USB
opening ailed
Solu ion:
Read e y ca e ully he lib a y ins ala io desc ibed (in my case) on he ile C: ools A ina J2SE
USB ReadMe. x . And copy he ile C: ools A ina J2SE USB a eLinkBT BIN usb.dll in o
c: windows sys em32
4.3 Issue 3
P oblem:
Canno ge local de ice: ja ax.blue oo h.Blue oo hS a eExcep ion: 1021001 : 10131421093105 : License ile
no include he o Ce i ica e.c p in CLASSPATH.
Solu ion:
CLASSPATH mus cona in he olde whe e is place he ile ha con ains he license.
4.4 Issue 4
P oblem:
Canno ge local de ice: ja ax.blue oo h.Blue oo hS a eExcep ion: 1021001 : T ial pe iod expi ed.
Please con ac [email p o ec ed] o isi he web si e h p://www.a ina .com
Solu ion:
Download again he lib a y and eplace he license ile Ce i ica e.c p
52
4.5 Issue 5
P oblem:
ja a.lang.NoClassDe FoundE o : com/in el/blue oo h/ es /S andaloneTes
Excep ion in h ead "main"
Solu ion:
I can no be gene a ed he .class iles, so he .class iles can no be execu ed. Type om command line:
C: p ojec s inal Tes Lib a y.A ina build>an compile
A e wa ds execu e he p ojec om eclipse.
4.6 Issue 6
Canno ge local de ice: ja ax.blue oo h.Blue oo hS a eExcep ion: 1021001 : 10 101 : BCC p ope ies
ile no ound
Be su e ha he in he olde lib om you p ojec is placed he ile bcc.p ope ies. You can ind i on he
olde whe e o iginally was ins alled he lib a y C: ools A ina J2SE USB a eLinkBT LIB
4.7 Issue 7
The a eLink lib a y ins alla ion, wipes ou he ins alla ion o ano he USB blue oo h dongles.
4.8 Issue 8
P oblem:
Solu ion:
Copy "C: ools A ina J2SE USB a eLinkBT BIN USB.dll" in o c: windows sys em32
53
54
Ge ing s a ed wi h A en ana
1. Ha dwa e
Ezu io pc-mcia blue oo h
2. So wa e
Widdcom 4.0.1.700 p o ided wi h he USB Blue oo h adap e .
A en ana. You can download i h p://www.a e ana-gmbh.de/a e ana-gmbh/p oduk e/js 82.eng.xmle. I is
a demo- e sion o 15 days. When you ask o he lib a y you ha e o in oduce he 3 blue oo h add essess
o he usb blue oo h adap e s ha you a e going o use.
3. Ins alla ion
Do no plug he usb blue oo h adap e , wai un il widdcomm ins alla ion asks i .
4. Execu ion
The e is a p ojec called Inqui y.A en ana ha de ec s he nea e blue oo h de ices. This p ojec i is placed
on C: p ojec s build Inqui y.A en ana. You can impo i om Eclipse. Take no e ha he A en ana lib a y
downloaded i is placed on lib olde .
5. P oblems ound
5.1 Issue 1
I he blue oo h add ess om he adap e ha you a e cu en ly using was no in he o m when you
eques ed he lib a y, he lib a y will no wo k.
a e anaBlue oo h e sion 1.3.11
Canno ge local de ice: ja ax.blue oo h.Blue oo hS a eExcep ion: license no alid o add ess 00-80-98-c4-
6d-bc
Running on Ve sion : 1.4.2 Build 18
Local Add ess 00:80:98:C4:6D:BC
Local Name YOGURSIN
Valid un il 28.11.2006
5.2 Issue 2
I he lib a y goes o , he he sys em da e o any da e when he lib a y wo ks. (e.g. 04.02.07)
55
56
Ge ing s a ed win iMo es and TinyOS
1. VCP (Vi ual Com po )
VCP is a ool ha emula es a USB connec ion as a Se ial Com (RS232) connec ion. The ins uc ions o ins all
i a e in h p://www. dichip.com/Documen s/Ins allGuides/Windows_XP_Ins alla ion_Guide.pd
Once ins alled, You ha e o plug he se ial cable be ween he iMo e and he lap op. On he de ice manage
you will see he new se ial po .
As de aul de TinyOS de elopmen en i onmen use se ial com2 o upda ing he i mwa e iMo es. Fo
changing i go o USB Se ial Po (Com6) p ope ies.
57
Illus a ion 43: De ice manage window
Illus a ion 44: Se ial con igu a ion window
Selec he license ile and click nex .
64
Illus a ion 56: ADS Toolchain ins alle sc eensho
Illus a ion 57: ADS Toolchain ins alle sc eensho
Finally o checking ha he ins lla ion has inished success ully. Open a cygwin window go o he olde
/op / inyos-1.x/con ib/imo e/apps/blink an ype he $ make ins all imo e. When appea s he ollowing
sc een:
65
Illus a ion 58: ADS Toolchain ins alle sc eensho
Illus a ion 59: ADS Toolchain ins alle sc eensho
Illus a ion 60: The i mwa e is eady o be loaded
Rese he iMo e, in o de o load he i mwa e on i .
6. P oblems ound
6.1 Issue 1
P oblem:
The VCP is no con igu ed o being COM2.
Solu ion:
Read VCP ins alla ion o COM2 o modi y he make ile o con igu e he new COMx.
6.2 Issue 2
P oblem:
E o L6002u.
Solu ion:
Ins all inyOS in he olde c: inyOS
6.3 Issue 3
P oblem:
You ha e ins alled he ool chain bu you ha e e en p oblems wi h he license.
Solu ion
Ins all he ARM De elopmen sui e (e alua ion cd) on he same olde .
66
Illus a ion 61: The i mwa e wi h he new applica ion has been loaded.
Ge ing s a ed wi h Symbian
1. In oduc ion
The aim o his sec ion is explain, s ep by s ep, how o ins all Symbian De elopmen En i onmnen and how
o de elop an execu e a sample applica ion.
2. Ha dwa e
The compu e whe e we will de elope he applica ion will be a PCWin32. Any lap op o desk op a ailable in
he ma ke (yea 2006) will be enough o de elopping applica ions o Symbian pla o m.
The mobile whe e we will execu e he applica ions will be he NOKIA 6630. The ope a ing sys em ha
ca ies his mobile is Symbian OS 8.0a. You can ind he mobile speci ica ion a
h p:// o um.nokia.com/de ices/6630. I can be used o he S60 o S80 e minal wi h Symbian OS e ion
equal o g ea e .
3. So wa e
In his sec ion is desc ibed how o ins all auxilia ools needed o de eloping on Symbian pla o m.
3.1 Pe l
I is manda o y ins all Pe l in he compu e whe e we a e going o de elop o Symbian pla o m. This ool is
used o being able o ins all SDK S60, some ools a e pe l sc ip s.
3.1.1 Download
Fo download Ac i e pe l jus ollow his link. h p://www.ac i es a e.com/P oduc s/Ac i ePe l/?_x=1. The
e sion ha I ha e used has been 5.8.8. Fo knowing which is he e sion ha we ha e o ins all, ins all
SDK60 and du ing he ins alla ion p ocess i will ell you.
3.1.2 Ins alla ion
Ins all Ac i e Pe l wi h he de aul pa ame e s. I he ins alle ask you o include Pe l execu able in he
sys em a ible PATH do i . I no we will ha e o do i manually.
67
3.1.3 Check he ins alla ion
Fo checking he ins alla ion open a cmd windos and ype Pe l - e sion. I should ha e o appea he Pe l
e sion and i s license in o ma ion.
3.2 JRE 1.5
I is manda o y as well ha e ins alled JRE 1.5.0 (Ja a Run ime En i onmen ) o ins al S60 SDK. Some ools
included in he SDK a e implemen ed in Ja a.
3.2.1 Download
You can download JRE 1.5.0 ollow his link h p://www.sun.com/.
3.2.2 Ins ala ion
Ins all JRE wi h he de aul in alla ion pa ame e s.
68
Illus a ion 62: Pe l ins allac ion sc eensho .
Illus a ion 63: I Pe l is co ec ly ins alled i p in s ou he e sion numbe
3.2.3 Checking he ins alla ion
Fo es ing ha he ins alla ion has been success ully ins alled; open a cmd window and ype: ja a - e sion.
I should ha e o appea in o ma ion abou JRE p oduc e sion.
3.3 SDK S60 pa a C++
The SDK has he ools o de eloping Symbian applica ions (compile s, linke s, emula o s,...) o S60
pla o m. Depending on he mobile ope a ing sys em you should ha e o wo k wi h di e en SDK e sion.
Chec he mobile speci ica ion o knowing which SDK e sion you ha e o download.
Symbian OS SDK
< 7.0 1s . Ed.
8.0a 2nd Ed. FP1
8.1 2nd Ed. FP2
9.1 3 d Ed
In case o Nokia 6630 mobile you ha e o download SDK 2nd Ed. FP2.
3.3.1 Download
Fo downloading he SDK is manda o y being egis ed on Nokia Fo um (i is ee) [h p:// o um.nokia.com].
Once egis e ed download i om [h p:// o um.nokia.com/in o/sw.nokia.com/id/4a7149a5-95a5-4726-913a-
3c6 21eb65a5/S60-SDK-0616-3.0-m .h ml].
3.3.2 Ins ala ion
Ins all JRE (Ja a Run ime En i onmen ) wi h he de aul pa ame e s. The ins alle will ask us o he ne
de ice ha will be used by he simula o , in case ha he applica ion pe o ms any in e ne access.
69
A e wa ds will asks abou he de aul SDK ha you wan o use. Fo Nokia 6630 mobile we will use
S60_2nd_FP2_CW. Finally es a he compu e .
3.3.3 Tes he ins alla ion
Fo checking ha he ins alla ion has been pe o med success ully. Open a cmd window and ype: de ices. I
should ha e o appea he chosen SDK.
3.4 Nokia PC Sui e
Each mobile has i s own p opie a y ools o downloading applica ions and iles in o he mobile. In case o
Nokia 6630 is Nokia PC Sui e. So ins all Nokia PC Sui e wi h he de aul ins alla ion pa ame e s.
When he mobile is being connec ed h ough he USB in e ace. The compu e will de ec he new ha dwa e
70
Illus a ion 64: Ne wo k de ices in alled.
Illus a ion 65: De aul Symbian SDK ins alled
and will ask us pe mision o ins alling he mobile d i e s. Windows will look up au oma ically he d i e s on
he CD whe e is included Nokia PC Sui e. This ope a ion is pe o med se e al imes, one o d i e ha he
sys em needs.
Once he d i e s a e success ully in alled we will see in he explo e some hing like his:
71
3.5 Code Wa io
CodeWa io is one o he IDE (In eg a ed De elopmen En i onmen ) o de eloping symbian
applica ions.
3.5.1 Downloading
Fo downloading CodeWa io i is necessa y being egs e ed on he NokiaFo um [h p:// o um.nokia.com]
(i is ee). Once you a e egis ed you can download i om
[h p:// o um.nokia.com/main/ esou ces/ ools_and_sdks/codewa io /index.h ml].
3.5.2 Ins alla ion
Ins all CodeWa io wi h he de aul ins alla ion pa ame e s. Once ins alled, es a he compu e .
4. Sample applica ion
The ollowing sample applica ions will help us o unde s anding how a Symbian applica ion wo ks and
checking i all he de elopmen en i onmen was success ully ins alled.
72
Illus a ion 66: The mobile ile sys em in eg a ed wi h explo e .
4.1 hellowo ld basic
Open Code Wa io (C: A chi os de p og ama Nokia CodeWa io o Symbian 3.1 Bin) and go o menu:
File | Impo p ojec om .mmp ile.
Nex , we wil in oduce he loca ion o a mmp ile
C: Symbian 8.0a S60_2nd_FP2_CW Se ies60Ex hellowo ldbasic g oup hellowo ldbasic.mmp. And click on
nex bu on.
Finally click on Nex bu on. Now i will appea all sou ces loaded.
73
Illus a ion 67: Symbian pla o m selec ion
Illus a ion 68: Impo p ojec window