Android Hardware Abstraction Layer
Data Fields
bt_interface_t Struct Reference

#include <bluetooth.h>

Data Fields

size_t size
 
int(* init )(bt_callbacks_t *callbacks)
 
int(* enable )(void)
 
int(* disable )(void)
 
void(* cleanup )(void)
 
int(* get_adapter_properties )(void)
 
int(* get_adapter_property )(bt_property_type_t type)
 
int(* set_adapter_property )(const bt_property_t *property)
 
int(* get_remote_device_properties )(bt_bdaddr_t *remote_addr)
 
int(* get_remote_device_property )(bt_bdaddr_t *remote_addr, bt_property_type_t type)
 
int(* set_remote_device_property )(bt_bdaddr_t *remote_addr, const bt_property_t *property)
 
int(* get_remote_service_record )(bt_bdaddr_t *remote_addr, bt_uuid_t *uuid)
 
int(* get_remote_services )(bt_bdaddr_t *remote_addr)
 
int(* start_discovery )(void)
 
int(* cancel_discovery )(void)
 
int(* create_bond )(const bt_bdaddr_t *bd_addr)
 
int(* remove_bond )(const bt_bdaddr_t *bd_addr)
 
int(* cancel_bond )(const bt_bdaddr_t *bd_addr)
 
int(* pin_reply )(const bt_bdaddr_t *bd_addr, uint8_t accept, uint8_t pin_len, bt_pin_code_t *pin_code)
 
int(* ssp_reply )(const bt_bdaddr_t *bd_addr, bt_ssp_variant_t variant, uint8_t accept, uint32_t passkey)
 
const void *(* get_profile_interface )(const char *profile_id)
 
int(* dut_mode_configure )(uint8_t enable)
 
int(* dut_mode_send )(uint16_t opcode, uint8_t *buf, uint8_t len)
 
int(* le_test_mode )(uint16_t opcode, uint8_t *buf, uint8_t len)
 
int(* config_hci_snoop_log )(uint8_t enable)
 

Detailed Description

NOTE: By default, no profiles are initialized at the time of init/enable. Whenever the application invokes the 'init' API of a profile, then one of the following shall occur:

1.) If Bluetooth is not enabled, then the Bluetooth core shall mark the profile as enabled. Subsequently, when the application invokes the Bluetooth 'enable', as part of the enable sequence the profile that were marked shall be enabled by calling appropriate stack APIs. The 'adapter_properties_cb' shall return the list of UUIDs of the enabled profiles.

2.) If Bluetooth is enabled, then the Bluetooth core shall invoke the stack profile API to initialize the profile and trigger a 'adapter_properties_cb' with the current list of UUIDs including the newly added profile's UUID.

The reverse shall occur whenever the profile 'cleanup' APIs are invokedRepresents the standard Bluetooth DM interface.

Definition at line 365 of file bluetooth.h.

Field Documentation

int(* cancel_bond)(const bt_bdaddr_t *bd_addr)

Cancel Bond

Definition at line 426 of file bluetooth.h.

int(* cancel_discovery)(void)

Cancel Discovery

Definition at line 417 of file bluetooth.h.

void(* cleanup)(void)

Closes the interface.

Definition at line 381 of file bluetooth.h.

int(* config_hci_snoop_log)(uint8_t enable)

Definition at line 455 of file bluetooth.h.

int(* create_bond)(const bt_bdaddr_t *bd_addr)

Create Bluetooth Bonding

Definition at line 420 of file bluetooth.h.

int(* disable)(void)

Disable Bluetooth.

Definition at line 378 of file bluetooth.h.

int(* dut_mode_configure)(uint8_t enable)

Bluetooth Test Mode APIs - Bluetooth must be enabled for these APIs

Definition at line 446 of file bluetooth.h.

int(* dut_mode_send)(uint16_t opcode, uint8_t *buf, uint8_t len)

Definition at line 449 of file bluetooth.h.

int(* enable)(void)

Enable Bluetooth.

Definition at line 375 of file bluetooth.h.

int(* get_adapter_properties)(void)

Get all Bluetooth Adapter properties at init

Definition at line 384 of file bluetooth.h.

int(* get_adapter_property)(bt_property_type_t type)

Get Bluetooth Adapter property of 'type'

Definition at line 387 of file bluetooth.h.

const void*(* get_profile_interface)(const char *profile_id)

Get Bluetooth profile interface

Definition at line 442 of file bluetooth.h.

int(* get_remote_device_properties)(bt_bdaddr_t *remote_addr)

Get all Remote Device properties

Definition at line 396 of file bluetooth.h.

int(* get_remote_device_property)(bt_bdaddr_t *remote_addr, bt_property_type_t type)

Get Remote Device property of 'type'

Definition at line 399 of file bluetooth.h.

int(* get_remote_service_record)(bt_bdaddr_t *remote_addr, bt_uuid_t *uuid)

Get Remote Device's service record for the given UUID

Definition at line 407 of file bluetooth.h.

int(* get_remote_services)(bt_bdaddr_t *remote_addr)

Start SDP to get remote services

Definition at line 411 of file bluetooth.h.

int(* init)(bt_callbacks_t *callbacks)

Opens the interface and provides the callback routines to the implemenation of this interface.

Definition at line 372 of file bluetooth.h.

int(* le_test_mode)(uint16_t opcode, uint8_t *buf, uint8_t len)

BLE Test Mode APIs

Definition at line 452 of file bluetooth.h.

int(* pin_reply)(const bt_bdaddr_t *bd_addr, uint8_t accept, uint8_t pin_len, bt_pin_code_t *pin_code)

BT Legacy PinKey Reply If accept==FALSE, then pin_len and pin_code shall be 0x0

Definition at line 430 of file bluetooth.h.

int(* remove_bond)(const bt_bdaddr_t *bd_addr)

Remove Bond

Definition at line 423 of file bluetooth.h.

int(* set_adapter_property)(const bt_property_t *property)

Set Bluetooth Adapter property of 'type'

Definition at line 393 of file bluetooth.h.

int(* set_remote_device_property)(bt_bdaddr_t *remote_addr, const bt_property_t *property)

Set Remote Device property of 'type'

Definition at line 403 of file bluetooth.h.

size_t size

set to sizeof(bt_interface_t)

Definition at line 367 of file bluetooth.h.

int(* ssp_reply)(const bt_bdaddr_t *bd_addr, bt_ssp_variant_t variant, uint8_t accept, uint32_t passkey)

BT SSP Reply - Just Works, Numeric Comparison and Passkey passkey shall be zero for BT_SSP_VARIANT_PASSKEY_COMPARISON & BT_SSP_VARIANT_CONSENT For BT_SSP_VARIANT_PASSKEY_ENTRY, if accept==FALSE, then passkey shall be zero

Definition at line 438 of file bluetooth.h.

int(* start_discovery)(void)

Start Discovery

Definition at line 414 of file bluetooth.h.


The documentation for this struct was generated from the following file: