WIP... Updating Bluetooth.

* Some bugfixes.
* added scan mode read.
* inactivated some printout for now. Was a lot of noice in terminal
This commit is contained in:
Fredrik Modéen
2012-08-27 19:23:22 +00:00
parent 9089ab06bd
commit 7a74a5df45
12 changed files with 231 additions and 115 deletions
+9 -3
View File
@@ -115,11 +115,17 @@ struct hci_command_header {
} __attribute__ ((packed));
#define OCF_WRITE_PG_TIMEOUT 0x0018
#define OCF_READ_SCAN_ENABLE 0x0019
struct hci_read_scan_enable {
uint8 status;
uint8 enable;
} __attribute__ ((packed));
#define OCF_WRITE_SCAN_ENABLE 0x001A
#define HCI_SCAN_DISABLED 0x00
#define HCI_SCAN_INQUIRY 0x01
#define HCI_SCAN_PAGE 0x02
#define HCI_SCAN_INQUIRY_PAGE 0x03
#define HCI_SCAN_INQUIRY 0x01 //Page Scan disabled
#define HCI_SCAN_PAGE 0x02 //Inquiry Scan disabled
#define HCI_SCAN_INQUIRY_PAGE 0x03 //All enabled
struct hci_write_scan_enable {
uint8 scan;
} __attribute__ ((packed));
@@ -1,6 +1,7 @@
/*
* Copyright 2007-2008 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
* Copyright 2008 Mika Lindqvist
* Copyright 2012 Fredrik Modéen [firstname]@[lastname].se
* All rights reserved. Distributed under the terms of the MIT License.
*/
#ifndef _COMMAND_MANAGER_H
@@ -104,6 +105,7 @@ SingleParameterCommandRequest(uint8 ofg, uint8 ocf, PARAMETERTYPE parameter,
/* CONTROL BASEBAND */
void* buildReset(size_t* outsize);
void* buildReadLocalName(size_t* outsize);
void* buildReadScan(size_t* outsize);
void* buildWriteScan(uint8 scanmode, size_t* outsize);
void* buildReadClassOfDevice(size_t* outsize);