2010-09-20 15:41:35 +08:00
|
|
|
Bluetooth Management API
|
|
|
|
*************************
|
|
|
|
|
|
|
|
Copyright (C) 2008-2009 Marcel Holtmann <marcel@holtmann.org>
|
|
|
|
|
|
|
|
|
|
|
|
Packet Structures
|
|
|
|
=================
|
|
|
|
|
|
|
|
Commands:
|
|
|
|
|
|
|
|
0 4 8 12 16 202 24 28 31
|
|
|
|
+-------------------------------+-----------------------------+
|
|
|
|
| Command Code | Parameter Total Length |
|
|
|
|
+-------------------------------+-----------------------------+
|
|
|
|
| |
|
|
|
|
|
|
|
|
Events:
|
|
|
|
|
|
|
|
0 4 8 12 16 202 24 28 31
|
|
|
|
+-------------------------------+-----------------------------+
|
|
|
|
| Event Code | Parameter Total Length |
|
|
|
|
+-------------------------------+-----------------------------+
|
|
|
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
Read Management Version Information Command
|
|
|
|
===========================================
|
|
|
|
|
|
|
|
Command Code: 0x0001
|
|
|
|
Command Parameters:
|
2010-11-02 03:24:23 +08:00
|
|
|
Return Parameters: Version (1 Octets)
|
2010-09-20 15:41:35 +08:00
|
|
|
Revision (2 Octets)
|
|
|
|
|
2010-11-08 04:08:23 +08:00
|
|
|
|
2010-09-20 15:41:35 +08:00
|
|
|
Read Management Supported Features Command
|
|
|
|
==========================================
|
|
|
|
|
|
|
|
Command Code: 0x0002
|
|
|
|
Command Parameters:
|
2010-11-02 03:24:23 +08:00
|
|
|
Return Parameters: Features (8 Octets)
|
2010-09-20 15:41:35 +08:00
|
|
|
|
|
|
|
Feature Bit 0: Controller Support
|
|
|
|
Feature Bit 1: Tracing Support
|
|
|
|
|
2010-11-08 04:08:23 +08:00
|
|
|
|
2010-09-20 15:41:35 +08:00
|
|
|
Read Controller Index List Command
|
|
|
|
==================================
|
|
|
|
|
|
|
|
Command Code: 0x0003
|
|
|
|
Command Parameters:
|
2010-11-02 03:24:23 +08:00
|
|
|
Return Paramters: Num_Controllers (2 Octets)
|
2010-09-20 15:41:35 +08:00
|
|
|
Controller_Index[i] (2 Octets)
|
|
|
|
|
2010-11-08 04:08:23 +08:00
|
|
|
|
2010-09-20 15:41:35 +08:00
|
|
|
Read Controller Information Command
|
|
|
|
===================================
|
|
|
|
|
|
|
|
Command Code: 0x0004
|
|
|
|
Command Parameters: Controller_Index (2 Octets)
|
|
|
|
Return Parameters: Status (1 Octet)
|
|
|
|
Controller_Index (2 Octets)
|
|
|
|
Controller_Type (1 Octet)
|
|
|
|
BD_ADDR (6 Octets)
|
|
|
|
Supported_Features (8 Octets)
|
|
|
|
|
|
|
|
Controller_Type:0x00 Reserved
|
|
|
|
0x01 Bluetooth (BR/EDR)
|
|
|
|
0x02 802.11 (AMP)
|
|
|
|
|
2010-11-08 04:08:23 +08:00
|
|
|
|
2010-09-20 15:41:35 +08:00
|
|
|
Read Controller Statistics Command
|
|
|
|
==================================
|
|
|
|
|
|
|
|
Command Code: 0x0005
|
|
|
|
Command Parameters: Controller_Index (2 Octets)
|
|
|
|
Return Paramters: Status (1 Octet)
|
|
|
|
Controller_Index (2 Octets)
|
|
|
|
....
|
|
|
|
|
2010-11-08 04:08:23 +08:00
|
|
|
|
2010-09-20 15:41:35 +08:00
|
|
|
Read Controller Mode Command
|
|
|
|
============================
|
|
|
|
|
|
|
|
Command Code: 0x0006
|
|
|
|
Command Parameters: Controller_Index (2 Octets)
|
|
|
|
Return Paramters: Status (1 Octect)
|
|
|
|
Controller_Index (2 Octets)
|
|
|
|
Enabled (1 Octet)
|
|
|
|
Mode (1 Octet)
|
|
|
|
|
|
|
|
Enabled: 0x00 Powered off
|
|
|
|
0x01 Controller Enabled
|
|
|
|
|
|
|
|
Mode: 0x00 Reserved
|
|
|
|
0x01 Connectable (pairing forbidden)
|
|
|
|
0x02 Connectable (pairing allowed)
|
|
|
|
0x03 Discoverable (pairing forbidden)
|
|
|
|
0x04 Discoverable (pairing allowed)
|
|
|
|
|
2010-11-08 04:08:23 +08:00
|
|
|
|
2010-09-20 15:41:35 +08:00
|
|
|
Write Controller Mode Command
|
|
|
|
=============================
|
|
|
|
|
|
|
|
Command Code: 0x0007
|
|
|
|
Command Parameters: Controller_Index (2 Octets)
|
|
|
|
...
|
|
|
|
Return Parameters: Status (1 Octet)
|
|
|
|
Controller_Index (2 Octets)
|
|
|
|
|
|
|
|
|
|
|
|
Read Tracing Buffer Size Command
|
|
|
|
================================
|
|
|
|
|
|
|
|
Command Code: 0x0004
|
|
|
|
Command Parameters:
|
|
|
|
Return Parameters: Status (1 Octet)
|
|
|
|
Buffer_Size (2 Octets)
|
|
|
|
|
|
|
|
Buffer Size in Kilobytes
|
|
|
|
|
2010-11-08 04:08:23 +08:00
|
|
|
|
2010-09-20 15:41:35 +08:00
|
|
|
Write Tracing Buffer Size Command
|
|
|
|
=================================
|
|
|
|
|
|
|
|
Command Code: 0x0005
|
|
|
|
Command Parameters: Buffer_Size (2 Octets)
|
|
|
|
Return Parameters: Status (1 Octet)
|
|
|
|
|
|
|
|
Buffer Size in Kilobytes
|
|
|
|
|
2010-11-08 04:08:23 +08:00
|
|
|
|
2010-09-20 15:41:35 +08:00
|
|
|
Read Controller Tracing Filter Command
|
|
|
|
=======================================
|
|
|
|
|
|
|
|
Command Code: 0x0011
|
|
|
|
Command Parameters: Controller_Index (2 Octects)
|
|
|
|
Return Parameters: Status (1 Octet)
|
|
|
|
Controller_Index (2 Octets)
|
|
|
|
Tracing_Enable (1 Octect)
|
|
|
|
Num_Filters (2 Octect)
|
|
|
|
Protocol_UUID[i] (16 Octets)
|
|
|
|
Protocol_Identifier[i] (16 Octets)
|
|
|
|
|
|
|
|
Tracing_Enable: 0x00 Tracing disabled
|
|
|
|
0x01 Command and Event tracing
|
|
|
|
0x02 Command, Event and ACL tracing
|
|
|
|
0x03 Command, Event, ACL and SCO tracing
|
|
|
|
|
2010-11-08 04:08:23 +08:00
|
|
|
|
2010-09-20 15:41:35 +08:00
|
|
|
Write Controller Tracing Filter Command
|
|
|
|
=======================================
|
|
|
|
|
|
|
|
Command Code: 0x0012 (Group 0x0)
|
|
|
|
Command Parameters: Controller_Index (2 Octects)
|
|
|
|
Tracing_Enable (1 Octect)
|
|
|
|
Num_Filters (2 Octect)
|
|
|
|
Protocol_UUID[i] (16 Octets)
|
|
|
|
Protocol_Identifier[i] (16 Octets)
|
|
|
|
Return Paramters: Status (1 Octet)
|
|
|
|
Controller_Index (2 Octets)
|
|
|
|
|
|
|
|
|
|
|
|
Command Complete Event
|
|
|
|
======================
|
|
|
|
|
|
|
|
Event Code 0x0001
|
2010-11-08 04:08:23 +08:00
|
|
|
Event Parameters Command_Opcode (2 Octets)
|
2010-09-20 15:41:35 +08:00
|
|
|
Return_Parameters
|
|
|
|
|
|
|
|
|
|
|
|
Command Status Event
|
|
|
|
====================
|
|
|
|
|
|
|
|
Event Code 0x0002
|
2010-11-08 04:08:23 +08:00
|
|
|
Event Parameters Status (1 Octet)
|
|
|
|
Command_Opcode (2 Octets)
|
|
|
|
|
2010-09-20 15:41:35 +08:00
|
|
|
|
|
|
|
Controller Error Event
|
|
|
|
======================
|
|
|
|
|
|
|
|
Event Code 0x0003
|
2010-11-08 04:08:23 +08:00
|
|
|
Event Parameters Error_Code (1 Octet)
|
|
|
|
|
|
|
|
|
|
|
|
Index Added Event
|
|
|
|
=================
|
|
|
|
|
|
|
|
Event Code 0x0004
|
|
|
|
Event Parameters Controller_Index (2 Octets)
|
|
|
|
|
|
|
|
|
|
|
|
Index Removed Event
|
|
|
|
===================
|
|
|
|
|
|
|
|
Event Code 0x0005
|
|
|
|
Event Parameters Controller_Index (2 Octets)
|