关键词不能为空

当前您在: 主页 > 英语 >

自杀死蓝牙耳机编程流程-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的相关文章

  • 余华爱情经典语录,余华爱情句子

    余华的经典语录——余华《第七天》40、我不怕死,一点都不怕,只怕再也不能看见你——余华《第七天》4可是我再也没遇到一个像福贵这样令我难忘的人了,对自己的经历如此清楚,

    语文
  • 心情低落的图片压抑,心情低落的图片发朋友圈

    心情压抑的图片(心太累没人理解的说说带图片)1、有时候很想找个人倾诉一下,却又不知从何说起,最终是什么也不说,只想快点睡过去,告诉自己,明天就好了。有时候,突然会觉得

    语文
  • 经典古训100句图片大全,古训名言警句

    古代经典励志名言100句译:好的药物味苦但对治病有利;忠言劝诫的话听起来不顺耳却对人的行为有利。3良言一句三冬暖,恶语伤人六月寒。喷泉的高度不会超过它的源头;一个人的事

    语文
  • 关于青春奋斗的名人名言鲁迅,关于青年奋斗的名言鲁迅

    鲁迅名言名句大全励志1、世上本没有路,走的人多了自然便成了路。下面是我整理的鲁迅先生的名言名句大全,希望对你有所帮助!当生存时,还是将遭践踏,将遭删刈,直至于死亡而

    语文
  • 三国群英单机版手游礼包码,三国群英手机单机版攻略

    三国群英传7五神兽洞有什么用那是多一个武将技能。青龙飞升召唤出东方的守护兽,神兽之一的青龙。玄武怒流召唤出北方的守护兽,神兽之一的玄武。白虎傲啸召唤出西方的守护兽,

    语文
  • 不收费的情感挽回专家电话,情感挽回免费咨询

    免费的情感挽回机构(揭秘情感挽回机构骗局)1、牛牛(化名)向上海市公安局金山分局报案,称自己为了挽回与女友的感情,被一家名为“实花教育咨询”的情感咨询机构诈骗4万余元。

    语文