BLE Device with Haptic Feedback - bluetooth-lowenergy

Is there an off-the-shelf beacon I can just buy that also has support for triggering Vibration / Haptic Motor over BLE? Amazon / whatever links are welcome.
Context: I'd like to trigger vibration from iOS in a small independent device. BLE seems ideal as I need to support more than one and all devices should be within range. I'm trying to rapidly prototype something instead of cranking out my own HW.

For prototyping you may be able to use a few sub-$20 Xiaomi Mi Band devices (or Band 2 which should be under $30 and has a screen). And then use API like this to trigger vibration: https://github.com/betomaluje/Mi-Band
They both can be removed from the wristband and look like a 2 cm long pill, and last weeks on a charge with normal use, maybe months when not counting steps.

Related

Some questions for bluetooth low energy as an indoor proximity sensor for building or school campus

My professor recently approved our research paper which will also be used in our final year thesis. Basically our main purpose is to create a system for location tracking and attendance automation for students and staffs. We would like to use the power of bluetooth low energy modules for this project.
I have actually done quite few research about this but I am having trouble which keywords to use in order for me to filter the right answers for my question. So instead, I'll just put all my questions here.
I provided an image to further understand the concept I am talking about.
Basically, the broadcaster/advertisement mode modules are for students and staffs. While the observer mode modules are initially installed in every rooms or spaces in our building/campus.
Broadcast and Observer mode
I would like to clarify first that the location tracking is only basic, it only detects which rooms are the students and staffs located.
Here are my questions:
What is the maximum advertisement/broadcaster module can the observer module detects at the same time?
Our target is about 50 students per room, 300 students in cafeteria, will the observer module have a large amount of latency upon scanning advertisement packets?
Do we have to use different module for observer mode, or will the same module for broadcaster mode be just fine?
Since this is supposedly embedded to school IDs, we would like to use a coin cell battery, how long will it last?
According to my research, BLE range is about 100 meters, but we will be using coin cell battery, is it really possible to achieve 100m for broadcasting and observing? If it is, can we perhaps decrease it by programming?
My apologies for too much question, as this is actually our first time doing applied hardware stuffs due to pandemic. Most of our laboratories are basically tinkercad base. Face-to-face classes are allowed for only medical students for now.
A few answers:
BLE scanners can detect hundreds of distinct broadcasters at the same time. There is no hard limit, but the more broadcasters the longer it will take the scanners to detect each broadcaster.
Most BLE modules support both peripheral mode (broadcaster) and central mode (scanner) simultaneously.
Scanning 50 broadcasters in a single room will easily detect 90% of packets, so if the advertiser is going at 1 Hz it will usually take one second to detect, but sometimes 2-3 seconds of packets are missed.
The indoor range is closer to 40 meters with no walls obstructing the signal. Outdoors with clear line of sight the range is higher. Walls often block signals almost entirely, depending on materials.
A CR2032 coin cell can power a BLE broadcast at 1 Hz and max power for about 30 days.
Creating an embedded solution is cool and valid but just remember that broadcasters already exists as each and every student carries a smartphone with BLE embedded into it and your observer can be any BLE capable device from smartphone through PC with BLE dongle all the way to Arduino and alike.
Your broadcasters (or BLE peripherals as they should be called) will need an Android / iOS app and you will have to deal with working in the background without the operating system stopping your app.
Your observer (or Central in BLE language) can be any stationary PC if such exists in the class which can make development and deployment a lot easier.

Which devices support which traits?

Is there a table somewhere of which devices support which traits? I'm particularly interested in humidity:
https://developers.google.com/nest/device-access/traits/device/humidity
But temp would be cool too, and I can convince myself ~most smart devices would have some awareness of temperature to shut down before they overheat etc.
I suspect humidity is just in the thermostats (not suitable for how we do HVAC here in AU) but I'm holding out hope it might also be in the smoke detectors... although they're not listed on the devices page. Even under the old API it looks like they didn't offer much (for example, it'd be awesome if you could get the motion detector state, or last motion detector trigger event from the nightlight feature).
Has anyone played around with the API enough to know? I'm only really interested in temp and humidity on the current list, so don't want to shell out the registration fee if they're not going to be available on my doorbell + smoke detectors + home hub.
The Device Access docs don't list devices per trait, but they do list traits per device:
Camera
Thermostat
Doorbell
Display
Today the only device type supporting the Humidity trait is Thermostats.

Kontakt beacon has garbage response time at 6 metres

I'm reading so much propaganda about BLE beacons (Kontakt.io, in my case) being accurate to the centimetre, readable at 70 metres etc etc, but my experience has been nothing like that.
I have 3 beacons. If they're in the next room over (door open, around 6 or 7 metres), it'll detect maybe one or two, after around 20 seconds. Even then I often need to restart my app over and over to detect it.
Move them to the same room, and they're pretty much okay. Everything's default, scanMode is 'LOW_LATENCY', scanPeriod is 'RANGING', I'm not sure what else I can do.
Do these results sound way off, or are they just not that good?
A few tips about Bluetooth beacons in general, not specifically Kontakt beacons:
When you need to restart your app to detect beacons, that clearly means it is something on the phone, not the beacons themselves that are the issue. That issue may be the app, the SDK, the Bluetooth stack on the phone, or the phone's bluetooth hardware. Try an off the shelf detector app like BeaconLocate for iOS or Android and also test with a different phone.
The range of a beacon is dependent on its output transmitter power, typically measured at 1 meter. This output power is adjustable on many hardware beacons and is often set lower than the maximum to save battery on battery-powered models. For best detection results, set the output power to the maximum that configuration allows. An output power at one meter should be at least -59 dBm for best results. Less negative numbers mean more power. Because some phone models have poor sensitivity and measure RSSI inaccurately, you may want to measure with different models. In general iOS models are more predictable receivers.
The range of a beacon between rooms varies greatly depending on materials in walls, furnishings, and local geometry. A beacon with an output power of -59 dBm at one meter can be reliably detected by a phone with a sensitive receiver at 40 meters away, but only with clear line of sight conditions (typically outdoors). Intermittently, I have seen such beacons be detected outdoors at over 100 meters away. Intermittently means that 99% of packets are lost, a small percentage are successfully received.
Always be skeptical of marketing claims from companies trying to sell you something. The above points should tell you what is achievable from an independent engineering perspective.

Can i detect more than 40 devices in one time and keep tracking by BLE

So I will have more than 40+ devices in one place and I need to record when device entered in my zone and also when i lost signal by BLE.
As i know there are only 20 regions limit in IOS in one time.
As i can't set regions on peoples devices , is it means that i can't track more than 20 devices or is there any way to do it?
Devices will be iPhone,apple watch , androids.
So i guess they will have different UUID.
You are right about the 20 beacon region limit on iOS, but that probably will not impact your solution for a number of reasons:
The limit is per region not per device as #paulw11 says, so you can track much more than 20 beacons if you define regions that match multiple beacons by using wildcard idebtifiers in the regions.
You cannot make an apple watch transmit as a beacon. And while iPhone and most Android devices can do this, iPhones must have your custom app in the foreground to transmit. This may not work for you depending on your use case.
An alternative to having the devices transmit is to have them receive a beacon signal from a fixed beacon transmitter you install. This can be done by a custom app in the background (although for Apple watch it must be tied to a nearby iPhone for this to work). With this approach, there is no limit to the number of devices you can track. This is the typical way this is done.

Simulate entering iBeacon region by fluctuating power?

I'm new to iBeacon, and would like to simulate entering and exiting an iBeacon region, to see how notifications work on entering/exiting a region when an app monitoring for iBeacons is in the background.
The iBeacon I'd like to try this with would be a virtual iBeacon, running on a mac or an ios device.
Can this be done by fluctuating the power or is there a better way to do it? And are there any good examples of doing this anywhere?
The easiest way to do this is by simply turning the iBeacon on and off. I do this every day using our MacBeacon and Locate for iBeacon test tools which have on-screen on/off switches.
In theory, you could do what you suggest by turning the radio power way down, too. But iOS, OSX and Linux do not let you adjust the radio power. Turning off the transmission completely is an easier and simpler alternative.

Resources