如何编译并打开微软蓝牙协议栈的LOG
来源:互联网 发布:数据库试题及答案解析 编辑:程序博客网 时间:2024/06/07 11:48
1. 如何编译并打开微软蓝牙协议栈的LOG
1.1 微软协议栈在哪里
以WinCE6.0为例,在文件夹/PRIVATE/WINCEOS/COMM/BLUETOOTH下。
2.2 如何编译
编译源码
从VS2005中进入命令行窗口,切换到/PRIVATE/WINCEOS/COMM/BLUETOOTH下,并执行Build –c(地球人都知道,呵呵)。
编译Dll
切换到PUBLIC/COMMON/CESYSGEN路径下(makefile就在这里,有兴趣可以看一下),运行sysgen btd –p,等待编译结束即可。
2.3 如何打开协议栈的LOG
最好的调试方法,莫过于编译一个Debug Version的协议栈代码,然后通过如下注册表配置的方式打开相关的Debug Zone来进行分析。
[HKEY_LOCAL_MACHINE/Software/Microsoft/Bluetooth/Debug]
"Mask"=dword:3 // file&uart
"Console"=dword:7fffffff // open all debug zone
有关Mask和Console的配置可以参考public/common/oak/inc/bt_debug.h中的定义,这里简单的列举一部分Debug Zone的定义:
#define DEBUG_ERROR 0x00000001
#define DEBUG_WARN 0x00000002
#define DEBUG_OUTPUT 0x00000004
#define DEBUG_VERBOSE 0x00000008
#define DEBUG_SHELL_ALL 0x00000030
#define DEBUG_SHELL_INIT 0x00000010
#define DEBUG_SHELL_TRACE 0x00000020
#define DEBUG_HCI_TRANSPORT_ALL 0x000000c0
#define DEBUG_HCI_DUMP 0x00000040
#define DEBUG_HCI_TRANSPORT 0x00000080
#define DEBUG_HCI_ALL 0x00000f00
#define DEBUG_HCI_INIT 0x00000100
#define DEBUG_HCI_TRACE 0x00000200
#define DEBUG_HCI_PACKETS 0x00000400
#define DEBUG_HCI_CALLBACK 0x00000800
#define DEBUG_L2CAP_ALL 0x000f0000
#define DEBUG_L2CAP_INIT 0x00010000
#define DEBUG_L2CAP_TRACE 0x00020000
#define DEBUG_L2CAP_PACKETS 0x00040000
#define DEBUG_L2CAP_CALLBACK 0x00080000
#define DEBUG_RFCOMM_ALL 0x00f00000
#define DEBUG_RFCOMM_INIT 0x00100000
#define DEBUG_RFCOMM_TRACE 0x00200000
#define DEBUG_RFCOMM_PACKETS 0x00400000
#define DEBUG_RFCOMM_CALLBACK 0x00800000
#define DEBUG_SDP_ALL 0x0f000000
#define DEBUG_SDP_INIT 0x01000000
#define DEBUG_SDP_TRACE 0x02000000
#define DEBUG_SDP_PACKETS 0x04000000
#define DEBUG_SDP_CALLBACK 0x08000000
#define DEBUG_TDI_ALL 0x00f00000
#define DEBUG_TDI_INIT 0x00100000
#define DEBUG_TDI_TRACE 0x00200000
#define DEBUG_TDI_PACKETS 0x00400000
#define DEBUG_TDI_CALLBACK 0x00800000
#define DEBUG_PAN_ALL 0x0000f000
#define DEBUG_PAN_INIT 0x00001000
#define DEBUG_PAN_TRACE 0x00002000
#define DEBUG_PAN_PACKETS 0x00004000
#define DEBUG_PAN_CALLBACK 0x00008000
#define DEBUG_AVDTP_ALL 0xf0000000
#define DEBUG_AVDTP_INIT 0x10000000
#define DEBUG_AVDTP_TRACE 0x20000000
#define DEBUG_AVDTP_PACKETS 0x40000000
#define DEBUG_AVDTP_CALLBACK 0x80000000
#define OUTPUT_MODE_DEBUG 0
#define OUTPUT_MODE_CONSOLE 1
#define OUTPUT_MODE_FILE 2
OK,现在就可以来分析和调试协议栈的代码了,至于分析到什么程度,就看对协议的理解了,呵呵。
附带说一句,Debug Version的协议栈可以编译到Release Version的Image中调试起来更加方便。
- 如何编译并打开微软蓝牙协议栈的LOG
- 如何编译并打开微软蓝牙协议栈的LOG
- 如何编译并打开WinCE Bluetooth Stack的LOG
- 如何编译WinCE Bluetooth Stack并打开的默认LOG
- 如何编译WinCE Bluetooth Stack并打开的默认LOG
- 蓝牙的协议栈编译通过了
- [转的]如何打开opencore/openmax里的log及如何编译opencore时显示命令
- 【tips】如何打开Ibatis的log
- 蓝牙自动打开并配对
- Android 蓝牙自动打开并扫描设备,以及获取对方蓝牙设备的种类
- bluez蓝牙协议栈交叉编译移植教程
- bluez蓝牙协议栈交叉编译移植教程
- 打开蓝牙的设置
- 蓝牙协议栈Bluez的移植
- 蓝牙的OBEX协议
- 蓝牙的L2CAP协议
- 蓝牙的OBEX协议
- 蓝牙的L2CAP协议
- 明星软件工程师的10种特质
- jquery slideUp IE6 闪动
- jquery slideUp IE6 闪动
- javascript 函数重载(深入理解)
- jquery plugin
- 如何编译并打开微软蓝牙协议栈的LOG
- 学习HTML5不可错过的12家国外网站
- android AysncTask简介
- Just a note
- 虚函数、纯虚函数一些对比(不断学习,不断更新)
- Java学习之路 --The Road Of Java Study
- 开发者最容易犯的13个JavaScript错误
- 累。。。。
- IIS配置PHP环境