Detecting Unwanted Location Trackers (DULT)
The Detecting Unwanted Location Trackers (DULT) library implements a set of functionalities required for Detecting Unwanted Location Trackers (DULT) integration with the nRF Connect SDK. The implementation is based on the official DULT specification, which lists a set of best practices and protocols for products with built-in location tracking capabilities. Following the specification improves the privacy and safety of individuals by preventing the location tracking products from tracking users without their knowledge or consent.
Accessory non-owner service (ANOS)
The DULT library implements the accessory non-owner service (ANOS), which is a GATT service that uses the accessory non-owner characteristic to communicate with other devices.
The ANOS uses UUID of 15190001-12F4-C226-88ED-2AC5579F2A85.
The accessory non-owner characteristic manages the DULT Accessory Information and the DULT Non-owner controls defined in the DULT specification.
Configuration
Set the CONFIG_DULT Kconfig option to enable the module.
This Kconfig option depends on the CONFIG_BT option that enables the Bluetooth® stack.
The following Kconfig options are also available for this module:
CONFIG_DULT_API_VARIANT_V1andCONFIG_DULT_API_VARIANT_V2- These options select the DULT API contract. TheCONFIG_DULT_API_VARIANT_V1option is chosen by default and is deprecated. For details on the differences between the variants, see the DULT API variant section of the DULT integration guide.CONFIG_DULT_USER_MAX- This option sets the maximum number of DULT users that can be registered at the same time. The default value is set to1. Values greater than1require theCONFIG_DULT_API_VARIANT_V2option, as theCONFIG_DULT_API_VARIANT_V1option supports only a single DULT user.CONFIG_DULT_MULTI_USER- This read-only convenience option indicates that more than one DULT user can be registered. It is enabled automatically when theCONFIG_DULT_USER_MAXoption is set to a value greater than1. Use it in the application code to conditionally compile the handling of the multi-user coexistence callbacks.CONFIG_DULT_ACCESSORY_TYPE_SMALLandCONFIG_DULT_ACCESSORY_TYPE_LARGE- These options declare the size and the discoverability of your accessory. TheCONFIG_DULT_ACCESSORY_TYPE_SMALLoption is chosen by default. With this option, the module validates the mandatory accessory capabilities during the DULT user registration. For details on how to choose the accessory type, see the Accessory type section of the DULT integration guide.CONFIG_DULT_BATTERY- This option enables support for battery information such as battery type and battery level. The battery information is an optional feature in the DULT specification. By default, this option is disabled.CONFIG_DULT_BATTERY_LEVEL_CRITICAL_THR,CONFIG_DULT_BATTERY_LEVEL_LOW_THR, andCONFIG_DULT_BATTERY_LEVEL_MEDIUM_THR- These options allow to configure the mapping between a battery level expressed as a percentage value and battery levels defined in the DULT specification. The default values are set to10,40, and80respectively.CONFIG_DULT_BATTERY_TYPE_POWERED,CONFIG_DULT_BATTERY_TYPE_NON_RECHARGEABLE, andCONFIG_DULT_BATTERY_TYPE_RECHARGEABLE- These options allow to choose the device’s declared battery type. By default, theCONFIG_DULT_BATTERY_TYPE_POWEREDis chosen.
The following ANOS configuration options are available for the DULT module:
CONFIG_DULT_BT_ANOS_ID_PAYLOAD_LEN_MAX- This option allows to configure the maximum length of the accessory-locating network identifier. The default value is set to18. The identifier is defined by the accessory-locating network that the accessory belongs to.CONFIG_DULT_BT_ANOS_INDICATION_COUNT- This option allows to configure the number of simultaneously processed GATT indications by the ANOS. The default value is set to2.
CONFIG_DULT_MOTION_DETECTOR- This option enables support for motion detector. The motion detector is an optional feature in the DULT specification. For more details see the DULT motion detector section of the DULT specification. This option is disabled by default.CONFIG_DULT_MOTION_DETECTOR_TEST_MODE- This option allows to configure motion detector parameters for testing purposes. These values are defined in the DULT specification and should not be changed in the production code. This option is disabled by default. When this option is enabled, the separated unwanted tracking timing parameters can also be overridden at runtime with thedult_test_motion_detector_separated_ut_period_set()function. The runtime values are expressed in seconds and bounded by theDULT_TEST_MOTION_DETECTOR_PERIOD_MAXmacro, while the Kconfig options below are expressed in minutes. New values take effect on the next timer arm and do not restart a timer that is already running.CONFIG_DULT_MOTION_DETECTOR_SEPARATED_UT_BACKOFF_PERIOD- This option allows to configure the period in minutes to disable the motion detector if the accessory is in the separated state. If this option is configurable, its default value is set to2. Otherwise, its default value is set to360according to the DULT specification.CONFIG_DULT_MOTION_DETECTOR_SEPARATED_UT_TIMEOUT_PERIOD_MIN- This option allows to configure the minimum time span in minutes in separated state before enabling motion detector. If this option is configurable, its default value is set to3. Otherwise, its default value is set to480according to the DULT specification.CONFIG_DULT_MOTION_DETECTOR_SEPARATED_UT_TIMEOUT_PERIOD_MAX- This option allows to configure the maximum time span in minutes in separated state before enabling motion detector. If this option is configurable, its default value is set to3. Otherwise, its default value is set to1440according to the DULT specification.
See the Kconfig help for details.
Note
The CONFIG_DULT_MOTION_DETECTOR_TEST_MODE option selects the CONFIG_DULT_TEST option, which enables the test-only layer of the DULT module.
Do not enable it in a production build.
Implementation details
The implementation uses BT_GATT_SERVICE_DEFINE to statically define and register the ANOS.
Because of that, the ANOS is still present in the GATT database after the DULT subsystem is disabled.
With the CONFIG_DULT_API_VARIANT_V1 Kconfig option, GATT operations on the ANOS are rejected until the DULT subsystem is enabled.
With the CONFIG_DULT_API_VARIANT_V2 Kconfig option, operations can also be served in the pre-association window for the DULT user that claimed the Bluetooth connection, subject to the access policy.
For more details, see the Handling multiple accessory-locating networks and Customizing the access policy to the accessory non-owner service sections of the DULT integration guide.
The ANOS handles all requests received from the outer world. In case of an application input needed to handle a GATT operation, the DULT subsystem calls the appropriate registered application callback. For more details, see the Integration steps section of the DULT integration guide.
With the CONFIG_DULT_API_VARIANT_V2 Kconfig option, the module keeps a slot table sized by the CONFIG_DULT_USER_MAX Kconfig option.
Each slot holds the per-user state, which is why callbacks, the battery level, and the near-owner state survive the dult_reset() function call and are only cleared by the dult_user_unregister() function call.
API documentation
include/dult/dult.h, include/dult/bt.h, include/dult/multi_user.h, include/dult/test.hsubsys/dult