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.

Physical Web

297 views

Published on

Slides for a talk on Physical Web and Web Bluetooth presented at Web Montag Kassel, Germany

Published in: Software
  • Be the first to comment

Physical Web

  1. 1. Physical Web Oder: Wenn der Browser mit dem Toaster…. Web Montag Kassel, 27. März 2017 Jens Siebert (@jens_siebert)
  2. 2. Der „smarte“ Toaster…
  3. 3. ?
  4. 4. Eddystone-URL (Beacon)* Web Bluetooth** Physical Web **Funktioniert zurzeit nur mit Chrome für Android, Mac, iOS und Linux. Windows ab Frühjahr 2017. *Funktioniert mit Android (ab 4.4) und iOS.
  5. 5. Bluetooth LE Generic Access Profile (GAP) - Eddystone-URL - Services
  6. 6. Bluetooth LE Generic Attribute Profile (GATT) - Characteristics - Data
  7. 7. Bluetooth LE Generic Attribute Profile (GATT) Profile Service Service Characteristic Characteristic Characteristic Characteristic GATT Environmental Sensing Battery Service Temperature Pressure Humidity Battery Level
  8. 8. if (!navigator.bluetooth) { return Promise.reject('Bluetooth API not available'); } return navigator.bluetooth.requestDevice({ acceptAllDevices: true, optionalServices: ['environmental_sensing'] }) .then(device => device.gatt.connect()) .then(server => server.getPrimaryService('environmental_sensing')) .then(service => service.getCharacteristic('temperature')) .then(characteristic => characteristic.addEventListener('characteristicvaluechanged', handleTemperatureValueChanged)) .then(characteristic => characteristic.startNotifications()) .catch(error => console.log(error)); function handleTemperatureValueChanged(event) { let characteristic = event.target; console.log(characteristic.value.getInt16(0, true) / 100 + " °C"); } Wichtig: https://...
  9. 9. Android: System-Einstellungen → Google → Nearby Chrome: Einstellungen → Datenschutz → Physical Web
  10. 10. Demo Time! Adafruit Feather 32u4 Bluefruit LE - Arduino-kompatibel - Bluetooth LE (nRF51) BMP280 Sensor - Temperatur - Luftdruck HTU21D Sensor - Luftfeuchtigkeit
  11. 11. Weitere Infos • Physical Web: https://google.github.io/physical-web/ • Web Bluetooth: https://webbluetoothcg.github.io/web-bluetooth/ • Web Bluetooth Examples: https://googlechrome.github.io/samples/web-bluetooth/ • Bluetooth LE GATT: https://www.bluetooth.com/specifications/generic-attributes-overview • Code (Web & Arduino): https://bitbucket.org/jenssiebert/wmksphysicalweb • Slides: http://www.slideshare.net/JensSiebert1/physical-web-73663054
  12. 12. Kleiner Hinweis Puck.js – JavaScript + Bluetooth LE = http://www.espruino.com/Puck.js

×