关键词不能为空

当前您在: 主页 > 英语 >

自杀死蓝牙耳机编程流程-HANDESET Programmers Guide

作者:高考题库网
来源:https://www.bjmy2z.cn/gaokao
2021-01-19 09:52
tags:

lior-自杀死

2021年1月19日发(作者:accompanying)
HANDESET Programmers Guide


洪林整理







HANDESET Programmers Guide
1.
Introduction
Headset profile is used to enable wireless connectivity among Bluetooth enabled Headsets,
PCs and the cellular phones.



2.
Concepts
2.1
USAGE (
用法
)
Two use cases are presented here for understanding the AG and HS roles. Note that these
cases are not comprehensive.
Incoming call
1
Incoming call arrives at a cellular phone connected to a mobile network.
2 The cellular phone acting as an AG indicates this call arrival to a Headset. This is
typically perceived as a ring on the HS.
3 The user accepts the incoming call, by pressing a button on the HS.



1














20



HANDESET Programmers Guide


洪林整理

4 The AG on receiving this acceptance routes the audio data from the network to HS.
Outgoing call

1
An user dials a number using a cellular phone (AG).
2 Upon successful connection, the user by pressing a button on the HS initiates a transfer
of the audio data from the cell phone to the HS.
Note:
1
Headset's typically have a user interface by which intentions such as call accept, call
transfer are indicated to the AG.
2 The word button used above is a simile for any such user interface

3
IMPORTANT
: Although the word call is frequently used in this document, it shall be read
as 'Audio connection'. This is because the AG may treat the HS as the input or output audio
port for purposes other than call processing (such as tunes, beeps, alarms, etc..).

2.2
控制路径和数据路径

1, A Control path typically transmits commands and responses relating to a profile and the Data path is
typically used to transmit voice data

2A Control path should be established prior to the establishment of the Data path.

3 The existence of a Data path is optional

4. In the context of the Headset profile commands and responses relating to call acceptance, audio data
transfer, volume control etc.. are exchanged between the AG and HS over the Control path and the Data
path is used to transfer audio (voice) data between the AG and the HS

2.3
MODULE


The profile implementation consists of three modules. These are outlined below
.

This provides the serial port interface that both HS and AG use to
SPChannel
establish/release Control and Data paths. (See SPChannel
programmers guide for details).
Implementation of the HS portion of the profile; used by applications
Headset (HS)

residing on the HS.
Implementation of the AG portion of the profile; used by applications
Audio-Gateway (AG)
residing on the AG.




2














20



HANDESET Programmers Guide


洪林整理


2.4
Application state
The Headset API is stateless in nature. This means that the application has to keep track of
states.

The possible states of an application (with respect to the Headset profile) are typically
State

NOT
CONNECTED
CONNECTED
IN_CALL


Description

Here the Control path is not established.
Here the Control path is established but the Data path

is not.
The Data path is also established here and is being used

to stream voice the AG to the HS.
2.5
Establishment and release of
Control and Data paths



The following matrix specifies the correlation between the Control/Data paths and the roles
as per the Headset profile specification.

Action

Control

Data

Establish

HS or AG
AG
Release

AG
AG
Path




3














20



HANDESET Programmers Guide


洪林整理

i.e.

1 The Control path can be established either by the HS or AG while its release can be
performed only by the AG.
2 The Data path can be established and released only by the AG
2.6
SPChannel API
The SPChannel API that provides a means to establish and release Control and Data paths is used by
the
Headset
API.
The
reader
is
recommended
to
read
the
SPChannel
programmers
guide
before
proceeding further.

2.7
Headset API usage
From the HS end

H
S initialization


T
o accept an incoming call.

T
o transfer the call from the AG to the HS.

T
o terminate the call.

T

o notify AG about speaker and microphone volume levels.
P
roprietary commands

H
S un- initialization

Note that the HS initialization and un-initialization are not necessarily requirements but have
been included here for the sake of completeness of the API usage.
From the AG end

A
G initialization

T
o notify the HS of an incoming call.

T
o transfer the call from the HS to the AG.

T
o control the speaker and microphone volume levels of the HS.

P
roprietary unsolicited result codes

A

G un-initialization

2.8
Button press handling
The Headset specification uses the word 'User initiated action' to mean an indication received
from the user (typically a button press, or a GUI click etc..) to perform a suitable action. The



4














20



HANDESET Programmers Guide


洪林整理

suitable action in the context HS in the Headset specification is either a call accept, call
transfer or call terminate. Thus the same 'User initiated action' that is conveyed by the HS to
the AG is interpreted differently. This is based on the states of the HS and AG applications that
are currently interaction with each other.
The HS_SendButtonPress function of the HS API is used to model this 'Use initiated action'.
We shall now look at what it means to handle the button press at the
Headset end and
Gateway end
3.
Requirements
The requirements on the HS and AG units of this profile are stated in the table below.
Requirement

Incoming audio connection
Outgoing audio connection

Audio connection transfer
Remote audio volume control

Description

Ability to establish a connection in order to treat the
HS as an output audio port of the AG.
Ability to establish a connection in order to treat the
HS as an input audio port of the AG.
Transferring the audio between the HS and AG.
Ability of the AG to adjust the volume level on the HS.
4.
API Usage


This section presents the usage of headset (HS and AG) API function. Example use case
scenarios are presented here to highlight API usage.
4.1
Usage of HS API
The usage of the HS API is presented in the following sections.



5














20



HANDESET Programmers Guide


洪林整理

4.1.1
H
S initialization
The HS application must first initialize the HS profile. This is done as follows:
E
stablish a SPChannel Control path

U
se the active (established) SPChannel handle to create (initialize) the HS_Handle.

T

his HF_Handle will be used in all the other calls of the HS API.
N

ote that whether the application is listening or connecti
ng, successful establishment of a
Control path will be indicated using the spchannel_open_cfm callback.


4.1.2
T
o accept an incoming call (I)



Here we present the case on how the HS accepts an incoming call.
This is accomplished as follows:
H
S waits for an incoming Control path establishment by the AG.

H

S receives the RING code on the Control path that


i
ndicates that the HS could perform a local ring on the headphone

t
hat there is a incoming call
U
ser at HS presses a button to signal call acceptance of the incoming call. This signal is sent

to the AG.
H
S receives a confirmation (response) from the AG for the call accept.

H

S receives a Data path establishment indication (the Data path being initiated by the AG).
V

oice data is received on the Data path and rendered on the headphone appropriately.



6














20



HANDESET Programmers Guide


洪林整理



4.1.3
T
o accept an incoming call (II)
Here we present another case by which the HS accepts an incoming call.
This is accomplished as follows:
H
S waits for an incoming Control path establishment by the AG.

H

S receives the RING code on the Control path that


i
ndicates that the HS could perform a local ring on the headphone

t
hat there is a incoming call
H
S receives a Data path establishment indication (the Data path being initiated by the AG).

A

ring tone
is communicated by the AG to the HS using a
in- band
signal on the Data path

established earlier.
U
ser at HS presses a button to signal acceptance of the incoming call. This signal is sent to

the AG.
H

S receives a confirmation from the AG for the call accept sent via the button press at HS.
V
oice data is received on the Data path and rendered on the headphone appropriate
ly.




7














20



HANDESET Programmers Guide


洪林整理



4.1.4
C
all transfer from AG to HS
Here we present a case by which the HS transfers a call from the AG to itself (when the call
was being attended at the AG). This is accomplished as follows:
U

ser at HS presses a button to signal acceptance of the call. This causes the following
things to happen.


H
S initiates a Control path establishment to the AG.

A
fter which the button press is communicated to the AG.
T
he AG responds to the button press indication with a positive response.

H
S then receives a Data path establishment indication (the Data path being initiated by the

AG.
V

oice data is received on the Data path and rendered on the headphone appropriately.



8














20



HANDESET Programmers Guide


洪林整理



4.1.5
C
all termination
Given that the Control path and Data path have been established and voice data is streaming
from the AG to the HS via the Data path; the HS can terminate the call as follows:
U
ser presses the button, this leads to the button press command being sent from the HS to

the AG
U
pon reception of positive confirmation, the HS waits for the AG to



r
elease the Data path

r
elease the Control path



9














20



HANDESET Programmers Guide


洪林整理



4.1.6
T
o notify AG about current volume levels
The HS typically informs the AG of the volume levels of the speaker and microphone soon
after the establishment of the Control path as follows:
I
ssue the command intimating the AG of the current speaker volume level.

R
eceive a confirmation for the same from the AG.




10














20


lior-自杀死


lior-自杀死


lior-自杀死


lior-自杀死


lior-自杀死


lior-自杀死


lior-自杀死


lior-自杀死



本文更新与2021-01-19 09:52,由作者提供,不代表本网站立场,转载请注明出处:https://www.bjmy2z.cn/gaokao/531890.html

蓝牙耳机编程流程-HANDESET Programmers Guide的相关文章

  • 爱心与尊严的高中作文题库

    1.关于爱心和尊严的作文八百字 我们不必怀疑富翁的捐助,毕竟普施爱心,善莫大焉,它是一 种美;我们也不必指责苛求受捐者的冷漠的拒绝,因为人总是有尊 严的,这也是一种美。

    小学作文
  • 爱心与尊严高中作文题库

    1.关于爱心和尊严的作文八百字 我们不必怀疑富翁的捐助,毕竟普施爱心,善莫大焉,它是一 种美;我们也不必指责苛求受捐者的冷漠的拒绝,因为人总是有尊 严的,这也是一种美。

    小学作文
  • 爱心与尊重的作文题库

    1.作文关爱与尊重议论文 如果说没有爱就没有教育的话,那么离开了尊重同样也谈不上教育。 因为每一位孩子都渴望得到他人的尊重,尤其是教师的尊重。可是在现实生活中,不时会有

    小学作文
  • 爱心责任100字作文题库

    1.有关爱心,坚持,责任的作文题库各三个 一则150字左右 (要事例) “胜不骄,败不馁”这句话我常听外婆说起。 这句名言的意思是说胜利了抄不骄傲,失败了不气馁。我真正体会到它

    小学作文
  • 爱心责任心的作文题库

    1.有关爱心,坚持,责任的作文题库各三个 一则150字左右 (要事例) “胜不骄,败不馁”这句话我常听外婆说起。 这句名言的意思是说胜利了抄不骄傲,失败了不气馁。我真正体会到它

    小学作文
  • 爱心责任作文题库

    1.有关爱心,坚持,责任的作文题库各三个 一则150字左右 (要事例) “胜不骄,败不馁”这句话我常听外婆说起。 这句名言的意思是说胜利了抄不骄傲,失败了不气馁。我真正体会到它

    小学作文