how to get Device UUID in iOS from Beacon broadcasting Devices within a range of region? - ios

I want to develop an iOS app that will work as Beacon receiver which will get broadcasted device UUID's from surrounding distance via bluetooth low energy(BLE) device supported coverage distance.
I am following this tutorial https://www.raywenderlich.com/152330/ibeacon-tutorial-ios-swift. This tutorial provides a device to work as Beacon via adding Device UUID's, but i need to get those device UUID's automatically.
How can i do that? Is it possible using CoreLocation and CoreBluetooth services?

Related

altbeacon-IOS, Only the ibeacon is not being scanned

enter image description here
I used swiftUI, and it was confirmed that the header bridge was also working properly.
As you can see in the image, the altbeacon is scanning fine,
but not the ibeacon.
I set the layout like this
setBeaconLayout("m:2-3=0215,i:4-19,i:20-21,i:22-23,p:24-24,d:25-25")
, is there any problem? please check.
I tried changing the layout like this, but it didn't work.
setBeaconLayout("m:2-3=0215,i:4-19,i:20-21,i:22-23,p:24-24")
The OP has set up beacon scanning on iOS using the AltBeacon iOS Beacon Tools
The above tools help iOS scan and decode Eddystone, AltBeacon and other BLE beacon formats using iOS CoreBluetooth APIs under the hood.
However, the above tools cannot detect iBeacon because iOS blocks the underlying CoreBluetooth APIs from getting scan results for iBeacon advertisements. In order to detect iBeacon you must use CoreLocation APIs alongside what you are already doing. While this is duplicative, unfortunately Apple requires this duplication by sandboxing iBeacon from other BLE advertisements.

Bluetooth device not visible on iOS but visible on MacOS

I'm trying to discover a bluetooth device from an iOS app I developed. The device is an industrial sensor which send a measure every x ms.
I dont understand why I can see and connect to the device from my MacBook but not from my iPhone. The device is not visible in iPhone bluetooth settings. I dont find it through CoreBluetooth too (by using 'scanForPeripheral' method). Is there particular specifications on iOS?
I'm allowed to setup every data I want on the BT device (profil, CoD, UUID, etc.)
The iOS app is basic and simple. I'm using CoreBluetooth framework.

Android Beacon Library version -- 2.3.5 not detecting TI senor tag

Mobile device model and OS version -- Nexus 5, API 23
Android Beacon Library version -- 2.3.5
I have a sensor tag from TI(Texas Instruments), and the firmware is TI provided. The same 2541 chipset is used in all beacons. I try to detect it using this library, it comes inside the didRangeBeaconsInRegion() callback but it prints beacons.size to be zero size.
Now, what changes I need to do, to get this chipset detected?
Just for further information, there are free apps in playstore named (iBeacon detector) which detects this chipset.
Any help will be highly appreciated.
Thank You
A few points:
The Android Beacon Library is designed to work with Bluetooth LE Beacons, not non-Beacon BLE devices. A beacon is a specialized BLE device that continually broadcasts a unique identifier. If you need a more general purpose BLE functionality, the library may not be a good fit.
The TI Sensor Tag must be loaded with specific firmware to make it broadcast as a beacon.
There are many beacon formats including AltBeacon, Eddystone and iBeacon. If your BLE device is transmitting as a beacon you need to know which one it is transmitting.
By default, the Android Beacon Library only detects beacon transmitters sending the AltBeacon format. To detect other beacon formats, you must supply a BeaconParser for that format. A Google search will easily find the Parser expression to configure based on the format the beacon is using.

Identify iOS device using iBeacon or CoreBluetooth in background

I have an app that runs 2 modes:
Mode 1: Advertises the App UUID
Mode 2: Monitors and ranges for the App UUID
When the 2 devices are in proximity a notification is triggered. When in the foreground I'm able use the Major / Minor values to send the unique device ID (guessing Bluetooth MAC address) to device in mode 2 and call a webservice to identify 'who' the device belongs to.
This method does not seem to be possible in the background? I've read that the Bluetooth packet that's advertised by iOS device either strips the Bluetooth MAC address and major / minor values out when advertising, or the device running the app in the background receiving the notification chooses not to receive it?
My question is really this:
Is it possible to detect which device is advertising the Apps UUID even if the device monitoring has the app in the background using CoreBluetooth iBeacon or CoreLocation services?
Yes, you can do this using CoreLocation iBeacon APIs in mode 2 and CoreBluetooth APIs to advertise an iBeacon with device-specific major and minor identifiers in mode 1.
To clarify, you CANNOT use the Bluetooth Mac address as iOS spoofs this on the receiver side (both in the background and foreground), assigning a unique one per session that is not always consistent for the same transmitting device.
Using an iBeacon transmission you must know the iBeacon ProximityUUID in advance on the receiver, so the 16-bit major and 16-bit minor fields are all that you can use to uniquely identify a device. That gives you over a billion combinations so it should be sufficient.
You can monitor for the single iBeacon UUID in the background, then iOS will wake up your app for 5 secs, allowing you to use the iBeacon ranging APIs to read the major and minor identifiers. All of this works in the background for mode 2, except transmitting as an iBeacon which requires the foreground for mode 1.

Unable to transmit as an iBeacon from iPad Air

We have an existing iPad app that we are adding iBeacon transmitting capabilities to. I am unable to transmit an iBeacon signal. I won't provide the code at this point because I've also tested the Apple AirLocate example and the Radius Networks Locate iB app as a transmitter and in both cases the iPad won't transmit a beacon.
We tested with iPhone 5 devices and they can both transmit and range beacons.
What could be the issue with our iPad test device that it won't transmit? It can range beacons from the iPhones just fine.
BT is enabled. Location Services are enabled and approved for the apps in question.
Two likely causes:
The Proximity UUID of the iBeacon transmitter is not configured with Locate for iBeacon or Air Locate. Locate cannot see new iBeacons with unknown Proximity UUIDs. Even if the configuration is off by only a single digit, the iBeacon will be invisible.
Many users have reported recently that their phones are getting into a state where they cannot see iBeacons, and a reboot solves the problem. See here for more details.
How do you detect the iBeacon, actually?
I once encountered the problem that CLLocationManager#startMonitoringForRegion: did require a certain period of time, until the regions were updated and a region was ranged. So CLLocationManager#requestStateForRegion:...
In either way. What I first did to validate that beacons were emitting/sending correctly (not receiving): I downloaded a common Bluetooth Scanning-App and checked, whether the App is able to range the emitted beacon. Could you verify this at first? Maybe the iPad Air is sending correctly, but the receives do not range the beacon yet.

Resources