SlideShare une entreprise Scribd logo
1  sur  15
Télécharger pour lire hors ligne
Bluetooth
BT, BTLE, "BT Smart"

@krugazor
Objets connectés
•

Petite taille, petite batterie, grosses fonctionnalités

•

La consommation énergétique est fonction de
distance (puissance) et débit (modulation)

•

Bluetooth est courte portée et faible débit pour
économiser la batterie

@krugazor
Bluetooth
•

1994 : "port série réseau"

•

1MB/s jusqu'a 24 MB/s

•

Distance maxi théorique de 100m

@krugazor
Connexion typique
Coucou,
j'existe!

Fais voir ce que
tu sais faire

Voila la liste de
mes services

Tiens voila une
commande pour XYZ

(Opt) OK!

@krugazor
CoreBluetooth
•

Device manager (discovery)

•

Services (top level)

•

Characteristics/descriptors (I/O)

@krugazor
Découverte
•

CBCentralManager : découverte/connexion
asynchrone

•

retrieveConnectedPeripheralsWithServices:

•

retrievePeripheralsWithIdentifiers:

•

scanForPeripheralsWithServices:options:
@krugazor
Delegate
•

centralManager:didRetrievePeripherals:

•

centralManager:didRetrieveConnectedPeripherals:

•

centralManager:didDiscoverPeripheral:

advertisementData:RSSI:

@krugazor
Connexion
•

CBPeripheral

•

connectPeripheral:options:

•

cancelPeripheralConnection:

@krugazor
Delegate
•

centralManager:didConnectPeripheral:

•

centralManager:didDisconnectPeripheral:error:

•

centralManager:didFailToConnectPeripheral:error:

@krugazor
Services/Characteristics

•

discoverServices:

•

discoverCharacteristics:forService:

@krugazor
Delegate

•

peripheral:didDiscoverServices:

•

peripheral:didDiscoverCharacteristicsForService:

error:

@krugazor
Lecture/Ecriture
•

CBCharacteristic/CBDescriptor

•

Piège : appelé sur le CBPeripheral

•

readValueForCharacteristic:

•

writeValue:forCharacteristic:type: (avec/sans
réponse)
@krugazor
Delegate
•

peripheral:didUpdateValueForCharacteristic:error:

•

peripheral:didWriteValueForCharacteristic:error:

•

NSData, baby!

@krugazor
Caveats
•

Communication radio : ni fiable, ni instantanée
(attention à vos timers)

•

Complètement asynchrone (attention à vos
boucles)

•

Extrêmement dépendant des manipulations
utilisateur (attention à l'état de vos données)

•

Très old school niveau échanges (niveau
commandes AT, au mieux)
@krugazor
Merci!
•

LightBlue (gratis) : permet d’interagir basiquement
avec n’importe quoi

•

Outils spécifiques (TI Multitool par ex, pour les kits
a base de CP2540/CP2541)

Contenu connexe

En vedette

En vedette (10)

BlaBlaCar et la mise en place d'une fonctionnalité FlagFeature
BlaBlaCar et la mise en place d'une fonctionnalité FlagFeatureBlaBlaCar et la mise en place d'une fonctionnalité FlagFeature
BlaBlaCar et la mise en place d'une fonctionnalité FlagFeature
 
Apple Search Optimization
Apple Search OptimizationApple Search Optimization
Apple Search Optimization
 
POI clusturing
POI clusturingPOI clusturing
POI clusturing
 
Swift Sequences & Collections
Swift Sequences & CollectionsSwift Sequences & Collections
Swift Sequences & Collections
 
MultiPeer Connectivity Framework
MultiPeer Connectivity Framework MultiPeer Connectivity Framework
MultiPeer Connectivity Framework
 
OHHttpStubs
OHHttpStubsOHHttpStubs
OHHttpStubs
 
Silent push
Silent pushSilent push
Silent push
 
CocoaPods for private libraries
CocoaPods for private librariesCocoaPods for private libraries
CocoaPods for private libraries
 
Plugins Xcode
Plugins XcodePlugins Xcode
Plugins Xcode
 
Découverte de HomeKit
Découverte de HomeKitDécouverte de HomeKit
Découverte de HomeKit
 

Similaire à Bluetooth par Nicolas Zinovieff

#NSD16 - btle juice, un framework d’interception pour le bluetooth low energy...
#NSD16 - btle juice, un framework d’interception pour le bluetooth low energy...#NSD16 - btle juice, un framework d’interception pour le bluetooth low energy...
#NSD16 - btle juice, un framework d’interception pour le bluetooth low energy...NetSecure Day
 
VoIP-kobbane2018_1_.pdf
VoIP-kobbane2018_1_.pdfVoIP-kobbane2018_1_.pdf
VoIP-kobbane2018_1_.pdfAlKir1
 
Diapo zig bee_amin_jan11_final
Diapo zig bee_amin_jan11_finalDiapo zig bee_amin_jan11_final
Diapo zig bee_amin_jan11_finalAmin Ferjani
 
Mender 2.0 101: Bien démarrer avec les 'update modules'
Mender 2.0 101: Bien démarrer avec les 'update modules'Mender 2.0 101: Bien démarrer avec les 'update modules'
Mender 2.0 101: Bien démarrer avec les 'update modules'Pierre-jean Texier
 
Le wearable computing.ppt
Le wearable computing.pptLe wearable computing.ppt
Le wearable computing.pptssuser0c0cdf
 
Ph.D Defense
Ph.D DefensePh.D Defense
Ph.D Defenseawxzeca
 

Similaire à Bluetooth par Nicolas Zinovieff (9)

Général réseau typologie et architecture
Général réseau typologie et architecture Général réseau typologie et architecture
Général réseau typologie et architecture
 
#NSD16 - btle juice, un framework d’interception pour le bluetooth low energy...
#NSD16 - btle juice, un framework d’interception pour le bluetooth low energy...#NSD16 - btle juice, un framework d’interception pour le bluetooth low energy...
#NSD16 - btle juice, un framework d’interception pour le bluetooth low energy...
 
VoIP-kobbane2018_1_.pdf
VoIP-kobbane2018_1_.pdfVoIP-kobbane2018_1_.pdf
VoIP-kobbane2018_1_.pdf
 
Diapo zig bee_amin_jan11_final
Diapo zig bee_amin_jan11_finalDiapo zig bee_amin_jan11_final
Diapo zig bee_amin_jan11_final
 
Mender 2.0 101: Bien démarrer avec les 'update modules'
Mender 2.0 101: Bien démarrer avec les 'update modules'Mender 2.0 101: Bien démarrer avec les 'update modules'
Mender 2.0 101: Bien démarrer avec les 'update modules'
 
Le wearable computing.ppt
Le wearable computing.pptLe wearable computing.ppt
Le wearable computing.ppt
 
Microcontroleur
MicrocontroleurMicrocontroleur
Microcontroleur
 
Ph.D Defense
Ph.D DefensePh.D Defense
Ph.D Defense
 
Chap5 wan
Chap5 wanChap5 wan
Chap5 wan
 

Plus de CocoaHeads France

Plus de CocoaHeads France (20)

Mutation testing for a safer Future
Mutation testing for a safer FutureMutation testing for a safer Future
Mutation testing for a safer Future
 
iOS App Group for Debugging
iOS App Group for DebuggingiOS App Group for Debugging
iOS App Group for Debugging
 
Asynchronous swift
Asynchronous swiftAsynchronous swift
Asynchronous swift
 
Visual accessibility in iOS11
Visual accessibility in iOS11Visual accessibility in iOS11
Visual accessibility in iOS11
 
My script - One year of CocoaHeads
My script - One year of CocoaHeadsMy script - One year of CocoaHeads
My script - One year of CocoaHeads
 
Ui testing dealing with push notifications
Ui testing dealing with push notificationsUi testing dealing with push notifications
Ui testing dealing with push notifications
 
CONTINUOUS DELIVERY WITH FASTLANE
CONTINUOUS DELIVERY WITH FASTLANECONTINUOUS DELIVERY WITH FASTLANE
CONTINUOUS DELIVERY WITH FASTLANE
 
L'intégration continue avec Bitrise
L'intégration continue avec BitriseL'intégration continue avec Bitrise
L'intégration continue avec Bitrise
 
Super combinators
Super combinatorsSuper combinators
Super combinators
 
Design like a developer
Design like a developerDesign like a developer
Design like a developer
 
Handle the error
Handle the errorHandle the error
Handle the error
 
Quoi de neuf dans iOS 10.3
Quoi de neuf dans iOS 10.3Quoi de neuf dans iOS 10.3
Quoi de neuf dans iOS 10.3
 
IoT Best practices
 IoT Best practices IoT Best practices
IoT Best practices
 
SwiftyGPIO
SwiftyGPIOSwiftyGPIO
SwiftyGPIO
 
Présentation de HomeKit
Présentation de HomeKitPrésentation de HomeKit
Présentation de HomeKit
 
Programme MFI retour d'expérience
Programme MFI retour d'expérienceProgramme MFI retour d'expérience
Programme MFI retour d'expérience
 
How to communicate with Smart things?
How to communicate with Smart things?How to communicate with Smart things?
How to communicate with Smart things?
 
Build a lego app with CocoaPods
Build a lego app with CocoaPodsBuild a lego app with CocoaPods
Build a lego app with CocoaPods
 
Let's migrate to Swift 3.0
Let's migrate to Swift 3.0Let's migrate to Swift 3.0
Let's migrate to Swift 3.0
 
Project Entourage
Project EntourageProject Entourage
Project Entourage
 

Bluetooth par Nicolas Zinovieff