Class of device,通称 CoD,用以叙述一个 BR/EDR 设备的种类。
当地设备进行 inquiry (HCI_Inquiry command) 后,远侧处在 inquiry scan 情况的设备会回应一些基础数据信息。这种数据信息被 controller 封裝在 event 中回到给 host。CoD 则是这种 event 中的一个主要参数。这时包括很有可能 CoD 的 event 以下:
HCI_Inquiry_Result event
HCI_Inquiry_Result_with_RSSI event
HCI_Extended_Inquiry_Result event
此外当当地设备接到远侧设备的联接要求时,将接到 HCI_Connection_Request event。该 event 也会带上 CoD。
分析 CoD 构造
CoD 的格式是可变性的,实际的格式由 Format Type 字段特定。在其中最普遍的格式是 “format #1”,且别的格式极为少见。这时 CoD 是一个尺寸为 3 bytes 的标值,它的构造如下图所显示(1st byte 为更大字节数):
下边将各自表述构成 CoD 的 3 个关键字段 Service Class, Major Device Class 与 Minor Device Class。
Service Class
下边为 0 的位被保存应用
Flag
Description
Example
1... .... 00.
Information
WEB-server, WAP-server
.1.. .... 00.
Telephony
Cordless telephony, Modem, Headset service
..1. .... 00.
Audio
Speaker, Microphone, Headset service
...1 .... 00.
Object Transfer
v-Inbox, v-Folder
.... 1... 00.
Capturing
Scanner, Microphone
.... .1.. 00.
Rendering
Printing, Speaker
.... ..1. 00.
Networking
LAN, Ad hoc
.... ...1 00.
Positioning
Location identification
.... .... 001
Limited Discoverable Mode
Major Device Class
Value
Description
Example
0b00000
Miscellaneous
0b00001
Computer
Desktop, Notebook, PDA, Organizers
0b00010
Phone
Cellular, Cordless, Payphone, Modem
0b00011
LAN /Network Access point
0b00100
Audio/Video
Headset, Speaker, Stereo, Video display, VCR
0b00101
Peripheral (HID)
Mouse, Joystick, Keyboards
0b00110
Imaging
Printing, Scanner, Camera, Display
0b00111
Wearable
0b01000
Toy
0b01001
Health
0b11111
Uncategorized
Others
Reserved
Minor Device Class
该字段尽管仅占有 8 bits,可是当 major device class 不另外,每一个 bit 的含意也不一样。因而该字段的界定很复杂,没有这儿过多阐释。实际能够参照 ref[1]。
一个分析 CoD 的事例
当 CoD 为 0x002540 时有:
0… …. …. …. …. ….=Service Classes: Information: False
.0.. …. …. …. …. ….=Service Classes: Telephony: False
..0. …. …. …. …. ….=Service Classes: Audio: False
…0 …. …. …. …. ….=Service Classes: Object Transfer: False
…. 0… …. …. …. ….=Service Classes: Capturing: False
…. .0.. …. …. …. ….=Service Classes: Rendering: False
…. ..0. …. …. …. ….=Service Classes: Networking: False
…. …0 …. …. …. ….=Service Classes: Positioning: False
…. …. 00.. …. …. ….=Service Classes: Reserved: 0x0
…. …. ..1. …. …. ….=Service Classes: Limited Discoverable Mode: True
…. …. …0 0101 …. ….=Major Device Class: Peripheral (HID) (0x05)
…. …. …. …. 01.. ….=Minor Device Class: Keyboard (0x1)
…. …. …. …. ..00 00..=Minor Device Class: Uncategorized device (0x0)
…. …. …. …. …. ..00=Format Type: 0x0
CoD 的掩藏
CoD 并并不是写死在 controller 中的数据信息,事实上它被 host 管理 *** 。Host 能够应用 HCI_Write_Class_of_Device command 改动当地设备的种类,进而做到掩藏的目地。应用以下指令能够载入或改动当地 BR/EDR 设备的种类:
hciconfig hci0 class
# hci0: Type: Primary Bus: USB
# BD Address: 11:22:33:44:55:19 ACL MTU: 310:10 SCO MTU: 64:8
# Class: 0x0c0000
# Service Classes: Rendering, Capturing
# Device Class: Miscellaneous,
sudo hciconfig hci0 class 0x002540
hciconfig hci0 class
# hci0: Type: Primary Bus: USB
# BD Address: 11:22:33:44:55:19 ACL MTU: 310:10 SCO MTU: 64:8
# Class: 0x002540
# Service Classes: Unspecified
# Device Class: Peripheral, Keyboard
此外 ref[2]是一个线上的 CoD *** 器,能够协助大家依据选中的设备种类自动生成 CoD 标值。
188网刷信誉平台里的24小时确认的任务,是指24小时后付款,还是马上付款,24小时后评价 新开店小卖家不刷想翻身是非常难的 现在有那种你把账号和钱都给他然后他给你刷 ...
世界上最大的海(世界上最大的海是哪一个)这个海叫做珊瑚海,是世界上最大的海,并且没有之一,面积达到了479万平方千米 这个海叫做珊瑚海,是世界上...
笔记本什么配置好(笔记百思特网本高配置) 很多朋友在选择笔记本电脑时,因为对电脑配置参数缺乏了解,不知道该怎么选择笔记本电脑。本期文章就结合笔记本电脑配置常识,教大家如何选择适合的笔记本电脑配置。...
微信聊天记录怎么备份?微信里的聊天记录,是不是已经十几GB了?是不是每次想找里面的图片都找不到?即使费了九牛二虎之。 可以做到,安卓机:手机需要能root,并且能安装xposed,不针对个人,针对公司...
一、黑客qq盗号联系方式(专业解冻qq黑客联系方式) 1、QQ被盗,有黑客朋友帮个忙吗? 留下联系方法。谢谢。 。这种事你找黑客是没用的,你要明确的知道 分布式盗Q 与针对性盗Q,概念不一样,前者好...
苹果手机截屏方法一 使用快捷键截图。具体操作方法如下: 两个手指同时按下“开机电源”键+“home”键,听到咔擦一声,说明截图成功了,截下的图片会自动保存在手机相册里,打开手机相册就能看见了。...