hciattach: Add support for Intel Bluetooth device
Subsystems (2)
PATCH 1/1 hciattach: Add support for Intel Bluetooth device
This patch enables the Intel Bluetooth device (UART sku) over the H4 protocol. It is responsible for bring up the device into known state by configuring the baudrate and applying the patches, if required.
--- Makefile.tools | 3 +- tools/hciattach.8 | 3 + tools/hciattach.c | 13 ++ tools/hciattach.h | 1 + tools/hciattach_intel.c | 596 +++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 615 insertions(+), 1 deletion(-) create mode 100644 tools/hciattach_intel.c
Makefile.tools +2 -1
@@ -27,7 +27,8 @@ tools_hciattach_SOURCES = tools/hciattach.c tools/hciattach.h \ tools/hciattach_ti.c \ tools/hciattach_tialt.c \ tools/hciattach_ath3k.c \ - tools/hciattach_qualcomm.c + tools/hciattach_qualcomm.c \ + tools/hciattach_intel.c tools_hciattach_LDADD = lib/libbluetooth-private.la tools_hciconfig_SOURCES = tools/hciconfig.c tools/csr.h tools/csr.c \
tools/hciattach.8 +3 -0
@@ -89,6 +89,9 @@ Serial adapters using CSR chips with BCSP serial protocol .TP .B ath3k Atheros AR300x based serial Bluetooth device +.TP +.B intel +Intel Bluetooth device .RE Supported IDs are (manufacturer id, product id)
tools/hciattach.c +13 -0
@@ -131,6 +131,10 @@ static int uart_speed(int s)case 3500000 :return B3500000 ;#endif +#ifdef B3710000 + case 3710000 + return B3710000; +#endif #ifdef B4000000 case 4000000 :return B4000000 ;
@@ -322,6 +326,11 @@ static int qualcomm(int fd, struct uart_t *u, struct termios *ti)return qualcomm_init (fd, u->speed, ti, u->bdaddr); } +static int intel (int fd,struct uart_t *u,struct termios *ti) +{ +return intel_init (fd, u->init_speed, &u->speed, ti); +} +static int read_check (int fd,void *buf,int count) {int res;
@@ -1137,6 +1146,10 @@ struct uart_t uart[] = { {"qualcomm" ,0x0000 ,0x0000 ,HCI_UART_H4 ,115200 ,115200 , FLOW_CTL, DISABLE_PM, NULL, qualcomm, NULL }, +/* Intel Bluetooth Module */ + { "intel", 0x0000, 0x0000, HCI_UART_H4, 115200, 115200, + FLOW_CTL, DISABLE_PM, NULL, intel, NULL }, + { NULL, 0 } };
tools/hciattach.h +1 -0
@@ -56,3 +56,4 @@ int ath3k_init(int fd, int speed, int init_speed, char *bdaddr, struct termios *ti);int ath3k_post (int fd,int pm);int qualcomm_init (int fd,int speed,struct termios *ti,const char *bdaddr); +int intel_init (int fd,int init_speed,int *speed,struct termios *ti);
tools/hciattach_intel.c new file +596 -0
596 lines not on this page · raw message
Signature · 1 line
1.7.9.5
Johan Hedberg
AppliedHi Tedd,
Quoted 4 lines · Tedd Ho-Jeong An
This patch enables the Intel Bluetooth device (UART sku) over the H4 protocol. It is responsible for bring up the device into known state by configuring the baudrate and applying the patches, if required.
Quoted 8 lines
--- Makefile.tools | 3 +- tools/hciattach.8 | 3 + tools/hciattach.c | 13 ++ tools/hciattach.h | 1 + tools/hciattach_intel.c | 596 +++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 615 insertions(+), 1 deletion(-) create mode 100644 tools/hciattach_intel.c
Applied. Thanks.
Johan