Chinaunix首页 | 论坛 | 博客
  • 博客访问: 9139659
  • 博文数量: 1725
  • 博客积分: 12961
  • 博客等级: 上将
  • 技术积分: 19840
  • 用 户 组: 普通用户
  • 注册时间: 2009-01-09 11:25
个人简介

偷得浮生半桶水(半日闲), 好记性不如抄下来(烂笔头). 信息爆炸的时代, 学习是一项持续的工作.

文章分类

全部博文(1725)

文章存档

2024年(1)

2023年(26)

2022年(112)

2021年(217)

2020年(157)

2019年(192)

2018年(81)

2017年(78)

2016年(70)

2015年(52)

2014年(40)

2013年(51)

2012年(85)

2011年(45)

2010年(231)

2009年(287)

分类: 其他平台

2019-09-16 16:06:31


为用户空间提供的基于socket的接口
1. 数据通道  L2CAP  HCI
2. 控制通道  MGMT  HCI

具体内容参考  

struct sockaddr_l2 
  sa_family_t l2_family; //地点族  
  unsigned short l2_psm; //PSM  
  bdaddr_t l2_bdaddr; //Bluetooth 地点  
  unsigned short l2_cid; 
};
psm代表给什么协议来建立l2cap连接。
Protocol PSM Reference 
---------------------------
SDP 0x0001 See Bluetooth Service Discovery Protocol (SDP), Bluetooth SIG. 
//上面这个表示如果是SDP连接就把psm设为0x0001,后面以此类推。
RFCOMM 0x0003 See RFCOMM with TS 07.10, Bluetooth SIG. 
TCS-BIN 0x0005 See Bluetooth Telephony Control Specification / TCS Binary, Bluetooth SIG. 
TCS-BIN-CORDLESS 0x0007 See Bluetooth Telephony Control Specification / TCS Binary, Bluetooth SIG. 
BNEP 0x000F See Bluetooth Network Encapsulation Protocal, Bluetooth SIG. 
HID_Control 0x0011 See Human Interface Device , Bluetooth SIG. 
HID_Interrupt 0x0013 See Human Interface Device, Bluetooth SIG. 
UPnP 0x0015 See [ESDP] , Bluetooth SIG. 
AVCTP 0x0017 See Audio/Video Control Transport Protocol , Bluetooth SIG. 
AVDTP 0x0019 See Audio/Video Distribution Transport Protocol , Bluetooth SIG. 
AVCTP_Browsing 0x001B See Audio/Video Remote Control Profile, Bluetooth SIG 
UDI_C-Plane 0x001D See the Unrestricted Digital Information Profile [UDI], Bluetooth SIG

********************************************************************************************
参考 https://blog.csdn.net/u011960402/article/details/17605199?utm_source=itdadao&utm_medium=referral 
CID的全称为ChannelIdentifer,他是用来标明不同的L2CAP通道的,每一个L2CAP通道都需要有一个不同的CID来表示
0x0000是不能使用的,0x0001~0x003F是被征用的,他们被叫做FixedChannels
这其中L2CAP Signaling channel0x0001)和LESignaling channel0x0005)是应当要支持的。若是支持0x0005LE设备)

阅读(1103) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~