Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft,...

45
Rendezvous for Bluetooth devices Marie Duflot

Transcript of Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft,...

Page 1: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Rendezvous forBluetooth devices

Marie Duflot

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � �� � � � ��� �

Page 2: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Outline

� Introduction

� Presentation of the lower layer

� How to connect Bluetooth devices

� Verification

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � �� � � � ��� �

Page 3: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

b Introduction

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � �� � � � ��� �

Page 4: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

What is Bluetooth ?

� Protocol for short range wireless communication

� Voice and Data

� Open specification

� Special Interest Group (Ericsson, IBM, Intel,Microsoft, Motorola, Nokia, Toshiba,...)

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � �� � � � ��� �

Page 5: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Bluetooth vs Wi-Fi, what is different ?

Wi-Fi

� Replacement forethernet

� More powerful:100/400m, 11Mbps

� Higher power con-sumption

Bluetooth

� Peer to peercommunication

� Shorter range andrate: 10m, 1Mbps

� Lower power con-sumption

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � �� � � � ��� �

Page 6: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

b Brief Overview

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � �� � � � ��� �

Page 7: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

States of a Bluetooth device

Standby

Inquiry Page

Connected

Standby: default operational state

Connected: device ready to communicate in a piconet

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � �� � � � ��� �

Page 8: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Piconets

and Scatternets

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � �� � � � ��� �

Page 9: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Piconets

and Scatternets

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � �� � � � ��� �

Page 10: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Piconets and Scatternets

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � �� � � � ��� �

Page 11: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Piconets and Scatternets

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � �� � � � ��� �

Page 12: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Frequencies and Hopping

� Industrial Scientific Medical band➤ free➤ interference (microwaves, etc.)

� Solution : hop through sequence of frequencies➤ "common"

to discover/be discovered by other devices➤ "unpredictable"

to communicate in a piconet

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � �� � � � ��� �

Page 13: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Access Code

� Devices need to know if a message is intended forthem

� An Access Code is prefixed to each message➤ Inquiry: general or dedicated,➤ Page: based on the address of the receiving

device,➤ Connected: based on the address of the master.

� When receiving a message, a device “reads” it only ifit has a correct Access Code

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � � � � � � ��� � �

Page 14: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Clocks

� Independent free running clocks➤ synchronisation via an offset

� Rates are not exactly the same➤ need to readjust their estimations

� The role of the clock is to determine➤ when a device can/cannot transmit/receive a

message➤ at which frequency

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � � � � � � ��� � �

Page 15: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

b The rendezvous layer

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � � � � � � ��� � �

Page 16: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Inquiry

� Inquiry frequency hopping sequence : common to alldevices➤ Inquiring device : hops every

�� ���

� ��➤ Inquired device : hops every

��

�� �

� Inquiry Access Code :➤ either general (look for all devices)➤ or dedicated (look for a particular type of device)

� Inquiry response packet : contains address & clockof the inquired device

� Randomized aspect to avoid collisions

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � � � � � � ��� � �

Page 17: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Inquiry

InquiryInquiry ScanInquiry Response

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � � � � � � ��� � �

Page 18: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Inquiry

InquiryInquiry ScanInquiry Response

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � � � � � � ��� � �

Page 19: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Inquiry

InquiryInquiry ScanInquiry Response

PROBLEM

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � � � � � � ��� � �

Page 20: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Inquiry

InquiryInquiry ScanInquiry Response

PROBLEM

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � � � � � � ��� � �

Page 21: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Inquiry

InquiryInquiry ScanInquiry Response

PROBLEM

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � � � � � � ��� � �

Page 22: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Inquiry

InquiryInquiry ScanInquiry Response

Rand1

Rand2

Rand1 < Rand2

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � � � � � � ��� � �

Page 23: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Inquiry

InquiryInquiry ScanInquiry Response

Rand1

Rand2

Rand1 < Rand2

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � � � � � � ��� � �

Page 24: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Inquiry

InquiryInquiry ScanInquiry Response

Rand1

Rand2

Rand1 < Rand2

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � � � � � � ��� � �

Page 25: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Page

� Page frequency hopping sequence : common to alldevices➤ Paging device : hops every

�� ���

� ��➤ Paged device : hops every

��

� � �

� Access Code : uses the address of the paged device

� Master response packet : contains address & clockof the master

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � � � � � � ��� � �

Page 26: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Page

PageMaster ResponsePage ScanSlave Response

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � � � � � � ��� � �

Page 27: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Page

PageMaster ResponsePage ScanSlave Response

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � � � � � � ��� � �

Page 28: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Page

PageMaster ResponsePage ScanSlave Response

ack

slave ID

slave ID

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � � � � � � ��� � �

Page 29: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Page

PageMaster ResponsePage ScanSlave Response

ack

slave ID

slave ID

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � � � � � � ��� � �

Page 30: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Page

PageMaster ResponsePage ScanSlave Response

ack

FHS packet

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � � � � � � ��� � �

Page 31: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Page

PageMaster ResponsePage ScanSlave Response

ack

FHS packet

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � � � � � � ��� � �

Page 32: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

b Verification of the protocol

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � � � � � � ��� � �

Page 33: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Model-checking

Does the system satisfy the property?

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � � � � � � ��� � �

Page 34: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Model-checking

Does the system

Modelling

satisfy the property?

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � � � � � � ��� � �

Page 35: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Model-checking

Does the system

Modelling

satisfy the property?

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � � � � � � ��� � �

Page 36: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Model-checking

Does the system

Modelling

satisfy the property?

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � � � � � � ��� � �

Page 37: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Model-checking

Does the system

Modelling

satisfy

Model-checkingAlgorithm

the property?

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � � � � � � ��� � �

Page 38: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Abstraction using UPPAAL

The problems:

� Constants are too large.

� Too many states.

The solution: abstract the model

� UPPAAL used to verify that the new model is really anabstraction

� Abstraction relation : trace refinement

� Transformation of probabilistic timed automata into“formerly probabilistic” ones

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � � � � � � ��� � �

Page 39: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Abstraction using UPPAAL (2)

The aim : show that

��� � � �� � � � �

Problem : need to use

��� � which is too big.

Solution : decompose the system

��� �

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � � � � � � ��� � �

Page 40: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Abstraction using UPPAAL (2)

The aim : show that

��� � � �� � � � �

Problem : need to use

��� � which is too big.

Solution : decompose the system

��� � ��� � � � �� � � �� ��

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � � � � � � ��� � �

Page 41: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Abstraction using UPPAAL (2)

The aim : show that

��� � � �� � � � �

Problem : need to use

��� � which is too big.

Solution : decompose the system

��� � ��� � � � �� � � �� ��

� � �

�� � � � � � � � � � �� � � �� � �� �

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � � � � � � ��� � �

Page 42: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Abstraction using UPPAAL (2)

The aim : show that

��� � � �� � � � �

Problem : need to use

��� � which is too big.

Solution : decompose the system

��� � ��� � � � �� � � �� ��

� � �

�� � � � � � � � � � �� � � �� � �� ��� � � � � �

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � � � � � � ��� � �

Page 43: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Abstraction using UPPAAL (2)

The aim : show that

��� � � �� � � � �

Problem : need to use

��� � which is too big.

Solution : decompose the system

��� � ��� � � � �� � � �� ��

� � �

�� � � � � � � � � � �� � � �� � �� ��� � � � � �

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � � � � � � ��� � �

Page 44: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Verification using PRISM

Why use PRISM ?

� The system contains probabilities

� Only digital clocks

� Simple translation from UPPAAL to PRISM

PRISM will be used to verify quantitative properties like"The proba. of establishing a connection within

time units is at least �"

“The average power consumption before establishing a communication is

�”

Challenge : PRISM needs to verify the complete abstractmodel��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � � � � � � ��� � �

Page 45: Rendezvous for Bluetooth devicesqav.comlab.ox.ac.uk › talks › marie-forward04.pdf · Microsoft, Motorola, Nokia, Toshiba,...) Bluetooth vs Wi-Fi, what is different ? Wi-Fi Replacement

Summary

� Need a lot of abstraction➤ Large constants➤ Different time scales

� Other difficulties➤ Specification not precise enough➤ Broadcast synchronisation

��� � � � �� �� �� � � � � � � � � � � � ��� � � � � � ��� �� � � � � � � � � ��� � �