Aaron’s Status Report for 3/27

This week I worked on setting up and configuring the H1 iBeacon tags, connecting to them using the Bluez stack, and doing testing to determine the calibration values needed for our distance pruning algorithm. The manufacturer of the beacons, Mokosmart, provided a smartphone app to connect to the iBeacons and configure their transmission power and interval.

Although our initial plan was to set the tranmission power to the lowest setting available, this power setting actually made the Bluetooth signal too weak to be detected by the Raspberry Pi. Additionally, the lower power transmission levels also had higher variance in the RSSI values reported at 50cm. After testing different power transmission levels, we found that level 4 (-12dBm) was a suitable balance between power consumption and detection reliability.

For testing, I used the aioblescan Python package created by François Wautier. We initially tried using the bluepy package created by Ian Harvey, however we discovered that the bluepy package could not achieve the 1 second update interval required for our project. We switched to the aioblescan package, as it is specifically designed for reading BLE advertisement packets, and it therefore has a sufficiently fast update interval for our needs. Using the package, I wrote a simple script to read in 1000 advertisement packets, and calculate the mean and standard deviation of the RSSI values reported. I then placed a beacon exactly 50cm from the Raspberry Pi, and ran the script. Below is a sample screenshot of the testing loop results.

I also tested 5 different beacons to measure the variation across different beacons. All of the mean RSSI values reported were within +/- 3 dBm of each other, indicating that the different transmission powers of the beacons were within tolerance of each other.

To increase the robustness of our system, we decided to order an additional Bluetooth receiver for the Raspberry Pi. This would allow us to obtain two distinct RSSI values, which would further increase the accuracy of our distance pruning algorithm. By placing the Raspberry Pi and additional receiver at opposite ends of the backpack, we can reduce the effective volume where a tag could be and still be within 50cm of both receivers. This helps mitigate the issue of items near the backpack being mistaken for being inside the backpack.

For next week, I plan on testing the ability of the system to work in a backpack, by attaching the tags to items and placing the Raspberry Pi in an actual backpack. I will also be working on an improved algorithm using two RSSI values instead of one, in preparation for the arrival of the additional Bluetooth Receiver.

Leave a Reply

Your email address will not be published. Required fields are marked *