TI BLE5-Stack API Documentation  2.01.03.00
Modules | Files | Functions
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_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_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 connHandle, uint8_t sampleRate1M, uint8_t sampleSize1M, uint8_t sampleRate2M, uint8_t sampleSize2M, uint8_t sampleCtrl)
 

Detailed Description

This module implements the RTLS Services APIs.

Function Documentation

§ 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 antenna array To initialize a single pin, use array of length 1

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_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)
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  connHandle,
uint8_t  sampleRate1M,
uint8_t  sampleSize1M,
uint8_t  sampleRate2M,
uint8_t  sampleSize2M,
uint8_t  sampleCtrl 
)

Set CTE sampling accuracy

Parameters
connHandleConnection 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-2020, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale