bluetooth - tx power and rssi - bluetooth-lowenergy

I am experimenting two low energy bluetooth 4. I am getting uuid, tx power level and rss values on the android app that I downloaded.
I noticed that one of these two is sending 0 for tx power level, but the other one is sending 4 for tx power level and see different RSSI values on the android app even though I put them in the same spot. It means that the distance is same between my android phone and these two bluetooth devices. If the difference is +/- 5, I understand, but the difference is +/- 15. Is is because of the tx power level?
And oo I need to take tx power level into consideration to calculate the proximity between the BLE 4 and my android app?

You cannot directly relate RSSI and absolute distance between BLE central and peripheral. Of course RSSI is affected by, but not only, distance. However there are other significant factors such as interference, transmittion medium, etc. If your two BLE peripherals are two different models, the values may even vary more.
RSSI fluctuating for around +-15 is very normal for BLE connections, and nearly impossible to eliminate in practical cases. So basically you cannot only rely on RSSI for calculating distance if you want the error to be less than several meters.

Related

ESP32 reduce BLE connection distance

i need to connect my phone to the esp32 with BLE(Bluetooth Low Energy). But only when you are close to just 1 meters. So, how can i reduce the meters? And also if you go far away from 1 meter, it has to disconnect. I would be happy, if you answer...
Unfortunately this would be very challenging to implement because you have to rely on the RSSI to approximate the distance which is not always very reliable. Have a look at these links below for more information:-
Things you should know about Bluetooth range
Using BLE for indoor positioning
Fundamentals of beacon ranging
Connect if the RSSI more than 40 and keep updating the RSSI for 2 seconds, get the average if it's more than -30 then you're too close to the device.

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.

What temperature to set a cooling system for a arudunio?

I'm building a cosplay prop for a friend that uses an arudunio Uno. The UNO will be kept inside a black PVC box with little ventilation and taken to comic cons. So it's going to get hot at times. I've never really built gaming PCs or anything with batteries and I'm not sure what temperatures are ideal to run at so my guesses are just based on a google search.
My question is:
If I place a temperature sensor next to the UNO and program it to start a fan at a given temperature, What temperature would be a good choice?
I was thinking 35 degrees with an alarm going off at 70 degrees telling him to turn it off.
Also, there will be two other batteries one 3.7V Li ion phone battery that powers the chips and a small audio amp with a 18-volt (May change) drill battery powering a DC motor. Both in different locations.
For this, I was thinking I would set a larger fan to start at 30 degrees with an alarm at 55.
FYI this will be programmed on a separate ATTINY chip.
I would recommend keeping it below 125C maximum (that is the ATmega 328p's maximum temperature rating). However, I have never seen an UNO get that hot. If you are concerned though, aim for as cool as possible with a maximum temperature of about 80C

estimating distance to ibeacon AVR

I want to ask about I Beacon advertising, especially Tx Power.
I used two BLE module HM10 and HM11. I make one as a ibeacon (HM10). and other one used to connect and listen to HM10 broadcasting.
I used MCU ATmega32 AVR tied with HM11 and I used scanf function to read the broadcast. I want to extract the last byte (Tx Power). I want to measure the distance with AVR programming.
Could you tell me the algorithm?
The formula Apple uses to calculate a distance estimate to an iBeacon is not published. There are a number of alternative formulas including this one, based on a best fit power curve, that we wrote for the Android Beacon Library.
Further research we have done shows that the formula above basically works, but it has two main imperfections:
It does not work well for weaker beacon transmitters. With weaker broadcasts, the distance is underestimated.
It does not account for varying signal gains in receivers. Different receivers have different antennas and receivers which measure the same signals differently.
There is an ongoing discussion of the best formula here.
A bit late but hopefully useful to others. I have given up on Apple's "Accuracy" number; as #davidyoung points out, different devices will have different signal gains. Now I am not an engineer but more of a math and statistics person, so I have gone down the route of "fingerprinting" an indoor space instead. Essentially I read all RSSI from all beacons installed in a certain "venue". Some might not be within reach and therefore I just assume, in such cases, an RSSI of -95 dBm (which seems to be the floor past which a signal is not read any more). Such constituted array has the same beacons in the same positions at all times (even across app launches). I compute a 5 seconds moving average for each beacon (so a I se 5 arrays to do that). The resulting avg array is then shifted up by 95 units and normalised so that the sum of all of its values is one. If you want to tag an an indoor "point" you collect many of these normalised average arrays on that specific spot. I go ahead and construct a database of "spots". To forecast your proximity to any spot in a database you simply compute a quadratic distance of your current reading and the all of the fingerprints in the database.
Which beacons to use? At least class 2 in power. How many? At least a couple per room (put them in two adjacent corners, on the ceiling or high up).
The last step that you need to do is match the fingerprints with an x,y coordinate on your map. I never did this step, because I am mainly interested in proximity applications and not fully fingerprint and indoor space.
Perhaps the discussion above will serve you as a guidance on a technique that is used by many indoor location companies.
Disclosure: I have recently open sourced my code doing the above calculations.

Bluetooth Low Energy Client scan range

I understand that Bluetooth Low energy(BLE) client scan for BLE peripherals. I want to know, how far,in meters, a BLE client can scan/discover a BLE peripheral.
An iPhone 5 will detect a RadBeacon USB (BLE Beacon) set at maximum transmit power about 40 meters away. At greater distances of up to 50 meters, it might be intermittently detected, but detections are not reliable. Outdoors with clear line of sight, it can sometimes be detected at even greater distances of up to 100 meters, but again this is not reliable.
This is typical, but just an example. The specifics depend on the transmitting device, the receiving device, any physical obstructions, and how much radio noise is in the area.

Resources