易截截图软件、单文件、免安装、纯绿色、仅160KB

实战Linux Bluetooth编程(四) L2CAP层编程

(L2CAP协议简介,L2CAP在BlueZ中的实现以及L2CAP编程接口)
一:L2CAP协议简介:
Logical Link Control and Adaptation Protocol(L2CAP)
逻辑连接控制和适配协议 (L2CAP) 为上层协议提供面向连接和无连接的数据服务,并提供多协议功能和分割重组操作。L2CAP 充许上层协议和应用软件传输和接收最大长度为 64K 的 L2CAP 数据包。
  L2CAP 基于 通道(channel) 的概念。 通道 (Channel) 是位于基带 (baseband) 连接之上的逻辑连接。每个通道以多对一的方式绑定一个单一协议 (single protocol)。多个通道可以绑定同一个协议,但一个通道不可以绑定多个协议。 每个在通道里接收到的 L2CAP 数据包被传到相应的上层协议。 多个通道可共享同一个基带连接。
L2CAP处于Bluetooth协议栈的位置如下:
也就是说,所有L2CAP数据均通过HCI传输到Remote Device。且上层协议的数据,大都也通过L2CAP来传送。
L2CAP可以发送Command。例如连接,断连等等。
下面看Command例子:Connection Request:
其中PSM比较需要注意,L2CAP 使用L2CAP连接请求(Connection Request )命令中的PSM字段实现协议复用。L2CAP可以复用发给上层协议的连接请求,这些上层协议包括服务发现协议SDP(PSM = 0x0001)、RFCOMM(PSM = 0x0003)和电话控制(PSM = 0x0005)等。
ProtocolPSMReference
SDP
0x0001
See Bluetooth Service Discovery Protocol (SDP), Bluetooth SIG.
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
二:L


相关文档:

Linux 0.12内核

在应用程序开发时,也经常需要如下的定时器. 这里对定时器做了一个优化,就是在插入队列中时进行了一次排序,使得检测时不需要遍历整个链表,只需把排在前面的几个到时的任务取出来就可以了。
static struct timer_list {
     long jiffies;
     void (*fn)();
   ......

Linux下 php5 MySQL5 Apache2 安装与配置


mkdir /downloads
chown -R root:root /downloads
chmod -R 774 /downloads
一、安装Apache2
    下载地址:http://www.apache.org/ --> HTTP Server --> from a mirror
    1. 获取mysql源码
        shell> cd /downloads
     ......

linux 解压问题

tar vxfz ttt-1.00.tar.bz2后出现以上错误是怎么回事啊?
gzip:stdin:not in gzip format
tar:Child returned status1
tar:Error exit delayed from prvious errors
tar jxvf  busybox-1.00.tar.bz2
解压:tar jxvf FileName.tar.bz2
压缩:tar jcvf FileName.tar.bz2 DirName
bz2格式用j
gz格式用z
c是创建 ......

[转贴]Linux文件查找命令find,xargs详述

总结:
zhy2111314
来自:
LinuxSir.Org
整理:
北南南北
摘要:
本文是find 命令的详细说明,可贵的是针对参数举了很多的实例,大量的例证,让初学者更为容易理解;本文是zhyfly兄贴在论坛中;我对本文进行了再次整理,为方便大家阅读;
目录
版权声明
前言:关于find命令
一、find 命令格式
1、find命令的一 ......

实战Linux Bluetooth编程(一) 协议栈概述

Sam一年前在Linux下写了一个类似Windows下BTW的库--BTX。现在需要添加新功能时发现很多知识点都忘记了。所以决定在这次学习中,把一些bluez API记录下来。这几天又想,这样还不够,不如把Linux下的Bluetooth编程基础给记录下来吧。
前言:随着嵌入式系统的飞速发展,很多嵌入式平台上需要Bluetooth设备和应用。但在Linux下 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号