JavaBluetooth Macherel Bruno M2PGI - UFRIMA Sommaire Présentation de bluetooth Caractéristique Fonctionnement Java Bluetooth (JSR-82) Protocoles / Profiles 2 Bluetooth Ericson, 1994 Bluetooth Special Interest Group (SIG) Ericsson, Nokia, Intel, IBM, et Toshiba, 1998 Commercialisation, 2001 Installation de composants Aucune configuration Multiplicité des connexions à des périphériques 3 Caractéristiques Ondes radios : 2400 – 2483,5 MHz Débit : 1 Mb/s Portée : 1 à 100m (1 à 100mW) Communication par paquets Encadrés par des blocs de données de contrôles Destinataire Fréquence du bloc suivant Débit réel : 864 Kbits/s 4 Fonctionnement Canal d’émission découpé en slot (625µs) 1 paquet = 1 slot (~> 5 slots) Saut de fréquence sur 79 canaux 1600 sauts/sec 5 255 appareils, 7 communications simultanées 6 États pour la station esclave Phase de découverte Fin connextion Connecté Connextion OK Configuration Problème Configuration 7 États pour la station maître Nouvelle connexion Connexion OK Connecté Configuration OK Perte de lien Configuration Erreur de configuration Fermeture de la connexion 8 BlueTooth 2 Annoncé le 8 novembre 2004 Premiers terminaux intégrant BT2 : courant 2005 Pressions de WiFi et ZigBee Fonctionnalités annoncées Débit X 4 voir X 10 Consommation X 1/2 9 Java Bluetooth 512 Ko Service Discovery Protocol (SDP) RFCOMM (type 1 device support) Logical Link Control and Adaptation Protocol (L2CAP) 10 Java Bluetooth - utilisation Peer-to-Peer Networking Kiosk Data transmissions only Protocols: L2CAP (connection-oriented only) RFCOMM SDP OBject Exchange protocol (OBEX) Profiles: Generic Access Profile (GAP) Service Discovery Application Profile (SDAP) Serial Port Profile (SPP) Generic Object Exchange Profile (GOEP) 11 Bluetooth protocols JSR-82 12 Bluetooth profiles JSR-82 13 Structure de l’API Java Bluetooth Disovery Communication Device management 14 Device & Service Discovery DiscoveryAgent startInquiry() retrieveDevices() DiscoveryListener servicesDiscovered() deviceDiscovered() 15 Device management Generic Access Profile LocalDevice & RemoteDevice Security Authentification Encryption Autorization Request for Master Role 16 Communication RFCOMM protocole Logical Link Control and Adaptation Protocol (L2CAP) OBEX protocole 17 Communication RFCOMM protocole Server StreamConnectionNotifier service = (StreamConnectionNotifier) Connector.open( “btspp://localhost:102030405060708090A1B1C1D1D1E100;name=SPPEx”); StreamConnection con = (StreamConnection) service.acceptAndOpen(); Client StreamConnection con = (StreamConnection) Connector.open(“btspp://0050C000321B:5”); 18 Communication Logical Link Control and Adaptation Protocol Server L2CAPConnectionNotifier server = (L2CAPConnectionNotifier) Connector.open(“btl2cap://localhost:3B9FA89520078C303355AAA694238F08; name=L2CAPEx”); L2CAPConnection con = (L2CAPConnection)server.acceptAndOpen(); Client L2CAPConnection client = (L2CAPConnection) Connector.open(“btl2cap://0050CD00321B:1001;ReceiveMTU=512; TransmitMTU=512”); 19 Communication OBEX protocole (by IrDA) Opérations : CONNECT, DISCONNECT PUT, GET SETPATH, ABORT, CREATE-EMPTY, PUT-DELETE 20 Démo 21