找回密码
 立即注册

使用微信账号登录

只需一步,快速开始

查看: 7461|回复: 8

[QCC5系列] pbap sdp 通讯录 弹窗

[复制链接]
连续签到天数:1天
签到总天数:1天
签到总奖励:5金币
发表于 2020-7-3 15:18:24 | 显示全部楼层 |阅读模式
本帖最后由 越过山丘 于 2020-7-9 11:08 编辑

问题更新:qcc5126 设备连接苹果ios的时候,访问通讯录时弹出用户授权访问通讯录的提示是车载设备
提示如下:
“您的车可能会访问通讯录。。。。”

有没有可能,把“您的车”改成“你的XX”,XX可以自定义,或者就是通用的名称,比如“设备”也可以。
那位大佬知道的话,不吝赐教啊



分割线--------------------------------------------------------------------------------------------------------------------------


qcc5126 设备连接苹果ios的时候,需要访问通讯录但是没有弹出用户授权访问通讯录的提示
用其他的设备在配对一开始会弹出提示如图

通过抓取的log确定sdp中已经注册了pbap协议,有大佬知道是怎么回事吗?


Qq群的大佬“踏雪无痕”指点改class_of_device
void sinkInitConfigureDeviceClass(void)
{
    //uint32 device_class = sinkInitGetDeviceClassConfig();
    ConnectionWriteClassOfDevice(0x00240408);
}


下面对CoD做简要的说明

Assigned Numbers for Baseband

Assigned numbers for Baseband identifies the Inquiry Access codes and Class of Device/Service (CoD) fields.


基带分配编号

为基带分配的编号标识了查询访问代码和设备/服务类别(CoD)字段。


The General- and Device-specific Inquiry Access Codes (DIACs)

The Inquiry Access Code (IAC) is the first level of filtering for finding Bluetooth® devices and services. The main purpose of defining multiple IACs is to limit the number of responses when scanning devices within range.


通用和特定于设备的查询访问代码(DIAC)


查询访问代码(IAC)是用于查找Bluetooth®设备和服务的第一级过滤。 定义多个IAC的主要目的是限制扫描范围内的设备时的响应数量。

C:\Users\hjw\AppData\Local\YNote\data\weixinobU7VjixR36LtX24EbczQm-GnRPY\efddc393d4dd4a71b97a50dbd6c9ba8b\clipboard.png

Table 1: Inquiry Access Codes

The Limited Inquiry Access Code (LIAC) is to be used only for limited periods in scenarios where both sides have been explicitly caused to enter this state, usually by user action. For further explanation of the use of the LIAC, please refer to the Generic Access Profile.

In contrast, it is allowed to continuously scan for the General Inquiry Access Code (GIAC) and respond whenever inquired.

限制查询访问代码(LIAC)仅在有限的时间段内使用,在这种情况下,通常是由于用户操作,导致双方显式进入此状态。 有关LIAC用法的进一步说明,请参阅通用访问配置文件。


相反,允许连续扫描通用查询访问代码(GIAC),并在每次查询时做出响应。


The Class of Device/Service field

The Class of Device/Service (CoD) field has a variable format. The format is indicated using the “Format Type field” within the CoD. The length of the Format Type field is variable and ends with two bits different from “11.” The version field starts at the least significant bit of the CoD and may extend upward.

In the “format #1” of the CoD (Format Type field = 00), 11 bits are assigned as a bit-mask (multiple bits can be set), each bit corresponding to a high-level generic category of service class. Currently, seven categories are defined. These are primarily of a “public service” nature. The remaining 11 bits are used to indicate device type category and other device-specific characteristics.Any reserved but otherwise unassigned bits, such as in the Major Service Class field, should be set to zero.


设备/服务类别字段


设备/服务类别(CoD)字段具有可变格式。 使用CoD中的“格式类型字段”指示格式。 格式类型字段的长度是可变的,并且以不同于“ 11”的两位结尾版本字段从CoD的最低有效位开始,并且可以向上扩展。


在CoD的“格式#1”中(格式类型字段= 00),将11位分配为位掩码(可以设置多个位),每个位对应于服务类的高级通用类别。 当前,定义了七个类别。 这些主要是“公共服务”性质的。 其余的11位用于指示设备类型类别和其他设备特定的特性。任何保留但未分配的位(例如在“主要服务类”字段中)应设置为零。


ps:CoD 总共包括24位,高11位是 主要服务类,

Major Service Classes

The Major and Minor Service classes define the general families of devices with which Bluetooth SIG members want their applications to be associated. No assumptions about the specific functionality or characteristics of any application should be based solely on its inclusion within a

主要服务等级


主要和次要服务类定义了与蓝牙SIG成员希望其应用程序关联的设备的一般系列。 任何应用程序的特定功能或特性的假设都不应仅基于其包含在主要设备或次要设备类中。

ps:#define AUDIO_MAJOR_SERV_CLASS      0x200000

对应主要服务类是 21 Audio headset

#define RENDER_MAJOR_SERV_CLASS     0x040000

18 Rendering(printing,Speakers)

C:\Users\hjw\AppData\Local\YNote\data\weixinobU7VjixR36LtX24EbczQm-GnRPY\4eb081d44be74a598ac0234a035d0789\clipboard.png

Major Device Classes

The Major Device Class segment is the highest level of granularity for defining a Bluetooth device. A device’s main function determines its Major Class assignment. There are 32 major classes. The assignment of this Major Class field is defined in the table.

主要设备类别


“主要设备类别”部分是用于定义蓝牙设备的最高粒度级别。 设备的主要功能决定了其主要类别的分配。 有32个主要类。 该主要类别字段的分配在表中定义。

#define AV_MAJOR_DEVICE_CLASS       0x000400

对应 Audio/Video (headset, speaker, stereo, video display, VCR, …

C:\Users\hjw\AppData\Local\YNote\data\weixinobU7VjixR36LtX24EbczQm-GnRPY\0b79ce49b5b345c3a8e6ab4de0580915\clipboard.png

The Minor Device Class field

The Minor Device Class field (bits 7 to 2 in the CoD) is interpreted only in the context of the Major Device Class (but independently of the Service Class field). Thus, the meaning of the bits may change, depending on the value of the Major Device Class field. When the Minor Device Class field indicates a device class, then the primary device class should be reported – e.g., a cellular phone that can also work as a cordless handset should use “Cellular” in the Minor Device Class field.

次要设备类别字段


次要设备类别字段(CoD中的第7至2位)仅在主要设备类别的上下文中进行解释(但独立于服务类别字段)。 因此,比特的含义可以改变,这取决于主要设备类别字段的值。 当“次要设备类别”字段指示设备类别时,则应报告主要设备类别-例如,也可以用作无绳手机的蜂窝电话应在“次要设备类别”字段中使用“蜂窝电话”。

#define HEADSET_MINOR_DEVICE_CLASS  0x000004

主类别是Audio/Video  对应Wearable Headset Device

而0x8对应 Hands-free Device

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册  

×
楼主热帖
积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
连续签到天数:1天
签到总天数:89天
签到总奖励:1653金币
发表于 2020-7-4 13:23:03 | 显示全部楼层
苹果获取电话本不确定是否需要mfi认证
积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
回复 支持 反对

使用道具 举报

连续签到天数:1天
签到总天数:831天
签到总奖励:24012金币
发表于 2020-7-5 23:02:46 | 显示全部楼层
不需要MFI,直接可以获取,主要麻烦是解析算法。
积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
回复 支持 反对

使用道具 举报

连续签到天数:1天
签到总天数:1天
签到总奖励:5金币
 楼主| 发表于 2020-7-6 15:18:52 | 显示全部楼层
本帖最后由 越过山丘 于 2020-7-6 15:20 编辑
我是小白 发表于 2020-7-4 13:23
苹果获取电话本不确定是否需要mfi认证

确定不需要哦,我的问题问的不是很清楚
我的意思要配对的时候的  iphone 会弹一个弹窗 询问授权
我用其他车载的设备试了下,可以弹出来,但是我的设备连上弹不出来,需要手动在设置里面授权

C:\Users\hjw\Desktop

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册  

×
积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
回复 支持 反对

使用道具 举报

连续签到天数:1天
签到总天数:1天
签到总奖励:5金币
 楼主| 发表于 2020-7-6 15:24:28 | 显示全部楼层
技术宅 发表于 2020-7-5 23:02
不需要MFI,直接可以获取,主要麻烦是解析算法。

我问题没说清楚,通讯录我已经获取到了,但是没有弹窗,图片已更新
积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
回复 支持 反对

使用道具 举报

连续签到天数:1天
签到总天数:831天
签到总奖励:24012金币
发表于 2020-7-9 08:37:04 | 显示全部楼层
越过山丘 发表于 2020-7-6 15:24
我问题没说清楚,通讯录我已经获取到了,但是没有弹窗,图片已更新

改下设备类型。
积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
回复 支持 反对

使用道具 举报

连续签到天数:1天
签到总天数:1天
签到总奖励:5金币
 楼主| 发表于 2020-7-9 11:01:41 | 显示全部楼层

是的,在一个蓝牙技术交流群里面有个大佬指点了下,修改下CoD就可以弹窗了
积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
回复 支持 反对

使用道具 举报

连续签到天数:1天
签到总天数:51天
签到总奖励:359金币
发表于 2021-7-3 18:13:44 | 显示全部楼层
你好,楼主,如果我不想出现这个弹窗,可以如何操作
积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
回复 支持 反对

使用道具 举报

暂无签到数据

发表于 2021-12-2 16:25:27 | 显示全部楼层
一起学高通芯片 发表于 2021-7-3 18:13
你好,楼主,如果我不想出现这个弹窗,可以如何操作

解决了吗?如果不想要这个访问请求应该怎么搞
积分商城 - 让您的金币更有价值!||官方Q群 - 让您的沟通更加及时!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册  

本版积分规则

小黑屋|手机版|我爱蓝牙网 - 52Bluetooth

GMT+8, 2024-4-23 20:54 , Processed in 0.924395 second(s), 24 queries , Gzip On, MemCached On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表