first of all i would like to say that beacons seems to be something great and usable, i am very enthusiastic still i saw it for the first time.
Now, i would like to try them and to make an Android app, but i'm confused about some things that i didn't found it clearly on internet:
Are beacons available already?
How much does a beacon cost?
Does it need to be charged ?
How much time can a beacon work without charging?
Do i need to setup every device for interaction with it?
Can i implement beacon in Unity App ?
Is there any tutorials about using it?
I know, post is a little big, but i would be very glad if i will found here answers. Have a nice day! ;)
Are beacons available already?
yes, check out the internet.. radius networks, kontakt.io, estimote etc., you could also hit Alibaba, or buy a raspberry pi and a bluetooth dongle
How much does a beacon cost?
cheap. Small beacons could be as little $1 each, but these have drawbacks like non-replaceable batteries and short range, Bluetooth 5 beacon could be more expensive, but these can cover a 1km radius (personally I think that's pointless). Typically expect around $30 for a "good" or top-tier beacon company's primary beacon choice. If you buy bulk you get cheaper, but you might want to experiment with a few different kinds before you do that. Our company bought like 300 at one stage and we might need to replace them with a different manufacturer now
Does it need to be charged ?
some have replaceable batteries, some are only available to be plugged in, some are just disposable - you need to track that yourself
How much time can a beacon work without charging?
it can't - you may be thinking of NFC here - a Bluetooth radio/antenna requires more power than you might think (but probably less than both of us think to be honest), however it needs a dedicated power source both to transmit and receive data
Do i need to setup every device for interaction with it?
no, you make an app that listens for it. Well.. there are actually lot of options, however, not with straightforward detection/processing. Eddystone promotes a notion of "the Physical Web", which is like using URLs sent by Eddystone beacons to show you the right content, or iPhones actually have more built in support for some (mainly) retail use cases. Android is great because you can do so much in the background, and foreground services give you a lot more say about how and when you are stopped. You should also be aware that 4/5/6/7 all have different caveats around scanning/receiving, but most of the differences will/should be absorbed by any SDK you might use
Can i implement beacon in Unity App ?
certainly, just find a use case (AR/VR and a drone with a beacon for a Dragon? :O)
Is there any tutorials about using it?
so many, google about, but I would recommend starting with Radius Network's Android Beacon Library.(This uses Altbeacon, but is VERY easily changed to work with iBeacon and even Eddystone, also it's free and these guys know their stuff). Also, there are many beacon apps you should download as the consistency is not guaranteed across devices, and a few apps have a few different features that you might want for debugging. Try Locate Beacon (by Radius) NRF Toolbox and basically any other BLE app with a decent score - it can be really good to cross reference the hits when funny stuff starts happening.
A lot of people talk about Beacons and managing them as if it's more complex than it is, you have an object that just screams an ID every X milliseconds, you hear that, you do something with it, once, every X seconds, or whatever you want
I would say you should get very familiar with the difference between BLE/ Bluetooth Smart and regular Bluetooth that interacts via a GATT server. With beacons you're essentially just listening to a peripheral device that advertises in a set format. As the developer, it is up to you to take this and make it meaningful for your user
Related
We want to incorporate beacon technology in our apps to create user engagement with screen-off events.
In the present use case, we assume that the end-user will be in constant movement.
So far, we have tested two different approaches.
Kontakt SDK/Android Beacon Library in order to be constantly scanning for beacons. Using the UUID (assuming we are using Eddystone), we can associate it with a cached message that we have retrieved for our back-end. However this ends up eating a lot of battery.
Nearby Messages/Nearby Awareness this had potential, since it has a beacon dashboard to easily configure the attachments on each beacon and it has the "same" implementation on both iOS and Android. However, after reading the documentation and after numerous tests, we could not retrieve beacon attachments if we had the screen off. The only possible way was for the user to be still in front of the beacon for 3 minutes (depending on the smart-phone and energy settings) and it goes against our premise that the user is in constant movement, so the scan might be triggered when the user is not near the beacon.
Also: using Nearby Messages on iOS we had the desired behaviour: the app would discover the beacons when using the Nearby Messages if both the app and the API was configured for background usage.
Thus, we ask:
Is there a way to use Nearby API with screen-off events? Like constantly scheduling a scan?
What other alternatives do we have, that can be used cross-platform between iOS and Android? (so that we can try to assure a similar behaviour between platforms)
EDIT:
Upon further reading, we came to the conclusion that BLE beacon scanning causes minimal impact on the battery when used correctly (emphasis on the correctly, we will have to change the heuristics on our side), see : this.
The question then remains: why can't we have background scans in the nearby api without Nearby Messages own notifications, so that we can assert that the user passed near a beacon? What intrigued us is that this works just fine on iOS...
The Nearby API scans on a schedule of its choosing, including screen on events. You do not have the flexibility of customizing Nearby scanning rules for your app, as it is designed to be a service that runs for all apps on the phone. When using Nearby, you must accept this limitation.
The Android Beacon Library is open source and allows flexible configurations of when you scan. If you find your configuration uses too much battery for your use case you can adjust this. The default settings have been designed for a good tradeoff between power usage and quick detection, so these are recommended. If you find the default settings don't work for you there are many different ways you can set it up. The simplest way is by adjusting its scanPeriod and betweenScanPeriod for the background. But there are many other ways to customize its scanning behavior.
You should note, however, that a "constantly scheduling a scan" (as mentioned in your question) will use up a lot of power if in low latency mode. The Android Beacon library default is to do a constant scan in low power mode, when the app is in the background and no beacons are around. On most devices, this yields detections within 5 seconds and reasonable power usage similar to cell standby.
It's hard to offer more suggestions without knowing the configuration you used with the Android Beacon Library, the test conditions in place, and how much power consumption was witnessed. If you can provide this information, I might be able to help more.
Full disclosure: I am the lead developer on the Android Beacon Library open source project.
I am testing out a positioning system using iBeacon and Altbeacon. I have found that my triangulation results are actually pretty accurate, but sometimes it takes upwards of 5 seconds to see the proper results.
For example, say I am currently standing at Point A. Altbeacon + my triangulation has me properly placed very close to Point A. However, when I move 5 meters away to Point B, I remain around Point A for around 6 seconds and all of the sudden I snap into place right near Point B. Is this an issue with Altbeacon, or possibly the communication between my iBeacons and my Android tablet?
Note: I am using a Kindle Fire 10, running FireOS 5.1.1 on top of Android. The Bluetooth iBeacon technology is BLE, and broadcasts at around 1Hz.
The issue of time lag that you describe may be caused by averaging intervals on the signal measurement. You do not say what scanning framework you are using, or if you are using raw RSSI or a distance estimate as input to your algorithm. The Android Beacon Library by default uses a 20 second averaging interval (configurable) for its distance estimates. Other framework's use similar averaging.
Reducing the averaging interval will lessen the lag, but increase the noise as an input to your algorithm.
EDIT: To reduce the distance estimate sampling interval to 3 seconds from the default 20 seconds, call:
RunningAverageRssiFilter.setSampleExpirationMilliseconds(3000l);
I have tried previously what you were trying to do. There was a lot of issues making it impossible to get correct triangulation results.
Theoretically it should work, but
Practically you will have a lot of challenges, like the fact the Bluetooth Beacon uses the 2.4GHz frequency, almost all Bluetooth Beacon has non-directional antenna, which means that you might risk not measuring the signal source but the reflection of the signal surrounded by the beacon.
The other fact is the noise from other sources or Bluetooth Beacon in your environment.
Depending on the Android phone model, the receiver antenna of Bluetooth is not necessarily mount same place in the phone, that means how you hold the phone will change the RSSI reading
Holding the phone in hand or near human body might also give different readings or no reading at all, since the human body contains water that is a signal reducer/killer for Bluetooth signal.
So even thus you improve your latency time of Bluetooth Beacon by software, you will still have these challenge make it almost impossible to get the right results.
I have seen a new directional Bluetooth Beacon I have not testing it yet, but it sounds like it solving some the mentioned issues.
It is correct what #davidgyoung wrote, but that won’t change the fact of real world scenario.
Btw, I have worked with Altbeacon a very nice and respected tool, and I used both RSSI and distance estimate with different type of Bluetooth Beacon and different phones and it did not help much, it is not Altbeacon the problem.
And regarding the university project I mentioned in my comments, we ended up using Bluetooth Beacon in different way to help us finding directions to target for visually impaired people, and we have developed scientific paper on it.
Finally for inspiration of what you are doing and what I mentioned in my answer, see this video it shows triangulation experiment, the provider of this video is btw also a user at Stackoverflow.
Note: my answer here is focusing on the context of triangulation and the challenges here make it as not a sweet solution.
So I have been experimenting with multi-peer networks. Ultimately I am going to try to use different frameworks to make one that can connect devices of same os through Bluetooth and WiFi, and ones of different types through wifi.
My first shot was apple's Multi-peer Networking. Unfortunately I got had about 0.5 seconds of delay (I didn't actually calculate this just an estimate) before even one bit of information actually got to the other device. I am suspicious that the framework is optimized for larger and encrypted data way more then it is for 1-32 bit jobs.
I was just wondering what you guys knew about the latency of other frameworks out their, since it takes a decent chunk of time for me to learn how to use each new framework. Is latency of about 0.5 seconds the best the industry has?
Honestly I would be happy if their was a library that was optimized to send 1 bit to each connected device every (1/60th) of a second. But I think most of these networks package up the data like its of bigger size anyways.
I sorta wish mobile devices had NFC. Just look at systems like the 3ds that can do multi-peer multiplayer (smash-bros) with really really small latency and great accuracy.
Try changing the MCSessionSendDataMode to MCSessionSendDataUnreliable
MCSessionSendDataUnreliable
Messages to peers should be sent immediately without socket-level queueing. If a message cannot be sent immediately, it should be dropped. The order of messages is not guaranteed.
This message type should be used for data that ceases to be relevant if delayed, such as real-time gaming data.
but depends how reliable you really need the data to be, but on a closed network, it should be very reliable anyway
My question is fairly simple, but all the cases that led to it aren't.
Let's say I have many iBeacons with the same UUID. You are placed in an environment you don't really know which beacons are around you. You do have an app monitoring for that general UUID.
How do you efficiently get the majors and minors of the iBeacons around you in Android?
Issue is that iBeacons and you can move, form groups (so be really close to each other), disappear for a while from your radio range etc.
From what I gathered, I'm left with constant ranging this UUID, which will consume battery. Is there a way to avoid it, even partially, or be more clever than that?
When beacons with different identifiers are always in range, then yes, constant ranging is the only way you can get the majors and minors, and this will consume a fair amount of battery.
Solutions all depend on your use case. A few questions you might ask yourself:
Can you live with periodic ranging, say on a 10% duty cycle?
Are there any event triggers that can be used to start ranging?
Can you design the beacon layout such that they are not always in range?
Can your app function only in the foreground?
I want to calculate distance Bluetooth Paired device from android mobile. I am new in Android Bluetooth Concept can any one suggest me it's possible or not possible in android sdk.if it's possible post any code or tutorial link!
The Bluetooth signal strength distance relation depends on the devices (built-in Bluetooth device, antenna, actual orientation of device), current way the persons hold their devices, objects in-between... You could measure this for a pair of devices for a given situation and use these information.
A larger and more general solution would incorporate an external Bluetooth network. Bluetooth triangulation is the basic concept, that will help. The link will give an insight on certainties that are achievable with such a setup. Take is as an upper limit, a device to device approach will be worse.
The EE Stack Exchange site has a more complete answer which includes a mention of Apple using 802.11v for determining if Apple Watch is close to a MacBook.
Bluetooth uses radio, and radio travels at the speed of light. A 1cm round trip will take less than 100ps. Timing something that short will be tricky, probably you'll want a 10GHz clock, though there are other options. But even then, Bluetooth isn't designed to instantly echo the radio message. If you receive, process and re-transmit the message, then the processing delay will be much longer than the time of flight, and will vary randomly by at least the period of the clock used with the Bluetooth chip.
You can't. Maybe, you can get approximate value from signal indicator but it's too much subject because of envirounment - is there something between connected devices, some reflection surfaces, etc.
There is a way you can research, is coding a response time. just calculate the bluethooth response time in nano secs, physically measure the distance between the devices and make a tree rule... is the same concept of GPS. This is a Laboratory work. I have a project that i have to develop it, in schedule i will taking it in a month.
OFC, its possible. It just requires ultra precise app, build to calculate "pings" between the two objects - kinda like ekko-location or laser distance measurement - its about how much time a specific signal travels back and forth.