InPlay API
BLE device information service

BLE DIS service. More...

Data Structures

struct  ble_dis_prf_t
 Parameters for the database creation. More...
 
struct  ble_diss_value_cfm_t
 Peer device value of requested attribute. More...
 

Enumerations

enum  ble_dis_evt { DISS_EVT_VALUE_REQ_IND = DIS_EVT_CODE +1 }
 Dis event. More...
 
enum  ble_dis_char {
  BLE_DIS_MANUFACTURER_NAME_CHAR, BLE_DIS_MODEL_NB_STR_CHAR, BLE_DIS_SERIAL_NB_STR_CHAR, BLE_DIS_HARD_REV_STR_CHAR,
  BLE_DIS_FIRM_REV_STR_CHAR, BLE_DIS_SW_REV_STR_CHAR, BLE_DIS_SYSTEM_ID_CHAR, BLE_DIS_IEEE_CHAR,
  BLE_DIS_PNP_ID_CHAR
}
 DIS char code. More...
 
enum  ble_diss_features {
  BLE_DISS_MANUFACTURER_NAME_CHAR_SUP = 0x0001, BLE_DISS_MODEL_NB_STR_CHAR_SUP = 0x0002, BLE_DISS_SERIAL_NB_STR_CHAR_SUP = 0x0004, BLE_DISS_HARD_REV_STR_CHAR_SUP = 0x0008,
  BLE_DISS_FIRM_REV_STR_CHAR_SUP = 0x0010, BLE_DISS_SW_REV_STR_CHAR_SUP = 0x0020, BLE_DISS_SYSTEM_ID_CHAR_SUP = 0x0040, BLE_DISS_IEEE_CHAR_SUP = 0x0080,
  BLE_DISS_PNP_ID_CHAR_SUP = 0x0100, BLE_DISS_ALL_FEAT_SUP = 0x01FF
}
 Database Configuration Flags. More...
 

Functions

int in_ble_disc_add (void *hdl, ble_dis_prf_t *p_prf, comp_cb callback)
 Add DIS client service. More...
 
int in_ble_disc_enable (void *hdl, int conidx, int con_type, ble_disc_content_t *p_dis, comp_cb callback)
 Enable DIS client servie. More...
 
int in_ble_disc_read_char (void *hdl, int conidx, int char_code, ble_att_info_t *p_att, comp_cb callback)
 Enable DIS client servie. More...
 
int in_ble_diss_add (void *hdl, ble_dis_prf_t *p_prf, comp_cb callback)
 Add DIS server service. More...
 
int in_ble_diss_set_value_req (void *hdl, int conidx, ble_diss_set_value_req_t *p_req, comp_cb callback)
 Set the value of an attribute - Request. More...
 
int in_ble_diss_set_value_cfm (void *hdl, int conidx, ble_diss_value_cfm_t *p_cfm)
 Peer device value of requested attribute confirmed. More...
 

Detailed Description

BLE DIS service.

Enumeration Type Documentation

◆ ble_dis_char

DIS char code.

Enumerator
BLE_DIS_MANUFACTURER_NAME_CHAR 

Manufacturer Name.

BLE_DIS_MODEL_NB_STR_CHAR 

Model Number.

BLE_DIS_SERIAL_NB_STR_CHAR 

Serial Number.

BLE_DIS_HARD_REV_STR_CHAR 

HW Revision Number.

BLE_DIS_FIRM_REV_STR_CHAR 

FW Revision Number.

BLE_DIS_SW_REV_STR_CHAR 

SW Revision Number.

BLE_DIS_SYSTEM_ID_CHAR 

System Identifier Name.

BLE_DIS_IEEE_CHAR 

IEEE Certificate.

BLE_DIS_PNP_ID_CHAR 

Plug and Play Identifier.

◆ ble_dis_evt

Dis event.

Enumerator
DISS_EVT_VALUE_REQ_IND 

Peer device request to get profile attribute value,.

See also
evt_value_req_ind_t

◆ ble_diss_features

Database Configuration Flags.

Enumerator
BLE_DISS_MANUFACTURER_NAME_CHAR_SUP 

Indicate if Manufacturer Name String Char. is supported.

BLE_DISS_MODEL_NB_STR_CHAR_SUP 

Indicate if Model Number String Char. is supported.

BLE_DISS_SERIAL_NB_STR_CHAR_SUP 

Indicate if Serial Number String Char. is supported.

BLE_DISS_HARD_REV_STR_CHAR_SUP 

Indicate if Hardware Revision String Char. supports indications.

BLE_DISS_FIRM_REV_STR_CHAR_SUP 

Indicate if Firmware Revision String Char. is writable.

BLE_DISS_SW_REV_STR_CHAR_SUP 

Indicate if Software Revision String Char. is writable.

BLE_DISS_SYSTEM_ID_CHAR_SUP 

Indicate if System ID Char. is writable.

BLE_DISS_IEEE_CHAR_SUP 

Indicate if IEEE Char. is writable.

BLE_DISS_PNP_ID_CHAR_SUP 

Indicate if PnP ID Char. is writable.

BLE_DISS_ALL_FEAT_SUP 

All features are supported.

Function Documentation

◆ in_ble_disc_add()

int in_ble_disc_add ( void *  hdl,
ble_dis_prf_t p_prf,
comp_cb  callback 
)

Add DIS client service.

Note
Add it after device configuration, but before any activity starts
Parameters
[in]p_prfPointer to profile attributes
See also
in_ble_dis_prf_t
Returns
IN_BLE_ERR_NO_ERROR if successful, otherwise failed.
See also
enum in_ble_err_t

◆ in_ble_disc_enable()

int in_ble_disc_enable ( void *  hdl,
int  conidx,
int  con_type,
ble_disc_content_t *  p_dis,
comp_cb  callback 
)

Enable DIS client servie.

Note
First function to call after connection
Parameters
[in]conidxConnection index
[in]con_typeConnnetion type,
See also
enum in_ble_con_type
Parameters
[in,out]p_disContents of service
  • Discover connection type: Stack will fill it
  • Normal connection type: Application needs to fill it.
Returns
IN_BLE_ERR_NO_ERROR if successful, otherwise failed.
See also
enum in_ble_err_t

◆ in_ble_disc_read_char()

int in_ble_disc_read_char ( void *  hdl,
int  conidx,
int  char_code,
ble_att_info_t p_att,
comp_cb  callback 
)

Enable DIS client servie.

Note
First function to call after connection
Parameters
[in]conidxConnection index
[in]char_codeCharacteristic value code,
See also
enum in_ble_disc_char
Parameters
[out]p_attReturn information
Returns
IN_BLE_ERR_NO_ERROR if successful, otherwise failed.
See also
enum in_ble_err_t

◆ in_ble_diss_add()

int in_ble_diss_add ( void *  hdl,
ble_dis_prf_t p_prf,
comp_cb  callback 
)

Add DIS server service.

Note
Add it after device configuration, but before any activity starts
Parameters
[in]p_prfPointer to profile attributes,
See also
in_ble_dis_prf_t
Returns
IN_BLE_ERR_NO_ERROR if successful, otherwise failed.
See also
enum in_ble_err_t

◆ in_ble_diss_set_value_cfm()

int in_ble_diss_set_value_cfm ( void *  hdl,
int  conidx,
ble_diss_value_cfm_t p_cfm 
)

Peer device value of requested attribute confirmed.

Parameters
[in]conidxConnection index
[in]p_cfmPointer to confirmed value
Returns
IN_BLE_ERR_NO_ERROR if successful, otherwise failed.
See also
enum in_ble_err_t

◆ in_ble_diss_set_value_req()

int in_ble_diss_set_value_req ( void *  hdl,
int  conidx,
ble_diss_set_value_req_t *  p_req,
comp_cb  callback 
)

Set the value of an attribute - Request.

Parameters
[in]conidxConnection index
[in]p_reqPointer to Connnetion type,
See also
enum in_ble_con_type
Parameters
[in]p_reqPointer to the request
Returns
IN_BLE_ERR_NO_ERROR if successful, otherwise failed.
See also
enum in_ble_err_t