NanoBeacon™ BLE Scanner Tutorial (Part 2)
In the previous tutorial within this series covering our recently-released NanoBeacon™ BLE Scanner mobile app, we covered an overview of the mobile app, where to install it from, how to use it to import an IN100 configuration from the NanoBeacon™ Config Tool desktop app, and more.
In this tutorial, we will cover the following:
A detailed look into device filters
Differences between the iOS and Android versions of the app
Let’s get started!
Device Filters
Here’s a look at the various filters available within the app for filtering for specific devices:
To recap, the available filters are:
Name: this allows you to filter by device name.
Advanced: allows you to filter by raw data included in the advertising data, company name, etc.
On Android, filtering by Bluetooth Address is possible (iOS does not expose the device’s Bluetooth address).Minimum RSSI: this allows you to filter out devices that are discovered with an RSSI lower than the set value.
Hide unnamed devices: this allows you to hide devices that do not advertise a device name.
Only show project configuration matches: this allows you to show only devices that match the imported IN100 configuration (via scanning the QR code from the NanoBeacon™ Config Tool app).
Sort by RSSI: this allows you to sort the list of devices by detected RSSI (starting with the device with the strongest signal).
Type: allows you to show any combination of iBeacon, Eddystone UID, and Eddystone TLM advertising devices (while excluding other non-selected devices), as shown below:
Let’s dig into each of these in more detail.
Device Name and Unnamed Devices
When scanning for advertising BLE devices, you will typically see dozens of devices being discovered. This can make it challenging to find the device of interest. To address this (and if you know the device name), you can type in a portion of the device name (case-sensitive), and the scanner will only display the devices that match the entered device name.
For example, here I’ve set up an IN100 with one advertising set (custom data type), and I’ve set the device name to be “IN100”:
In the scanner view, the device will show up but among tens of other devices, making it challenging to find. Let’s add a device name filter to make it easier to find:
Once we enter the device name filter, we can click to the filter icon to go back to the scanner view. In the scanner view, we should be able to see the device now without all the other devices:
This also works by entering partial strings, for example “IN”.
Another useful filter is the “Hide unnamed devices” checkbox. Once that’s checked, the scanner will only display devices that have included a device name in the advertising data:
Sorting by RSSI and Min RSSI
Two other useful filters are the “Sort by RSSI” and “Minimum RSSI” filters.
“Minimum RSSI” is helpful for filtering out devices that are too far and that typically add clutter to the scan results. For relatively nearby devices, we recommend discovering devices with an RSSI of -70 or greater. This will ensure you are only looking at devices that are in proximity to your smartphone.
Once you’ve set the minimum RSSI, it is also helpful to utilize the “Sort by RSSI” filter, which allows you to see a sorted list of discovered devices starting with the highest RSSI.
Here’s an example screenshot showing the results:
As you can see, the devices are sorted by RSSI in descending order.
Type Filter
With the “Type” filter, you can ensure that only specific devices (iBeacon, Eddystone TLM, and Eddystone UID) are being listed in scanner view. You can select one or more of these types to show matching devices. The selected type is the only one that will be matched in the list. For example, selecting “Eddystone TLM” will only show Eddystone TLM advertising devices.
Note that all configured filters will be applied to the scan results. Also, there are certain restrictions on discovered iBeacon devices in the iOS version of the app. We’ll cover more on that in a later section within the tutorial.
“Only show project configuration matches” Filter
The “Only show project configuration matches” filter is a unique feature of our NanoBeacon™ BLE Scanner mobile app. It allows you to only show devices that match the imported configuration from the NanoBeacon™ Config Tool.
This is a very powerful filter that will not only let you focus on analyzing your IN100 device’s advertising data but also view it in a human-readable format, which no other mobile app on the market can do!
We covered how to import configurations via the QR code scan functionality in the previous tutorial in this series.
After importing the configuration and selecting this filter, the scanner will only show your device:
And to make things even more user-friendly, you can navigate into each of the discovered advertising sets to view the detailed parsed advertising data:
Advanced Filters
The last filter we want to cover is the “Advanced” entry field. This allows us to filter by:
Raw bytes in the advertising data (hex values)
Company ID (hex values)
Company Name (string values)
Device Name as well (string values)
Let’s take a look at an example of a discovered device and which parts can be matched using the Advanced Filter:
As you can see, there are various types of filters that can help you match only the devices you’re interested in discovering and having show up in the list.
Differences Between iOS and Android Versions of the App
There are quite a few differences between iOS and Android when it comes to UI, the functionality and APIs available to apps, BLE behavior, etc.
It’s essential to be aware of these differences not just as a developer but also as a user of our mobile app. This will help you better understand how things work on each platform and are aware of any differences in behavior between the two that could affect your development and testing activities when working with BLE devices, specifically our NanoBeacon™ IN100.
Here’s a summary of the differences between the two platforms as it pertains to Bluetooth Low Energy functionality and the functionality of our NanoBeacon™ BLE Scanner mobile app:
Advertisement Data
iOS does not give apps visibility of the Bluetooth address, so it’s not possible to search by or view the Bluetooth address of the discovered device(s).
iBeacons come through the Core Location framework on iOS and are reported once per second, so the adv interval cannot be estimated.
iOS does not provide access to the raw advertisement data, so user-defined data types are not supported.
On iOS, it’s not possible to scan for unspecified iBeacons, and they will not show up in scan results unless you have scanned in a configuration that contains an iBeacon. The app registers the iBeacon when you load the configuration.
iOS will report iBeacons RSSI as 0 if iOS cannot determine the iBeacons proximity based on the TX power included in the iBeacon payload. The algorithm used by iOS is not public.
iOS will continue to report an iBeacon for up to 30 seconds after it has been powered down (or goes out of range).
General Scanning
iOS will miss more advertisement packets than Android when using a larger advertisement interval (greater than 1000 ms).
Background Scanning
iOS does not allow continuous background scanning for advertisement data, with the exception of iBeacons.
Android will allow continuous background scanning for all BLE advertisements.
Notifications
Android supports background notifications for all types of Triggered advertisements.
iOS only supports background notifications for Triggered iBeacon advertisements.
Conclusion
And that’s it for this tutorial. We covered a lot of topics, including:
Device Filters:
Device Name
Minimum RSSI
Sort by RSSI
Hide Unnamed Devices
Advanced Filters (raw data/bytes, text/strings, etc.)
Only Show Configuration Matches
Filter by Type (Eddystone TLM, Eddystone UID, and iBeacon)
The differences between the iOS and Android versions of the mobile app.
In the upcoming tutorials in the series, we will cover:
How to export logging data for captured advertising sets and analyze them
App notifications for Triggered Advertising Mode advertising sets
The new NanoBeaconLib mobile app library (allows you to develop a custom IN100-interfacing mobile app in no time!)
and more!