Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Eddystone - Droidcon Paris 2015

Turhan OZ
November 10, 2015

Eddystone - Droidcon Paris 2015

Talk I gave during DroidconParis 2015

Turhan OZ

November 10, 2015
Tweet

More Decks by Turhan OZ

Other Decks in Technology

Transcript

  1. Droidcon Paris, 2015
    Eddystone™ an open Bluetooth® Smart
    beacon format from Google

    View full-size slide

  2. Who am I ?
    ❖ Turhan OZ
    ❖ turhanoz.com
    ❖ @TurhanOz
    ❖ @ParisAndroidUG

    View full-size slide

  3. Beacon - what’s that ?

    View full-size slide

  4. Beacon - what for ?

    View full-size slide

  5. Eddystone™
    ❖ an open BLE beacon format
    ❖ specification : github.com/google/eddystone

    View full-size slide

  6. Eddystone-UID
    Service UUID
    … OxO3 OxO3 0xFEAA
    Service Data
    … Ox16 OxFEAA 0x00 Tx Namespace ID (10 bytes) Instance ID (6 bytes)
    Beacon1 e83bda0408d0802c61b8 a000000000001
    Beacon2 e83bda0408d0802c61b8 a000000000002
    Beacon3 e83bda0408d0802c61b8 a000000000003
    ❖ Instance ID
    ❖ sha1 (droidcon.fr) = e83bda0408d0802c61b8a258a065d56bef3f43ac

    View full-size slide

  7. Eddystone-URL
    Service UUID
    … OxO3 OxO3 0xFEAA
    Service Data
    … Ox16 OxFEAA 0x10 Tx URL Scheme Encoded URL (up to 17 bytes)
    URL Scheme Prefix
    0x00 http://www.
    0x01 https://www.
    0x02 http://
    0x03 https://
    Url extension
    0x00 .com/
    0x01 .org/
    0x02 .edu/
    … …
    ❖ http://www.droidcon.com/paris
    http://www. d r o i d c o n .com/ p a r i s
    0x00 0x64 0x72 0x6F 0x69 0x64 0x63 0x6F 0x6E 0x00 0x70 0x61 0x72 0x69 0x73

    View full-size slide

  8. Walk up and use anything
    Physical Web http://physical-web.org

    View full-size slide

  9. Eddystone-TLM
    Service UUID
    … OxO3 OxO3 0xFEAA
    Service Data
    … Ox16 OxFEAA 0x20 Tx Battery Voltage Temp Count
    Time since
    power

    View full-size slide

  10. Eddystone Scanning
    BluetoothManager manager = (BluetoothManager) getSystemService(BLUETOOTH_SERVICE);
    BluetoothLeScanner scanner = manager.getAdapter().getBluetoothLeScanner();
    scanner.startScan(filters, settings, scanCallback);
    //Eddystone service UUID
    private static final ParcelUuid UID_SERVICE =
    ParcelUuid.fromString("0000feaa-0000-1000-8000-00805f9b34fb");
    ScanFilter beaconFilter = new ScanFilter.Builder()
    .setServiceUuid(UID_SERVICE)
    .setServiceData(UID_SERVICE, FRAME_FILTER_ON_URL, FILTER_MASK_ON_FRAME_TYPE)
    .build();
    List filters = Collections.singletonList(beaconFilter);
    public static final byte[] FRAME_FILTER_ON_URL = { /* 0x100000000000000000000000000000000000 */ };
    public static final byte[] FILTER_MASK_ON_FRAME_TYPE = { /* 0xFF0000000000000000000000000000000000 */ };
    Service UUID
    … OxO3 OxO3 0xFEAA
    Service Data
    … Ox16 OxFEAA 0x10 Tx URL Scheme Encoded URL (up to 17 bytes)

    View full-size slide

  11. Eddystone Scanning
    BluetoothManager manager = (BluetoothManager) getSystemService(BLUETOOTH_SERVICE);
    BluetoothLeScanner scanner = manager.getAdapter().getBluetoothLeScanner();
    scanner.startScan(filters, settings, scanCallback);
    private ScanCallback scanCallback = new ScanCallback() {
    @Override
    public void onScanResult(int callbackType, ScanResult result) {
    byte[] serviceDate = result.getScanRecord().getServiceData(UID_SERVICE);
    }
    @Override
    public void onBatchScanResults(List results) {}
    @Override
    public void onScanFailed(int errorCode) {}
    };

    View full-size slide

  12. Beacon Platform
    Web Management
    Platform ??

    View full-size slide

  13. Proximity Beacon REST Api
    beacons
    beaconinfo
    namespaces
    diagnotics
    attachments
    getforobserved
    create
    list
    delete
    batchDelete
    list list
    get
    list
    update
    register
    decommission
    activate
    deactivate
    https://developers.google.com/beacons/proximity/reference/rest/ https://github.com/TurhanOz/RxProximityBeacon

    View full-size slide

  14. attachments.list

    View full-size slide

  15. Nearby Messages API

    View full-size slide

  16. Sum-up
    ❖ beacon: hardware that advertises data
    ❖ Eddystone™: open Bluetooth® beacon format from Google
    ❖ UID
    ❖ URL (Physical Web)
    ❖ TLM
    ❖ Beacon Platform: Enhance (attachments, location) and Monitor
    ❖ Proximity Beacon REST API
    ❖ Client Side
    ❖ Nearby Messages API, Places API (& Proximity Beacon API)

    View full-size slide

  17. @TurhanOz
    https://developers.google.com/beacons/overview
    https://github.com/google/eddystone/
    https://github.com/TurhanOz/RxProximityBeacon
    http://physical-web.org
    Thank You

    View full-size slide