
Page 24 of 42
trade-offs to consider:
The scanning duration from the PC may need to be longer to discover the device during its active advertising period
Even if a device is successfully scanned it may subsequently be deactivated before a BLE connection attempt is made
Note that the
and
only apply when no BLE connection is established. Once a BLE connection is
scheduledInterval
scheduledDuration
made, a device is no longer discoverable until the BLE connection is dropped.
Note that bluetooth connectivity is not possible whilst the USB peripheral stack has been enumerated with a host PC i.e., a USB connection
always takes precedence. However, it is possible to activate a bluetooth connection when either an external USB charger is used (i.e., not
connected to a PC) or with no USB cable attached (i.e., the system is running from the battery only).
7.2.2. Device addressing
The
Horizon
device addressing adopts the random static addressing scheme.
This allows the device address to be set to any 46-bit value with the
2 MSBs forcibly set to 1.
Note that the public addressing scheme requires device addresses to be assigned by the IEEE and so is not used by
the
current firmware.
The device address may optionally be user-configured for each tracker device via the
bluetooth.deviceAddress
setting. If no device
address configuration is supplied then the default internal random static address of the nRF52 device is used instead.
7.2.3. Host PC preparation for scanning and connectivity
Firstly, confirm your bluetooth low energy adapter is available and enabled. This is required to be done every time your Linux PC is booted.
This is best achieved using
and
as follows:
hcitool
hciconfig
# Confirm BLE device is present and enabled
$ hcitool dev
Devices:
hci0 F4:B7:E2:4B:4D:6C
$ hciconfig hci0 up
# Find source code distribution of arribada_tool python package
$ cd arribada-tools-x.y.z/tests
$ export HCI_DEV=0
$ sudo ./setup_ble.sh
Note that if you wish to use a different device to
then ensure that you substitute the correct device name in the above commands and
hci0
ensure
is set to the correct device number.
HCI_DEV
7.2.4. Scanning for tracker devices
The
tool performs a bluetooth scan of available tracker devices in the vicinity. The system looks for any devices with the device name
ble_scan
. The following (example) output is produced by the tool:
Arribada_Tracker
Device df:3e:d9:3c:a0:ae (random), RSSI=-62 dB
Flags = 06
Complete Local Name = Arribada_Tracker
Each device found shall have a unique (random) device address of the form
. The device address will either be the Nordic
xx:xx:xx:xx:xx:xx
factory programmed device address (if
is not set) or the value that was programmed via
bluetooth.deviceAddress
bluetooth.deviceAdd
.
ress
The
tool also accepts a
parameter which defines the number of seconds to continue scanning before reporting all
ble_scan
--timeout
discovered devices. It may be necessary to extend the timeout parameter when the advertising interval has been set to a longer duration. The
default timeout is 1 second.
7.2.5. Provisioning using bluetooth
It is possible to perform provisioning and also download the log file over a bluetooth low energy connection. The procedure is identical to the USB
Arribada Horizon ARTIC R2 Developer’s Kit | User Manual