Bluetooth LE Profile API document
Bluetooth LE Profile API document Rev.1.00 [May 22, 2020]
Location and Navigation Service Client

This is the client for the Location and Navigation Service. More...

Detailed Description

This is the client for the Location and Navigation Service.

Data Structures

struct  st_ble_lnc_feat_t
 LN Feature value structure. More...
 
struct  st_ble_lnc_feat_attr_hdl_t
 LN Feature attribute handle value. More...
 
struct  st_ble_lnc_location_and_speed_flags_t
 Location and Speed Flags value structure. More...
 
struct  st_ble_lnc_location_and_speed_t
 Location and Speed value structure. More...
 
struct  st_ble_lnc_location_and_speed_attr_hdl_t
 Location and Speed attribute handle value. More...
 
struct  st_ble_lnc_position_quality_flags_t
 Position Quality Flags value structure. More...
 
struct  st_ble_lnc_position_quality_t
 Position Quality value structure. More...
 
struct  st_ble_lnc_position_quality_attr_hdl_t
 Position Quality attribute handle value. More...
 
struct  st_ble_lnc_cp_t
 LN Control Point value structure. More...
 
struct  st_ble_lnc_cp_attr_hdl_t
 LN Control Point attribute handle value. More...
 
struct  st_ble_lnc_navigation_flags_t
 Navigation Flags value structure. More...
 
struct  st_ble_lnc_navigation_t
 Navigation value structure. More...
 
struct  st_ble_lnc_navigation_attr_hdl_t
 Navigation attribute handle value. More...
 
struct  st_ble_lnc_evt_data_t
 Location and Navigation client event data. More...
 

Macros

#define BLE_LNC_FEAT_UUID   (0x2A6A)
 
#define BLE_LNC_FEAT_LEN   (4)
 
#define BLE_LNC_LOCATION_AND_SPEED_UUID   (0x2A67)
 
#define BLE_LNC_LOCATION_AND_SPEED_LEN   (30)
 
#define BLE_LNC_LOCATION_AND_SPEED_CLI_CNFG_UUID   (0x2902)
 
#define BLE_LNC_LOCATION_AND_SPEED_CLI_CNFG_LEN   (2)
 
#define BLE_LNC_POSITION_QUALITY_UUID   (0x2A69)
 
#define BLE_LNC_POSITION_QUALITY_LEN   (16)
 
#define BLE_LNC_CP_UUID   (0x2A6B)
 
#define BLE_LNC_CP_LEN   (23)
 
#define BLE_LNC_CP_CLI_CNFG_UUID   (0x2902)
 
#define BLE_LNC_CP_CLI_CNFG_LEN   (2)
 
#define BLE_LNC_NAVIGATION_UUID   (0x2A68)
 
#define BLE_LNC_NAVIGATION_LEN   (21)
 
#define BLE_LNC_NAVIGATION_CLI_CNFG_UUID   (0x2902)
 
#define BLE_LNC_NAVIGATION_CLI_CNFG_LEN   (2)
 

Enumerations

enum  e_ble_lnc_cp_op_codes_t {
  BLE_LNC_CP_OP_CODES_SET_CUMULATIVE_VALUE = 1,
  BLE_LNC_CP_OP_CODES_MASK_LOCATION_AND_SPEED_CHARACTERISTIC_CONTENT = 2,
  BLE_LNC_CP_OP_CODES_NAVIGATION_CONTROL = 3,
  BLE_LNC_CP_OP_CODES_REQUEST_NUMBER_OF_ROUTES = 4,
  BLE_LNC_CP_OP_CODES_REQUEST_NAME_OF_ROUTE = 5,
  BLE_LNC_CP_OP_CODES_SELECT_ROUTE = 6,
  BLE_LNC_CP_OP_CODES_SET_FIX_RATE = 7,
  BLE_LNC_CP_OP_CODES_SET_ELEVATION = 8,
  BLE_LNC_CP_OP_CODES_RESPONSE_CODE = 32
}
 LN Control Point Op Codes enumeration. More...
 
enum  e_ble_lnc_cp_response_value_t {
  BLE_LNC_CP_RESPONSE_VALUE_SUCCESS = 1,
  BLE_LNC_CP_RESPONSE_VALUE_OP_CODE_NOT_SUPPORTED = 2,
  BLE_LNC_CP_RESPONSE_VALUE_INVALID_PARAMETER = 3,
  BLE_LNC_CP_RESPONSE_VALUE_OPERATION_FAILED = 4
}
 LN Control Point Response Value enumeration. More...
 
enum  e_ble_lnc_cp_navigation_control_value_t {
  BLE_LNC_CP_NAVIGATION_CONTROL_VALUE_STOP_NAVIGATION = 0,
  BLE_LNC_CP_NAVIGATION_CONTROL_VALUE_START_NAVIGATION = 1,
  BLE_LNC_CP_NAVIGATION_CONTROL_VALUE_PAUSE_NAVIGATION = 2,
  BLE_LNC_CP_NAVIGATION_CONTROL_VALUE_CONTINUE_NAVIGATION = 3,
  BLE_LNC_CP_NAVIGATION_CONTROL_VALUE_SKIP_WAYPOINT = 4,
  BLE_LNC_CP_NAVIGATION_CONTROL_VALUE_SELECT_NEAREST_WAYPOINT_ON_A_ROUTE = 5
}
 LN Control Point Navigation Control Value enumeration. More...
 
enum  e_ble_lnc_char_idx_t {
  BLE_LNC_FEAT_IDX,
  BLE_LNC_LOCATION_AND_SPEED_IDX,
  BLE_LNC_LOCATION_AND_SPEED_CLI_CNFG_IDX,
  BLE_LNC_POSITION_QUALITY_IDX,
  BLE_LNC_CP_IDX,
  BLE_LNC_CP_CLI_CNFG_IDX,
  BLE_LNC_NAVIGATION_IDX,
  BLE_LNC_NAVIGATION_CLI_CNFG_IDX
}
 Location and Navigation characteristic ID. More...
 
enum  e_ble_lnc_event_t {
  BLE_LNC_EVENT_FEAT_READ_RSP = BLE_SERVC_ATTR_EVENT(BLE_LNC_FEAT_IDX, BLE_SERVC_READ_RSP),
  BLE_LNC_EVENT_LOCATION_AND_SPEED_HDL_VAL_NTF = BLE_SERVC_ATTR_EVENT(BLE_LNC_LOCATION_AND_SPEED_IDX, BLE_SERVC_HDL_VAL_NTF),
  BLE_LNC_EVENT_LOCATION_AND_SPEED_CLI_CNFG_READ_RSP = BLE_SERVC_ATTR_EVENT(BLE_LNC_LOCATION_AND_SPEED_CLI_CNFG_IDX, BLE_SERVC_READ_RSP),
  BLE_LNC_EVENT_LOCATION_AND_SPEED_CLI_CNFG_WRITE_RSP = BLE_SERVC_ATTR_EVENT(BLE_LNC_LOCATION_AND_SPEED_CLI_CNFG_IDX, BLE_SERVC_WRITE_RSP),
  BLE_LNC_EVENT_POSITION_QUALITY_READ_RSP = BLE_SERVC_ATTR_EVENT(BLE_LNC_POSITION_QUALITY_IDX, BLE_SERVC_READ_RSP),
  BLE_LNC_EVENT_CP_WRITE_RSP = BLE_SERVC_ATTR_EVENT(BLE_LNC_CP_IDX, BLE_SERVC_WRITE_RSP),
  BLE_LNC_EVENT_CP_HDL_VAL_IND = BLE_SERVC_ATTR_EVENT(BLE_LNC_CP_IDX, BLE_SERVC_HDL_VAL_IND),
  BLE_LNC_EVENT_CP_CLI_CNFG_READ_RSP = BLE_SERVC_ATTR_EVENT(BLE_LNC_CP_CLI_CNFG_IDX, BLE_SERVC_READ_RSP),
  BLE_LNC_EVENT_CP_CLI_CNFG_WRITE_RSP = BLE_SERVC_ATTR_EVENT(BLE_LNC_CP_CLI_CNFG_IDX, BLE_SERVC_WRITE_RSP),
  BLE_LNC_EVENT_NAVIGATION_HDL_VAL_NTF = BLE_SERVC_ATTR_EVENT(BLE_LNC_NAVIGATION_IDX, BLE_SERVC_HDL_VAL_NTF),
  BLE_LNC_EVENT_NAVIGATION_CLI_CNFG_READ_RSP = BLE_SERVC_ATTR_EVENT(BLE_LNC_NAVIGATION_CLI_CNFG_IDX, BLE_SERVC_READ_RSP),
  BLE_LNC_EVENT_NAVIGATION_CLI_CNFG_WRITE_RSP = BLE_SERVC_ATTR_EVENT(BLE_LNC_NAVIGATION_CLI_CNFG_IDX, BLE_SERVC_WRITE_RSP)
}
 Location and Navigation client event type. More...
 

Functions

ble_status_t R_BLE_LNC_ReadFeat (uint16_t conn_hdl)
 Read LN Feature characteristic value from the remote GATT database. More...
 
void R_BLE_LNC_GetFeatAttrHdl (const st_ble_dev_addr_t *p_addr, st_ble_lnc_feat_attr_hdl_t *p_hdl)
 Get LN Feature attribute handles. More...
 
ble_status_t R_BLE_LNC_ReadLocationAndSpeedCliCnfg (uint16_t conn_hdl)
 Read Location and Speed characteristic Client Characteristic Configuration descriptor value from the remote GATT database. More...
 
ble_status_t R_BLE_LNC_WriteLocationAndSpeedCliCnfg (uint16_t conn_hdl, const uint16_t *p_value)
 Write Location and Speed characteristic Client Characteristic Configuration descriptor value to remote GATT database. More...
 
void R_BLE_LNC_GetLocationAndSpeedAttrHdl (const st_ble_dev_addr_t *p_addr, st_ble_lnc_location_and_speed_attr_hdl_t *p_hdl)
 Get Location and Speed attribute handles. More...
 
ble_status_t R_BLE_LNC_ReadPositionQuality (uint16_t conn_hdl)
 Read Position Quality characteristic value from the remote GATT database. More...
 
void R_BLE_LNC_GetPositionQualityAttrHdl (const st_ble_dev_addr_t *p_addr, st_ble_lnc_position_quality_attr_hdl_t *p_hdl)
 Get Position Quality attribute handles. More...
 
ble_status_t R_BLE_LNC_ReadCpCliCnfg (uint16_t conn_hdl)
 Read LN Control Point characteristic Client Characteristic Configuration descriptor value from the remote GATT database. More...
 
ble_status_t R_BLE_LNC_WriteCpCliCnfg (uint16_t conn_hdl, const uint16_t *p_value)
 Write LN Control Point characteristic Client Characteristic Configuration descriptor value to remote GATT database. More...
 
ble_status_t R_BLE_LNC_WriteCp (uint16_t conn_hdl, const st_ble_lnc_cp_t *p_value)
 Write LN Control Point characteristic value to remote GATT database. More...
 
void R_BLE_LNC_GetCpAttrHdl (const st_ble_dev_addr_t *p_addr, st_ble_lnc_cp_attr_hdl_t *p_hdl)
 Get LN Control Point attribute handles. More...
 
ble_status_t R_BLE_LNC_ReadNavigationCliCnfg (uint16_t conn_hdl)
 Read Navigation characteristic Client Characteristic Configuration descriptor value from the remote GATT database. More...
 
ble_status_t R_BLE_LNC_WriteNavigationCliCnfg (uint16_t conn_hdl, const uint16_t *p_value)
 Write Navigation characteristic Client Characteristic Configuration descriptor value to remote GATT database. More...
 
void R_BLE_LNC_GetNavigationAttrHdl (const st_ble_dev_addr_t *p_addr, st_ble_lnc_navigation_attr_hdl_t *p_hdl)
 Get Navigation attribute handles. More...
 
ble_status_t R_BLE_LNC_Init (ble_servc_app_cb_t cb)
 Initialize Location and Navigation client. More...
 
void R_BLE_LNC_ServDiscCb (uint16_t conn_hdl, uint8_t serv_idx, uint16_t type, void *p_param)
 Location and Navigation client discovery callback. More...
 
void R_BLE_LNC_GetServAttrHdl (const st_ble_dev_addr_t *p_addr, st_ble_gatt_hdl_range_t *p_hdl)
 Get Location and Navigation client attribute handle. More...
 

Enumeration Type Documentation

◆ e_ble_lnc_cp_op_codes_t

LN Control Point Op Codes enumeration.

Enumerator
BLE_LNC_CP_OP_CODES_SET_CUMULATIVE_VALUE 

Set Cumulative Value

BLE_LNC_CP_OP_CODES_MASK_LOCATION_AND_SPEED_CHARACTERISTIC_CONTENT 

Mask Location and Speed Characteristic Content

BLE_LNC_CP_OP_CODES_NAVIGATION_CONTROL 

Navigation Control

BLE_LNC_CP_OP_CODES_REQUEST_NUMBER_OF_ROUTES 

Request Number of Routes

BLE_LNC_CP_OP_CODES_REQUEST_NAME_OF_ROUTE 

Request Name of Route

BLE_LNC_CP_OP_CODES_SELECT_ROUTE 

Select Route

BLE_LNC_CP_OP_CODES_SET_FIX_RATE 

Set Fix Rate

BLE_LNC_CP_OP_CODES_SET_ELEVATION 

Set Elevation

BLE_LNC_CP_OP_CODES_RESPONSE_CODE 

Response Code

◆ e_ble_lnc_cp_response_value_t

LN Control Point Response Value enumeration.

Enumerator
BLE_LNC_CP_RESPONSE_VALUE_SUCCESS 

Success

BLE_LNC_CP_RESPONSE_VALUE_OP_CODE_NOT_SUPPORTED 

Op Code not Supported

BLE_LNC_CP_RESPONSE_VALUE_INVALID_PARAMETER 

Invalid Parameter

BLE_LNC_CP_RESPONSE_VALUE_OPERATION_FAILED 

Operation Failed

◆ e_ble_lnc_cp_navigation_control_value_t

LN Control Point Navigation Control Value enumeration.

◆ e_ble_lnc_char_idx_t

Location and Navigation characteristic ID.

◆ e_ble_lnc_event_t

Location and Navigation client event type.

Function Documentation

◆ R_BLE_LNC_ReadFeat()

ble_status_t R_BLE_LNC_ReadFeat ( uint16_t  conn_hdl)

Read LN Feature characteristic value from the remote GATT database.

Parameters
[in]conn_hdlConnection handle.
Returns
ble_status_t

◆ R_BLE_LNC_GetFeatAttrHdl()

void R_BLE_LNC_GetFeatAttrHdl ( const st_ble_dev_addr_t p_addr,
st_ble_lnc_feat_attr_hdl_t p_hdl 
)

Get LN Feature attribute handles.

Parameters
[in]p_addrBluetooth device address for the attribute handles.
[out]p_hdlThe pointer to store the retrieved attribute handles.
Returns
ble_status_t

◆ R_BLE_LNC_ReadLocationAndSpeedCliCnfg()

ble_status_t R_BLE_LNC_ReadLocationAndSpeedCliCnfg ( uint16_t  conn_hdl)

Read Location and Speed characteristic Client Characteristic Configuration descriptor value from the remote GATT database.

Parameters
[in]conn_hdlConnection handle.
Returns
ble_status_t

◆ R_BLE_LNC_WriteLocationAndSpeedCliCnfg()

ble_status_t R_BLE_LNC_WriteLocationAndSpeedCliCnfg ( uint16_t  conn_hdl,
const uint16_t *  p_value 
)

Write Location and Speed characteristic Client Characteristic Configuration descriptor value to remote GATT database.

Parameters
[in]conn_hdlConnection handle.
[in]p_valueLocation and Speed characteristic Client Characteristic Configuration descriptor value to write.
Returns
ble_status_t

◆ R_BLE_LNC_GetLocationAndSpeedAttrHdl()

void R_BLE_LNC_GetLocationAndSpeedAttrHdl ( const st_ble_dev_addr_t p_addr,
st_ble_lnc_location_and_speed_attr_hdl_t p_hdl 
)

Get Location and Speed attribute handles.

Parameters
[in]p_addrBluetooth device address for the attribute handles.
[out]p_hdlThe pointer to store the retrieved attribute handles.
Returns
ble_status_t

◆ R_BLE_LNC_ReadPositionQuality()

ble_status_t R_BLE_LNC_ReadPositionQuality ( uint16_t  conn_hdl)

Read Position Quality characteristic value from the remote GATT database.

Parameters
[in]conn_hdlConnection handle.
Returns
ble_status_t

◆ R_BLE_LNC_GetPositionQualityAttrHdl()

void R_BLE_LNC_GetPositionQualityAttrHdl ( const st_ble_dev_addr_t p_addr,
st_ble_lnc_position_quality_attr_hdl_t p_hdl 
)

Get Position Quality attribute handles.

Parameters
[in]p_addrBluetooth device address for the attribute handles.
[out]p_hdlThe pointer to store the retrieved attribute handles.
Returns
ble_status_t

◆ R_BLE_LNC_ReadCpCliCnfg()

ble_status_t R_BLE_LNC_ReadCpCliCnfg ( uint16_t  conn_hdl)

Read LN Control Point characteristic Client Characteristic Configuration descriptor value from the remote GATT database.

Parameters
[in]conn_hdlConnection handle.
Returns
ble_status_t

◆ R_BLE_LNC_WriteCpCliCnfg()

ble_status_t R_BLE_LNC_WriteCpCliCnfg ( uint16_t  conn_hdl,
const uint16_t *  p_value 
)

Write LN Control Point characteristic Client Characteristic Configuration descriptor value to remote GATT database.

Parameters
[in]conn_hdlConnection handle.
[in]p_valueLN Control Point characteristic Client Characteristic Configuration descriptor value to write.
Returns
ble_status_t

◆ R_BLE_LNC_WriteCp()

ble_status_t R_BLE_LNC_WriteCp ( uint16_t  conn_hdl,
const st_ble_lnc_cp_t p_value 
)

Write LN Control Point characteristic value to remote GATT database.

Parameters
[in]conn_hdlConnection handle.
[in]p_valueLN Control Point characteristic value to write.
Returns
ble_status_t

◆ R_BLE_LNC_GetCpAttrHdl()

void R_BLE_LNC_GetCpAttrHdl ( const st_ble_dev_addr_t p_addr,
st_ble_lnc_cp_attr_hdl_t p_hdl 
)

Get LN Control Point attribute handles.

Parameters
[in]p_addrBluetooth device address for the attribute handles.
[out]p_hdlThe pointer to store the retrieved attribute handles.
Returns
ble_status_t

◆ R_BLE_LNC_ReadNavigationCliCnfg()

ble_status_t R_BLE_LNC_ReadNavigationCliCnfg ( uint16_t  conn_hdl)

Read Navigation characteristic Client Characteristic Configuration descriptor value from the remote GATT database.

Parameters
[in]conn_hdlConnection handle.
Returns
ble_status_t

◆ R_BLE_LNC_WriteNavigationCliCnfg()

ble_status_t R_BLE_LNC_WriteNavigationCliCnfg ( uint16_t  conn_hdl,
const uint16_t *  p_value 
)

Write Navigation characteristic Client Characteristic Configuration descriptor value to remote GATT database.

Parameters
[in]conn_hdlConnection handle.
[in]p_valueNavigation characteristic Client Characteristic Configuration descriptor value to write.
Returns
ble_status_t

◆ R_BLE_LNC_GetNavigationAttrHdl()

void R_BLE_LNC_GetNavigationAttrHdl ( const st_ble_dev_addr_t p_addr,
st_ble_lnc_navigation_attr_hdl_t p_hdl 
)

Get Navigation attribute handles.

Parameters
[in]p_addrBluetooth device address for the attribute handles.
[out]p_hdlThe pointer to store the retrieved attribute handles.
Returns
ble_status_t

◆ R_BLE_LNC_Init()

ble_status_t R_BLE_LNC_Init ( ble_servc_app_cb_t  cb)

Initialize Location and Navigation client.

Parameters
[in]cbClient callback.
Returns
ble_status_t

◆ R_BLE_LNC_ServDiscCb()

void R_BLE_LNC_ServDiscCb ( uint16_t  conn_hdl,
uint8_t  serv_idx,
uint16_t  type,
void *  p_param 
)

Location and Navigation client discovery callback.

Parameters
[in]conn_hdlConnection handle
[in]serv_idxService instance index.
[in]typeService discovery event type.
[in]p_paramService discovery event parameter.
Returns
ble_status_t

◆ R_BLE_LNC_GetServAttrHdl()

void R_BLE_LNC_GetServAttrHdl ( const st_ble_dev_addr_t p_addr,
st_ble_gatt_hdl_range_t p_hdl 
)

Get Location and Navigation client attribute handle.

Parameters
[in]p_addrBluetooth device address for the attribute handles.
[out]p_hdlThe pointer to store the retrieved attribute handles.