Bluetooth-Low-Energy RSSI changes periodically on Android devices
Asked Answered
H

2

8

I noticed that the signal strength of Bluetooth Low Energy received on Androids is varying in cycles. The graph below represents the RSSI values of one BLE beacon over two minutes. The receiving Android and the beacon were both static with a distance of 1 meter. I made sure that there is as low interference as possible. The Android was a Nexus 5, but I had the same phenomenon with other Android devices, all running on API 21. I could not test it on iOS yet.

RSSI Graph

You can see that there are 3 major levels for the RSSI repeating every 15 seconds, like low -> middle -> high -> low -> middle -> high etc.

My guess is that the reason lies on the android side, not sure whether it is because of hardware or software reasons.

Why is the RSSI cyclic over time? Can someone explain?

Hartzog answered 8/10, 2015 at 13:6 Comment(4)
What device was this on and at what distance? I have made plots similar to this on a Nexus 5 but have not seen such a pattern.Acrolith
This was a nexus 5. But also with a Nexus 9 and a Nexus player it showed similar behavior. The distance was 1 meter, the beacon an easibeacon Pro. It was the same with a sensoro beacon. I have to mention this is the raw data without any filtering done.Hartzog
One more thing: you wrote in another answer that beacons change their frequency according to surronding Wi-Fi networks. I assumed they do it automatically without regards to other networks, as they probably have no possibillity to scan for network frequency around. But that was just my guess. In our office there are plenty of Wi-Fi signals on several different channels. Maybe at your place this is not the case - or you have more expensive beacons that can adapt their frequency on their needs while mine can't...? I'm going to test it with an expensive SensorTag one more time and report.Hartzog
So I tested it with a SensorTag from Texas Instruments as well and it shows similar behavior. What I noticed is that the beacon orientation (horizontal vs vertical) makes a huge difference on the "amplitude" of the curve.Hartzog
L
5

As per Android AOSP - Definition of scan interval and scan window in android source code the scan interval in any scanning mode is 5000ms.

I would assume that your graph was generated via an application that used continuous scanning - i.e. scan window of 5000ms, which is basically continuous.

The scanner will rotate between channels 37,38,39 after every scan interval, which accounts for the differences you observe. Channels 37,38,39 are not contiguous in the BLE spectrum - 37 is at 2402Mz whereas 39 is at 2480Mz. The difference in wave length means that the multi path (interference from reflections) fade will be different for each channel http://www.cl.cam.ac.uk/~rmf25/papers/BLE.pdf - you say that the devices were static, so provided that nothing else was moving, the interference will also be static.

On iOS, the scan interval (foreground) is reportedly 40ms which means that you should not experience this precise effect.

Lianeliang answered 29/3, 2016 at 13:44 Comment(0)
H
7

After reading a lot into the topic now, I might have come to an answer.

Bluetooth Low Energy beacons use three different channels for advertising, which is their adaption of frequency hopping to avoid interference with other 2.4GHz signals. This happens much slower than for normal Bluetooth (1600/s) - according to my measurements around every 5 seconds.

More here: http://www.argenox.com/bluetooth-low-energy-ble-v4-0-development/library/a-ble-advertising-primer/

The received signal strength depends obviously on the frequency, so if the frequency changes to another channel, the RSSI is different. How to deal with that is now a different question.

UPDATE: After following up on this issue, I have to update my remarks:

It is very likely that the three levels with each one around 5s are not directly due to the beacons slow frequency hopping, but to the android devices scanning seperately on the channels and switching to the next after such a time interval.

A way to overcome this behavior is starting and stopping the scan process in a loop, so that a scan lasts clearly less than 5s. When starting the scan, the device seems to begin scanning always on the same channel and the scan is restarted before it can switch to a different channel. With the restarts, the pattern is not detectable anymore - to the disadvantage that the channel is "fixed" and may suffer interference on this frequency. Thanks to Airsource Ltd for bringing me back to this question.

Hartzog answered 27/10, 2015 at 12:40 Comment(2)
Advertising does not do frequency hopping in the way you describe. Adverts are transmitted on all three channels in close succession. They certainly do not hop every 5 seconds unless the firmware is set up very strangely. However, the rate at which the Android device changes channel is unknown. It could be determined by having two devices each advertising on different channels with different data...Lianeliang
@Airsource Ltd After working with this issue for several weeks more, I figured out a similar deduction like you said. I will edit the answer so that others might get something out of it.Hartzog
L
5

As per Android AOSP - Definition of scan interval and scan window in android source code the scan interval in any scanning mode is 5000ms.

I would assume that your graph was generated via an application that used continuous scanning - i.e. scan window of 5000ms, which is basically continuous.

The scanner will rotate between channels 37,38,39 after every scan interval, which accounts for the differences you observe. Channels 37,38,39 are not contiguous in the BLE spectrum - 37 is at 2402Mz whereas 39 is at 2480Mz. The difference in wave length means that the multi path (interference from reflections) fade will be different for each channel http://www.cl.cam.ac.uk/~rmf25/papers/BLE.pdf - you say that the devices were static, so provided that nothing else was moving, the interference will also be static.

On iOS, the scan interval (foreground) is reportedly 40ms which means that you should not experience this precise effect.

Lianeliang answered 29/3, 2016 at 13:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.