TI BLE5-Stack API Documentation  2.02.05.00
Modules | Files | Functions | Variables
RTLSSrv

This module implements the RTLS Services APIs. More...

Modules

 RTLS Services Commands
 
 RTLS Services Structures
 
 RTLS Services callbacks
 
 RTLS Services constants
 
 RTLS Services error codes
 
 RTLS Services event types
 

Files

file  rtls_srv_api.h
 RTLS Services.
 

Functions

bStatus_t RTLSSrv_CLCteTransmitEnable (uint8 advHandle, uint8 enable)
 
bStatus_t RTLSSrv_init (uint8_t numOfRTLSConns)
 
PIN_Handle RTLSSrv_initAntArray (uint8_t mainAntenna)
 
bStatus_t RTLSSrv_processHciEvent (uint16_t hciEvt, uint16_t hciEvtSz, uint8_t *pEvtData)
 
bStatus_t RTLSSrv_readAntennaInformationCmd (void)
 
bStatus_t RTLSSrv_register (pfnAppEventHandlerCB_t pCB)
 
bStatus_t RTLSSrv_setCLCteSamplingEnableCmd (uint16_t syncHandle, uint8_t enable, uint8_t slotDuration, uint8_t maxSampleCte, uint8_t numAnt, uint8_t pAntPattern[])
 
bStatus_t RTLSSrv_SetCLCteTransmitParams (uint8 advHandle, uint8 cteLength, uint8 cteType, uint8 cteCount, uint8 switchLen, uint8 *pAntenna)
 
bStatus_t RTLSSrv_setConnCteReceiveParams (uint16_t connHandle, uint8_t samplingEnable, uint8_t slotDurations, uint8_t numAnt, uint8_t antArray[])
 
bStatus_t RTLSSrv_setConnCteRequestEnableCmd (uint16_t connHandle, uint8_t enable, uint16_t interval, uint8_t length, uint8_t type)
 
bStatus_t RTLSSrv_setConnCteResponseEnableCmd (uint16_t connHandle, uint8_t enable)
 
bStatus_t RTLSSrv_setConnCteTransmitParams (uint16_t connHandle, uint8_t types, uint8_t length, uint8_t antArray[])
 
bStatus_t RTLSSrv_setCteSampleAccuracy (uint16_t handle, uint8_t sampleRate1M, uint8_t sampleSize1M, uint8_t sampleRate2M, uint8_t sampleSize2M, uint8_t sampleCtrl)
 

Variables

uint8_t maxNumClCteBufs
 Maximum number of buffers for CL AoA.
 

Detailed Description

This module implements the RTLS Services APIs.

Function Documentation

§ RTLSSrv_CLCteTransmitEnable()

bStatus_t RTLSSrv_CLCteTransmitEnable ( uint8  advHandle,
uint8  enable 
)

RTLSSrv_CLCteTransmitEnable

Used to request the advertiser to enable or disable the periodic advertising for the advertising set

/ref did_214342976

Parameters
advHandle- Used to identify a periodic advertising train
enable- 0x00 - Periodic advertising is disabled (default)
  • 0x01 - Periodic advertising is enabled
Returns
SUCCESS, RTLSSRV_BAD_PARAMETER, RTLSSRV_COMMAND_DISALLOWED

§ RTLSSrv_init()

bStatus_t RTLSSrv_init ( uint8_t  numOfRTLSConns)

Initialize RTLSSrv module

Parameters
numOfRTLSConns- number of connections that RTLS Srv is required to support
Returns
SUCCESS/FAILURE

§ RTLSSrv_initAntArray()

PIN_Handle RTLSSrv_initAntArray ( uint8_t  mainAntenna)

Initialize GPIO's which correspond to Antenna Table configured in sysConfig or in ble_user_config.c (antennaTbl) Initialize one of the antenna ID's(mainAntenna) as the main antenna used to Tx/Rx

Parameters
mainAntenna- Antenna ID to be used as main receiving antenna
Returns
PIN_Handle - handle for initialized pins

§ RTLSSrv_processHciEvent()

bStatus_t RTLSSrv_processHciEvent ( uint16_t  hciEvt,
uint16_t  hciEvtSz,
uint8_t *  pEvtData 
)

RTLSSrv_processHciEvent

This is the HCI event handler for RTLSSrv module Any HCI event related to RTLS should pass through this API

Parameters
hciEvt- is used to parse the event according to RTLS Services event types
hciEvtSz- size of evtData
pEvtData- pointer to event data structure RTLS Services Structures
Returns
TRUE = success, FALSE = failure

§ RTLSSrv_readAntennaInformationCmd()

bStatus_t RTLSSrv_readAntennaInformationCmd ( void  )

Read Antenna information

Returns
bStatus_t - command was acked, async return status in case of an error provided by RTLSSRV_ANTENNA_INFORMATION_EVT

§ RTLSSrv_register()

bStatus_t RTLSSrv_register ( pfnAppEventHandlerCB_t  pCB)

Register callback functions with RTLS Services

Parameters
pCBpointer to callback function structure
Returns
SUCCESS/FAILURE

§ RTLSSrv_setCLCteSamplingEnableCmd()

bStatus_t RTLSSrv_setCLCteSamplingEnableCmd ( uint16_t  syncHandle,
uint8_t  enable,
uint8_t  slotDuration,
uint8_t  maxSampleCte,
uint8_t  numAnt,
uint8_t  pAntPattern[] 
)

RTLSSrv_setCLCteSamplingEnableCmd

Request the Controller to enable or disable capturing IQ samples from the CTE of periodic advertising packets in the periodic advertising train identified by the syncHandle parameter.

/ref did_214342976

Parameters
syncHandle- Handle identifying the periodic advertising train (Range: 0x0000 to 0x0EFF)
enable- 0x00 - Disable CTE sampling
  • 0x01 - Enable CTE sampling
slotDuration- Switching and sampling slots in 1 us or 2 us each (1 or 2).
maxSampleCte- 0 - Sample and report all available CTEs
1-16 - Max number of CTEs to sample and report in each periodic event
numAnt- Number of items in Antenna array (relevant to AoA only)
pAntPattern- Pointer to Antenna array (relevant to AoA only)
Returns
SUCCESS, RTLSSRV_COMMAND_DISALLOWED, RTLSSRV_BAD_PARAMETER RTLSSRV_UNKNOWN_ADVERTISING_IDENTIFIER

§ RTLSSrv_SetCLCteTransmitParams()

bStatus_t RTLSSrv_SetCLCteTransmitParams ( uint8  advHandle,
uint8  cteLength,
uint8  cteType,
uint8  cteCount,
uint8  switchLen,
uint8 *  pAntenna 
)

RTLSSrv_SetCLCteTransmitParams

Used to request the advertiser to enable or disable the periodic advertising for the advertising set

/ref did_214342976

Parameters
advHandle- Used to identify a periodic advertising train
cteLength- CTE length in 8 us units.
cteType- 0x00 - AoA CTE
  • 0x01 - AoD CTE with 1 us slots.
  • 0x02 - AoD CTE with 2 us slots.
cteCount- The number of CTE to transmit in each periodic advertising interval. Range: 0x01-0x10
switchLen- The number of Antenna IDs in the pattern. Range: 0x02-0x4B.
pAntenna- list of Antenna IDs in the pattern.
Returns
SUCCESS, RTLSSRV_COMMAND_DISALLOWED, RTLSSRV_FEATURE_NOT_SUPPORTED, RTLSSRV_BAD_PARAMETER

§ RTLSSrv_setConnCteReceiveParams()

bStatus_t RTLSSrv_setConnCteReceiveParams ( uint16_t  connHandle,
uint8_t  samplingEnable,
uint8_t  slotDurations,
uint8_t  numAnt,
uint8_t  antArray[] 
)

Note: RTLSSrv_initAntArray must be called before calling this functions In order to not limit users GPIO configuration, it is the users responsibility to either call RTLSSrv_initAntArray or to initialize GPIO's in another manner

Used to:

  1. Enable or disable sampling received Constant Tone Extension fields on a connection
  2. Configure the antenna switching pattern
  3. Configure switching and sampling slot durations to be used
Parameters
connHandle- Connection handle
samplingEnable- Sample CTE on a connection and report the samples to the User Application (0 or 1)
slotDurations- Switching and sampling slots in 1 μs or 2 μs each (1 or 2)
numAnt- The number of Antenna IDs in the pattern (2 to 75)
antArray- List of Antenna IDs in the pattern
Returns
bStatus_t - command was acked, async return status in case of an error provided by RTLS_ERROR_EVT

§ RTLSSrv_setConnCteRequestEnableCmd()

bStatus_t RTLSSrv_setConnCteRequestEnableCmd ( uint16_t  connHandle,
uint8_t  enable,
uint16_t  interval,
uint8_t  length,
uint8_t  type 
)

Start or stop initiating the CTE Request procedure on a connection Note that the API enables periodically requesting CTE by using the 'interval' parameter

Parameters
connHandle- Connection handle
enable- Enable or disable CTE Request for a connection (1 or 0)
interval- Requested interval for initiating the CTE Request procedure in number of connection events (1 to 0xFFFF).
1 means the next CTE Request procedure is initiated at the connection interval following the completion of a previous CTE Request procedure.
The first CTE Request procedure is sent as soon as possible no matter the value set for this parameter.
length- Min length of the CTE being requested in 8 μs units (2 to 20)
type- Requested CTE type (0 - AoA, 1 - AoD with 1μs slots, 2 - AoD with 2μs slots)
Returns
bStatus_t - command was acked, async return status in case of an error provided by RTLS_ERROR_EVT

§ RTLSSrv_setConnCteResponseEnableCmd()

bStatus_t RTLSSrv_setConnCteResponseEnableCmd ( uint16_t  connHandle,
uint8_t  enable 
)

Enable responding to CTE requests

Parameters
connHandle- Connection handle
enable- Enable or disable CTE Response for a connection (1 or 0)
Returns
bStatus_t - command was acked, async return status in case of an error provided by RTLS_ERROR_EVT

§ RTLSSrv_setConnCteTransmitParams()

bStatus_t RTLSSrv_setConnCteTransmitParams ( uint16_t  connHandle,
uint8_t  types,
uint8_t  length,
uint8_t  antArray[] 
)

Used to:

  1. Set the antenna switching pattern
  2. Set permitted Constant Tone Extension types used for transmitting Constant Tone Extensions requested by the peer device on a connection
Parameters
connHandle- Connection handle
types- CTE types (0 - Allow AoA CTE Response)
length- The number of Antenna IDs in the pattern (2 to 75)
antArray- List of Antenna IDs in the pattern
Returns
bStatus_t - command was acked, async return status in case of an error provided by RTLS_ERROR_EVT

§ RTLSSrv_setCteSampleAccuracy()

bStatus_t RTLSSrv_setCteSampleAccuracy ( uint16_t  handle,
uint8_t  sampleRate1M,
uint8_t  sampleSize1M,
uint8_t  sampleRate2M,
uint8_t  sampleSize2M,
uint8_t  sampleCtrl 
)

Set CTE sampling accuracy

Parameters
handleConnection/sync handle.
sampleRate1Msample rate for PHY 1M range : 1 - least accuracy (as in 5.1 spec) to 4 - most accuracy
sampleSize1Msample size for PHY 1M range : 1 - 8 bits (as in 5.1 spec) or 2 - 16 bits (more accurate)
sampleRate2Msample rate for PHY 2M range : 1 - least accuracy (as in 5.1 spec) to 4 - most accuracy
sampleSize2Msample size for PHY 2M range : 1 - 8 bits (as in 5.1 spec) or 2 - 16 bits (more accurate)
sampleCtrl- sample control flags range : range : bit0=0 - Default filtering, bit0=1 - RAW_RF(no filtering), , bit1..7=0 - spare
Returns
bStatus_t - command was acked, async return status in case of an error provided by RTLS_ERROR_EVT
© Copyright 1995-2022, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale