bluetooth_service

bts2_app_interface.h

Author

Sifli software development team

Defines

bt_interface_get_a2dp_stream_state()

Typedefs

typedef int (*register_bt_notify_func_t)(uint16_t type, uint16_t event_id, uint8_t *data, uint16_t data_len)
typedef struct bt_notify_register_callback_t bt_notify_register_callback_t

Enums

enum bt_interface_status_t

Values:

enumerator BT_INTERFACE_STATUS_OK
enumerator BT_INTERFACE_STATUS_NO_MEMORY
enumerator BT_INTERFACE_STATUS_ALREADY_EXIST
enumerator BT_INTERFACE_STATUS_NOT_EXIST

Functions

void bt_interface_open_bt(void)

Performs chip power on and kickstarts OS scheduler.

void bt_interface_close_bt(void)

Inititates shutdown of Bluetooth system. Any active links will be dropped and device entering non connectable/discoverable mode.

void bt_interface_start_inquiry(void)

Start device discovery/inquiry for BT_DEVCLS_AUDIO device.

int8_t bt_interface_start_inquiry_ex(bt_start_inquiry_ex_t *param)

Start device discovery/inquiry with more parameters.

参数:
  • param[in] Parameters for inquiry condition

返回:

int8_t

void bt_interface_stop_inquiry(void)

Stop device discovery/inquiry.

bt_err_t bt_interface_conn_ext(unsigned char *mac, bt_profile_t ext_profile)

Initiate connect with the specified device and profile(hf sink)

参数:
  • mac[in] Remote device address

  • ext_profile[in] Profile value

返回:

bt_err_t

bt_err_t bt_interface_conn_to_source_ext(unsigned char *mac, bt_profile_t ext_profile)

Initiate connect with the specified device and profile(ag source)

参数:
  • mac[in] Remote device address

  • ext_profile[in] Profile value

返回:

bt_err_t

bt_err_t bt_interface_disc_ext(unsigned char *mac, bt_profile_t ext_profile)

Disconnect with the specified profile.

参数:
  • mac[in] Remote device address

  • ext_profile[in] : Profile value

返回:

bt_err_t

              BT_ERROR_INPARAM            = 0x10000001,  input param error
              BT_ERROR_UNSUPPORTED        = 0x10000002,  unsupported function
              BT_ERROR_TIMEOUT            = 0x10000003,  error timout
              BT_ERROR_DISCONNECTED       = 0x10000004,  the bt device is disconnected
              BT_ERROR_STATE              = 0x10000005,  current state  unsupported this function
              BT_ERROR_PARSING            = 0x10000006,  parsing at response error
              BT_ERROR_POWER_OFF          = 0x10000007,  current bt device has been power off
              BT_ERROR_NOTIFY_CB_FULL     = 0x10000008,  register notify cb is more than BT_MAX_EVENT_NOTIFY_CB_NUM
              BT_ERROR_DEVICE_EXCEPTION   = 0x10000009,  current bt device has happend exception
              BT_ERROR_RESP_FAIL          = 0x10000010,  at cmd response fail
              BT_ERROR_AVRCP_NO_REG       = 0x10000011,  set absolute volume, but remote device dont register the event
              BT_ERROR_IN_PROGRESS        = 0x10000012,  for non-blocking processing, wait until the corresponding event is reported
              BT_ERROR_OUT_OF_MEMORY      = 0x10000013,  System heap is not enough

int8_t bt_interface_cancel_connect_req(unsigned char *mac)

Cancel with the specified device.

参数:
  • mac[in] Remote device address

返回:

int8_t

int8_t bt_interface_disconnect_req(unsigned char *mac)

Disconnect with the specified device.

参数:
  • mac[in] Remote device address

返回:

int8_t

void bt_interface_set_local_name(int len, void *data)

Change local name.

参数:
  • len[in] Name length

  • data[in] Name

void bt_interface_rd_local_name(void)

Read local name request.

void bt_interface_rd_local_bd_addr(void)

Read local address request.

void bt_interface_exit_sniff_mode(void)

exit sniff mode

void bt_interface_rd_local_rssi(unsigned char *mac)

Read rssi with the specified device.

参数:
  • mac[in] Remote device address

U8 bt_interface_get_current_scan_mode(void)

Read bluetooth’s current scan mode.

返回:

Bluetooth scan mode

uint8_t bt_addr_convert(BTS2S_BD_ADDR *src_addr, uint8_t *addr)

Bluetooth address covert.

参数:
  • src_addr[in] BTS2S_BD_ADDR to uint8_t

  • addr[out] Device mac address (eg:uint8_t mac[6] = {11,22,33,44,55,66})

返回:

uint8_t

BTS2S_BD_ADDR *bt_interface_this_connect_addr(unsigned char *mac)

Read connected address with the type of BTS2S_BD_ADDR.

参数:
  • mac[in] Device mac address(eg:char mac[6] = {11,22,33,44,55,66})

返回:

BTS2S_BD_ADDR

void bt_interface_acl_accept_role_set(U8 role)

Set the local role when acl connection is received.

参数:
  • role[in] Role to be set when acl connection is received

void bt_interface_set_linkpolicy(U16 lp_in, U16 lp_out)

Set the local link policy.

参数:
  • lp_in[in] Link policy to be set

  • lp_out[in] Link policy to be set

void bt_interface_set_sniff_enable(BOOL enable)

Set whether sniff mode is turned on.

参数:
  • enable[in] Whether the flag of sniff mode is enabled or not

void bt_interface_open_avsink(void)

Open the function of a2dp sink.

bt_err_t bt_interface_close_avsink(void)

Close the function of a2dp sink.

返回:

Return whether closing succeeded

void bt_interface_set_a2dp_bqb_test(U8 value)

Set a2dp bqb test model flag.

参数:
  • value[in] A2dp bqb test-case number

void bt_interface_set_audio_device(U8 device_type)

Set audio device type.

参数:
  • device_type[in] Audio device type

U8 bt_interface_get_current_audio_device(void)

Get current audio device type.

返回:

Return current audio device type

U8 bt_interface_get_receive_a2dp_start(void)

Check whether the a2dp start command sent by the mobile phone has been received.

返回:

Return results

void bt_interface_release_a2dp(void)

release a2dp media channel

void bt_interface_unregister_av_snk_sdp(void)

unregister a2dp sink sdp record

void bt_interface_register_av_snk_sdp(void)

register a2dp sink sdp record

void bt_interface_open_avrcp(void)

Open the function of avrcp profile.

void bt_interface_close_avrcp(void)

Close the function of avrcp profile.

void bt_interface_phone_play_next(void)

Control the phone to switch to the next music.

void bt_interface_phone_play(void)

Control the mobile phone to play music.

void bt_interface_phone_play_pause(void)

Control the mobile phone to suspend music.

void bt_interface_phone_play_stop(void)

Control the mobile phone to stop music.

void bt_interface_avrcp_volume_up(void)

Control the phone to turn up the volume.

void bt_interface_avrcp_volume_down(void)

Control the phone to turn down the volume.

void bt_interface_phone_play_previous(void)

Control the phone to switch to the previous music.

bt_err_t bt_interface_avrcp_volume_changed(U8 volume)

Adjust the volume of mobile phone through avrcp.

参数:
  • volume[in] The volume value you want to adjust

返回:

The result of adjusting the volume

bt_err_t bt_interface_set_absolute_volume(U8 volume)

Adjust the absolute volume by avrcp command.

参数:
  • volume[in] The volume value you want to adjust

void bt_interface_set_avrcp_playback_status(U8 playback_status)

Set the playback status of avrcp.

参数:
  • playback_status[in] The playback status of avrcp

void bt_interface_set_can_play(void)

Get the playback status of avrcp.

U8 bt_interface_get_avrcp_playback_status(void)

Get the playback status of avrcp.

返回:

The playback status of avrcp

void bt_interface_open_hid(void)

Open the function of hid profile.

void bt_interface_close_hid(void)

Close the function of hid profile.

void bt_interface_set_hid_device(U8 is_ios)

Set whether the peer device is an ios device.

参数:
  • is_ios[in] IOS device flag

void bt_interface_phone_drag_up(void)

Control the mobile phone to page up.

void bt_interface_phone_drag_down(void)

Control the mobile phone to page down.

void bt_interface_phone_once_click(void)

Control mobile phone click once.

void bt_interface_phone_double_click(void)

Control mobile phone click twice.

void bt_interface_phone_take_picture(void)

Control mobile phone take a picture.

void bt_interface_phone_volume_down(void)

Control the phone to lower the volume.

void bt_interface_add_hid_descriptor(U8 *data, U8 len)

Add hid descriptor.

参数:
  • data[in] The pointer of hid descriptor

  • len[in] The length of hid descriptor

bt_err_t bt_interface_spp_send_data(U8 *data, U16 len, BTS2S_BD_ADDR *bd_addr, U8 srv_chl)

Send data through spp.

参数:
  • data[in] The pointer of spp data

  • len[in] The length of spp data

  • bd_addr[in] The pointer of bd address

  • srv_chl[in] The service channel of spp

返回:

The results of send spp data

bt_err_t bt_interface_add_spp_uuid(U8 *uuid, U8 uuid_len, char *srv_name)

Add spp uuid.

参数:
  • uuid[in] The pointer of spp uuid

  • uuid_len[in] The length of spp uuid

  • srv_name[in] The service name of spp uuid

bt_err_t bt_interface_spp_srv_data_rsp(BTS2S_BD_ADDR *bd_addr, U8 srv_chl)

Send spp data response.

参数:
  • bd_addr[in] The pointer of bd address

  • srv_chl[in] The service channel of spp

返回:

The results of send spp data response

bt_err_t bt_interface_dis_spp_by_addr_and_chl(BTS2S_BD_ADDR *bd_addr, U8 srv_chl)

Disconnect spp by bd address and service channel.

参数:
  • bd_addr[in] The pointer of bd address

  • srv_chl[in] The service channel of spp

返回:

The results of disconnect spp

bt_err_t bt_interface_dis_spp_all(void)

Disconnect all connected spp.

返回:

The results of disconnect spp

void bt_interface_bt_gatt_reg(br_att_sdp_data_t *sdp_info)

This function register gatt’s sdp_info.

参数:
  • sdp_info[in] BLE gatt UUID information

返回:

void

void bt_interface_bt_gatt_unreg(U32 sdp_hdl)

This function unregister gatt’s sdp_info.

参数:
  • sdp_hdl[in] Sdp_hdl is the value when gatt_sdp_register callback

返回:

void

void bt_interface_bt_gatt_mtu_changed(U16 mtu)

Change l2cap config MTU para.

参数:
  • mtu[in] MTU value

返回:

void

void bt_interface_phone_state_changed(HFP_CALL_INFO_T *call_info)

Update phone call state.

参数:
  • call_info[in] Call information

返回:

void

void bt_interface_local_phone_info_res(hfp_phone_number_t *local_phone_num)

Send subscriber number response for AT+CNUM.

参数:
  • local_phone_num[in] Local phone number information

返回:

void

void bt_interface_remote_call_info_res(hfp_remote_calls_info_t *calls_info)

Response for all call info request(AT+CLCC)

参数:
  • calls_info[in] All call information

返回:

void

void bt_interface_get_all_indicator_info_res(hfp_cind_status_t *cind_status)

Response all indicators information for remote device.

参数:
  • cind_status[in] All indicators information

返回:

void

void bt_interface_indicator_status_changed(HFP_IND_INFO_T *ind_info)

Update indicator status.

参数:
  • ind_info[in] indicator information

返回:

void

void bt_interface_spk_vol_change_req(U8 vol)

Update speaker volume.

参数:
  • vol[in] Volume value

返回:

void

void bt_interface_mic_vol_change_req(U8 vol)

Update microphone volume.

参数:
  • vol[in] Volume value

返回:

void

void bt_interface_make_call_res(U8 res)

The response of make_call request.

参数:
  • res[in] OK (0)/ERROR (1)

返回:

void

bt_err_t bt_interface_ag_audio_switch(bt_hfp_audio_switch_t *audio)

Create/Close an audio connection.

参数:
  • bt_hfp_audio_switch_t[in]

返回:

bt_err_t

bt_err_t bt_interface_hfp_hf_start_connecting(unsigned char *mac)

Connect hf profile request.

参数:
  • mac[in] Connect with the specified device address

返回:

bt_err_t

bt_err_t bt_interface_get_ph_num(void)

Get subscriber information request.

返回:

bt_err_t

bt_err_t bt_interface_get_remote_ph_num(void)

Get all call information request.

返回:

bt_err_t

bt_err_t bt_interface_get_remote_call_status(void)

Get current call status (only CIEV) request.

返回:

bt_err_t

bt_err_t bt_interface_hf_out_going_call(int len, void *data)

Place a call using number.

参数:
  • len[in] Phone number length

  • data[in] Phone number

返回:

bt_err_t

bt_err_t bt_interface_start_last_num_dial_req_send(void)

Place call to last dialed number.

返回:

bt_err_t

bt_err_t bt_interface_start_hf_answer_req_send(void)

Answer a call.

返回:

bt_err_t

bt_err_t bt_interface_handup_call(void)

Hang up a call.

返回:

bt_err_t

bt_err_t bt_interface_start_dtmf_req_send(char key)

Transmit DTMF tone.

参数:
  • key[in] DTMF tone

返回:

bt_err_t

bt_err_t bt_interface_hf_3way_hold(bt_3way_coded_t cmd, int idx)

Call hold and multiparty handling AT command.

1 = Releases all active calls (if any exist) and accepts the other (held or waiting) call. 1(idx) = Releases specified active call only ((idx)).

2 = Places all active calls (if any exist) on hold and accepts the other (held or waiting) call. 2(idx) = Request private consultation mode with specified call ((idx)). (Place all calls on hold EXCEPT the call indicated by (idx).)

3 = Adds a held call to the conversation.

4 = Connects the two calls and disconnects the subscriber from both calls (Explicit Call Transfer). Support for this value and its associated functionality is optional for the HF.

参数:
  • cmd[in] this specification only covers values for (n) of 0, 1, 1(idx), 2, 2(idx), 3 and 4, where: 0 = Releases all held calls or sets User Determined User Busy (UDUB) for a waiting call.

  • idx[in] current call index

返回:

bt_err_t

bt_err_t bt_interface_hf_3way_btrh(bt_3way_incom_t cmd)

Query response and hold status.

参数:
  • cmd[in] cmd

返回:

bt_err_t

bt_err_t bt_interface_hf_3way_ccwa(unsigned int enable)

Call waiting notification control.

参数:
  • enable[in] Enable(1)/Disable(0)call waiting notification

返回:

bt_err_t

bt_err_t bt_interface_voice_recog(uint8_t flag)

Voice recognition control.

参数:
  • flag[in] Enable(1)/Disable(0)voice recognition

返回:

bt_err_t

bt_err_t bt_interface_audio_switch(U8 type)

Create/Close an audio connection.

参数:
  • type[in] Create(0)/Close(1) an audio connection

返回:

bt_err_t

bt_err_t bt_interface_set_speaker_volume(int volume)

Speaker volume control.

参数:
  • volume[in] Volume value

返回:

bt_err_t

bt_err_t bt_interface_hf_update_battery(U8 batt_val)

Update device battery value.

参数:
  • batt_val[in] Current battery value

返回:

bt_err_t

bt_err_t bt_interface_set_wbs_status(U8 status)

Codec negotiation control.

参数:
  • status[in] Enable(1)/Disable(0)codec negotiation

返回:

bt_err_t

void bt_interface_bt_event_notify(uint16_t type, uint16_t event_id, void *data, uint16_t data_len)

BT event notify callback function.

参数:
  • type[in] Event module_id

  • event_id[in] Event identifier

  • data[in] Event result

  • data_len[in] Event result data length

返回:

void

bt_interface_status_t bt_interface_register_bt_event_notify_callback(register_bt_notify_func_t func)

This function is called to register to bt notify callback.

参数:
  • func[in] Need register function

返回:

bt_interface_status_t

bt_interface_status_t bt_interface_unregister_bt_event_notify_callback(register_bt_notify_func_t func)

This function is called to unregister to bt notify callback.

参数:
  • func[in] Need unregister function

返回:

bt_interface_status_t

struct bt_notify_register_callback_t

Public Members

register_bt_notify_func_t function
struct bt_notify_register_callback_t *next

bts2_app_interface_type.h

Author

Sifli software development team

Defines

BT_NOTIFY_PBAP_MAX_VCARD_ENTRY_HANDLE_SIZE
BT_NOTIFY_PBAP_MAX_VCARD_CONTACT_NAME_SIZE
BT_NOTIFY_MAX_FRIENDLY_NAME_LEN

Enums

enum bt_notify_type_id_t

these type are bt callback type_id

Values:

enumerator BT_NOTIFY_COMMON

BT common event notify type.

enumerator BT_NOTIFY_HFP_HF

HFP HF profle event notify type.

enumerator BT_NOTIFY_HFP_AG

HFP AG profle event notify type.

enumerator BT_NOTIFY_A2DP

A2DP profle event notify type.

enumerator BT_NOTIFY_AVRCP

AVRCP profle event notify type.

enumerator BT_NOTIFY_HID

HID profle event notify type.

enumerator BT_NOTIFY_PAN

PAN profle event notify type.

enumerator BT_NOTIFY_SPP

SPP profle event notify type.

enumerator BT_NOTIFY_GATT

BT GATT profle event notify type.

enumerator BT_NOTIFY_PBAP

PBAP profle event notify type.

enum bt_notify_common_event_id_t

these type are BT_NOTIFY_COMMON event id

Values:

enumerator BT_NOTIFY_COMMON_BT_STACK_READY

BT stack ready event.

enumerator BT_NOTIFY_COMMON_CLOSE_COMPLETE

close bt function complete event

enumerator BT_NOTIFY_COMMON_DISCOVER_IND

inquiry response event

enumerator BT_NOTIFY_COMMON_INQUIRY_CMP

inquiry complete event

enumerator BT_NOTIFY_COMMON_LOCAL_NAME_RSP

read local name complete event

enumerator BT_NOTIFY_COMMON_REMOTE_NAME_RSP

read remote name complete event

enumerator BT_NOTIFY_COMMON_LOCAL_RSSI_RSP

read local RSSI complete event

enumerator BT_NOTIFY_COMMON_LOCAL_ADDR_RSP

read local address complete event

enumerator BT_NOTIFY_COMMON_CHANGE_ADDR_RSP

change local address complete event

enumerator BT_NOTIFY_COMMON_RMT_VERSION_IND

read remote version complete event

enumerator BT_NOTIFY_COMMON_ENCRYPTION

encryption complete event

enumerator BT_NOTIFY_COMMON_KEY_MISSING

notift link key missing event

enumerator BT_NOTIFY_COMMON_KEY_OVERLAID

notift link key overlaid event

enumerator BT_NOTIFY_COMMON_PAIR_IND

pair complete event

enumerator BT_NOTIFY_COMMON_PAIR_STATE

receive pair request event

enumerator BT_NOTIFY_COMMON_ACL_CONNECT_IND

receive acl connect request from remote device

enumerator BT_NOTIFY_COMMON_ACL_CONNECTED

acl connection complete event

enumerator BT_NOTIFY_COMMON_ACL_DISCONNECTED

acl disconnection complete event

enumerator BT_NOTIFY_COMMON_SCO_CONNECTED

sco connection complete event

enumerator BT_NOTIFY_COMMON_SCO_DISCONNECTED

sco disconnection complete event

enumerator BT_NOTIFY_COMMON_USER_CONFIRM_IND

user confirm event

enumerator BT_NOTIFY_COMMON_IO_CAPABILITY_IND

receive io capability request event

enum bt_notify_hfp_hf_event_id_t

these type are BT_NOTIFY_HFP_HF event id

Values:

enumerator BT_NOTIFY_HF_PROFILE_CONNECTED

HFP HF profile connection complete event.

enumerator BT_NOTIFY_HF_PROFILE_DISCONNECTED

HFP HF profile disconnection complete event.

enumerator BT_NOTIFY_HF_VOICE_RECOG_CAP_UPDATE

HFP HF profile voice recognition capability status update event.

enumerator BT_NOTIFY_HF_VOICE_RECOG_STATUS_CHANGE

HFP HF profile voice recognition status change event.

enumerator BT_NOTIFY_HF_LOCAL_PHONE_NUMBER

HFP HF profile local phone number event.

enumerator BT_NOTIFY_HF_REMOTE_CALL_INFO_IND

HFP HF profile remote phone information event.

enumerator BT_NOTIFY_HF_VOLUME_CHANGE

HFP HF profile voice speaker volume change event.

enumerator BT_NOTIFY_HF_CALL_STATUS_UPDATE

HFP HF profile call status change event.

enumerator BT_NOTIFY_HF_INDICATOR_UPDATE

HFP HF profile indicator status change event.

enumerator BT_NOTIFY_HF_AT_CMD_CFM

HFP HF profile at cmd send result event.

enum bt_notify_hfp_ag_event_id_t

these type are BT_NOTIFY_HFP_AG event id

Values:

enumerator BT_NOTIFY_AG_PROFILE_CONNECTED

HFP AG profile connection complete event.

enumerator BT_NOTIFY_AG_PROFILE_DISCONNECTED

HFP AG profile disconnection complete event.

enumerator BT_NOTIFY_AG_MAKE_CALL_REQ

HFP AG profile receive make call request event.

enumerator BT_NOTIFY_AG_ANSWER_CALL_REQ

HFP AG profile receive answer call request event.

enumerator BT_NOTIFY_AG_HANGUP_CALL_REQ

HFP AG profile receive hangup call request event.

enumerator BT_NOTIFY_AG_RECV_DTMF_KEY

HFP AG profile receive dtmf key request event.

enumerator BT_NOTIFY_AG_VOLUME_CHANGE

HFP AG profile receive speaker volume change event.

enumerator BT_NOTIFY_AG_GET_INDICATOR_STATUS_REQ

HFP AG profile receive get indicator status request event.

enumerator BT_NOTIFY_AG_GET_ALL_REMT_CALLS_INFO_REQ

HFP AG profile receive get all remote call information request event.

enumerator BT_NOTIFY_AG_GET_LOCAL_PHONE_INFO_REQ

HFP AG profile receive get local phone number request event.

enumerator BT_NOTIFY_AG_EXTERN_AT_CMD_KEY_REQ

HFP AG profile receive extern at cmd event.

enum bt_notify_a2dp_event_id_t

these type are BT_NOTIFY_A2DP event id

Values:

enumerator BT_NOTIFY_AVSNK_CLOSE_COMPLETE

A2DP sink function close complete event.

enumerator BT_NOTIFY_AVSNK_OPEN_COMPLETE

A2DP sink function open complete event.

enumerator BT_NOTIFY_A2DP_PROFILE_CONNECTED

A2DP profile connection complete event.

enumerator BT_NOTIFY_A2DP_PROFILE_DISCONNECTED

A2DP profile disconnection complete event.

enumerator BT_NOTIFY_A2DP_START_IND

receive a2dp start command from remote device indication event

enum bt_notify_avrcp_event_id_t

these type are BT_NOTIFY_AVRCP event id

Values:

enumerator BT_NOTIFY_AVRCP_CLOSE_COMPLETE

AVRCP function close complete event.

enumerator BT_NOTIFY_AVRCP_OPEN_COMPLETE

AVRCP function open complete event.

enumerator BT_NOTIFY_AVRCP_PROFILE_CONNECTED

AVRCP profile connection complete event.

enumerator BT_NOTIFY_AVRCP_PROFILE_DISCONNECTED

AVRCP profile disconnection complete event.

enumerator BT_NOTIFY_AVRCP_MP3_DETAIL_INFO

get music information event

enumerator BT_NOTIFY_AVRCP_VOLUME_CHANGED_REGISTER

peer device register the absolute volume change notify event

enumerator BT_NOTIFY_AVRCP_ABSOLUTE_VOLUME

peer device adjusts the absolute volume event

enumerator BT_NOTIFY_AVRCP_PLAY_STATUS

play status changed event

enumerator BT_NOTIFY_AVRCP_SONG_PROGREAS_STATUS

play progress change event

enumerator BT_NOTIFY_AVRCP_TRACK_CHANGE_STATUS

play song change event

enum bt_notify_hid_event_id_t

these type are BT_NOTIFY_HID event id

Values:

enumerator BT_NOTIFY_HID_CLOSE_COMPLETE

HID function close complete event.

enumerator BT_NOTIFY_HID_OPEN_COMPLETE

HID function open complete event.

enumerator BT_NOTIFY_HID_PROFILE_CONNECTED

HID profile connection complete event.

enumerator BT_NOTIFY_HID_PROFILE_DISCONNECTED

HID profile disconnection complete event.

enum bt_notify_spp_event_id_t

these type are BT_NOTIFY_SPP event id

Values:

enumerator BT_NOTIFY_SPP_PROFILE_CONNECTED

SPP profile connection complete event.

enumerator BT_NOTIFY_SPP_PROFILE_DISCONNECTED

SPP profile disconnection complete event.

enumerator BT_NOTIFY_SPP_CONN_IND

receive spp connect request event

enumerator BT_NOTIFY_SPP_DATA_IND

receive spp data event

enumerator BT_NOTIFY_SPP_DATA_CFM

send spp response event

enumerator BT_NOTIFY_SPP_DISC_IND

certain spp disconnection event

enum bt_notify_pan_event_id_t

these type are BT_NOTIFY_PAN event id

Values:

enumerator BT_NOTIFY_PAN_PROFILE_CONNECTED

PAN profile connection complete event.

enumerator BT_NOTIFY_PAN_PROFILE_DISCONNECTED

PAN profile disconnection complete event.

enum bt_notify_gatt_event_id_t

these type are BT_NOTIFY_GATT event id

Values:

enumerator BT_NOTIFY_GATT_PROFILE_CONNECTED

GATT profile connection complete event.

enumerator BT_NOTIFY_GATT_PROFILE_DISCONNECTED

GATT profile disconnection complete event.

enumerator BT_NOTIFY_GATT_REGISTER_RESPONSE

GATT profile register status update event.

enumerator BT_NOTIFY_GATT_UNREGISTER_RESPONSE

GATT profile unregister status update event.

enumerator BT_NOTIFY_GATT_CHANGE_MTU_RESPONSE

GATT profile change mtu value result event.

enum bt_notify_pbap_event_id_t

these type are BT_NOTIFY_PBAP event id

Values:

enumerator BT_NOTIFY_PBAP_PROFILE_CONNECTED

PBAP profile connection complete event.

enumerator BT_NOTIFY_PBAP_PROFILE_DISCONNECTED

PBAP profile disconnection complete event.

enumerator BT_NOTIFY_PBAP_VCARD_LIST_ITEM_IND

PBAP profile vCard list event.

enumerator BT_NOTIFY_PBAP_VCARD_LIST_CMPL

PBAP profile vCard list complete event.

struct bt_start_inquiry_ex_t
#include <bts2_app_interface_type.h>

Inquiry parameters.

Public Members

uint32_t dev_cls_mask

Device class mask, A device with a specific Class of Device responded to the Inquiry process. 0 is used for unlimited class of device

uint16_t max_timeout

Maxium amount of time specified before the inquiry procedure halted with SECOND. 0 is used for unlimited time

uint8_t max_rsp

Maxium number of responses from the inquiry before the inquiry is halted. 0 is used for unlimited number of responses

struct bt_notify_device_mac_t
#include <bts2_app_interface_type.h>

bt device mac information

Public Members

uint8_t addr[6]

bt device mac

struct bt_notify_pair_confirm_t
#include <bts2_app_interface_type.h>

bt device pair confirm information

Public Members

bt_notify_device_mac_t mac

bt device mac

uint32_t num_val

passkey val

struct bt_notify_rmt_version_t
#include <bts2_app_interface_type.h>

bt remote device version information

Public Members

uint8_t res

read remote device version status

uint8_t lmp_version

remote LMP version status

uint16_t manufacturer_name

remote device manufacturer mame

uint16_t lmp_subversion

remote device lmp subversion

struct bt_notify_remote_device_info_t
#include <bts2_app_interface_type.h>

bt inquiry remote device information

Public Members

bt_notify_device_mac_t mac

remote bt device mac

uint32_t dev_cls

remote bt class of device

uint8_t name_size

remote device name size

char bt_name[(60) + 1]

remote device name,utf8

struct bt_notify_rmt_name_t
#include <bts2_app_interface_type.h>

bt read remote device name information

Public Members

bt_notify_device_mac_t mac

remote bt device mac

uint8_t res

read remote bt device name result

char bt_name[(60) + 1]

remote device name

struct bt_notify_device_base_info_t
#include <bts2_app_interface_type.h>

bt remote device acl connection state base information

Public Members

bt_notify_device_mac_t mac

remote device mac

uint8_t res

reason

struct bt_notify_profile_state_info_t
#include <bts2_app_interface_type.h>

bt profile connection state information

Public Members

bt_notify_device_mac_t mac

remote device mac

uint8_t profile_type

profile type

uint8_t res

reason

struct bt_notify_device_acl_conn_info_t
#include <bts2_app_interface_type.h>

bt acl connection state information

Public Members

bt_notify_device_mac_t mac

remote device mac

uint8_t res

reason

uint8_t acl_dir

acl connect direction

uint32_t dev_cls

remote device class of device

struct bt_notify_device_sco_info_t
#include <bts2_app_interface_type.h>

bt sco connection state information

Public Members

uint8_t sco_type

bt sco connection type:AG or HF or L2CAP

uint8_t sco_res

reason

struct bt_notify_at_cmd_cfm_t
#include <bts2_app_interface_type.h>

HFP HF at cmd send result.

Public Members

uint8_t at_cmd_id

at cmd identify

uint8_t res

result

struct bt_notify_cind_ind_t
#include <bts2_app_interface_type.h>

HFP HF indicator status.

Public Members

uint8_t type

indicator type

uint8_t val

indicator value

struct bt_notify_all_call_status
#include <bts2_app_interface_type.h>

HFP HF call information.

Public Members

uint8_t call_status

call status

uint8_t callsetup_status

callsetup status

uint8_t callheld_status

call held status

struct bt_notify_clcc_ind_t
#include <bts2_app_interface_type.h>

HFP HF remote call detail information.

Public Members

uint16_t phone_number_type

phone number type

uint8_t idx

Current call index, counting from 1.

uint8_t dir

Telephone direction 0:outgoing 1:incoming.

uint8_t st

Telephone direction 0:outgoing 1:incoming.

uint8_t mode

Telephone mode£¬0 (Voice), 1 (Data), 2 (FAX)

uint8_t mpty

Multiparty call identification 0: not multiparty call 1:multiparty call.

uint8_t number_size

phone number size

uint8_t number[23]

phone number

struct bt_notify_gatt_sdp_info_t
#include <bts2_app_interface_type.h>

GATT register or unregister result.

Public Members

uint32_t sdp_rec_hdl

sdp record handler

uint8_t res

result

struct bt_notify_pbap_vcard_listing_item_t
#include <bts2_app_interface_type.h>

PABP vcard name result.

Public Members

uint8_t vcard_handle_len

vcard handle length

uint8_t name_len

vcard name length

char vcard_handle[(42) + 1]

vcard handle

char vcard_name[(80) + 1]

vcard name

union SPP_UUID

Public Members

uint8_t uuid_16[2]
uint8_t uuid_32[4]
uint8_t uuid_128[16]
struct bt_notify_spp_data_ind_t
#include <bts2_app_interface_type.h>

received spp data information

Public Members

bt_notify_device_mac_t mac

the address of the device that sent the data

uint8_t srv_chl

the service channel of spp connection that sent the data

SPP_UUID uuid

the uuid of spp connection that sent the data

uint8_t uuid_len

the uuid length of spp connection that sent the data

uint16_t payload_len

payload length

uint8_t payload[1]

payload pointer

struct bt_notify_spp_conn_ind_t
#include <bts2_app_interface_type.h>

spp connection information

Public Members

bt_notify_device_mac_t mac

the address of the connected device

uint8_t srv_chl

the service channel of the connected device

SPP_UUID uuid

the uuid of spp connection that sent the data

uint8_t uuid_len

the uuid length of spp connection that sent the data

uint16_t mfs

the mtu size of the connected device

struct bt_notify_spp_data_cfm_t
#include <bts2_app_interface_type.h>

spp data response confirm information

Public Members

bt_notify_device_mac_t mac

the address of the connected device

uint8_t srv_chl

the service channel of the connected device

SPP_UUID uuid

the uuid of the connected device

uint8_t uuid_len

the uuid length of spp connection that sent the data

struct bt_notify_spp_disc_ind_t
#include <bts2_app_interface_type.h>

spp disconnection information

Public Members

bt_notify_device_mac_t mac

the address of the disconnected device

uint8_t srv_chl

the service channel of the disconnected device

SPP_UUID uuid

the uuid of the disconnected device

uint8_t uuid_len

the uuid length of spp connection that sent the data