Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Hands Free Profile - Audio Gateway (HFP-AG)

Hands Free Profile - Audio Gateway (HFP-AG) . More...

Data Structures

struct  bt_hfp_ag_cb
 HFP profile AG application callback. More...
 

Macros

#define BT_HFP_AG_CODEC_CVSD   0x01
 
#define BT_HFP_AG_CODEC_MSBC   0x02
 
#define BT_HFP_AG_CODEC_LC3_SWB   0x03
 

Enumerations

enum  bt_hfp_ag_indicator {
  BT_HFP_AG_SERVICE_IND = 0 , BT_HFP_AG_CALL_IND = 1 , BT_HFP_AG_CALL_SETUP_IND = 2 , BT_HFP_AG_CALL_HELD_IND = 3 ,
  BT_HFP_AG_SIGNAL_IND = 4 , BT_HFP_AG_ROAM_IND = 5 , BT_HFP_AG_BATTERY_IND = 6 , BT_HFP_AG_IND_MAX
}
 

Functions

int bt_hfp_ag_register (struct bt_hfp_ag_cb *cb)
 Register HFP AG profile.
 
int bt_hfp_ag_connect (struct bt_conn *conn, struct bt_hfp_ag **ag, uint8_t channel)
 Create the hfp ag session.
 
int bt_hfp_ag_disconnect (struct bt_hfp_ag *ag)
 Disconnect the hfp ag session.
 
int bt_hfp_ag_remote_incoming (struct bt_hfp_ag *ag, const char *number)
 Notify HFP Unit of an incoming call.
 
int bt_hfp_ag_reject (struct bt_hfp_ag *ag)
 Reject the incoming call.
 
int bt_hfp_ag_accept (struct bt_hfp_ag *ag)
 Accept the incoming call.
 
int bt_hfp_ag_terminate (struct bt_hfp_ag *ag)
 Terminate the active/hold call.
 
int bt_hfp_ag_outgoing (struct bt_hfp_ag *ag, const char *number)
 Dial a call.
 
int bt_hfp_ag_remote_ringing (struct bt_hfp_ag *ag)
 Notify HFP Unit that the remote starts ringing.
 
int bt_hfp_ag_remote_reject (struct bt_hfp_ag *ag)
 Notify HFP Unit that the remote rejects the call.
 
int bt_hfp_ag_remote_accept (struct bt_hfp_ag *ag)
 Notify HFP Unit that the remote accepts the call.
 
int bt_hfp_ag_remote_terminate (struct bt_hfp_ag *ag)
 Notify HFP Unit that the remote terminates the active/hold call.
 

Detailed Description

Hands Free Profile - Audio Gateway (HFP-AG) .

Macro Definition Documentation

◆ BT_HFP_AG_CODEC_CVSD

#define BT_HFP_AG_CODEC_CVSD   0x01

◆ BT_HFP_AG_CODEC_LC3_SWB

#define BT_HFP_AG_CODEC_LC3_SWB   0x03

◆ BT_HFP_AG_CODEC_MSBC

#define BT_HFP_AG_CODEC_MSBC   0x02

Enumeration Type Documentation

◆ bt_hfp_ag_indicator

#include <zephyr/bluetooth/classic/hfp_ag.h>

Enumerator
BT_HFP_AG_SERVICE_IND 
BT_HFP_AG_CALL_IND 
BT_HFP_AG_CALL_SETUP_IND 
BT_HFP_AG_CALL_HELD_IND 
BT_HFP_AG_SIGNAL_IND 
BT_HFP_AG_ROAM_IND 
BT_HFP_AG_BATTERY_IND 
BT_HFP_AG_IND_MAX 

Function Documentation

◆ bt_hfp_ag_accept()

int bt_hfp_ag_accept ( struct bt_hfp_ag * ag)

#include <zephyr/bluetooth/classic/hfp_ag.h>

Accept the incoming call.

Accept the incoming call.

Parameters
agHFP AG object.
Returns
0 in case of success or negative value in case of error.

◆ bt_hfp_ag_connect()

int bt_hfp_ag_connect ( struct bt_conn * conn,
struct bt_hfp_ag ** ag,
uint8_t channel )

#include <zephyr/bluetooth/classic/hfp_ag.h>

Create the hfp ag session.

Create the hfp ag session

Parameters
connACL connection object.
agCreated HFP AG object.
channelPeer rfcomm channel to be connected.
Returns
0 in case of success or negative value in case of error.

◆ bt_hfp_ag_disconnect()

int bt_hfp_ag_disconnect ( struct bt_hfp_ag * ag)

#include <zephyr/bluetooth/classic/hfp_ag.h>

Disconnect the hfp ag session.

Disconnect the hfp ag session

Parameters
agHFP AG object.
Returns
0 in case of success or negative value in case of error.

◆ bt_hfp_ag_outgoing()

int bt_hfp_ag_outgoing ( struct bt_hfp_ag * ag,
const char * number )

#include <zephyr/bluetooth/classic/hfp_ag.h>

Dial a call.

Dial a call.

Parameters
agHFP AG object.
numberDailing number.
Returns
0 in case of success or negative value in case of error.

◆ bt_hfp_ag_register()

int bt_hfp_ag_register ( struct bt_hfp_ag_cb * cb)

#include <zephyr/bluetooth/classic/hfp_ag.h>

Register HFP AG profile.

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

Parameters
cbcallback structure.
Returns
0 in case of success or negative value in case of error.

◆ bt_hfp_ag_reject()

int bt_hfp_ag_reject ( struct bt_hfp_ag * ag)

#include <zephyr/bluetooth/classic/hfp_ag.h>

Reject the incoming call.

Reject the incoming call.

Parameters
agHFP AG object.
Returns
0 in case of success or negative value in case of error.

◆ bt_hfp_ag_remote_accept()

int bt_hfp_ag_remote_accept ( struct bt_hfp_ag * ag)

#include <zephyr/bluetooth/classic/hfp_ag.h>

Notify HFP Unit that the remote accepts the call.

Notify HFP Unit that the remote accepts the call.

Parameters
agHFP AG object.
Returns
0 in case of success or negative value in case of error.

◆ bt_hfp_ag_remote_incoming()

int bt_hfp_ag_remote_incoming ( struct bt_hfp_ag * ag,
const char * number )

#include <zephyr/bluetooth/classic/hfp_ag.h>

Notify HFP Unit of an incoming call.

Notify HFP Unit of an incoming call.

Parameters
agHFP AG object.
numberDailing number.
Returns
0 in case of success or negative value in case of error.

◆ bt_hfp_ag_remote_reject()

int bt_hfp_ag_remote_reject ( struct bt_hfp_ag * ag)

#include <zephyr/bluetooth/classic/hfp_ag.h>

Notify HFP Unit that the remote rejects the call.

Notify HFP Unit that the remote rejects the call.

Parameters
agHFP AG object.
Returns
0 in case of success or negative value in case of error.

◆ bt_hfp_ag_remote_ringing()

int bt_hfp_ag_remote_ringing ( struct bt_hfp_ag * ag)

#include <zephyr/bluetooth/classic/hfp_ag.h>

Notify HFP Unit that the remote starts ringing.

Notify HFP Unit that the remote starts ringing.

Parameters
agHFP AG object.
Returns
0 in case of success or negative value in case of error.

◆ bt_hfp_ag_remote_terminate()

int bt_hfp_ag_remote_terminate ( struct bt_hfp_ag * ag)

#include <zephyr/bluetooth/classic/hfp_ag.h>

Notify HFP Unit that the remote terminates the active/hold call.

Notify HFP Unit that the remote terminates the active/hold call.

Parameters
agHFP AG object.
Returns
0 in case of success or negative value in case of error.

◆ bt_hfp_ag_terminate()

int bt_hfp_ag_terminate ( struct bt_hfp_ag * ag)

#include <zephyr/bluetooth/classic/hfp_ag.h>

Terminate the active/hold call.

Terminate the active/hold call.

Parameters
agHFP AG object.
Returns
0 in case of success or negative value in case of error.