Accessory Scanner Guide
1. Setting Up the Filters and Configuration
1.1 First Steps
Firstly, open/create a configuration template for your device. Inside, go to the Script tab and add a new script.
Using the dropdown menu, search for the newest Accessory Scanner VX.X script.
Then go to the script settings and create filters by selecting Import preset or adding custom filters by pressing Add:
1.2 Using filter presets:
To use presets, go to the script settings in the device configuration and select the Import preset button.
There, you can find already integrated Bluetooth devices and their parameters. When selected, the filters are added to the list. Pay close attention to the Notes section, where instructions are stored.
Open the newly added filter and look at the available fields.
Universal fields that correspond to the specific beacon and data are filled, but to finish setting up the filter, a few things must be done:
Filter- The filter field must be edited according to the beacon used. Usually, name or address filters are used to identify the specific beacons.Sensor- The sensor assigned to the filter must be selected according to the size of the filtered data. The recommended sensor type will be set in the preset.
It is essential to consult the preset notes for detailed accessory setup instructions. Preset descriptions may contain further steps, like entering a data pattern.
In this ELA temperature beacon example, it is necessary to enter the full beacon name and select a sensor (or use the default one). Fully configured filter looks like this:
1.3 Creating custom filters
Go to the script settings in the device configuration and select the Add button to add a new filter.
Fill out the mandatory and optional fields from the payload structure in the beacon documentation.
For this example ELA temperature beacon will be used. The protocol is:
Byte Position | Data | Byte description | Bluetooth data fields |
|---|---|---|---|
1 | 0x02 | Flags data type length | Bluetooth “Flags” data type |
2 | 0x01 | Flags data type ID | |
3 | 0x06 | Bluetooth flags bitfield | |
4 | 0x05 | Service data length | Bluetooth “Service data (16-bit UUID)” data type with “Temperature” UUID. Temperature data is encoded in little-endian format and needs to be divided by 100 to return a temperature float value. In this example: 2165 (0x0875)/100 = 21.65 °C |
5 | 0x16 | Service data ID | |
6 | 0x6E | Temperature UUID | |
7 | 0x2A | ||
8 | 0x75 | Temperature LSB | |
9 | 0x08 | Temperature MSB | |
10 | 0x0E | Complete Local Name data type length | Bluetooth “Complete Local Name“ data type. For ELA beacons, using a name filter for identification is recommended as it is easier to find than MAC address. In this example, the name is “P T EN 801803“ |
11 | 0x09 | Complete local ame data type ID | |
12 | “P” | Name string for ELA temperature beacon | |
13 | “ “ | ||
14 | “T” | ||
15 | “ “ | ||
16 | “E” | ||
17 | “N” | ||
18 | “ “ | ||
19 | “8“ | ||
20 | “0“ | ||
21 | “1“ | ||
22 | “8“ | ||
23 | “0“ | ||
24 | “3“ |
To get the temperature data from the beacon, there are a few things to note:
Filter type and filter.
In this example, either MAC filter or name filter can be used. They are usually written on the beacon itself or you can find the device using a Bluetooth scanning app (nRF connect) on a phone.
It is not uncommon for a beacon to advertise multiple protocols or messages on one identity (MAC address). For this,
Patternfield must be used additionally to distinguish between the two messages. Refer to the field description table for more information.
Start byte or end byte.
Start byte and end byte marks the start end the end of value. Using ELA temperature beacon as an example, the temperature data start byte index is
8and the end byte index is9.
Note: If the documentation specifies offset (byte numbering starts from 0), +1 needs to be added to both start byte and end byte positions to get the correct data.
Endianess
How memory is organised between the start byte and end byte.
In the ELA beacon example, the first temperature data byte is the LSB, and the second byte is the MSB. This shows that the temperature field is in Little-Endian (LSB first), and the byte positions must be swapped.
Sensor
The device sensor must be selected according to the value type and size.
For the ELA temperature beacon, at least a 16-bit sensor must be selected to fit the temperature data.
Example of a fully configured accessory scanner beacon filter (temperature field from the ELA temperature sensor):
2. Next steps
2.1 Interpreting Raw Values
Filtered raw values typically require mathematical operations to transform them into usable parameters, like fuel level or temperature. This conversion can be achieved in two ways:
By developing a separate script to perform calculations with the sensor values.
By transmitting the raw data to a server for the calculations to be conducted there.
2.2 Finalising the device configuration settings
Telemetry server setup can be found here: Telemetry setup
Data recording setup can be found here: Data sending methods
2.3 Loading the settings to the device
After completing the device configuration, you can load it onto the device by either OTA update or by using USB.