fuchsia.bluetooth.hfp

Added: 7

PROTOCOLS

Call

Defined in fuchsia.bluetooth.hfp/hfp.fidl

Controls the lifecycle of a call that has been routed through a headset.

RequestActive

Request that the Call be set to the ONGOING_ACTIVE CallState. This has the side effect of placing all other Calls that are routed to this peer in the ONGOING_HELD call state if it succeeds.

Request

<EMPTY>

RequestHold

Request that the Call be set to the ONGOING_HELD CallState

Request

<EMPTY>

RequestTerminate

Request that the Call be TERMINATED.

Request

<EMPTY>

RequestTransferAudio

Request that the Call's audio be transfered to the Audio Gateway and the call state set to TRANSFERRED_TO_AG.

Request

<EMPTY>

SendDtmfCode

Send a code that the call manager or remote audio gateway peer should transmit to its network connection. The request returns after the code has been transmitted to the network.

Can return an error if the call manager or peer failed to transmit the code to the network.

Request

NameType
code DtmfCode

Response

NameType
payload Call_SendDtmfCode_Result

WatchState

A hanging get method for call state. See the CallState documentation for information on possible states.

Request

<EMPTY>

Response

NameType
state CallState

CallManager

Defined in fuchsia.bluetooth.hfp/hfp.fidl

PeerConnected

Signal that a peer that supports the HFP Hands-Free role is connected.

id is the unique identifier associated with the peer. handle is the channel that the call manager should use to manage a the peer. If the call manager does not intend to handle a given peer, it must close the handle with a ZX_ERR_UNAVAILABLE epitaph.

Multiple concurrent PeerConnected requests can be made by the client. The empty response is used as a flow control mechanism to allow the client to limit the number of pending PeerConnected requests.

Request

NameType
id fuchsia.bluetooth/PeerId
handle server_end<PeerHandler>

Response

<EMPTY>

HandsFree

Defined in fuchsia.bluetooth.hfp/hfp.fidl

Added: 12

WatchPeerConnected

Hanging get that waits for a a peer that supports the HFP Audio Gateway role to connect.

id is the unique identifier associated with the peer.

handle is the channel that the client should use to manage the peer. If the call manager does not intend to handle a given peer. it must close the handle,

Request

<EMPTY>

Response

NameType
payload HandsFree_WatchPeerConnected_Result

HeadsetGain

Defined in fuchsia.bluetooth.hfp/hfp.fidl

Control Headset Speaker and Microphone gain and receive reports of current values as specified in HFP v1.8, Section 4.29. This protocol is served by the Hfp service.

Gain is represented as an absolute value on a scale from 0 to 15. 0 is the minimum gain and 15 is the maximum gain. It is related to a particular (implementation dependent) volume level controlled by the Headset.

Epitaphs:

This channel will be closed with a ZX_ERR_ALREADY_BOUND epitaph if there is already an active HeadsetGain channel.

This channel will be closed with a ZX_ERR_NOT_SUPPORTED epitaph if the Hfp service is not configured to support remote volume control or the peer headset does not support remote volume control. If the channel is closed with this error, the client should not attempt to reopen it using the PeerHandler::GainControl request on the same PeerHandler connection.

This channel will be closed with a ZX_ERR_INVALID_ARGUMENT epitaph if invalid arguments are passed to requests. See documentation on specific requests for more details.

SetMicrophoneGain

Make a request to the Headset to set the microphone gain to requested.

requested must be in the range [0-15] inclusive. Any values outside of this range will result in the channel closing with a ZX_ERR_INVALID_ARGUMENT epitaph.

Request

NameType
requested uint8

SetSpeakerGain

Make a request to the headset to set the speaker gain to requested.

requested must be in the range [0-15] inclusive. Any values outside of this range will result in the channel closing with a ZX_ERR_INVALID_ARGUMENT epitaph.

Request

NameType
requested uint8

WatchMicrophoneGain

Hanging get to watch for updates to the headset microphone gain. Responses represent the current gain value that is set.

The returned gain value will always be in the range [0-15] inclusive.

Request

<EMPTY>

Response

NameType
gain uint8

WatchSpeakerGain

Hanging get to watch for updates to the headset speaker gain. Responses represent the current gain value that is set.

The returned gain value will always be in the range [0-15] inclusive.

Request

<EMPTY>

Response

NameType
gain uint8

Hfp

Defined in fuchsia.bluetooth.hfp/hfp.fidl

Register

Register as the call manager for this device.

There can only be one call manager registered at a time. If one is registered at the time a call to Register is made, the newer CallManager channel will be closed.

A call manager can be unregistered by closing either end of the channel.

Request

NameType
manager CallManager

PeerHandler

Defined in fuchsia.bluetooth.hfp/hfp.fidl

The call manager or the hands-free server component will serve a call handler protocol for each connected headset that it chooses to manage calls through.

If the peer handler is closed by either channel endpoint, all protocols associated with this peer handler are closed. This includes any Call, and HeadsetGain protocols. Channels closed by a server end will include an epitaph ZX_ERR_HANDLE_CLOSED in this situation.

GainControl

Tear off protocol for Headset Gain.

Only one HeadsetGain protocol can be active for a PeerHandler protocol at any given time. Older HeadsetGain protocols are given preference. If a HeadsetGain protocol is active when a new GainControl request is made, the new HeadsetGain protocol will be closed immediately.

Request

NameType
control HeadsetGain

QueryOperator

Request the name of the network operator for the call manager or audio gateway peer. A null value is returned if there is no operator name available.

Request

<EMPTY>

Response

NameType
operator string[16]?

ReportHeadsetBatteryLevel

Headset battery level from 0 ~ 100 See https://www.bluetooth.com/specifications/assigned-numbers/hands-free-profile/

Request

NameType
level uint8

RequestOutgoingCall

Used to request an outgoing call be initiated by the call manager or audio gateway peer. RequestOutgoingCall shall complete after the outgoing call has been initiated and the corresponding Call protocol has been returned via a WatchNextCall result.

An error is returned if the call could not be placed as requested.

  • ZX_ERR_NOT_SUPPORTED can be used if the system does not support the requested action.

  • ZX_ERR_ALREADY_EXISTS can be used if there is alreadya call in progress and the system does not support additional calls.

Request

NameType
action CallAction

Response

NameType
payload PeerHandler_RequestOutgoingCall_Result

SetNrecMode

Request by the HF to enable or disable the Noise Reduction/Echo Cancellation functionality on the AG based on the enabled boolean. A ZX_ERR_NOT_SUPPORTED error is returned if Noice Reduction/Echo Cancellation is not supported by the device.

Request

NameType
enabled bool

Response

NameType
payload PeerHandler_SetNrecMode_Result

SubscriberNumberInformation

Request subscriber numbers from the call manager or audio gateway peer. There can be zero or more numbers returned. Sending more than 128 numbers is not supported at this time.

Request

<EMPTY>

Response

NameType
numbers vector<string>[128]

WatchNetworkInformation

Hanging get to provide the Hfp service with an update on the NetworkInformation. Any fields in update that are not present will be treated as unmodified by the update.

The call manager or audio gateway peer should provide a fully populated update when it is called for the first time.

The most up-to-date NetworkInformation is used during the connection initialization process of the peer, and updates are propagated to the peer if it supports AG Indicators.

Request

<EMPTY>

Response

NameType
update NetworkInformation

WatchNextCall

Hanging get which returns when a new call is initiated by the call manager or audio gateway peer, or an ongoing call is transferred to the headset. RequestOutgoingCall can be called before or after WatchNextCall.

Request

<EMPTY>

Response

NameType
call NextCall

STRUCTS

Call_SendDtmfCode_Response

Defined in fuchsia.bluetooth.hfp/hfp.fidl

<EMPTY>

HandsFree_WatchPeerConnected_Response resource

Defined in fuchsia.bluetooth.hfp/hfp.fidl

FieldTypeDescriptionDefault
id fuchsia.bluetooth/PeerId No default
handle PeerHandler No default

PeerHandler_RequestOutgoingCall_Response

Defined in fuchsia.bluetooth.hfp/hfp.fidl

<EMPTY>

PeerHandler_SetNrecMode_Response

Defined in fuchsia.bluetooth.hfp/hfp.fidl

<EMPTY>

RedialLast

Defined in fuchsia.bluetooth.hfp/hfp.fidl

Represents the action of redialing the last dialed number.

<EMPTY>

TransferActive

Defined in fuchsia.bluetooth.hfp/hfp.fidl

Represents the action of transferring an active call to the Headset.

<EMPTY>

ENUMS

CallDirection strict

Type: uint32

Defined in fuchsia.bluetooth.hfp/hfp.fidl

The direction of call initiation.

NameValueDescription
1

Call originated on this device. This is also known as an Outgoing call.

2

Call is terminated on this device. This is also known as an Incoming call.

CallState flexible

Type: uint32

Defined in fuchsia.bluetooth.hfp/hfp.fidl

Represents the valid states of a call.

NameValueDescription
1

There is a callsetup procedure in progress for an outgoing call. This state should not be set by the Call protocol client. It is the initial state of an unanswered outgoing call.

2

There is a callsetup procedure in progress for an outgoing call and the remote party has been alerted to the callsetup. This state is an optional transition from OUTGOING_DIALING.

3

There is a callsetup procedure in progress for an incoming call.

4

There is a callsetup procedure in progress for an incoming call.

5

A call is in progress but another call is active.

6

A call is active.

7

The call has been termianted.

8

The call has been transferred to the AG, after which the HF is no longer tracking its state.

DtmfCode strict

Type: uint8

Defined in fuchsia.bluetooth.hfp/hfp.fidl

Dual-tone multi-frequency signaling codes.

NameValueDescription
49

Represented by ASCII "1" in AT commands.

50

Represented by ASCII "2" in AT commands.

51

Represented by ASCII "3" in AT commands.

52

Represented by ASCII "4" in AT commands.

53

Represented by ASCII "5" in AT commands.

54

Represented by ASCII "6" in AT commands.

55

Represented by ASCII "7" in AT commands.

56

Represented by ASCII "8" in AT commands.

57

Represented by ASCII "9" in AT commands.

35

Represented by ASCII "#" in AT commands.

48

Represented by ASCII "0" in AT commands.

42

Represented by ASCII "*" in AT commands.

65

Represented by ASCII "A" in AT commands.

66

Represented by ASCII "B" in AT commands.

67

Represented by ASCII "C" in AT commands.

68

Represented by ASCII "D" in AT commands.

SignalStrength strict

Type: int8

Defined in fuchsia.bluetooth.hfp/hfp.fidl

Represents the signal strength of a connection between the Audio Gateway and a network.

NameValueDescription
1
2
3
4
5
6

TABLES

NetworkInformation

Defined in fuchsia.bluetooth.hfp/hfp.fidl

Network information for the Audio Gateway. Typically this represents information regarding the state of connectivity to a telephony network.

OrdinalFieldTypeDescription
service_available bool

Report the status of registration with the network. See HFP v1.8, Section 4.4

signal_strength SignalStrength

Report the signal strength of the connection to the network. See the HFP v1.8, Section 4.5.

roaming bool

Report the roaming status of the connection to the network. See HFP v1.8, Section 4.6

NextCall resource

Defined in fuchsia.bluetooth.hfp/hfp.fidl

Information for the next call reported by a Peer Handler.

OrdinalFieldTypeDescription
call Call

Channel for this call. This field is required.

remote Number

The Number of the remote party on the call. This field is required.

state CallState

State of the call when it is reported by the Peer Handler. This field is required.

direction CallDirection

Direction of the call's initiation. See CallDirection documentation for more information. This field is required.

UNIONS

CallAction strict

Defined in fuchsia.bluetooth.hfp/hfp.fidl

A command from the HF with a value representing what number to dial.

OrdinalVariantTypeDescription
dial_from_number Number

A complete number to be dialed by the call handler service. See HFP v1.8 Section 4.18.

dial_from_location Memory

A phone book memory location from which a number to be dialed should be looked up. See HFP v1.8 Section 4.19.

redial_last RedialLast

The call handler service should dial the last used number. See HFP v1.8 Section 4.20.

transfer_active TransferActive

Request to transfer an active call to the headset rather than initiating a new outgoing call. A call must already be in progress on the Audio Gateway in order for a transfer of audio to the Hands-Free device to take place. See HFP v1.8 Section 4.16.

Call_SendDtmfCode_Result strict

Defined in fuchsia.bluetooth.hfp/hfp.fidl

OrdinalVariantTypeDescription
response Call_SendDtmfCode_Response
err zx/Status

HandsFree_WatchPeerConnected_Result strict resource

Defined in fuchsia.bluetooth.hfp/hfp.fidl

OrdinalVariantTypeDescription
response HandsFree_WatchPeerConnected_Response
err zx/Status

PeerHandler_RequestOutgoingCall_Result strict

Defined in fuchsia.bluetooth.hfp/hfp.fidl

OrdinalVariantTypeDescription
response PeerHandler_RequestOutgoingCall_Response
err zx/Status

PeerHandler_SetNrecMode_Result strict

Defined in fuchsia.bluetooth.hfp/hfp.fidl

OrdinalVariantTypeDescription
response PeerHandler_SetNrecMode_Response
err zx/Status

CONSTANTS

NameValueTypeDescription
MAX_PICONET_SIZE 8 uint64

ALIASES

NameValueDescription
Memory string[256]

Represents a specific phone book memory location.

Number string[256]

Represents a text string of V.250 dialing digits. See TS 127.007v06.08.00, Section 6.2 for more information.