Download - BEACON AND ITS PROTOCOLS
![Page 1: BEACON AND ITS PROTOCOLS](https://reader031.vdocuments.mx/reader031/viewer/2022030212/58a06f4a1a28ab06528b67db/html5/thumbnails/1.jpg)
BEACONS
THE NEW REALITYby Andrea Bissoli
SAPIENZA UNIVERSITY of
ROME
Pervasive Systems Prof. Ioannis Chatzigiannakis
![Page 2: BEACON AND ITS PROTOCOLS](https://reader031.vdocuments.mx/reader031/viewer/2022030212/58a06f4a1a28ab06528b67db/html5/thumbnails/2.jpg)
What is a beacon?
Estimote Beacon is a small computer:
It’s 32-bit ARM® Cortex M0 CPU
It has ACCELEROMETER, TEMEPERATURE sensor, and 2.4 GHz radio using Bluetooth 4.0 Smart, also known as BLE or Bluetooth low energy.
![Page 3: BEACON AND ITS PROTOCOLS](https://reader031.vdocuments.mx/reader031/viewer/2022030212/58a06f4a1a28ab06528b67db/html5/thumbnails/3.jpg)
About BLT Signal
It’s a new standard developed by Nokia™, now implemented in all modern smartphones.
Since Bluetooth Smart doesn’t require pairing, a phone can listen to many beacons at the same time.
Estimote Beacons have a NOMINAL range up to 70 meters.
![Page 4: BEACON AND ITS PROTOCOLS](https://reader031.vdocuments.mx/reader031/viewer/2022030212/58a06f4a1a28ab06528b67db/html5/thumbnails/4.jpg)
1. THE PROTOCOLS
![Page 5: BEACON AND ITS PROTOCOLS](https://reader031.vdocuments.mx/reader031/viewer/2022030212/58a06f4a1a28ab06528b67db/html5/thumbnails/5.jpg)
Some Clarity about Protocol and SDKs
Beacon is only a piece of hardware broadcasting radio signal. On top of that, there are different
APIs,
SDKs
and protocols that you’ll be using (unfortunately).
![Page 6: BEACON AND ITS PROTOCOLS](https://reader031.vdocuments.mx/reader031/viewer/2022030212/58a06f4a1a28ab06528b67db/html5/thumbnails/6.jpg)
Three main types of Protocols
iBeacon (2013)
AltBeacon (2014)
Eddystone (2015)
Note: The first two have the same features, the last one is different. So we are going to see the differences.
![Page 7: BEACON AND ITS PROTOCOLS](https://reader031.vdocuments.mx/reader031/viewer/2022030212/58a06f4a1a28ab06528b67db/html5/thumbnails/7.jpg)
SUMMARY
![Page 8: BEACON AND ITS PROTOCOLS](https://reader031.vdocuments.mx/reader031/viewer/2022030212/58a06f4a1a28ab06528b67db/html5/thumbnails/8.jpg)
the Multi-Beacon CapabilityThis means that a single hardware beacon sends out multiple transmissions that can be used independently.
Eddystone-UID
Eddystone-TLM
Eddystone-URL
Not all of these frames have to be used at the same time. In fact, beacons based on Eddystone can be configured to turn off some of these frames to save battery power or reduce noise.
![Page 9: BEACON AND ITS PROTOCOLS](https://reader031.vdocuments.mx/reader031/viewer/2022030212/58a06f4a1a28ab06528b67db/html5/thumbnails/9.jpg)
Do I have to use Estimote SDK? What are the benefits? 1/2
![Page 10: BEACON AND ITS PROTOCOLS](https://reader031.vdocuments.mx/reader031/viewer/2022030212/58a06f4a1a28ab06528b67db/html5/thumbnails/10.jpg)
Estimote Beacons: How to Set it?
![Page 11: BEACON AND ITS PROTOCOLS](https://reader031.vdocuments.mx/reader031/viewer/2022030212/58a06f4a1a28ab06528b67db/html5/thumbnails/11.jpg)
2. DEMO
![Page 12: BEACON AND ITS PROTOCOLS](https://reader031.vdocuments.mx/reader031/viewer/2022030212/58a06f4a1a28ab06528b67db/html5/thumbnails/12.jpg)
The BASE IDEA: Control Flow 1/2
Calculate how many people are in a place.
So, if one person (with its mobile phone) is close to Beacons, the app notices him/her and sends the information to a server.
If someone wants to know how many people are in this place can be checked it throught server.
![Page 13: BEACON AND ITS PROTOCOLS](https://reader031.vdocuments.mx/reader031/viewer/2022030212/58a06f4a1a28ab06528b67db/html5/thumbnails/13.jpg)
The IDEA: Control Flow 2/2
![Page 14: BEACON AND ITS PROTOCOLS](https://reader031.vdocuments.mx/reader031/viewer/2022030212/58a06f4a1a28ab06528b67db/html5/thumbnails/14.jpg)
The REAL IMPLEMENTATION
We would want to know
how many people there are in a library/ how many seatings are free
how many people follow the courses. We can use this information for the scheduling room of the next year.
![Page 15: BEACON AND ITS PROTOCOLS](https://reader031.vdocuments.mx/reader031/viewer/2022030212/58a06f4a1a28ab06528b67db/html5/thumbnails/15.jpg)
THE BIG PROBLEM: TURN ON the BLUETOOTH
Generally, we don’t make another application, we can use university application (like infostud) and attach the module.
In this case, but also in all cases when we use a beacon we have to give something to the user. In the First case we can give library’s hours, library news
and so on.
In the second case the professor should spend some minutes of the lecture.
![Page 16: BEACON AND ITS PROTOCOLS](https://reader031.vdocuments.mx/reader031/viewer/2022030212/58a06f4a1a28ab06528b67db/html5/thumbnails/16.jpg)
THE CODE..
![Page 17: BEACON AND ITS PROTOCOLS](https://reader031.vdocuments.mx/reader031/viewer/2022030212/58a06f4a1a28ab06528b67db/html5/thumbnails/17.jpg)
BEACON REGION 1/2In my demo i have used the Estimote Default broadcasting packet and since it is iBeacon-compatible we have like apple standard the region formed by :
UUID - most commonly represented as a String.
Major - an unsigned short integer, (1–65535)
Minor - an unsigned short integer, (1–65535)
These three values serve for identify the beacon’s range
![Page 18: BEACON AND ITS PROTOCOLS](https://reader031.vdocuments.mx/reader031/viewer/2022030212/58a06f4a1a28ab06528b67db/html5/thumbnails/18.jpg)
BEACON REGION 2/2
beaconManager = new BeaconManager(this); beaconManager.connect(new BeaconManager.ServiceReadyCallback() { @Override public void onServiceReady() { beaconManager.startMonitoring(new Region("monitored region", UUID.fromString("B9407F30-F5F8-466E-AFF9-25556B57FE6D"), 61272, 53723)); } });
![Page 19: BEACON AND ITS PROTOCOLS](https://reader031.vdocuments.mx/reader031/viewer/2022030212/58a06f4a1a28ab06528b67db/html5/thumbnails/19.jpg)
MAIN METHOD 1/3
Monitoring can be thought of as a geofence: a virtual barrier, here defined by the range of beacon or a group of beacons. Going in(enter) and out(exit) of this range triggers events that application can react to.
![Page 20: BEACON AND ITS PROTOCOLS](https://reader031.vdocuments.mx/reader031/viewer/2022030212/58a06f4a1a28ab06528b67db/html5/thumbnails/20.jpg)
MAIN METHOD 2/4beaconManager.setMonitoringListener(new BeaconManager.MonitoringListener() { @Override public void onEnteredRegion(Region region, List<Beacon> list) { //put the enter region logic here } @Override public void onExitedRegion(Region region) { //put the exit region logic here } });
![Page 21: BEACON AND ITS PROTOCOLS](https://reader031.vdocuments.mx/reader031/viewer/2022030212/58a06f4a1a28ab06528b67db/html5/thumbnails/21.jpg)
MAIN METHOD 2/3 Ranging enables receiving more
comprehensive beacon data: identifiers and proximity estimates of the beacons in range.
beaconManager.setRangingListener(new BeaconManager.RangingListener() { @Override public void onBeaconsDiscovered(Region region,List<Beacon> list) { //put here the ranging listener logic } });
![Page 22: BEACON AND ITS PROTOCOLS](https://reader031.vdocuments.mx/reader031/viewer/2022030212/58a06f4a1a28ab06528b67db/html5/thumbnails/22.jpg)
MAIN METHOD 3/3
Hint: ranging only when in range of beacons
Since ranging is much more energy-intensive than monitoring, it's a good practice to only do it when you know (thanks to monitoring) that you're in range of some beacons.
![Page 23: BEACON AND ITS PROTOCOLS](https://reader031.vdocuments.mx/reader031/viewer/2022030212/58a06f4a1a28ab06528b67db/html5/thumbnails/23.jpg)
CountDownTimer
After 30 seconds the application sends some info to the server. The latter stored it and responses with the ID if the request is for registering(ID needs for unregistering), or with positive message if the request has been unregistered .
![Page 24: BEACON AND ITS PROTOCOLS](https://reader031.vdocuments.mx/reader031/viewer/2022030212/58a06f4a1a28ab06528b67db/html5/thumbnails/24.jpg)
Download the apk 1/2If you want you can download the demo-app and we can try it together. The app was tested on Samsung s6 with Android 6.0.1
STEPS THAT MUST BE FOLLOWED1. Enable «Unknown Sources» in setting.2. Turn on the internet connection and
turn on the bluetooth.3. Click the button «Start Demo»4. Give it the general permission 5. Wait more or less 30 seconds.6. So we’ll check the result in my website.
![Page 25: BEACON AND ITS PROTOCOLS](https://reader031.vdocuments.mx/reader031/viewer/2022030212/58a06f4a1a28ab06528b67db/html5/thumbnails/25.jpg)
Download the apk 1/2 link:
http://beaconcontrolflow.altervista.org/BeaconControlFlow.apk
or QrCode:
![Page 26: BEACON AND ITS PROTOCOLS](https://reader031.vdocuments.mx/reader031/viewer/2022030212/58a06f4a1a28ab06528b67db/html5/thumbnails/26.jpg)
THE REAL PROJECTS
I will show few real project with beacon technology
![Page 27: BEACON AND ITS PROTOCOLS](https://reader031.vdocuments.mx/reader031/viewer/2022030212/58a06f4a1a28ab06528b67db/html5/thumbnails/27.jpg)
LIST OF PROJECTS London Station for blind people (
Youtube video, article)
Romania (here)/Sud Tirol(search "tecnologia Beacon" in the page) Bus for blind people.
Museums (here)
Control flow in big event (blog article)
Navigator to enclosed spaces (here)
![Page 28: BEACON AND ITS PROTOCOLS](https://reader031.vdocuments.mx/reader031/viewer/2022030212/58a06f4a1a28ab06528b67db/html5/thumbnails/28.jpg)
Thanks!
![Page 29: BEACON AND ITS PROTOCOLS](https://reader031.vdocuments.mx/reader031/viewer/2022030212/58a06f4a1a28ab06528b67db/html5/thumbnails/29.jpg)
CREDITS AND LINKS Presentation template by
SlidesCarnival
Code available on Github
Presentation available on Slideshare
You can find me also on LinkedIn