Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Bluetooth low energy & Lumia Sensor Core per Windows Phone 8.1

1,191 views

Published on

Sessione "Bluetooth low energy & Lumia Sensor Core per Windows Phone 8.1" tenuta il 10/12/2014 al Microsoft Mobile Camp di Roma.

Published in: Software
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

Bluetooth low energy & Lumia Sensor Core per Windows Phone 8.1

  1. 1. Bluetooth Low Energy & Lumia Sensor Core per Windows Phone 8.1 Massimo Bonanni Microsoft MVP, Intel Software Innovator massimo.bonanni@tiscali.it @massimobonanni codetailor.blogspot.com
  2. 2. Agenda • Bluetooth Low Energy • Cos'è Bluetooth Low Energy • Bluetooth vs Bluetooth LE • Architettura • BLE & Windows Phone 8.1 (Windows 8.1) • BLE & Background task • Lumia SensorCore • Cos'è Lumia SensorCore • Lumia SensorCore API
  3. 3. Cos'è Bluetooth Low Energy - Storia • 2001 Nokia inizia lavorare su una nuova tecnologia wireless • 2004 risultati pubblicati con il nome Bluetooth Low End Extension • 2006 rilasciato pubblicamente come Wibree • 2007 accordo per includere Wibree dentro Bluetooth come Ultra low power technology • 2010 integrato come Bluetooth Smart dentro Core Specifications 4.0 • 2011 viene rilasciato iPhone 4S con supporto per BLE • 2012 escono i primi dispositivi • 2013 Windows 8.1 aggiunge supporto parziale per BLE • 2014 Windows Phone 8.1 aggiunge supporto per BLE
  4. 4. Caratteristiche di Bluetooth LE • Connectionless • Dimensioni ridotte • Low power (~30μA più di 300 giorni con una batteria) • Low cost • Collegamenti veloci 10 ms, latenza bassa 3-6 msec • Raggio 10-30 metri • Adaptive Frequency Hopping (AFH), resistente alle interferenze • Proximity detection - Geofencing • IoT, fitness, retail,….. • iBeacons (no WP 8.1 )
  5. 5. Classic vs Smart Technical Specification Classic Bluetooth Bluetooth Smart Distance/Range (theoretical max.) 100 m (330 ft) <100 m (<330 ft) Over the air data rate 1–3 Mbit/s 1 Mbit/s Application throughput 0.7–2.1 Mbit/s 0.27 Mbit/s Active slaves 7 Not defined; implementation dependent Security 56/128-bit and application layer user defined 128-bit AES with Counter Mode CBC-MAC and application layer user defined Robustness Adaptive fast frequency hopping, FEC, fast ACK Adaptive frequency hopping, Lazy Acknowledgement, 24-bit CRC, 32- bit Message Integrity Check Latency (from a non-connected state) Typically 100 ms 6 ms Total time to send data (det.battery life) 100 ms 3 ms
  6. 6. Supporto a BLE Attualmente BLE è supportato dalle seguenti piattaforme: • iOS5+ (meglio iOS7 e successivi) • Android 4.3+ (meglio 4.4 e successivi) • Apple OS X 10.6 e successivi • Windows 8 (XP, Vista e 7 supportano Bluetooth 2.1) • Windows (Phone) 8.1 • GNU/Linux Vanilla BlueZ 4.93 o successivi
  7. 7. Dispositivi • HTP - for medical temperature measurement devices. • GLP - for blood glucose monitors. • BLP - for blood pressure measurement. • HRP - for devices which measure heart rate. • CSCP - for sensors attached to a bicycle or exercise bike to measure cadence and wheel speed. • RSCP - running speed and cadence profile. • CPP - cycling power profile. • LNP - location and navigation profile. • FMP - the "find me" profile — allows one device to issue an alert on a second misplaced device • PXP - the proximity profile — allows a proximity monitor to detect whether a proximity reporter is within a close range.
  8. 8. Architettura Genetic Attribute Profiles standard GATT Profiles https://developer.bluetooth.org/TechnologyOverview/Pages/GATT.aspx
  9. 9. GATT - Nomenclatura • Client : Un dispositivo che invia comandi e richieste e accetta risposte. Ad esempio un PC o uno smartphone. • Server : Un device che riceve comandi GATT e richieste e restituisce risposte. Per esempio un sensore di temperatura. • Characteristic : Un dato trasmesso tra client e e server. Ad esempio il valore della temperature della stanza. • Service : Una collezione di Characteristic tra loro correlate a fornire una particolare funzionalita’. Ad esempio un termomento potrebbe offrire la caratteristica della temperatura e quelle dell’interavllo di tempo di campionamento. • Descriptor : Un descriptor fornisce informazioni addizionali sulla caratteristica (una sorta di matadato). Ad esempio la caratteristica temperature potrebbe avere come descrittori l’unita’ di misura ed il range di misurazione. I descriptor sono opzionali e ogni caratteristica puo’ avere un numero qualsiasi di descriptor.
  10. 10. GATT – Servizi e caratteristiche Profile Service Characteristic Characteristic Characteristic Value Descriptor Descriptor
  11. 11. GATT Profiles https://developer.bluetooth.org/TechnologyOverview/Pages/Profiles.aspx
  12. 12. DEMO BLE Explorer
  13. 13. Bluetooth LE & WP 8.1 1. Modifica del manifest Package.appxmanifest http://msdn.microsoft.com/it-it/library/windows/apps/br211430.aspx
  14. 14. Bluetooth LE & WP 8.1 2. Recupero dell’handle per il device bluetooth LE http://msdn.microsoft.com/en-us/library/windows.devices.bluetooth.bluetoothledevice.aspx
  15. 15. Bluetooth LE & WP 8.1 3. Recupero del servizio http://msdn.microsoft.com/en-us/library/windows.devices.bluetooth.genericattributeprofile.gattdeviceservice.aspx
  16. 16. Bluetooth LE & WP 8.1 4. Recupero della/e caratteristiche http://msdn.microsoft.com/en-us/library/windows.devices.bluetooth.genericattributeprofile.gattcharacteristic.aspx
  17. 17. Bluetooth LE & WP 8.1 5. Utilizzo della caratteristica (es. lettura del dato dal sensore)
  18. 18. DEMO TI BLE Sensor Tag http://goo.gl/MqILbz
  19. 19. Background task Possiamo sfruttare i background task di Windows Phone 8.1 per ricevere i dati notificati quando la nostra applicazione non è in foreground 1. Creare un progetto Windows Phone Runtime component e implementare IBackgroundTask
  20. 20. Background task 2. Modificare il file di manifest dell’applicazione Windows Phone
  21. 21. Background task 3. Verificare che la nostra applicazione abbia i privilegi per l’accesso ai background task
  22. 22. Background task 4. Registrare il task
  23. 23. DEMO Background Task
  24. 24. Lumia SensorCore SensorCore e’ un marchio registrato Qualcomm. Si tratta di un “chip” in grado di integrare dati provenienti da differenti sensori e processarli ottimizzando il consumo di batteria. Lumia SensorCore e’ la tecnologia sviluppata da Nokia (ora Microsoft) in collaborazione con Qualcomm per interagire con il SensorCore di Qualcomm su dispositivi Windows Phone.
  25. 25. Lumia SensorCore SDK Lumia SensorCore SDK e’ una collezione di API in grado di recuperare i dati provenienti da SensorCore. • Usato per tenere traccia delle attività fisica e movimento • I sensori girano in background e raccolgono dati per un massimo di 10 giorni • Sempre attivi ma in Low Power Mode • Potrebbe fornire accesso a dati PRIVATI quindi può essere disabilitata e lo storico può essere cancellato
  26. 26. Lumia SensorCore SDK • Dll disponibile da NuGet • Architettura ARM o x86 • Microsoft Visual C++ 2013 Runtime Package for Windows Phone • Testing Tools opzionale
  27. 27. Lumia SensorCore SDK Il package NuGet modifica anche il file di manifest dell’applicazione
  28. 28. Step Counter API • Quanti passi e per quanto tempo • Caminata o corsa – usa anche l’intensità del movimento non solo la velocità • Granularità 5 minuti – storico 10 giorni • 5-6 secondi fino quando inizia vedere gli eventi • Ci possono essere falsi positivi
  29. 29. Activity Monitor • Cambiamenti nell’attività del utente: fermo, cammina, corre… • Delay tipico 5-10 sec per eliminare alcuni falsi positivi • Risultati migliori dentro la borsa o in tasca • Bisogna abilitare l’API • API con risultati real-time e storico 10 giorni
  30. 30. Place Monitor • Lista di geo-coordinate • Usa principalmente celle del operatore e/o hotspot WiFi. GPS solo se un’altra applicazione lo usa • Non fornisce dati in tempo reale • Prova indovinare l’indirizzi di casa e lavoro • Classificazione può durare 2-3 giorni • Area raggio almeno 200 metri, distanze minimo 500 m, tempo di permanenza almeno 10 minuti
  31. 31. TrackPoint Monitor • Simile a Place Monitor ma traccia i percorsi fatti • API offline come Place Monitor • Track point ogni 5 minuti e un minimo di 500 metri • Accuratezza dipende da numero di celle o hotspot. Una corsa in un parco senza una sessione GPS attiva potrebbe registrare un solo trackpoint
  32. 32. DEMO Lumia Sensor Core
  33. 33. Q&A
  34. 34. Riferimenti Bluetooth LE • http://msdn.microsoft.com/en-us/library/windows/hardware/jj159880(v=vs.85).aspx Texas Instrument BLE Sensor Tag • http://www.ti.com/ww/en/wireless_connectivity/sensortag/index.shtml?INTC=Senso rTag&HQS=sensortag-bt • https://sensortag.codeplex.com/ Lumia SensorCore • http://developer.nokia.com/lumia/nokia-apis/sensorcore • http://developer.nokia.com/resources/library/sensorcore-api-ref/index.html

×