RTLS System

Table of Contents

General Information

  1. To get usage information for the RTLS Node Manager scripts and GUI please refer to: tools\blestack\rtls_agent\README.md
  2. In order to edit and view how the RTLS subsystem handles uNPI commands, please refer to the following file: tools\blestack\rtls_agent\rtls\ss_rtls.py
  3. In order to see a usage example, please refer to tools\blestack\rtls_agent\rtls\test_rtls.py which shows how to use a RTLS Master + RTLS Slave + RTLS Passive combination
  4. To access GUI, please refer TI Gallery and look for RTLS Monitor project.

Introduction

This readme contains the following information: 1. How to setup AoA demo 2. How to setup ToF demo 3. Description of commands accepted by RTLS Control and their meaning

Angle of Arrival - Setup

Software Setup

AoA is currently supported on all roles with the following caveats:

RTLS Master

RTLS Slave

RTLS Passive

Hardware Setup

AoA requires 3 devices: RTLS Master/Passive/Slave. The devices should be flashed with the rtls_master/rtls_passive/rtls_slave applications as described above (with AoA flags). Compile and flash your applications - note that the LaunchPad with BOOSTXL-AOA should be used as the RTLS Passive.

For the RTLS Passive hardware setup, please take a look at Angle of Arrival BoosterPack

Running The Example

The steps to run the out of box example is described in tools\blestack\rtls_agent\README.html

Time of Flight - Setup

Software Setup

RTLS Master

RTLS Slave

RTLS Passive

Hardware Setup

ToF requires 3 devices: RTLS Master/Passive/Slave. The devices should be flashed with the rtls_master/rtls_passive/rtls_slave applications as described above (with ToF flags).

Calibration

This part is relevant when using TOF_MODE_DIST * To calibrate your devices, keep the RTLS Slave 1m apart from RTLS Master/Passive before starting ToF * Once ToF is started and results start appearing, it means that the device is calibrated and started collecting samples

Using BOOSTXL-AOA on a ToF board

It is possible to have a board that is modified to be used for AoA and still being able to perform ToF with. The user must set the relevant antenna pins (IOID28, IOID29, IOID30) to act as output. For reference, see AOA_openPins function under AOA.c.

Running The Example

The steps to run the out of box example is described in tools\blestack\rtls_agent\README.html

RTLS Control Commands

The commands are split into Requests and Responses and to Sync/Async requests/responses

Sync Requests/Responses

Sync requests will always be answered with Sync responses and usually used to tell RTLS Node Manager that a certain operation has been started successfuly

Async Requests

Async requests will be used by RTLS Control to send out information to RTLS Node Manager and usually used for various types of results

Requests

Requests are the way of the RTLS Node Manager to request actions from RTLS Control - essentially a sort of RPC (Remote Procedure Call) * Note that all requests coming from RTLS Node Manager to RTLS Control are SyncRequests and will always be answered by SyncResponses


RTLS_CMD_IDENTIFY

Request a unique identifier from the device

Params

None

RTLS_CMD_RESET_DEVICE

Soft resets the device

Params

None


RTLS_CMD_SCAN

Request the RTLS Master device to perform a scan

Params

None

RTLS_CMD_TERMINATE_LINK

Requests the node to terminate the active connection (will work only when connected)

Params

None

RTLS_CMD_CONNECT

Requests to connect to a specific BLE address

Params

RTLS_CMD_CONN_PARAMS

Sets BLE connection parameters for RTLS Passive

Params

RTLS_CMD_TOF_SET_SEC_SEED

Sets the seed for ToF Security

Params

RTLS_CMD_TOF_GET_SEC_SEED

Used to extract the seed from RTLS Master and distribute to RTLS Passive nodes

Params

None


RTLS_CMD_AOA_SET_PARAMS

Sets AoA parameters

Params

RTLS_CMD_AOA_ENABLE

Request the device to start AoA. Must call RTLS_CMD_AOA_SET_PARAMS beforehand

Params

RTLS_CMD_TOF_SET_PARAMS

Sets ToF parameters

Params

RTLS_CMD_TOF_ENABLE

Request the device to start ToF. Must call RTLS_CMD_TOF_SET_PARAMS beforehand

Params

RTLS_CMD_TOF_CALIBRATE

Enables ToF for calibration - RTLS_CMD_TOF_ENABLE must be called for calibration to start! ToF calibration is only performed in TOF_MODE_DIST - this is because DIST is the only mode that calculates a final result. If the requirement is to perform the final calculation off chip when using TOF_MODE_STAT/RAW, then the user should store calibration values and offsets on the host side

Params
Calibration will run depending on the setting of samplesPerFreq:

Responses

RTLS_CMD_IDENTIFY

Sends back the RTLS Node's capabilities and a unique identifier

Params

capabilities - capabilities supported by each device (described by capabilities ENUM) identifier - unique identifier per device

RTLS_CMD_ERROR

If an internal error occurs in RTLS Control, it will notify RTLS Node Manager

Params

status - a status code described by RtlsStatus ENUM

RTLS_CMD_RESET_DEVICE

Device is reset

Params

status - a status code described by RtlsStatus ENUM

RTLS_EVT_DEBUG - This command is used by the user to debug the application, a sort of logging message

A debug event has been sent

Params


RTLS_CMD_SCAN - SyncRsp

Used to tell RTLS Node Manager that a scan has started

Params

status - a status code described by RtlsStatus ENUM

RTLS_CMD_SCAN - AsyncReq

Contains information found in the BLE scan packet

Params

RTLS_CMD_SCAN_STOP - AsyncReq

A scan procedure has finished (if nothing is found a scan can be restarted)

Params

status - a status code described by RtlsStatus ENUM

RTLS_CMD_CONNECT - SyncRsp

This will inform the RTLS Node Manager that RTLS Control has requested the stack to form a connection

Params

status - a status code described by RtlsStatus ENUM

RTLS_CMD_CONNECT - AsyncReq

This will inform the RTLS Node Manager that a connection has been formed (or failed to form)

Params

status - a status code described by RtlsStatus ENUM

RTLS_CMD_CONN_PARAMS - SyncRsp

Informing that Connection Parameters will be set

Params

status - a status code described by RtlsStatus ENUM

RTLS_CMD_CONN_PARAMS - AsyncReq

Sends out the connection params as soon as they are available

Params

RTLS_CMD_AOA_SET_PARAMS - SyncRsp

Indicates that RTLS Control will set AoA parameters

Params

status - a status code described by RtlsStatus ENUM

RTLS_CMD_AOA_ENABLE - SyncRsp

Indicates that RTLS Control will enable/disable AoA

Params

status - a status code described by RtlsStatus ENUM

RTLS_CMD_AOA_RESULT_ANGLE - AsyncReq

Contains the results for a single AoA run when using AOA_MODE_ANGLE

Params

RTLS_CMD_AOA_RESULT_PAIR_ANGLES - AsyncReq

Contains the results for a single AoA run when using AOA_MODE_PAIR_ANGLES

Params

RTLS_CMD_AOA_RESULT_RAW - AsyncReq

Outputs the raw array of I/Q samples collected in RF Core RAM. The output is quite large (around 2K bytes) and will be output over uNPI in chunks of 32 samples per chunk.

Params

RTLS_CMD_TOF_ENABLE - SyncRsp

RTLS Control will enable/disable ToF

Params

status - a status code described by RtlsStatus ENUM

RTLS_CMD_TOF_SET_PARAMS - SyncRsp

RTLS Control will set ToF parameters

Params

status - a status code described by RtlsStatus ENUM

RTLS_CMD_TOF_SET_SEC_SEED - SyncRsp

RTLS Control will set ToF Security seed (used for RTLS Passive nodes)

Params

status - a status code described by RtlsStatus ENUM

RTLS_CMD_TOF_GET_SEC_SEED - SyncRsp

RTLS Control will send out the ToF Security seed (passed onto RTLS Passive nodes)

Params

seed[32] - a seed of 32 bytes

RTLS_CMD_TOF_RESULT_STAT - AsyncReq

RTLS Control will send out this result when using TOF_MODE_STAT TOF_MODE_STAT will average tick values for each frequency used in a ToF run (partial calculation)

Params

RTLS_CMD_TOF_RESULT_DIST - AsyncReq

RTLS Control will hold an average of all ToF runs and report over and over for each ToF run that the user requests

Params

RTLS_CMD_TOF_RESULT_RAW - AsyncReq

Raw results reported directly by ToF driver

Params

RTLS_CMD_TOF_CALIBRATE - SyncRsp

RTLS Control will enable/disable ToF

Params

status - a status code described by RtlsStatus ENUM

RTLS_CMD_TOF_CALIBRATE - AsyncReq

RTLS Control will output the calibration array to the host once calibration is complete

Params