[Popular technology] HFP Bluetooth Application Protocol

Source: Internet
Author: User

I. Definition
HFP (hands-free profile) allows a bluetooth device to control the phone number, such as answering, hanging up, rejecting, And dialing voice. Rejected or voice dialing depends on whether the Bluetooth headset and phone number are supported.

Ii. Use Cases

Car kits in a car are common scenarios. The car kit will connect to your phone and be used to make and receive calls. It is more common to connect a wireless headset to a mobile phone and use the headset to call and answer the phone.

Example: hfp may be used for device models such as automobile, automobile kit, GPS system, earphone, and mobile PDA.


3. HFP defines two roles: the audio Gateway (AG) and the hands-free component (HF:
Audio Gateway (AG)-this device is the input/output gateway of audio (especially mobile phones.

Hands-free components (HF)-This device acts as a remote audio input/output Mechanism for the audio gateway and provides several remote control functions.

4. structure composition:

1) underlying hardware module

The Link Management Layer (LMP), baseband specification layer (BBP), and Bluetooth radio channels constitute the underlying module of Bluetooth.
2) Interface Layer

It includes the Host Control Interface Layer, Bluetooth unified transmission management, and host control transmission layer.
3) protocol layer

This layer includes L2CAP, SDP, and RFCOMM.
4) high-end application layer

The top part of the Bluetooth protocol stack is various application models.

V. Protocol Interpretation

1) The main function of SDP (Service Discovery Protocol) is to allow two bluetooth devices to get to know each other and establish a connection. SDP is a client/server-based protocol.

2) RFCOMM is a simple transmission protocol designed to ensure a complete communication path between applications on two different devices and maintain a communication segment between them. Fcomm is a protocol developed to be compatible with traditional serial port applications and replace wired communication methods. The Bluetooth protocol stack needs to provide communication interfaces consistent with wired serial ports. RFCOMM provides serial port Simulation Based on L2CAP protocol, based on etsi07.10. Supports up to 60 connections between two Bt devices. RFCOMM simulates the RS232 serial port. The simulation process includes transmission of non-data channels. RFCOMM has a built-in null modem simulation standard framework.

3) RS-232 interface to 9 pin (DB-9) or 25 pin (DB-25) type, usually on the PC there are two groups of RS-232 interface, called COM1 and com2. (That is, the legendary serial port used to connect to the projector)

4) L2CAP Logical Link Control and Adaptation Protocol)

Adapt to the upper-layer protocols in the baseband. It works in parallel with the link manager and provides data services with a targeted connection and no connection to the upstream protocol. This layer has The L2CAP splitting and restructuring function, enabling higher-level protocols and applications to send and receive data packets in 64 kB length. It can also process protocol multiplexing to provide multiple connections and multiple connection types (through one air interface), and provide service quality support and group communication.

Logical Link Control and Adaptation Protocol (L2CAP) are the upper-layer baseband protocol, which can be considered to work in parallel with LMP. The difference between them is that when business data does not pass through LMP, l2CAP provides services for the upper layer. L2CAP provides connection-oriented and connectionless data services at the upper layer. It uses multi-channel, segmentation and reorganization, and group extraction technologies. L2CAP allows high-level protocols to send and receive data groups in 64 KB. Although the baseband protocol provides two connection types: SCO and ACL, L2CAP only supports ACL.

5) LMP Link Management Protocol (LMP) is an important part of the optical network (ASON) control plane protocol stack. It implements the optical network link management function.


Vi. Bluetooth Application Programming

Bluetooth Programming

There are two ways to implement Bluetooth communication at the application layer:

1) use analog serial port
2) Use WinSock

Winsock has the following advantages: the Bluetooth communication using Winsock is simpler than the Bluetooth virtual serial port. It does not need to be configured and is stronger, because the Bluetooth communication using Winsock can directly listen to the bluetooth device to close or leave the communication range.


Bluetooth socket

In short, a socket is a data channel set up between different computers to meet the needs of communication between processes.

The connection process between sockets can be divided into three steps: server listening, client requests, and Connection Confirmation

 

Bluetooth socket implementation

The purpose of using Bluetooth socket Winsock is to discover other Bluetooth devices and read and write data through Bluetooth. Two roles are created in a communication channel through Bluetooth: Initiator and receiver. After the receiver completes the configuration, wait for the initiator to establish a connection. Once the connection is established, both parties are equal and can send or accept data.



Http://blog.csdn.net/robotcsdn/article/details/6708250

Http://blog.csdn.net/xy1001/article/category/492420

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.