summaryrefslogtreecommitdiff
path: root/recipes/bluez
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/bluez
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/bluez')
-rw-r--r--recipes/bluez/bcm2035-tool/addr-as-arg.patch104
-rw-r--r--recipes/bluez/bcm2035-tool_0.0.bb19
-rw-r--r--recipes/bluez/bluez-cups-backend_3.33.bb27
-rw-r--r--recipes/bluez/bluez-cups-backend_3.36.bb26
-rw-r--r--recipes/bluez/bluez-dtl1-workaround/02dtl1_cs.sh57
-rw-r--r--recipes/bluez/bluez-dtl1-workaround_1.0.bb17
-rw-r--r--recipes/bluez/bluez-gnome_0.26.bb14
-rw-r--r--recipes/bluez/bluez-gnome_cvs.bb17
-rw-r--r--recipes/bluez/bluez-gnome_git.bb17
-rw-r--r--recipes/bluez/bluez-gstreamer-plugin_3.33.bb27
-rw-r--r--recipes/bluez/bluez-gstreamer-plugin_3.36.bb26
-rw-r--r--recipes/bluez/bluez-hcidump_1.42.bb13
-rw-r--r--recipes/bluez/bluez-libs.inc22
-rw-r--r--recipes/bluez/bluez-libs_3.33.bb1
-rw-r--r--recipes/bluez/bluez-libs_3.36.bb3
-rw-r--r--recipes/bluez/bluez-utils-3.33/hciattach-ti-bts.patch477
-rw-r--r--recipes/bluez/bluez-utils-3.x/hciattach-ti-bts.patch489
-rw-r--r--recipes/bluez/bluez-utils-3.x/hcid.conf72
-rw-r--r--recipes/bluez/bluez-utils-alsa_3.33.bb25
-rw-r--r--recipes/bluez/bluez-utils-alsa_3.36.bb24
-rw-r--r--recipes/bluez/bluez-utils-dbus/dbus-2.24.patch53
-rw-r--r--recipes/bluez/bluez-utils-dbus/dbus.patch58
-rw-r--r--recipes/bluez/bluez-utils-dbus/hcid-alignment-fix.patch42
-rw-r--r--recipes/bluez/bluez-utils-dbus/hcid.conf72
-rw-r--r--recipes/bluez/bluez-utils-dbus/smash.patch11
-rw-r--r--recipes/bluez/bluez-utils.inc67
-rw-r--r--recipes/bluez/bluez-utils/handle-eintr.patch23
-rw-r--r--recipes/bluez/bluez-utils/hcid.conf57
-rw-r--r--recipes/bluez/bluez-utils/hid2hci_usb_init.patch33
-rw-r--r--recipes/bluez/bluez-utils/ppoll-uclibc-arm-r0.patch14
-rw-r--r--recipes/bluez/bluez-utils/sbc-thumb.patch11
-rw-r--r--recipes/bluez/bluez-utils/uclibc-fix.patch46
-rw-r--r--recipes/bluez/bluez-utils3.inc148
-rw-r--r--recipes/bluez/bluez-utils_3.33.bb67
-rw-r--r--recipes/bluez/bluez-utils_3.36.bb72
-rw-r--r--recipes/bluez/bluez.inc95
-rw-r--r--recipes/bluez/bluez4/fix-dfutool-usb-declaration-mismatch.patch13
-rw-r--r--recipes/bluez/bluez4/hid2hci_usb_init.patch33
-rw-r--r--recipes/bluez/bluez4/sbc-thumb.patch11
-rw-r--r--recipes/bluez/bluez4_4.31.bb60
-rw-r--r--recipes/bluez/files/base.patch33
-rw-r--r--recipes/bluez/files/blueboxes.patch18
-rw-r--r--recipes/bluez/files/bluetooth.conf13
-rw-r--r--recipes/bluez/files/bluetooth.default37
-rw-r--r--recipes/bluez/files/default-manfid-0x0-to-bcps.patch22
-rw-r--r--recipes/bluez/files/hciattach_devlength.patch11
-rw-r--r--recipes/bluez/files/no-user-include.patch18
-rw-r--r--recipes/bluez/files/openmn/bluetooth.default37
-rw-r--r--recipes/bluez/files/openmn/hcid.conf70
-rw-r--r--recipes/bluez/files/pkgconfig-add-gthread.patch50
-rw-r--r--recipes/bluez/files/slugos/bluetooth.default37
-rw-r--r--recipes/bluez/files/slugos/hcid.conf70
52 files changed, 2879 insertions, 0 deletions
diff --git a/recipes/bluez/bcm2035-tool/addr-as-arg.patch b/recipes/bluez/bcm2035-tool/addr-as-arg.patch
new file mode 100644
index 0000000000..28618c5bbb
--- /dev/null
+++ b/recipes/bluez/bcm2035-tool/addr-as-arg.patch
@@ -0,0 +1,104 @@
+--- bcm2035-tool/bcm2035-tool.c 2007/05/07 12:48:06 2000
++++ bcm2035-tool/bcm2035-tool.c 2007/05/07 12:55:47 2001
+@@ -1,6 +1,8 @@
+-/* bcm2035-tool - bcm2035 tool for Motorola EZX phones
++/* bcm2035-tool
+ *
+ * (C) 2007 by Daniel Ribeiro <drwyrm@gmail.com>
++ *
++ * MAC address as argument extension by: Jan Herman <2hp@seznam.cz>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+@@ -17,10 +19,10 @@
+ *
+ */
+
++/* Default MAC address */
++#define BDADDR "\x06\x05\x04\x03\x02\x01"
+
+ //#define PATCH_FIRMWARE
+-#define BDADDR "\xab\x89\x67\x45\x23\x01"
+-
+
+ #include <stdio.h>
+ #include <string.h>
+@@ -33,6 +35,7 @@
+ #include <sys/ioctl.h>
+ #include <termios.h>
+ #include "bcm2035-tool.h"
++//#include "bluetooth.h"
+
+ #ifdef PATCH_FIRMWARE
+ #include "motorola_patches.h"
+@@ -180,18 +183,51 @@
+
+ }
+
++void mac2hex(const char *mac, u_char *dst)
++{
++
++ int i;
++ long l;
++ char *pp;
++
++ while (isspace(*mac))
++ mac++;
++
++ /* expect 6 hex octets separated by ':' or space/NUL if last octet */
++ for (i = 0; i < 6; i++) {
++ l = strtol(mac, &pp, 16);
++ if (pp == mac || l > 0xFF || l < 0)
++ return;
++ if (!(*pp == ':' || (i == 5 && (isspace(*pp) || *pp == '\0'))))
++ return;
++ /* 5-i swaps hex chars */
++ dst[5-i] = (u_char) l;
++ mac = pp + 1;
++ }
++ }
++
++char bdaddr[6];
++
+ int main(int argc, char **argv)
+ {
+ int fd, i;
+ struct termios term;
+ char buf[1024];
+- char bdaddr[6];
+-
+- if (argc < 2) {
+- printf("use: %s <device>\n", argv[0]);
++
++ if (argc < 3) {
++ printf("BCM2035 Tool:\n");
++ printf("Usage: %s <device> <bdaddr>\n", argv[0]);
+ exit(1);
+ }
+
++ if (strlen(argv[2]) < 17) {
++ printf("invalid argument %s!\n", argv[2]);
++ exit(1);
++ }
++
++ /* Converts MAC address to swapped HEX */
++ mac2hex(argv[2], bdaddr);
++
+ fd = open (argv[1], O_RDWR | O_NOCTTY );
+
+ if(fd < 0) exit(-1);
+@@ -212,7 +248,7 @@
+ #endif
+ set_baud(fd, 460800);
+
+- send_cmd(fd, CMD_SET_BDADDR, BDADDR, 6);
++ send_cmd(fd, CMD_SET_BDADDR, bdaddr, 6);
+
+ i = N_HCI;
+ if (ioctl(fd, TIOCSETD, &i) < 0) {
+@@ -228,5 +264,3 @@
+ while (1) sleep(999999999);
+ return 0;
+ }
+-
+-
diff --git a/recipes/bluez/bcm2035-tool_0.0.bb b/recipes/bluez/bcm2035-tool_0.0.bb
new file mode 100644
index 0000000000..636841de6f
--- /dev/null
+++ b/recipes/bluez/bcm2035-tool_0.0.bb
@@ -0,0 +1,19 @@
+DESCRIPTION = "Bluetooth firmware poker for bccm2035 chips (motorola phones and palms)"
+LICENSE = "GPLv2"
+
+PR = "r1"
+
+SRC_URI = "http://people.openezx.org/wyrm/bcm2035-tool.tgz \
+ file://addr-as-arg.patch;patch=1 \
+ "
+
+S = "${WORKDIR}/${PN}"
+
+do_compile() {
+ ${CC} bcm2035-tool.c -o bcm2035-tool
+}
+
+do_install() {
+ install -d ${D}${sbindir}
+ install -m 755 bcm2035-tool ${D}${sbindir}
+}
diff --git a/recipes/bluez/bluez-cups-backend_3.33.bb b/recipes/bluez/bluez-cups-backend_3.33.bb
new file mode 100644
index 0000000000..40e099642a
--- /dev/null
+++ b/recipes/bluez/bluez-cups-backend_3.33.bb
@@ -0,0 +1,27 @@
+require bluez-utils3.inc
+
+PR = "r1"
+
+DEPENDS += "cups"
+
+# see bluez-utils3.inc for the explanation of these option
+EXTRA_OECONF = " \
+ --enable-bccmd \
+ --enable-hid2hci \
+ --disable-alsa \
+ --enable-cups \
+ --enable-glib \
+ --disable-sdpd \
+ --enable-network \
+ --enable-serial \
+ --enable-input \
+ --enable-audio \
+ --enable-echo \
+ --enable-configfile \
+ --enable-initscripts \
+ --enable-test \
+ "
+
+
+FILES_${PN} = "${libdir}/cups/backend/bluetooth"
+RDEPENDS_${PN} = "cups"
diff --git a/recipes/bluez/bluez-cups-backend_3.36.bb b/recipes/bluez/bluez-cups-backend_3.36.bb
new file mode 100644
index 0000000000..4bcb962f3c
--- /dev/null
+++ b/recipes/bluez/bluez-cups-backend_3.36.bb
@@ -0,0 +1,26 @@
+require bluez-utils3.inc
+
+
+DEPENDS += "cups"
+
+# see bluez-utils3.inc for the explanation of these option
+EXTRA_OECONF = " \
+ --enable-bccmd \
+ --enable-hid2hci \
+ --disable-alsa \
+ --enable-cups \
+ --enable-glib \
+ --disable-sdpd \
+ --enable-network \
+ --enable-serial \
+ --enable-input \
+ --enable-audio \
+ --enable-echo \
+ --enable-configfile \
+ --enable-initscripts \
+ --enable-test \
+ "
+
+
+FILES_${PN} = "${libdir}/cups/backend/bluetooth"
+RDEPENDS_${PN} = "cups"
diff --git a/recipes/bluez/bluez-dtl1-workaround/02dtl1_cs.sh b/recipes/bluez/bluez-dtl1-workaround/02dtl1_cs.sh
new file mode 100644
index 0000000000..fefc72e07a
--- /dev/null
+++ b/recipes/bluez/bluez-dtl1-workaround/02dtl1_cs.sh
@@ -0,0 +1,57 @@
+#!/bin/sh
+
+case "$1" in
+ suspend)
+ if [ "`/sbin/hciconfig`" != "" ]; then
+ #If hciconfig outputs anything then there's probably a Bluetooth
+ # CF card in the slot so shut it down.
+ hcitool dc `hcitool con | grep ACL | sed 's/^.*\([0-9A-F]\{2\}\(:[0-9A-F]\{2\}\)\{5\}\).*$/\1/'`
+ hciconfig hci0 down
+ killall hciattach > /dev/null 2>&1
+ fi
+ ;;
+
+ resume)
+ #check for kernel version
+ if [ "`uname -r | grep 2.4.`" != "" ]; then
+ k="o"
+ elif [ "`uname -r | grep 2.6.`" != "" ]; then
+ k="ko"
+ else
+ exit 0
+ fi
+
+ if test -e /sbin/cardctl; then
+ CARDCTL=/sbin/cardctl
+ elif test -e /sbin/pccardctl; then
+ CARDCTL=/sbin/pccardctl
+ else
+ exit 0
+ fi
+
+ if [ "`lsmod | grep hci_uart`" != "" ]; then
+ #If the hci_usb module is still loaded then there's a serial based
+ # Bluetooth CF card in the slot, which only needs a resume to get it going
+ # again.
+ rfcomm bind all
+ $CARDCTL resume
+ hciconfig hci0 up
+ else
+ # only works for nokia dtl1 cards
+ for f in /lib/modules/`uname -r`/kernel/drivers/bluetooth/dtl1_cs.$k
+ do
+ #Enumerate all the self-contained Bluetooth CF card drivers
+ f=`echo $f | sed 's/\.'$k'$//'`
+ f=`basename $f`
+ if [ "`lsmod | grep $f`" != "" ]; then
+ #If one of these drivers is still loaded, then there is probably
+ #a non-serial based Bluetooth CF card in the slot that needs
+ #ejecting and reinserting to get it going again
+ rfcomm bind all
+ $CARDCTL eject
+ $CARDCTL insert
+ hciconfig hci0 up
+ fi
+ done
+ fi
+esac
diff --git a/recipes/bluez/bluez-dtl1-workaround_1.0.bb b/recipes/bluez/bluez-dtl1-workaround_1.0.bb
new file mode 100644
index 0000000000..413d220508
--- /dev/null
+++ b/recipes/bluez/bluez-dtl1-workaround_1.0.bb
@@ -0,0 +1,17 @@
+DESCRIPTION = "A nasty hack for for dtl1-cs driver to workaround suspend/resume."
+SECTION = "console"
+PRIORITY = "optional"
+LICENSE = "GPL"
+PR = "r1"
+
+SRC_URI = "file://02dtl1_cs.sh"
+
+do_install() {
+ install -d ${D}${sysconfdir}/apm/event.d/
+ install -m 0755 ${WORKDIR}/02dtl1_cs.sh ${D}${sysconfdir}/apm/event.d/
+}
+
+#Package 02dtl1_cs.sh, which is a nasty hack to get dtl1c_cs cards working with suspend/resume
+FILES_${PN} += "${sysconfdir}/apm/"
+
+PACKAGE_ARCH = "all"
diff --git a/recipes/bluez/bluez-gnome_0.26.bb b/recipes/bluez/bluez-gnome_0.26.bb
new file mode 100644
index 0000000000..135bb5ca40
--- /dev/null
+++ b/recipes/bluez/bluez-gnome_0.26.bb
@@ -0,0 +1,14 @@
+DESCRIPTION = "Bluetooth configuration applet"
+LICENSE = "GPL+LGPL"
+
+DEPENDS = "dbus-glib gconf libnotify gtk+"
+RRECOMMENDS = "gnome-icon-theme"
+
+PR = "r4"
+
+SRC_URI = "http://bluez.sourceforge.net/download/${P}.tar.gz"
+
+inherit autotools pkgconfig gconf mime
+
+FILES_${PN} += "${datadir}/gconf ${datadir}/icons ${datadir}/mime/packages"
+
diff --git a/recipes/bluez/bluez-gnome_cvs.bb b/recipes/bluez/bluez-gnome_cvs.bb
new file mode 100644
index 0000000000..728d20e5f1
--- /dev/null
+++ b/recipes/bluez/bluez-gnome_cvs.bb
@@ -0,0 +1,17 @@
+DESCRIPTION = "Bluetooth configuration applet"
+LICENSE = "GPL+LGPL"
+
+DEFAULT_PREFERENCE = "-1"
+
+DEPENDS = "dbus-glib gconf libnotify gtk+"
+
+SRC_URI = "cvs://anonymous@cvs.bluez.org/cvsroot/bluez;module=gnome \
+ "
+
+PV = "0.13+cvs${SRCDATE}"
+S = "${WORKDIR}/gnome"
+
+inherit autotools pkgconfig gconf
+
+FILES_${PN} += "${datadir}/gconf"
+
diff --git a/recipes/bluez/bluez-gnome_git.bb b/recipes/bluez/bluez-gnome_git.bb
new file mode 100644
index 0000000000..e8bfd97419
--- /dev/null
+++ b/recipes/bluez/bluez-gnome_git.bb
@@ -0,0 +1,17 @@
+DESCRIPTION = "Bluetooth configuration applet"
+LICENSE = "GPL+LGPL"
+
+DEFAULT_PREFERENCE = "-2"
+
+DEPENDS = "dbus-glib gconf libnotify gtk+"
+
+SRC_URI = "git://people.freedesktop.org/~hadess/bluez-gnome;protocol=git \
+ file://pkgconfig-add-gthread.patch;patch=1 "
+
+PV = "0.10+git${SRCDATE}"
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig gconf
+
+FILES_${PN} += "${datadir}/gconf"
+
diff --git a/recipes/bluez/bluez-gstreamer-plugin_3.33.bb b/recipes/bluez/bluez-gstreamer-plugin_3.33.bb
new file mode 100644
index 0000000000..53b7eb86f2
--- /dev/null
+++ b/recipes/bluez/bluez-gstreamer-plugin_3.33.bb
@@ -0,0 +1,27 @@
+require bluez-utils3.inc
+
+PR = "r1"
+
+DEPENDS += "gstreamer gst-plugins-base "
+
+# see bluez-utils3.inc for the explanation of these option
+EXTRA_OECONF = " \
+ --enable-bccmd \
+ --enable-hid2hci \
+ --enable-alsa \
+ --disable-cups \
+ --enable-glib \
+ --enable-gstreamer \
+ --disable-sdpd \
+ --enable-network \
+ --enable-serial \
+ --enable-input \
+ --enable-audio \
+ --enable-echo \
+ --enable-configfile \
+ --enable-initscripts \
+ --enable-test \
+ "
+
+
+FILES_${PN} = "${libdir}/gstreamer-0.10/libgstbluetooth.so"
diff --git a/recipes/bluez/bluez-gstreamer-plugin_3.36.bb b/recipes/bluez/bluez-gstreamer-plugin_3.36.bb
new file mode 100644
index 0000000000..facad9cedd
--- /dev/null
+++ b/recipes/bluez/bluez-gstreamer-plugin_3.36.bb
@@ -0,0 +1,26 @@
+require bluez-utils3.inc
+
+
+DEPENDS += "gstreamer gst-plugins-base "
+
+# see bluez-utils3.inc for the explanation of these option
+EXTRA_OECONF = " \
+ --enable-bccmd \
+ --enable-hid2hci \
+ --enable-alsa \
+ --disable-cups \
+ --enable-glib \
+ --enable-gstreamer \
+ --disable-sdpd \
+ --enable-network \
+ --enable-serial \
+ --enable-input \
+ --enable-audio \
+ --enable-echo \
+ --enable-configfile \
+ --enable-initscripts \
+ --enable-test \
+ "
+
+
+FILES_${PN} = "${libdir}/gstreamer-0.10/libgstbluetooth.so"
diff --git a/recipes/bluez/bluez-hcidump_1.42.bb b/recipes/bluez/bluez-hcidump_1.42.bb
new file mode 100644
index 0000000000..877c8db33c
--- /dev/null
+++ b/recipes/bluez/bluez-hcidump_1.42.bb
@@ -0,0 +1,13 @@
+DESCRIPTION = "Linux Bluetooth Stack HCI Debugger Tool."
+SECTION = "console"
+PRIORITY = "optional"
+DEPENDS = "bluez-libs"
+LICENSE = "GPL"
+PR = "r0"
+
+SRC_URI = "http://bluez.sourceforge.net/download/bluez-hcidump-${PV}.tar.gz"
+S = "${WORKDIR}/bluez-hcidump-${PV}"
+
+EXTRA_OECONF = "--with-bluez-libs=${STAGING_LIBDIR} --with-bluez-includes=${STAGING_INCDIR}"
+
+inherit autotools
diff --git a/recipes/bluez/bluez-libs.inc b/recipes/bluez/bluez-libs.inc
new file mode 100644
index 0000000000..d740bd80a9
--- /dev/null
+++ b/recipes/bluez/bluez-libs.inc
@@ -0,0 +1,22 @@
+DESCRIPTION = "Linux Bluetooth Stack Userland Libaries."
+SECTION = "libs"
+PRIORITY = "optional"
+HOMEPAGE = "http://www.bluez.org"
+LICENSE = "GPL"
+PR = "r0"
+
+SRC_URI = "http://bluez.sourceforge.net/download/bluez-libs-${PV}.tar.gz"
+
+inherit autotools pkgconfig
+
+HEADERS = "bluetooth.h bnep.h cmtp.h hci.h hci_lib.h hidp.h l2cap.h rfcomm.h sco.h sdp.h sdp_lib.h"
+
+do_stage() {
+ oe_libinstall -a -so -C src libbluetooth ${STAGING_LIBDIR}
+
+ install -d ${STAGING_INCDIR}/bluetooth/
+ for f in ${HEADERS}
+ do
+ install -m 0644 include/$f ${STAGING_INCDIR}/bluetooth/$f
+ done
+}
diff --git a/recipes/bluez/bluez-libs_3.33.bb b/recipes/bluez/bluez-libs_3.33.bb
new file mode 100644
index 0000000000..6ddf62a4fb
--- /dev/null
+++ b/recipes/bluez/bluez-libs_3.33.bb
@@ -0,0 +1 @@
+require bluez-libs.inc
diff --git a/recipes/bluez/bluez-libs_3.36.bb b/recipes/bluez/bluez-libs_3.36.bb
new file mode 100644
index 0000000000..8e0e467bc9
--- /dev/null
+++ b/recipes/bluez/bluez-libs_3.36.bb
@@ -0,0 +1,3 @@
+require bluez-libs.inc
+
+PR = "r1"
diff --git a/recipes/bluez/bluez-utils-3.33/hciattach-ti-bts.patch b/recipes/bluez/bluez-utils-3.33/hciattach-ti-bts.patch
new file mode 100644
index 0000000000..1b208f7979
--- /dev/null
+++ b/recipes/bluez/bluez-utils-3.33/hciattach-ti-bts.patch
@@ -0,0 +1,477 @@
+--- bluez-utils-3.1/tools/hciattach.c.orig 2006-07-23 14:02:14.000000000 +0200
++++ bluez-utils-3.1/tools/hciattach.c 2006-07-23 14:06:29.000000000 +0200
+@@ -60,6 +60,8 @@
+ #define HCI_UART_3WIRE 2
+ #define HCI_UART_H4DS 3
+
++#include "ti_bts.h"
++
+ struct uart_t {
+ char *type;
+ int m_id;
+@@ -70,6 +72,7 @@
+ int flags;
+ char *bdaddr;
+ int (*init) (int fd, struct uart_t *u, struct termios *ti);
++ char *bts; /* bluetooth script */
+ };
+
+ #define FLOW_CTL 0x0001
+@@ -279,6 +282,114 @@
+ return 0;
+ }
+
++static int brf6150(int fd, struct uart_t *u, struct termios *ti)
++{
++ bts_t *bfp;
++ int i;
++ unsigned long vers;
++ unsigned char actionbuf[256];
++ unsigned char resp[128]; /* Response */
++ unsigned long count;
++ unsigned short atype;
++
++ if (u->bts == NULL) /* no script, ignore */
++ return 0;
++
++ bfp = bts_load_script( u->bts, &vers );
++ if (bfp == NULL)
++ return -1;
++
++ fprintf( stderr, "Loading BTS script version %lu\n", vers );
++
++ while ((count = bts_next_action( bfp, actionbuf,
++ sizeof actionbuf - 1, &atype )) != 0) {
++ if (atype == ACTION_REMARKS) {
++ if (actionbuf[0] != 0)
++ fprintf( stderr, "%s\n", actionbuf );
++ }
++ else if (atype == ACTION_SEND_COMMAND) {
++#if 0
++ fprintf( stderr, "ACTION_SEND_COMMAND: ", (int)atype );
++ for (i=0; i<count; i++) {
++ fprintf( stderr, "0x%02x ", actionbuf[i] );
++ }
++ fprintf( stderr, "\n" );
++#endif
++ int n;
++ n = write(fd, actionbuf, count);
++ if (n < 0 || n < count) {
++ perror("Failed to write TI action command");
++ return -1;
++ }
++ }
++ else if (atype == ACTION_WAIT_EVENT) {
++ action_wait_t *wait = (action_wait_t *)actionbuf;
++#if 0
++ fprintf( stderr, "ACTION_WAIT_EVENT: %u msec, %u size, data = ", wait->msec, wait->size );
++ for (i=0; i<wait->size; i++) {
++ fprintf( stderr, "0x%02x ", wait->data[i] );
++ }
++ fprintf( stderr, "\n" );
++#endif
++ usleep(wait->msec); /* seems they give usec, not msec */
++ /* Read reply. */
++ if ((count = read_hci_event(fd, resp, sizeof resp)) < 0) {
++ perror("Failed to read TI command response");
++ return -1;
++ }
++ if (count < wait->size) {
++ fprintf( stderr, "TI command response is short.");
++ }
++ for (i=0; i<wait->size; i++) {
++ if (i == 3) continue; /* ignore */
++ if (resp[i] != wait->data[i]) {
++ fprintf( stderr, "TI command response does not match expected result.\n" );
++ }
++ }
++ }
++ else if (atype == ACTION_SERIAL_PORT_PARAMETERS) {
++ action_serial_t *sercmd = (action_serial_t *)actionbuf;
++
++ /* Set actual baudrate */
++ fprintf( stderr,
++ "BTS changing baud rate to %u, flow control to %u\n",
++ sercmd->baud, sercmd->flow_control );
++
++ tcflush(fd, TCIOFLUSH);
++
++ if (sercmd->flow_control)
++ ti->c_cflag |= CRTSCTS;
++ else
++ ti->c_cflag &= ~CRTSCTS;
++ if (tcsetattr(fd, TCSANOW, ti) < 0) {
++ perror("Can't set port settings");
++ return -1;
++ }
++
++ u->speed = sercmd->baud;
++
++ tcflush(fd, TCIOFLUSH);
++ if (set_speed(fd, ti, sercmd->baud) < 0) {
++ perror("Can't set baud rate");
++ return -1;
++ }
++ }
++ else if (atype == ACTION_DELAY) {
++ action_delay_t *delay = (action_delay_t *)actionbuf;
++ usleep(delay->msec); /* seems they give usec, not msec */
++ }
++ else {
++ fprintf( stderr, "BTS action type = %d: ", (int)atype );
++ for (i=0; i<count; i++) {
++ fprintf( stderr, "0x%02x ", actionbuf[i] );
++ }
++ fprintf( stderr, "\n" );
++ }
++ }
++ bts_unload_script( bfp );
++ return 0;
++}
++
+ static int texas(int fd, struct uart_t *u, struct termios *ti)
+ {
+ struct timespec tm = {0, 50000};
+@@ -328,6 +439,17 @@
+ /* Print LMP subversion */
+ fprintf(stderr, "Texas module LMP sub-version : 0x%02x%02x\n", resp[14] & 0xFF, resp[13] & 0xFF);
+
++ if ((resp[14] >> 2) == 3) {
++ /* BRF6150 */
++ int err;
++
++ nanosleep(&tm, NULL);
++ if ((err = brf6150(fd, u, ti)) != 0) {
++ fprintf(stderr, "Texas module script failed (err=%d)\n", err);
++ return -1;
++ }
++ }
++
+ nanosleep(&tm, NULL);
+ return 0;
+ }
+@@ -1204,7 +1326,7 @@
+ {
+ printf("hciattach - HCI UART driver initialization utility\n");
+ printf("Usage:\n");
+- printf("\thciattach [-n] [-p] [-b] [-t timeout] [-s initial_speed] <tty> <type | id> [speed] [flow|noflow] [bdaddr]\n");
++ printf("\thciattach [-n] [-p] [-b] [-t timeout] [-s initial_speed] [-S bts-script] <tty> <type | id> [speed] [flow|noflow] [bdaddr]\n");
+ printf("\thciattach -l\n");
+ }
+
+@@ -1219,11 +1341,12 @@
+ struct sigaction sa;
+ struct pollfd p;
+ char dev[PATH_MAX];
++ char *bts = NULL;
+
+ detach = 1;
+ printpid = 0;
+
+- while ((opt=getopt(argc, argv, "bnpt:s:l")) != EOF) {
++ while ((opt=getopt(argc, argv, "bnpt:s:S:l")) != EOF) {
+ switch(opt) {
+ case 'b':
+ send_break = 1;
+@@ -1245,6 +1368,10 @@
+ init_speed = atoi(optarg);
+ break;
+
++ case 'S':
++ bts = optarg;
++ break;
++
+ case 'l':
+ for (i = 0; uart[i].type; i++) {
+ printf("%-10s0x%04x,0x%04x\n", uart[i].type,
+@@ -1320,6 +1447,8 @@
+ if (init_speed)
+ u->init_speed = init_speed;
+
++ u->bts = bts;
++
+ memset(&sa, 0, sizeof(sa));
+ sa.sa_flags = SA_NOCLDSTOP;
+ sa.sa_handler = sig_alarm;
+--- bluez-utils-3.1/tools/ti_bts.h.orig 2006-07-23 14:07:26.000000000 +0200
++++ bluez-utils-3.1/tools/ti_bts.h 2006-07-23 14:07:46.000000000 +0200
+@@ -0,0 +1,116 @@
++/*
++ * Copyright (c) 2005 Texas Instruments, Inc.
++ * Ported by SDG Systems, LLC
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License