I read that Nexus6 and Nexus9 can only act as beacon in eddystone format.
Currently I do not have either of the phones. I have an iphone, can we use aniphone to broadcast eddystone format?
Unfortunately, this is not possible. Apple restricts the type of advertisements that can be sent out by its CoreBluetooth APIs. While you can broadcast an advertisement with the same GATT Service UUID as required for Eddystone, you cannot attach the necessary data. This is because the CBAdvertisementDataServiceDataKey that associates service data to an advertisement is read-only on iOS. You can't set the data.
So while you want to make the iOS device advertise something like this:
0201060303aafe1516aafe00e72f234454f4911ba9ffa6000000000001
You end up advertising something like this:
0201060303aafe0316aafe
This leaves off the Eddystone-UID type code (00), the calibrated power (e7), the namespace identifier (2f234454f4911ba9ffa6) and the instance identifier (000000000001). As a result, it won't be recognized as an Eddystone-UID frame.
Related
I have a Bluetooth device, and I try to execute a function when my application is near the device.
I read on an iBeacon technology, but I did not really understand if the iBeacon could be used on all Bluetooth devices as long as you have your UUID, or you need the Bluetooth device have a service that sends a special UUID for iBeacon?
If you have access to the firmware on your Bluetooth device, it is generally simple to set up iBeacon advertising. You must enable the Bluetooth controller to emit a manufacturer advertisement with a specific 22 byte payload. The details of how you do this is device-dpecific.
That payload contains three identifiers which you may choose, the Proximity UUID is a 16 byte sequence, the major is a two byte sequence and the minor is also a two byte sequence.
You can see the layout of this payload in my answer here.
You can then use the CoreLocation API on iOS and the Android Beacon Library on Android devices to detect the iBeacon advertisement with the same identifiers and make your app react.
Simply put, how does Eddystone-EID work and what are the main use cases?
Standard beacons transmit a unique identifier so apps can tell when they are in a particular place. But because this identifier is in clear text, any app can read this identifier, and use the transmission to know where it is. An unauthorized third party app can make use of standard beacons that the app's authors did not deploy.
Eddystone-EID encrypts it's identifier and rotates it periodically to prevent others from making use of the beacon identifier. Authorized apps can use a "trusted resolver" to get a stable identifier from the rotating encrypted one in the transmission. A server call is needed to convert the 8-byte AES encrypted identifier to a stable one.
Google's Proximity Beacon API provides this conversion. It is theoretically possible to build an independent trusted resolver apart from Google (I have done so for testing purposes), but otherwise you must register your EID beacons with Google and use their web services to resolve their identifiers.
An example ephemeral identifier looks like this:
0a194f562c97d2ea.
Here's a write up I did on the topic: http://altbeacon.github.io/android-beacon-library/eddystone-eid.html
Here's an explanation I found on a developers.google.com page here.
What happens when a client sights an Eddystone-EID beacon?
When a client device sights an Eddystone-EID beacon as a result of a Nearby1 subscription, the current EID is sent to the Google Proximity Beacon API2 along with the API key of the calling app. The Google Proximity Beacon API establishes whether the supplied API key is authorized to fetch attachments that have been associated with the beacon. If resolution is allowed, the attachments are served back as Nearby message objects in the normal way. Otherwise, Google Proximity Beacon API returns an empty value, as it would if the beacon had not been registered.
1 - The beacon scanning component of the Google beacon platform
2 - The Proximity Beacon API is a cloud service that allows you to manage data associated with your BLE beacons using a REST interface.
Here's another paragraph which I found critical to understand how the technology works.
Eddystone-EID is designed to give developers control over which clients can make use of their beacon signals. The beacon identifier changes pseudo-randomly in such a way that it can only be resolved to stable information by a resolution service that shares an encryption key with the beacon. Without access to the resolution service, the beacon identifier is of little use.
Eddystone-EID is appropriate for cases where beacon deployers wish to:
Prevent other parties from using their beacons.
Preserve user privacy in scenarios involving wearables or other equipment carried by the user.
Lease their beacon network to other parties in a way that allows a provable 'off switch' for access.
Provide a strong signal that a user is at a particular place, that is not easily spoofed.
We can make iOS devices act as a iBeacon transmitter and We can locate nearby iBeacons if we know their Proximity UUID.
With Google's Proximity Beacon API, It's possible to configure and register real Beacon hardware, and we can locate them with Nearby Messaging API.
But is it possible to make iOS devices to broadcast as Eddystone Beacons ? And it needs to be discoverable by apps that scan Eddystone beacons.
Thanks in advance.
Unfortunately, this is not possible. While iOS devices can advertise Bluetooth LE service advertisements(which are the advertisement type used by Eddystone) using CoreBluetooth APIs, you cannot attach the necessary data. This is because the CBAdvertisementDataServiceDataKey that associates service data to an advertisement is read-only on iOS. You can't set the data.
So while you want to make the iOS device advertise something like this to transmit Eddystone-UID:
0201060303aafe1516aafe00e72f234454f4911ba9ffa6000000000001
You end up advertising something like this:
0201060303aafe0316aafe
This leaves off the Eddystone-UID type code (00), the calibrated power (e7), the namespace identifier (2f234454f4911ba9ffa6) and the instance identifier (000000000001). As a result, it won't be recognized as an Eddystone-UID frame.
I know iBeacon only broadcasts UUID signal. What I'm reading about Proximity Beacon API is confusing. We must register:
Advertised ID (required)
Status
Stability
Latitude and longitude
Indoor floor level
Google Places API Place ID.
Text description
Arbitrary properties as key/value pairs
Does Eddystone broadcast all the information above, as shown on this image?
Beacons broadcast very little information themselves — typically only a Proximity UUID + major + minor (for iBeacons) or a BeaconID + transmission power (for Eddystone UID beacons).
The Proximity Beacon API is a service that allows you to "register" a beacon along with additional information for it. Some of this information, such as:
PlaceID
Building level
Stability
Lat/Lng
Description
Properties
are entirely optional are only for the registering beacon owner's own uses. You can choose to specify exactly where a beacon is with a lat/lng and a PlaceID, or you can skip these.
The Proximity Beacon API also lets you associate little pieces of data called "attachments" to your beacon. These are things that people can see when they run into your beacons in the wild. The content and format of these are entirely up to you.
So, if you want to register a beacon with the PB API, the only thing you MUST specify is the advertisementId.
For an Eddystone beacon, this will be 16 bytes (The BeaconID from the UID Frame) whereas for iBeacons, this will be 20 bytes (16 byte iBeacon Proximity UUID + 2 byte major + 2 byte minor).
Note that as per my answer to another question, what you upload to the register function for the beacon is a base64 encoded string representing the underlying BINARY data. So, get a Buffer or byte array representing the advertisement ID and then base64 encode that.
As you noted, the beacon itself only broadcasts its identifier—i.e., UUID + Major + Minor for iBeacon, and Namespace + Instance for Eddystone.
These additional fields that you register with Google's Proximity API are stored entirely on their server, and not broadcast by the beacon.
When you detect a beacon, you can read its identifier from the advertising packet, and use it to retrieve the additional data from Proximity API.
Imagine you have a beacon with identifier X. You upload the beacon's data to Proximity API, e.g., Advertised ID = X, description = "My beacon". Later, when your app detects that beacon, it can go to the Proximity API and say "give me data for beacon X", and that's how you gain access to the extra information, e.g., the "My beacon" description.
The image you've linked to is from a Proximity API tutorial I remember seeing on the Internet, and it's just a simplification, because strictly speaking, the beacon doesn't broadcast all this information, only the identifier. But this identifier is enough to fetch the extra data from Proximity API (providing you have Internet connection), so one can think about Proximity API as something that extends what you know about the beacon, and I think that's the reason why the image shows it this way.
How would I sync the contacts to MFi device so that it can be displayed on the device using Phone Book Access Profile (PBAP).I am able to get the contacts from address book. I would like to know is there any alternative to this? How to initiate Phone book request from the device and how do I transfer it to MFi device.Please let me know any examples to sync the contacts using Bluetooth or any pointers to accomplish the task.'MFi' device supports Serial Port Profile (SPP). I would like to sync the contacts in the delegate method mentioned below, but I am not sure how to start this. Any pointers to accomplish this.
- (void)accessoryDidDisconnect:(EAAccessory *)accessory
what kind of bluetooth device? If you are making your own it must be Bluetooth 4.0. Low Energy. Then you can transfer any data using Core Bluetooth.
You must then define your own Service UUID, your own Characteristic UUID.
Search for devices (with your Service UUID for instance or 'nil' for all)
Connect
Find Services
Find Characteristics for each service
Now you can use GATT profile access to transfer data in whatever format you want. It can be the data from the phonebook if your bluetooth low energy device know how to decode that. Maybe you want to make your own format...
If you don't want to do this then you must join the MFI program to get the documentation.
Also you should really go to iTunes, then find the WWDC 2012 Session Videos. There are several which can explain stuff for you.
Session 701 is great about IOS Accessories
Session 703 about Core Bluetooth
Session 705 about Advanced Core Bluetooth
BR
Henrik