An app being used for COVID-19 exposure notifications is asking for access to location services. The developers claim that location services must be enabled for BLE to work in this context. I'm not an iOS developer, but I am having trouble finding if this is accurate or not. This app does not use the Apple API for exposure notification, but it does use the same methodology. To work, the app must be able to scan for other BLE devices at all times, and there is some older discussion I found that indicates that MIGHT be the reason for requiring location services permission.
Related
From Android documentation:
Caution: When a user pairs their device with another device using BLE, the data that's communicated between the two devices is accessible to all apps on the user's device.
For this reason, if your app captures sensitive data, you should implement app-layer security to protect the privacy of that data.
Is this also true for iOS? I haven't found anything on it and I assumed because iOS doesn't show the true MAC addresses of devices this wouldn't be an issue, but just wanted to check. Thanks
Yes, iOS also works in a similar way. And if you want private communication, you also need to maintain app layer security. Thus android wear, galaxy watch, and other similar devices use encrypted communication in the app layer.
If you already know the details. BLE communication works via Gatt Characteristics.
Consider there are two health applications running on an iOS device and the user also using an activity tracker device. In that case if the user wants to connect both of the health apps with that tracker, he certainly can do it. Both apps will be able to communicate with the activity tracker and get sensor data using the CBCentral module. Look at the diagram for Details.
On the other hand, In general, vice versa will not possible. Because if both iOS apps use Peripheral Role they will register two different instances of BLE-Service even if using the same UUID. Thus it will force two apps to communicate with completely different characteristics instances. However, it is also possible to work with two peripheral apps with the same UUID but this is not what the BLE developers ever wanted.
you need to provide app level security based on Service UUID, so that devices having the app with only same service UUID can connect.
I want to make a IOS device act as a virtual Ibeacon and configure it to google proximaty API.
When I try to configure using google beacon tools. I get "eddystone configuration not supported by the beacon"
Can any one help me to understand on what basis Google says Ibeacon is supported for nearby notifications
Yes, you can use Google's Beacon Tools app to register a virtual iPhone iBeacon transmitter with Google's servers. The problem is that you are misunderstanding the meaning of that error message.
To clarify: The question shows a screenshot of an Android app that has scanned for an iBeacon transmission coming from an iOS device.
Provisioning shows "Eddystone configuration service not supported by this beacon" because that section is used for configuring the beacon over bluetooth using the Eddystone configuration GATT service standard. Because your iPhone doesn't support that GATT service (lots of beacons don't -- not just virtual beacons), you get that error message.
Don't worry, that section is optional.
Just skip it and go down to the next section labelled Registration.
As of KitKat 4.4, the required proximity API is baked into the Nearby functionality of the Android OS. This means that Android devices no longer require an application to detect and interact with beacons.
iOS, however, still requires either an app or the chrome browser to do so with Google's beacons.
My question: With current technology, if a website is designed using Google's PWA standards, can it have the ability to detect and interact with beacons in the same fashion that an application would (regardless of the browser being used)?
Follow-up, if YES, would it be able to perform these tasks while open in the background?
The short answer is no, you generally cannot interact with beacons from web apps. This is true even on Android devices that use the Chrome browser. On Android, you can launch a web app on beacon detection using Nearby, but only if the user taps the Nearby notification.
Here's the longer explanation:
Android devices do support Google Nearby which allows you to send a notification to a user when your beacon is detected that can (a) launch a native app, (b) launch the Google Play store to install an app, or (c) launch a URL in the default browser.
When launching a URL, the URL can be to a web app and may include a URL parameter that tells it that the web app was launched by the beacon detection through Nearby. But once the launch of complete, the web app's interaction with beacons is over.
In order to have dynamic interaction with beacons, there must be web APIs that give the web app callbacks when beacons are detected. These currently do not exist. There is hope for this in the future using Web Bluetooth APIs (See: https://webbluetoothcg.github.io/web-bluetooth/), however they do not currently support scanning for arbitrary Bluetooth advertisements needed to detect beacons.
I'm hoping to create a BLE advertisement on iOS where I can control the advertisement on a byte level.
One use case would be to mimic an iBeacon advertisement. What is the iBeacon Bluetooth Profile (I want to advertise while my app is in the background which is why I'm not using CoreLocation)
I do not see a way to do this with the Core Bluetooth API. Is this correct? Are there alternatives using private API's or jailbreaking?
As the others already pointed out, there is no API on iOS that allows you to do this.
You can advertise as an iBeacon, but only when your app is in the foreground. When in background, the advertisement is removed and therefore cannot be discovered anymore (except for other iOS devices which explicitly scan for that service UUID). Also see the documentation here: Core Bluetooth Background Processing
If you would share your use case and what you want to achieve, maybe there are other ways to realise it.
My experience with iOS is that if it is something is not exposed in the API, there is no way around, except jailbreaking. For Bluetooth low energy the API is at GAP/GATT level, and very little at the lower levels (if anything) is exposed. Advertising is a LL (link layer) feature.
To illustrate how restricted the access is: When scanning for BLE devices you will not have access to the advertiser's MAC address iOS. In Android you have it.
I do not see a way to do this with the Core Bluetooth API. Is this
correct?
Since you have to set Manufacture Specific Data in order to achieve this, if nothing has changed you will experience exactly the same issue that I did. Explained here:
The advertisement key 'Manufacturer Data' is not allowed in CoreBluetooth
It is not possible.
Is it possible to discover Gimbal beacons using the iOS SDK? I want to use simple ranging but I don't know the UUID of the transmitter.
YES, you can use Gimbals as iBeacons. You have to re-configure it using iBeacon configuration.
Login to Gimbal website, create an account if you don't have one.
https://proximity.gimbal.com/
Open Proximity tab. Click on Manage Configuration button at the top and create new configuration, select iBeacon as beacon type, assign UUID, major and minor. You can choose any UUID you'd like.
Now register your Gimbal beacon, and select your new configuration. You must open the beacon to get to the Factory ID that is required to register.
Download Gimbal manager app for iPhone, open it, select "Configure" option. Open Gimbal and remove battery, put the batter back in, and you should see your beacon in the Gimbal Manager app, click the Update button.
That's it, now you your Gimbal is in iBeacon mode.
If anyone interested, I found this useful post on http://beekn.net/2013/12/inside-gimbal-qualcomm-beacons-tackle-bluetooth-le-challenges/:
Actually, you can’t sniff the iBeacon UUID as Gimbal use their own implementation for their beacons. They use BLE to transmit encrypted IDs that change with each broadcast, so it needs to validate with the SDK / API to confirm which beacon ID this ties up to.
update: davidyoung is right. There is some info that I skipped in Gimbal's documentation:
If your application's use case requires you to use iBeacon technology, the Gimbal Series 20 beacon can be configured to broadcast iBeacon compatible BLE packets. To learn how to configure a beacon to be iBeacon compatible please read the Proximity Quickstart Guide. The Proximity framework makes it very easy to use both iBeacons and Gimbal beacons from the SDK and lets you manage them through the Gimbal Manager Portal.
Interesting - I recently received a reply from Radius Networks that said ScanBeacon cannot identify Gimbal beacons - at least that's how I read it..
"Scanbeacon should display any device that is transmitting an ibeacon advertisement.
We have had several reports that the little blue beacons that Qualcomm has been making available are not showing up with ScanBeacon.
Our own investigation into these units is that they are not advertising the iBeacon identifiers.
There may be some configuration or other steps that need to be taken that we are not aware of.
But the out-of-the-box state of the Qualcomm beacons appears to be no iBeacon advertisement."
To use iOS, you will need to know the UUID.
There are some other options that do not require knowledge of the UUID.
If you have an Android device w/ 4.3 or later and support for BT4.0, you can use the free Locate application at the following link. https://play.google.com/store/apps/details?id=com.radiusnetworks.locate
If you have a Mac w 10.9 or higher and support for BT4.0, you can use the ScanBeacon app ($9.99) available on the Mac App Store or at this link. http://www.radiusnetworks.com/scanbeacon-app.html
Good luck, and make sure you report back your findings to rest of the community!
David
Full Disclosure: My colleagues just firmly reminded me that I'm misbehaving by not noting that I work for Radius Networks, who provides the tools listed above, and am the developer of the second tool listed, ScanBeacon.