This is the documentation for the latest (main) development branch. If you are looking for the documentation of previous releases, use the drop-down menu on the left and select the desired version.

Hands Free Profile (HFP)

API Reference

group bt_hfp

Hands Free Profile (HFP)

Defines

HFP_HF_CMD_OK
HFP_HF_CMD_ERROR
HFP_HF_CMD_CME_ERROR
HFP_HF_CMD_UNKNOWN_ERROR

Enums

enum bt_hfp_hf_at_cmd

Values:

enumerator BT_HFP_HF_ATA
enumerator BT_HFP_HF_AT_CHUP

Functions

int bt_hfp_hf_register(struct bt_hfp_hf_cb *cb)

Register HFP HF profile.

Register Handsfree profile callbacks to monitor the state and get the required HFP details to display.

Parameters:

cb – callback structure.

Returns:

0 in case of success or negative value in case of error.

int bt_hfp_hf_send_cmd(struct bt_conn *conn, enum bt_hfp_hf_at_cmd cmd)

Handsfree client Send AT.

Send specific AT commands to handsfree client profile.

Parameters:
  • conn – Connection object.

  • cmd – AT command to be sent.

Returns:

0 in case of success or negative value in case of error.

struct bt_hfp_hf_cmd_complete

HFP HF Command completion field.

struct bt_hfp_hf_cb

HFP profile application callback.