Package: android.hardware.bluetooth@1.0

IBluetoothHci

interface IBluetoothHci

The Host Controller Interface(HCI)is the layer defined by the Bluetooth specification between the software that runs on the host and the Bluetooth controller chip.This boundary is the natural choice for a Hardware Abstraction Layer(HAL). Dealing only in HCI packets and events simplifies the stack and abstracts away power management, initialization, and other implementation-specific details related to the hardware.

Methods

initialize

initialize (IBluetoothHciCallbacks callback)

Initialize the underlying HCI interface.

This method should be used to initialize any hardware interfaces required to communicate with the Bluetooth hardware in the device.

The |oninitializationComplete| callback must be invoked in response to this function to indicate success before any other function(sendHciCommand, sendAclData, * sendScoData)is invoked on this interface.

Details
Parameters
callback
implements IBluetoothHciCallbacks which will receive callbacks when incoming HCI packets are received from the controller to be sent to the host.
Annotations
entry
callflow
next= { "sendHciCommand" , "sendAclData" , "sendScoData" , "close" }

sendHciCommand

sendHciCommand (HciPacket command)

Send an HCI command(as specified in the Bluetooth Specification V4.2, Vol 2, Part 5, Section 5.4.1)to the Bluetooth controller.Commands must be executed in order.

Details
Parameters
command
is the HCI command to be sent
Annotations
callflow
next= { "sendHciCommand" , "sendAclData" , "sendScoData" , "close" }

sendAclData

sendAclData (HciPacket data)

Send an HCI ACL data packet(as specified in the Bluetooth Specification V4.2, Vol 2, Part 5, Section 5.4.2)to the Bluetooth controller.Packets must be processed in order.

Details
Parameters
data
HCI data packet to be sent
Annotations
callflow
next= { "sendHciCommand" , "sendAclData" , "sendScoData" , "close" }

sendScoData

sendScoData (HciPacket data)

Send an SCO data packet(as specified in the Bluetooth Specification V4.2, Vol 2, Part 5, Section 5.4.3)to the Bluetooth controller.Packets must be processed in order.

Details
Parameters
data
HCI data packet to be sent
Annotations
callflow
next= { "sendHciCommand" , "sendAclData" , "sendScoData" , "close" }

close

close ()

Close the HCI interface

Details
Annotations
exit