summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2003-11-18 11:36:20 +0000
committerMarcel Holtmann <marcel@holtmann.org>2003-11-18 11:36:20 +0000
commitaac33d6b2e0c3c7b021478feb320afd8c812bda9 (patch)
treec0ccd14e8252319181cfa8e3adb899471639627f
parent3d29835ef69b00fa3ed92702727ea2f737f37af2 (diff)
Add decoding of Bluetooth 1.2 features
-rw-r--r--include/hci.h17
-rw-r--r--src/hci.c68
2 files changed, 65 insertions, 20 deletions
diff --git a/include/hci.h b/include/hci.h
index 89ef19b6..fee39c20 100644
--- a/include/hci.h
+++ b/include/hci.h
@@ -200,6 +200,23 @@ enum {
#define LMP_PSCHEME 0x02
#define LMP_PCONTROL 0x04
#define LMP_TRSP_SCO 0x08
+#define LMP_BCAST_ENC 0x80
+
+#define LMP_ENH_ISCAN 0x08
+#define LMP_ILACE_ISCAN 0x10
+#define LMP_ILACE_PSCAN 0x20
+#define LMP_RSSI_INQ 0x40
+#define LMP_ESCO 0x80
+
+#define LMP_EV4 0x01
+#define LMP_EV5 0x02
+#define LMP_AFH_CAP_SLV 0x08
+#define LMP_AFH_CLS_SLV 0x10
+
+#define LMP_AFH_CAP_MST 0x08
+#define LMP_AFH_CLS_MST 0x10
+
+#define LMP_EXT_FEAT 0x80
/* Link policies */
#define HCI_LP_RSWITCH 0x0001
diff --git a/src/hci.c b/src/hci.c
index 818c04e5..61bdd1a6 100644
--- a/src/hci.c
+++ b/src/hci.c
@@ -295,32 +295,60 @@ int lmp_strtover(char *str, unsigned int *ver)
/* LMP features mapping */
hci_map lmp_features_map[][9] = {
{ /* byte 0 */
- { "<3-slot packets>", LMP_3SLOT },
- { "<5-slot packets>", LMP_5SLOT },
- { "<encryption>", LMP_ENCRYPT },
- { "<slot offset>", LMP_SOFFSET },
- { "<timing accuracy>", LMP_TACCURACY},
- { "<role switch>", LMP_RSWITCH },
- { "<hold mode>", LMP_HOLD },
- { "<sniff mode>", LMP_SNIFF },
+ { "<3-slot packets>", LMP_3SLOT },
+ { "<5-slot packets>", LMP_5SLOT },
+ { "<encryption>", LMP_ENCRYPT },
+ { "<slot offset>", LMP_SOFFSET },
+ { "<timing accuracy>", LMP_TACCURACY },
+ { "<role switch>", LMP_RSWITCH },
+ { "<hold mode>", LMP_HOLD },
+ { "<sniff mode>", LMP_SNIFF },
{ NULL }
},
{ /* byte 1 */
- { "<park mode>", LMP_PARK },
- { "<RSSI>", LMP_RSSI },
- { "<channel quality>", LMP_QUALITY },
- { "<SCO link>", LMP_SCO },
- { "<HV2 packets>", LMP_HV2 },
- { "<HV3 packets>", LMP_HV3 },
- { "<u-law log>", LMP_ULAW },
- { "<A-law log>", LMP_ALAW },
+ { "<park state>", LMP_PARK },
+ { "<RSSI>", LMP_RSSI },
+ { "<channel quality>", LMP_QUALITY },
+ { "<SCO link>", LMP_SCO },
+ { "<HV2 packets>", LMP_HV2 },
+ { "<HV3 packets>", LMP_HV3 },
+ { "<u-law log>", LMP_ULAW },
+ { "<A-law log>", LMP_ALAW },
{ NULL }
},
{ /* byte 2 */
- { "<CVSD>", LMP_CVSD },
- { "<paging scheme>", LMP_PSCHEME },
- { "<power control>", LMP_PCONTROL },
- { "<transparent SCO>", LMP_TRSP_SCO },
+ { "<CVSD>", LMP_CVSD },
+ { "<paging scheme>", LMP_PSCHEME },
+ { "<power control>", LMP_PCONTROL },
+ { "<transparent SCO>", LMP_TRSP_SCO },
+ { "<broadcast encrypt>",LMP_BCAST_ENC },
+ { NULL }
+ },
+ { /* byte 3 */
+ { "<enhanced iscan>", LMP_ENH_ISCAN },
+ { "<interlaced iscan>", LMP_ILACE_ISCAN },
+ { "<interlaced pscan>", LMP_ILACE_PSCAN },
+ { "<inquiry with RSSI>",LMP_RSSI_INQ },
+ { "<extended SCO>", LMP_ESCO },
+ { NULL }
+ },
+ { /* byte 4 */
+ { "<EV4 packets>", LMP_EV4 },
+ { "<EV5 packets>", LMP_EV5 },
+ { "<AFH cap. slave>", LMP_AFH_CAP_SLV },
+ { "<AFH class. slave>", LMP_AFH_CLS_SLV },
+ { NULL }
+ },
+ { /* byte 5 */
+ { "<AFH cap. master>", LMP_AFH_CAP_MST },
+ { "<AFH class. master>",LMP_AFH_CLS_MST },
+ { NULL }
+ },
+ { /* byte 6 */
+ { NULL }
+ },
+ { /* byte 7 */
+ { "<extended features>",LMP_EXT_FEAT },
{ NULL }
},
{{ NULL }}