bluez/doc/mgmt-api.txt
2011-01-21 10:57:41 +02:00

345 lines
7.4 KiB
Plaintext

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:
Return Parameters: Version (1 Octets)
Revision (2 Octets)
Read Management Supported Features Command
==========================================
Command Code: 0x0002
Command Parameters:
Return Parameters: Features (8 Octets)
Feature Bit 0: Controller Support
Feature Bit 1: Tracing Support
Read Controller Index List Command
==================================
Command Code: 0x0003
Command Parameters:
Return Paramters: Num_Controllers (2 Octets)
Controller_Index[i] (2 Octets)
Read Controller Information Command
===================================
Command Code: 0x0004
Command Parameters: Controller_Index (2 Octets)
Return Parameters: Controller_Index (2 Octets)
Controller_Type (1 Octet)
Powered (1 octet)
Connectable (1 octet)
Discoverable (1 octet)
Pairable (1 octed)
Security_Mode (1 octed)
BD_ADDR (6 Octets)
Device_Class (3 octets)
Supported_Features (8 Octets)
Manufacturer (2 Octets)
HCI_Version (1 Octet)
HCI_Revision (2 Octets)
Controller_Type:0x00 Reserved
0x01 Bluetooth (BR/EDR)
0x02 802.11 (AMP)
Set Powered Command
===================
Command Code: 0x0005
Command Parameters: Controller_Index (2 Octets)
Powered (1 Octet)
Return Paramters: Controller_Index (2 Octets)
Powered (1 Octet)
Set Discoverable Command
========================
Command Code: 0x0006
Command Parameters: Controller_Index (2 Octets)
Discoverable (1 Octet)
Return Paramters: Controller_Index (2 Octets)
Discoverable (1 Octet)
Set Connectable Command
=======================
Command Code: 0x0007
Command Parameters: Controller_Index (2 Octets)
Connectable (1 Octet)
Return Paramters: Controller_Index (2 Octets)
Connectable (1 Octet)
Set Pairable Command
====================
Command Code: 0x0008
Command Parameters: Controller_Index (2 Octets)
Pairable (1 Octet)
Return Paramters: Controller_Index (2 Octets)
Pairable (1 Octet)
Add UUID Command
================
Command Code: 0x0009
Command Parameters: Controller_Index (2 Octets)
UUID (16 Octets)
SVC_Hint (1 octet)
Return Paramters: Controller_Index (2 Octets)
Remove UUID Command
===================
Command Code: 0x000A
Command Parameters: Controller_Index (2 Octets)
UUID (16 Octets)
Return Paramters: Controller_Index (2 Octets)
Set Device Class
================
Command Code: 0x000B
Command Parameters: Controller_Index (2 Octets)
Major_Class (1 octet)
Minor_Class (1 octed)
Return Paramters: Controller_Index (2 Octets)
Set Service Cache Command
=========================
Command Code: 0x000C
Command Parameters: Controller_Index (2 Octets)
Enable (1 octet)
Return Paramters: Controller_Index (2 Octets)
Load Keys Command
=================
Command Code: 0x000D
Command Parameters: Controller_Index (2 Octets)
Debug_Keys (1 Octet)
Key_Count (2 Octets)
Key1 {
Address (6 Octets)
Type (1 Octet)
Value (16 Octets)
PIN_Length (1 Octet)
}
Key2 { }
...
Return Paramters: Controller_Index (2 Octets)
Remove Key Command
==================
Command Code: 0x000E
Command Parameters: Controller_Index (2 Octets)
Address (6 Octets)
Disconnect (1 Octet)
Return Paramters: Controller_Index (2 Octets)
Disconnect Command
==================
Command Code: 0x000F
Command Parameters: Controller_Index (2 Octets)
Address (6 Octets)
Return Paramters: Controller_Index (2 Octets)
Address (6 Octets)
Read Tracing Buffer Size Command
================================
Command Code: <not yet assigned>
Command Parameters:
Return Parameters: Status (1 Octet)
Buffer_Size (2 Octets)
Buffer Size in Kilobytes
Write Tracing Buffer Size Command
=================================
Command Code: <not yet assigned>
Command Parameters: Buffer_Size (2 Octets)
Return Parameters: Status (1 Octet)
Buffer Size in Kilobytes
Read Controller Tracing Filter Command
=======================================
Command Code: <not yet assigned>
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
Write Controller Tracing Filter Command
=======================================
Command Code: <not yet assigned>
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
Event Parameters Command_Opcode (2 Octets)
Return_Parameters
Command Status Event
====================
Event Code 0x0002
Event Parameters Status (1 Octet)
Command_Opcode (2 Octets)
Controller Error Event
======================
Event Code 0x0003
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)
Controller Powered Event
========================
Event Code 0x0006
Event Parameters Controller_Index (2 Octets)
Powered (1 Octet)
Controller Discoverable Event
=============================
Event Code 0x0007
Event Parameters Controller_Index (2 Octets)
Discoverable (1 Octet)
Controller Connectable Event
============================
Event Code 0x0008
Event Parameters Controller_Index (2 Octets)
Connectable (1 Octet)
Controller Pairable Event
=========================
Event Code 0x0009
Event Parameters Controller_Index (2 Octets)
Pairable (1 Octet)
New Key Event
=============
Event Code 0x000A
Event Parameters Controller_Index (2 Octets)
Key {
Address (6 Octets)
Type (1 Octet)
Value (16 Octets)
PIN_Length (1 Octet)
}
Old_Key_Type (1 Octet)
Device Connected Event
======================
Event Code 0x000B
Event Parameters Controller_Index (2 Octets)
Address (6 Octets)
Device Disconnected Event
=========================
Event Code 0x000C
Event Parameters Controller_Index (2 Octets)
Address (6 Octets)
Connect Failed Event
====================
Event Code 0x000D
Event Parameters Controller_Index (2 Octets)
Address (6 Octets)
Status (1 Octet)