Bio-logger BLE Beaconing using GPS on iOS
Using a Bluetooth Low Energy (BLE) microprocessor in a bio-logger has advantages over non-wireless alternatives such as real-time monitoring, configuration, and the possibility of using BLE advertising as a beacon on live animals in their natural environment. However, a single BLE peripheral-to-central scheme does not inherently contain information regarding the direction or location of a device. The good news is, using the peripheral advertisements Received Signal Strength Indicator (RSSI) it is possible to hone in on a device location by walking around it.
In fact, apps already exist to do this to track down watches or headphones (see Wunderfind), but I was unable to find something that integrated with GPS in the manner that would be helpful for a bio-logger application. Below is a proof of concept that uses MapKit and Swift on iOS to continuously scan (1 Hz) for a specific BLE device and plot the RSSI based on the position of the phone (or person) at that time.
Almost everything meaningful is contained in ViewController.swift on GitHub. When the user presses the play/pause button the phone begins searching for the BLE peripheral device with a specific service UUID (see UUIDKey.swift). As the device scans for BLE, it is also gathering GPS data and plotting a marker each time a new location is registered. If you have good GPS signal, the accuracy of the latest iPhone is quite high—about 5 meters. I am using an opaque white marker to represent a not connected (N/C) signal, or when the BLE peripheral is out of range. Once the peripheral is found, the color and opacity of the marker changes with signal strength—which is displayed in the upper-right corner—and continues to plot the location as the user walks around; red is a weak signal and yellow is a strong signal. The current location of the phone is centered on the black dot-ring. When the play/pause button is pressed again, scanning is discontinued and the markers remain in place until the next scan is initiated.
This test took place in my backyard with the bio-logger perched on a bench. I walked around my house from the front door and ended up in the backyard out of range of the device (see black dot-ring and white markers). You can appreciate how in just a few minutes the approximate device location can be identified.
Final Notes
The major issue to be resolved is how implantation of the bio-logger will affect signal strength. One advantage of using arboreal species is that the signal should remain strong through the trees, as opposed to a burrowing animal. Another consideration is how the radiation pattern of the peripheral antenna and the receiving properties of the phone antenna affect signal strength; in theory, there will always be some asymmetry here, which I observed to some degree, which adds to the overall error of the actual bio-logger location. I will keep this post updated with what we find in terms of signal attenuation and overall performance in real conditions.
Recent Comments
Archives
- April 2023
- January 2023
- November 2022
- May 2022
- March 2022
- January 2022
- December 2021
- April 2021
- December 2020
- October 2020
- August 2020
- July 2020
- March 2020
- February 2020
- January 2020
- December 2019
- November 2019
- October 2019
- January 2019
- December 2018
- November 2018
- August 2018
- July 2018
- April 2018
- March 2018
- November 2017
- October 2017
- February 2017
- October 2016
- August 2016
- July 2016
- November 2015
- October 2013
- February 2013
- January 2013
- August 2012
- July 2012
- June 2012
- May 2012
- April 2012
- February 2012
- December 2011