TP#Bluetooth#LE!
!"#$%&'()**+,-./,%&'
0-,)'1)2$3'
4-,)56)2$37+,-.$589'
($' :;' /' 2)+9' "+%' 4$' <)+&' 8/-9$' .)*29$,49$' 6=/9.>-%$.%+9$' 4$&' &$9<-.$&' Bluetooth(Low(
Energy(2/9'6/' 29/%-?+$5' @)+&'/66),&' 4),.' 4/,&'+,' 29$*-$9' %$*2&'$A26)9$9' 6$&' &$9<-.$&'
)88$9%&' 2/9' +,' ./2%$+9' 4$' 9B%>*$' ./94-/?+$' +%-6-&/,%' C1DE' $%' $,&+-%$E' &$6),' 6$' %$*2&'
4-&2),-"6$E' /+%)*/%-&$9' 6/' */,-2+6/%-),' $%' 6$.%$+9' 4+' ./2%$+9' 2/9' 6$' "-/-&' 4=+,'
29)F9/**$'G.9-%'$,';B%>),5'
1. Manipulation,par,la,CLI,
1$&' 4-&2)&-%-8&' C1D&' /B/,%' +,$' /9.>-%$.%+9$' 26+&' &-*26$' ?+$' 6$&' 4-&2)&-%-8&' C6+$%))%>'
(6/&&-?+$E'6$+9'*/,-2+6/%-),'$&%'$,.)9$'26+&'&-*26$5'
Exercice'1.';9$*-H9$*$,%E'.),,$.%$3'<)%9$'C1D'/+'2)9%'IJC'4$'<)%9$'*/.>-,$E'$%'&)B$3'
&K9' ?+=-6' /' G%G' "-$,' 9$.),,+' 2/9' 6$' &B&%H*$' F9L.$' M' 6/' .)**/,4$' N'>.-%))6' 4$<'O5' J-' 6$'
4-&2)&-%-8'C1D'$&%'"-$,'9$.),,+E'2/&&$3'M'6=G%/2$'&+-</,%$5'
Exercice'2.'P.%-<$3'<)%9$'./2%$+9'4$'9B%>*$'./94-/?+$5';)+9'.$6/E'<)+&'4$<$3'/%%/.>$9'6$'
./2%$+9' M' &/' .$-,%+9$' $%' >+*-4-8-$9' 6GFH9$*$,%' 6$&' ./2%$+9&' 4$' 6/' .$-,%+9$' Q2/9%-$'
26/&%-?+$R5' ;)+9' G<-%$9' ?+$' 6$' ./2%$+9' &=G%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$&' -,%$98/.$&' C1DE' /.%-<$3S6$' Q)+' 4G&/.%-<$3S6$'
&$6),'6$' "$&)-,R'/<$.'6/' .)**/,4$' N'>.-.),8-F'>.-\' 6$/4<' U'O'Q>.-.),8-F' >.-\' ,)6$/4<R5'
D,&+-%$E'6/,.$3'6$'29)F9/*'$A/*26$SF/%%S&$9<$95'I%-6-&$3'F/%%%))6')+'+,'/+%9$'.6-$,%'bP::'
2)+9' $A26)9$9' 6$&' &$9<-.$&' G*+6G&' 2/9' 6$' &.9-2%' $A/*26$SF/%%S&$9<$95' J-' <)+&' /<$3' +,'
&*/9%2>),$' P,49)-4' /<$.' +,$' -,%$98/.$' C1DE' <)+&' 2)+<$3' -,&%/66$9' 6=/226-./%-),' C1D'
J./,,$9' Q4-&2),-"6$' 4/,&' 6/' ;6/B' J%)9$R' 2)+9' <)+&' .),,$.%$9' M' <)%9$' &$9<$+9' C1D' &+9'
1-,+A5'Activez(la(notification(du(capteur(de(rythme(cardiaque(émulé5'
Exercice' 13.' DA26-?+$3' "9-H<$*$,%' .$' ?+$' <)+&' 4$<$3' *)4-8-$9d/#)+%$9' 4/,&' 6$' &.9-2%'
$A/*26$SF/%%S&$9<$9' 2)+9' /#)+%$9' +,' &$9<-.$' ?+$6.),?+$' Q$5F5' 6$' &$9<-.$' ./2%$+9' 4$'
%$*2G9/%+9$R5'
1 / 3 100%
La catégorie de ce document est-elle correcte?
Merci pour votre participation!

Faire une suggestion

Avez-vous trouvé des erreurs dans linterface ou les textes ? Ou savez-vous comment améliorer linterface utilisateur de StudyLib ? Nhésitez pas à envoyer vos suggestions. Cest très important pour nous !