I have played around with Airlocate and two iPhones. Also between a Linux /hcitool beacon transmitter and Airlocate ranging. I see that the set of proximity UUIDs to be tracked are hardcoded in the Airlocate source code.
Is it possible for an iOS app to get a more generic call back , when it is in the vicinity of any iBeacon (any proximity UUID) and let that app decide how to go about behaving the way it wants.
I understand that this should definitely be possible from the OS perspective, as I see a 9 byte iBeacon prefix in the start of the PDU, which is independent of the proximity UUID.
Another query - I view hardcoding the proximity UUID in the APP as some sort of pairing . How is general bluetooth pairing different from this.
My aim in asking these questions is to understand the feasibility of using beacons to beam (broadcast) data, so that all recipients in the vicinity can receive it. If I choose to go with a specific 16 byte proximity UUID, then I am left with only 5 bytes (Major/minor/power) to beam data. Otherwise I get 21 bytes
By "more generic call back", it seems like you are trying to listen to iBeacons that are not deployed by you. The answer to this is NO, you can't do that.
According to this post:http://beekn.net/2013/10/ibeacons-can-my-ios-app-find-beacons-that-arent-mine/ , in order to listen to an iBeacon, you must know its proximityUUID first.
Unfortunately Apple decides to limited your ability to do that. CoreBluetooth framework can detect iBeacon nearby but since it only returns the device UUID, not the proximityUUID, you cannot add callback to them.
And Android can read the proximityUUID of any iBeacon without any problem.
Related
I and my team are working on a beacon that we need to talk to an app on the user's iPhone. Since we need the app to detect the beacon and execute code to talk to our API even when killed, we cannot use CoreBluetooth and need to operate as a beacon.
We're attempting to make a custom beacon on a BCM20737S BLE module. Is it possible to have this custom beacon talk to an app on an iPhone as a beacon? (CoreLocation framework)
Thanks!
As long as your packet is broadcasting a packet with the iBeacon protocol, then corelocation can detect it and your app will wake based on detection of this signal. An iBeacon protocol packet is a 25 byte payload set as the manufacturer data field in the BLE advertisement.
The company ID is 2 bytes (0x004C)
The type is 1 byte (0x02)
Data Length is 1 byte (0x015)
Proximity UUID is a 16 byte Hex String
Major is 2 bytes uint16_t
Minor is 2 bytes uint16_t
Measured Power is 1 byte int8_t
This stack thread might be of some use to you.
What is the iBeacon Bluetooth Profile
But essentially corelocation is only configured for ibeacons, if you want to transmit a different protocol packet youre going to need to use CoreBluetooth on iOS, then once you receive the packet, translate it somehow for use with your app.
The CoreLocation framework will only detect iBeacons, which means beacons that meet the iBeacon byte format. You can certainly build your own, and while it does not have to be an official Apple certified iBeacon, but it does have to match the byte pattern. This pattern is widely available on the internet, even if you do not sign up for Apple's certification program that earns you the right to see the spec.
Be careful, however, that you make no changes to rhe byte pattern. Some vendors have built beacon transmissions that tack extra bytes on to the end to send the battery level. While these transmissions are detected, they are detected much more slowly because the header has a different length field, which does not match the hardware filter used for rapid detection in the background.
If you want to customize your beacon format, you must use CoreBluetooth for detections. I have written some open source iOS beacon tools that help do this, using the open source AltBeacon and Eddystone-UID formats as examples. While detections in the background are slower as you say, you can make your beacon transmit both an iBeacon signal (to wake up your app quickly) and a custom beacon signal (to send whatever custom fields you want) to be detected as soon as it is awoken. This way you get fast detection even if you define your own custom beacon format.
I really haven't read into much about iBeacons beyond the fact that they are low energy bluetooth transmitters that are able to detect nearby proximity devices. I am aware that there are beacon devices such as estimote that allows users to get prompts when entering their proximity. However, I am wondering if two iPhones can act as both beacons and receivers at the same time. So is possible for User A to be able to connect to User B when he arrives in a particular distance of the person?
By connect what I mean is for some sort of interaction to occur.
(e.g. Notifying User A that User B is nearby or exchanging messages that these users would like to send to people that comes in their proximity)
Thanks guys.
Yes, iPhones can both act as iBeacons and receive iBeacon signals. But they can only act as an iBeacon when the transmitting app is in the foreground.
What you suggest is all possible, but it is important to note that the iBeacon concept is connectionless. It is a one way transmission of a simple identifier from beacon to receiver. If you want to make a connection and exchange data, you need a separate mechanism like the internet or a non-iBeacon Bluetooth connection.
Is it possible to read iBeacon broadcasting message, that is unsecured without knowing the identifier to connect or monitor them? Basically in iOS you need to specify the UDID of that iBeacon in order to monitor it rather then we need the list of all the beacons that are near by and fetch its broadcasting message like location etc..
On iOS you cannot see iBeacons for which you have not provided the ProximityUUID up front. This is a limitation of the iOS APIs and the operating system.
You can specify up to 20 ProximityUUIDs simultaneously for monitoring (and more for ranging). You can even rotate more UUIDs into your list over time. This would allow you to use a list of known UUIDs from a source like wikibeacon.org to find many beacons nearby. But it will not let you see any beacon with an unpublished and unknown UUID.
For this, you can use a beacon scanner app on Android, OSX or Linux which have no such restrictions.
Does anyone know if it's possible on iOS to scan the network and then discover all iBeacons devices? After the scan is completed I would like to get for each device the real uuid, minor and major values and check throughout a web service if that particular configuration is saved in my database.
I know that generally on iOS you have to know the proximityUUID and listen to a region using the Beacons API.
Thanks.
It only possible to scan a network for predefined beacon. A beacon region looks for devices whose identifying information matches the information you provide. When that device comes in range, the region triggers the delivery of an appropriate notification. see CLBeaconRegion class here
When you start advertising a CLBeacon with peripheral data, can you pass in a NSString or UIImage into this dictionary that you could then have show up when the beacon is discovered?
For example, if I wanted to create write a message to a friend and then when the friend entered the beacon area, could I have the message show up on their phone by storing the message in the NSDictionary and then extracting it? If so, how? If not, is there another way?
Thanks!
So you are asking if you could add extra information to the beacon advertisement that's sent by a beacon device that a custom application could look for?
The answer is no. The iBeacon protocol is a very short, fixed packet of data. There's no facility for adding extra information to the packets.
You could design and implement your own BLE service that's an alternative to iBeacons and implement it on both the transmitter and the receiver.
You could also use a hybrid approach, where you use standard iBeacon discovery to find beacons, and when you detect a beacon you're interested in, trigger a 2-way BLE conversation with the beacon and ask it for additional information. It's my understanding that some of the BLE devices that are being sold as iBeacons can run custom software that would implement this sort of thing. (Many of these devices have ARM processors in them, the same family of chips that power iOS devices.
No, you cannot do this. iOS-based iBeacons (like all other standard iBeacons) will only transmit a three-part identifier and a transmitter power calibration value. That's it. You cannot transmit anything else.
Even if you did make a custom Bluetooth LE advertisement that sends additional data besides the standard iBeacon fields, you wouldn't be able to see this data with the standard APIs for seeing iBeacons.
If you want to tie other data to an iBeacon, you have to do it through another channel, by some kind of lookup that matches the data up with the identifiers above. Three common ways to do this:
Hard-code a static lookup table in your app.
Use a Web Service to look up the value based on the iBeacon identifiers.
Fetch the data directly from a (non-standard) iBeacon using a secondary BluetoothLE communication channel.
My company has a web service called ProximityKit that makes it easy to tie data to iBeacons in your app. You log into a web interface to type in key/value pairs to associate with each iBeacon, then the included iOS client library automatically gives you those key/value pairs when the iBeacon is visible.