summaryrefslogtreecommitdiffstats
path: root/meta-extras/packages
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2007-05-08 15:30:16 +0000
committerRichard Purdie <richard@openedhand.com>2007-05-08 15:30:16 +0000
commit4c5caa6764150e68775e7d4774e82b5a27e475f8 (patch)
tree5f14cf02be03663e124f04b9a6c548e42a5f57ec /meta-extras/packages
parent81547613652cbcc65dfc1e832e6845f3f167c2be (diff)
downloadpoky-4c5caa6764150e68775e7d4774e82b5a27e475f8.tar.gz
bluez: Move from meta-extras to meta since required by syncml/openobex
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1612 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta-extras/packages')
-rw-r--r--meta-extras/packages/bluez/bluez-hcidump_1.32.bb13
-rw-r--r--meta-extras/packages/bluez/bluez-libs_3.4.bb22
-rw-r--r--meta-extras/packages/bluez/bluez-utils-dbus/dbus-2.24.patch53
-rw-r--r--meta-extras/packages/bluez/bluez-utils-dbus/dbus.patch58
-rw-r--r--meta-extras/packages/bluez/bluez-utils-dbus/hcid-alignment-fix.patch42
-rw-r--r--meta-extras/packages/bluez/bluez-utils-dbus/hcid.conf72
-rw-r--r--meta-extras/packages/bluez/bluez-utils-dbus/smash.patch11
-rw-r--r--meta-extras/packages/bluez/bluez-utils.inc60
-rw-r--r--meta-extras/packages/bluez/bluez-utils/02dtl1_cs.sh57
-rw-r--r--meta-extras/packages/bluez/bluez-utils/hciattach-ti-bts.patch489
-rw-r--r--meta-extras/packages/bluez/bluez-utils/hcid.conf57
-rw-r--r--meta-extras/packages/bluez/bluez-utils_3.4.bb53
-rw-r--r--meta-extras/packages/bluez/files/02dtl1_cs.sh57
-rw-r--r--meta-extras/packages/bluez/files/base.patch33
-rw-r--r--meta-extras/packages/bluez/files/blueboxes.patch18
-rw-r--r--meta-extras/packages/bluez/files/bluetooth.conf13
-rw-r--r--meta-extras/packages/bluez/files/bluetooth.default37
-rw-r--r--meta-extras/packages/bluez/files/default-manfid-0x0-to-bcps.patch22
-rw-r--r--meta-extras/packages/bluez/files/hciattach-ti-bts.patch489
-rw-r--r--meta-extras/packages/bluez/files/hciattach_devlength.patch11
-rw-r--r--meta-extras/packages/bluez/files/hcid.conf72
-rw-r--r--meta-extras/packages/bluez/files/no-user-include.patch18
-rw-r--r--meta-extras/packages/bluez/files/openmn/bluetooth.default37
-rw-r--r--meta-extras/packages/bluez/files/openmn/hcid.conf70
-rw-r--r--meta-extras/packages/bluez/files/openzaurus/bluetooth.default37
-rw-r--r--meta-extras/packages/bluez/files/slugos/bluetooth.default37
-rw-r--r--meta-extras/packages/bluez/files/slugos/hcid.conf70
27 files changed, 0 insertions, 2008 deletions
diff --git a/meta-extras/packages/bluez/bluez-hcidump_1.32.bb b/meta-extras/packages/bluez/bluez-hcidump_1.32.bb
deleted file mode 100644
index 877c8db33c..0000000000
--- a/meta-extras/packages/bluez/bluez-hcidump_1.32.bb
+++ /dev/null
@@ -1,13 +0,0 @@
1DESCRIPTION = "Linux Bluetooth Stack HCI Debugger Tool."
2SECTION = "console"
3PRIORITY = "optional"
4DEPENDS = "bluez-libs"
5LICENSE = "GPL"
6PR = "r0"
7
8SRC_URI = "http://bluez.sourceforge.net/download/bluez-hcidump-${PV}.tar.gz"
9S = "${WORKDIR}/bluez-hcidump-${PV}"
10
11EXTRA_OECONF = "--with-bluez-libs=${STAGING_LIBDIR} --with-bluez-includes=${STAGING_INCDIR}"
12
13inherit autotools
diff --git a/meta-extras/packages/bluez/bluez-libs_3.4.bb b/meta-extras/packages/bluez/bluez-libs_3.4.bb
deleted file mode 100644
index d740bd80a9..0000000000
--- a/meta-extras/packages/bluez/bluez-libs_3.4.bb
+++ /dev/null
@@ -1,22 +0,0 @@
1DESCRIPTION = "Linux Bluetooth Stack Userland Libaries."
2SECTION = "libs"
3PRIORITY = "optional"
4HOMEPAGE = "http://www.bluez.org"
5LICENSE = "GPL"
6PR = "r0"
7
8SRC_URI = "http://bluez.sourceforge.net/download/bluez-libs-${PV}.tar.gz"
9
10inherit autotools pkgconfig
11
12HEADERS = "bluetooth.h bnep.h cmtp.h hci.h hci_lib.h hidp.h l2cap.h rfcomm.h sco.h sdp.h sdp_lib.h"
13
14do_stage() {
15 oe_libinstall -a -so -C src libbluetooth ${STAGING_LIBDIR}
16
17 install -d ${STAGING_INCDIR}/bluetooth/
18 for f in ${HEADERS}
19 do
20 install -m 0644 include/$f ${STAGING_INCDIR}/bluetooth/$f
21 done
22}
diff --git a/meta-extras/packages/bluez/bluez-utils-dbus/dbus-2.24.patch b/meta-extras/packages/bluez/bluez-utils-dbus/dbus-2.24.patch
deleted file mode 100644
index d8ec946a0b..0000000000
--- a/meta-extras/packages/bluez/bluez-utils-dbus/dbus-2.24.patch
+++ /dev/null
@@ -1,53 +0,0 @@
1--- bluez-utils-2.24/acinclude.m4.orig 2006-01-12 08:21:38.000000000 +0100
2+++ bluez-utils-2.24/acinclude.m4 2006-01-12 08:23:18.000000000 +0100
3@@ -131,46 +131,15 @@
4 ])
5
6 AC_DEFUN([AC_PATH_DBUS], [
7- dbus_prefix=${prefix}
8-
9- AC_ARG_WITH(dbus, AC_HELP_STRING([--with-dbus=DIR], [D-BUS library is installed in DIR]), [
10- if (test "${withval}" != "yes"); then
11- dbus_prefix=${withval}
12- fi
13- ])
14-
15- ac_save_CPPFLAGS=$CPPFLAGS
16- ac_save_LDFLAGS=$LDFLAGS
17-
18- DBUS_CFLAGS="-DDBUS_API_SUBJECT_TO_CHANGE"
19- test -d "${dbus_prefix}/include/dbus-1.0" && DBUS_CFLAGS="$DBUS_CFLAGS -I${dbus_prefix}/include/dbus-1.0"
20- if (test "${prefix}" = "${bluez_prefix}"); then
21- test -d "${libdir}/dbus-1.0/include" && DBUS_CFLAGS="$DBUS_CFLAGS -I${libdir}/dbus-1.0/include"
22- else
23- test -d "${dbus_prefix}/lib64/dbus-1.0/include" && DBUS_CFLAGS="$DBUS_CFLAGS -I${dbus_prefix}/lib64/dbus-1.0/include"
24- test -d "${dbus_prefix}/lib/dbus-1.0/include" && DBUS_CFLAGS="$DBUS_CFLAGS -I${dbus_prefix}/lib/dbus-1.0/include"
25- fi
26+ if pkg-config --exists dbus-1; then
27+ dbus_found=yes ; DBUS_CFLAGS="`pkg-config --cflags dbus-1` -DDBUS_API_SUBJECT_TO_CHANGE"
28+ DBUS_LIBS="`pkg-config --libs dbus-1`"
29
30 CPPFLAGS="$CPPFLAGS $DBUS_CFLAGS"
31- AC_CHECK_HEADER(dbus/dbus.h, dbus_found=yes, dbus_found=no)
32-
33- DBUS_LIBS=""
34- if (test "${prefix}" = "${dbus_prefix}"); then
35- test -d "${libdir}" && DBUS_LIBS="$DBUS_LIBS -L${libdir}"
36- else
37- test -d "${dbus_prefix}/lib64" && DBUS_LIBS="$DBUS_LIBS -L${dbus_prefix}/lib64"
38- test -d "${dbus_prefix}/lib" && DBUS_LIBS="$DBUS_LIBS -L${dbus_prefix}/lib"
39- fi
40-
41 LDFLAGS="$LDFLAGS $DBUS_LIBS"
42- AC_CHECK_LIB(dbus-1, dbus_error_init, DBUS_LIBS="$DBUS_LIBS -ldbus-1", dbus_found=no)
43- AC_CHECK_LIB(dbus-1, dbus_message_iter_get_basic, dummy=yes, dbus_found=no)
44-
45- CPPFLAGS=$ac_save_CPPFLAGS
46- LDFLAGS=$ac_save_LDFLAGS
47-
48 AC_SUBST(DBUS_CFLAGS)
49 AC_SUBST(DBUS_LIBS)
50+ fi
51 ])
52
53 AC_DEFUN([AC_PATH_FUSE], [
diff --git a/meta-extras/packages/bluez/bluez-utils-dbus/dbus.patch b/meta-extras/packages/bluez/bluez-utils-dbus/dbus.patch
deleted file mode 100644
index c5ab129469..0000000000
--- a/meta-extras/packages/bluez/bluez-utils-dbus/dbus.patch
+++ /dev/null
@@ -1,58 +0,0 @@
1
2#
3# Patch managed by http://www.holgerschurig.de/patcher.html
4#
5
6--- bluez-utils-2.20/acinclude.m4~dbus.patch
7+++ bluez-utils-2.20/acinclude.m4
8@@ -211,46 +211,15 @@
9 ])
10
11 AC_DEFUN([AC_PATH_DBUS], [
12- dbus_prefix=${prefix}
13-
14- AC_ARG_WITH(dbus, AC_HELP_STRING([--with-dbus=DIR], [D-BUS library is installed in DIR]), [
15- if (test "${withval}" != "yes"); then
16- dbus_prefix=${withval}
17- fi
18- ])
19-
20- ac_save_CPPFLAGS=$CPPFLAGS
21- ac_save_LDFLAGS=$LDFLAGS
22-
23- DBUS_CFLAGS="-DDBUS_API_SUBJECT_TO_CHANGE"
24- test -d "${dbus_prefix}/include/dbus-1.0" && DBUS_CFLAGS="$DBUS_CFLAGS -I${dbus_prefix}/include/dbus-1.0"
25- if (test "${prefix}" = "${bluez_prefix}"); then
26- test -d "${libdir}/dbus-1.0/include" && DBUS_CFLAGS="$DBUS_CFLAGS -I${libdir}/dbus-1.0/include"
27- else
28- test -d "${dbus_prefix}/lib64/dbus-1.0/include" && DBUS_CFLAGS="$DBUS_CFLAGS -I${dbus_prefix}/lib64/dbus-1.0/include"
29- test -d "${dbus_prefix}/lib/dbus-1.0/include" && DBUS_CFLAGS="$DBUS_CFLAGS -I${dbus_prefix}/lib/dbus-1.0/include"
30- fi
31+ if pkg-config --exists dbus-1; then
32+ dbus_found=yes ; DBUS_CFLAGS="`pkg-config --cflags dbus-1` -DDBUS_API_SUBJECT_TO_CHANGE"
33+ DBUS_LIBS="`pkg-config --libs dbus-1`"
34
35 CPPFLAGS="$CPPFLAGS $DBUS_CFLAGS"
36- AC_CHECK_HEADER(dbus/dbus.h, dbus_found=yes, dbus_found=no)
37-
38- DBUS_LIBS=""
39- if (test "${prefix}" = "${dbus_prefix}"); then
40- test -d "${libdir}" && DBUS_LIBS="$DBUS_LIBS -L${libdir}"
41- else
42- test -d "${dbus_prefix}/lib64" && DBUS_LIBS="$DBUS_LIBS -L${dbus_prefix}/lib64"
43- test -d "${dbus_prefix}/lib" && DBUS_LIBS="$DBUS_LIBS -L${dbus_prefix}/lib"
44- fi
45-
46 LDFLAGS="$LDFLAGS $DBUS_LIBS"
47- AC_CHECK_LIB(dbus-1, dbus_error_init, DBUS_LIBS="$DBUS_LIBS -ldbus-1", dbus_found=no)
48- AC_CHECK_LIB(dbus-1, dbus_message_iter_get_basic, AC_DEFINE(HAVE_DBUS_MESSAGE_ITER_GET_BASIC, 1, [Define to 1 if you have the dbus_message_iter_get_basic() function.]))
49-
50- CPPFLAGS=$ac_save_CPPFLAGS
51- LDFLAGS=$ac_save_LDFLAGS
52-
53 AC_SUBST(DBUS_CFLAGS)
54 AC_SUBST(DBUS_LIBS)
55+ fi
56 ])
57
58 AC_DEFUN([AC_ARG_BLUEZ], [
diff --git a/meta-extras/packages/bluez/bluez-utils-dbus/hcid-alignment-fix.patch b/meta-extras/packages/bluez/bluez-utils-dbus/hcid-alignment-fix.patch
deleted file mode 100644
index 276281c14e..0000000000
--- a/meta-extras/packages/bluez/bluez-utils-dbus/hcid-alignment-fix.patch
+++ /dev/null
@@ -1,42 +0,0 @@
1--- bluez-utils-2.20/hcid/dbus.c.orig 2005-09-21 11:27:26 +0200
2+++ bluez-utils-2.20/hcid/dbus.c 2005-09-21 11:27:35 +0200
3@@ -120,6 +121,7 @@
4 DBusMessage *message;
5 #ifdef HAVE_DBUS_MESSAGE_ITER_GET_BASIC
6 uint8_t *addr = (uint8_t *) &ci->bdaddr;
7+ uint32_t ci_out = ci->out;
8 #else
9 DBusMessageIter iter;
10 #endif
11@@ -138,7 +140,7 @@
12 bacpy(&req->bda, &ci->bdaddr);
13
14 #ifdef HAVE_DBUS_MESSAGE_ITER_GET_BASIC
15- dbus_message_append_args(message, DBUS_TYPE_BOOLEAN, &ci->out,
16+ dbus_message_append_args(message, DBUS_TYPE_BOOLEAN, &ci_out,
17 DBUS_TYPE_ARRAY, DBUS_TYPE_BYTE,
18 &addr, sizeof(bdaddr_t), DBUS_TYPE_INVALID);
19 #else
20@@ -261,6 +263,8 @@
21 DBusMessage *message;
22 #ifndef HAVE_DBUS_MESSAGE_ITER_GET_BASIC
23 DBusMessageIter iter;
24+#else
25+ int32_t tmp_rssi = rssi;
26 #endif
27 char *local_addr, *peer_addr;
28 bdaddr_t tmp;
29@@ -276,11 +280,12 @@
30 }
31
32 #ifdef HAVE_DBUS_MESSAGE_ITER_GET_BASIC
33+
34 dbus_message_append_args(message,
35 DBUS_TYPE_STRING, &local_addr,
36 DBUS_TYPE_STRING, &peer_addr,
37 DBUS_TYPE_UINT32, &class,
38- DBUS_TYPE_INT32, &rssi,
39+ DBUS_TYPE_INT32, &tmp_rssi,
40 DBUS_TYPE_INVALID);
41 #else
42 dbus_message_append_iter_init(message, &iter);
diff --git a/meta-extras/packages/bluez/bluez-utils-dbus/hcid.conf b/meta-extras/packages/bluez/bluez-utils-dbus/hcid.conf
deleted file mode 100644
index ab3ca2aaee..0000000000
--- a/meta-extras/packages/bluez/bluez-utils-dbus/hcid.conf
+++ /dev/null
@@ -1,72 +0,0 @@
1#
2# HCI daemon configuration file.
3#
4# $Id: hcid.conf,v 1.4 2004/04/29 20:14:21 holtmann Exp $
5#
6
7# HCId options
8options {
9 # Automatically initialize new devices
10 autoinit yes;
11
12 # Security Manager mode
13 # none - Security manager disabled
14 # auto - Use local PIN for incoming connections
15 # user - Always ask user for a PIN
16 #
17 security auto;
18
19 # Pairing mode
20 # none - Pairing disabled
21 # multi - Allow pairing with already paired devices
22 # once - Pair once and deny successive attempts
23 pairing multi;
24
25 # PIN helper
26 # pin_helper /usr/bin/bluepin;
27
28 # D-Bus PIN helper
29 dbus_pin_helper;
30}
31
32# Default settings for HCI devices
33device {
34 # Local device name
35 # %d - device id
36 # %h - host name
37 name "%h";
38
39 # Local device class
40 class 0x120112;
41
42 # Default packet type
43 #pkt_type DH1,DM1,HV1;
44
45 # Inquiry and Page scan
46 iscan enable; pscan enable;
47
48 # Default link mode
49 # none - no specific policy
50 # accept - always accept incoming connections
51 # master - become master on incoming connections,
52 # deny role switch on outgoing connections
53 #
54 #lm accept,master;
55 #
56 lm accept;
57
58 # Default link policy
59 # none - no specific policy
60 # rswitch - allow role switch
61 # hold - allow hold mode
62 # sniff - allow sniff mode
63 # park - allow park mode
64 #
65 #lp hold,sniff;
66 #
67 lp rswitch,hold,sniff,park;
68
69 # Authentication and Encryption
70 #auth enable;
71 encrypt enable;
72}
diff --git a/meta-extras/packages/bluez/bluez-utils-dbus/smash.patch b/meta-extras/packages/bluez/bluez-utils-dbus/smash.patch
deleted file mode 100644
index 55cdbb7284..0000000000
--- a/meta-extras/packages/bluez/bluez-utils-dbus/smash.patch
+++ /dev/null
@@ -1,11 +0,0 @@
1--- bluez-utils-2.11/hcid/dbus.c.old 2004-12-31 16:35:12.000000000 +0000
2+++ bluez-utils-2.11/hcid/dbus.c 2004-12-31 16:39:58.000000000 +0000
3@@ -89,6 +89,8 @@
4
5 memset(&pr, 0, sizeof(pr));
6 bacpy(&pr.bdaddr, &req->bda);
7+ if (len > sizeof (pr.pin_code))
8+ goto error;
9 memcpy(pr.pin_code, pin, len);
10 pr.pin_len = len;
11 hci_send_cmd(req->dev, OGF_LINK_CTL, OCF_PIN_CODE_REPLY,
diff --git a/meta-extras/packages/bluez/bluez-utils.inc b/meta-extras/packages/bluez/bluez-utils.inc
deleted file mode 100644
index ff3916ea94..0000000000
--- a/meta-extras/packages/bluez/bluez-utils.inc
+++ /dev/null
@@ -1,60 +0,0 @@
1DESCRIPTION = "Linux Bluetooth Stack Userland Utilities."
2SECTION = "console"
3PRIORITY = "optional"
4DEPENDS = "bluez-libs-${PV} pcmcia-cs"
5RPROVIDES_${PN} = "bluez-pan bluez-sdp bluez-utils"
6LICENSE = "GPL"
7
8SRC_URI = "http://bluez.sourceforge.net/download/bluez-utils-${PV}.tar.gz \
9 file://base.patch;patch=1 \
10 file://blueboxes.patch;patch=1 \
11 file://no-user-include.patch;patch=1 \
12 file://hcid.conf \
13 file://bluetooth.default \
14 file://bluetooth.conf \
15 file://02dtl1_cs.sh"
16
17# Almost all serial CF cards w/ manfid 0x0000,0x0000 seem to use the bcs protocol
18# Let's default to that instead of 'any' until further notice...
19SRC_URI += " file://default-manfid-0x0-to-bcps.patch;patch=1"
20
21S = "${WORKDIR}/bluez-utils-${PV}"
22
23# We don't depend on openobex, fuse, alsa or usb but we set paths into staging
24# otherwise /usr/lib and /usr/include make it onto command lines with unpredictable results
25# Ideally acinclude.m4 needs fixing
26EXTRA_OECONF = "--with-bluez-libs=${STAGING_LIBDIR} --with-bluez-includes=${STAGING_INCDIR} \
27 --enable-pcmcia --enable-initscripts --enable-bcm203x --enable-hid2hci \
28 --disable-obex --disable-alsa \
29 --with-openobex=${STAGING_DIR}/${HOST_SYS} --with-fuse=${STAGING_DIR}/${HOST_SYS} \
30 --with-alsa=${STAGING_DIR}/${HOST_SYS} --with-usb=${STAGING_DIR}/${HOST_SYS} \
31 --with-bluez=${STAGING_LIBDIR}/${HOST_SYS}"
32
33inherit autotools update-rc.d
34
35INITSCRIPT_NAME = "bluetooth"
36INITSCRIPT_PARAMS = "defaults 23 19"
37
38do_compile_prepend() {
39 find ${S} -name Makefile | xargs sed -i 's:/usr/include:${STAGING_INCDIR}:'
40}
41
42do_install_append() {
43 install -d ${D}${base_sbindir} ${D}${base_bindir}/ ${D}${sysconfdir}/apm/event.d/
44 mv ${D}${sbindir}/* ${D}${base_sbindir}/
45 mv ${D}${bindir}/* ${D}${base_bindir}/
46 rmdir ${D}${bindir} ${D}${sbindir}
47 chmod u+s ${D}${base_sbindir}/hciattach ${D}${base_sbindir}/hciconfig
48 chmod 755 ${D}${sysconfdir}/pcmcia/bluetooth
49 install -m 0644 ${WORKDIR}/hcid.conf ${D}${sysconfdir}/bluetooth/
50 install -m 0644 ${WORKDIR}/bluetooth.default ${D}${sysconfdir}/default/bluetooth
51 cat ${WORKDIR}/bluetooth.conf >> ${D}${sysconfdir}/pcmcia/bluetooth.conf
52 install -m 0755 ${WORKDIR}/02dtl1_cs.sh ${D}${sysconfdir}/apm/event.d/
53}
54
55CONFFILES_${PN} = "${sysconfdir}/bluetooth/hcid.conf ${sysconfdir}/bluetooth/rfcomm.conf \
56 ${sysconfdir}/bluetooth/pin ${sysconfdir}/default/bluetooth"
57
58PACKAGES =+ "${PN}-ciptool ${PN}-bluepin"
59FILES_${PN}-ciptool = "/bin/ciptool"
60FILES_${PN}-bluepin = "/bin/bluepin"
diff --git a/meta-extras/packages/bluez/bluez-utils/02dtl1_cs.sh b/meta-extras/packages/bluez/bluez-utils/02dtl1_cs.sh
deleted file mode 100644
index fd81508010..0000000000
--- a/meta-extras/packages/bluez/bluez-utils/02dtl1_cs.sh
+++ /dev/null
@@ -1,57 +0,0 @@
1#!/bin/sh
2
3case "$1" in
4 suspend)
5 if [ "`/bin/hciconfig`" != "" ]; then
6 #If hciconfig outputs anything then there's probably a Bluetooth
7 # CF card in the slot so shut it down.
8 hcitool dc `hcitool con | grep ACL | sed 's/^.*\([0-9A-F]\{2\}\(:[0-9A-F]\{2\}\)\{5\}\).*$/\1/'`
9 hciconfig hci0 down
10 killall hciattach > /dev/null 2>&1
11 fi
12 ;;
13
14 resume)
15 #check for kernel version
16 if [ "`uname -r | grep 2.4.`" != "" ]; then
17 k="o"
18 elif [ "`uname -r | grep 2.6.`" != "" ]; then
19 k="ko"
20 else
21 exit 0
22 fi
23
24 if test -e /sbin/cardctl; then
25 CARDCTL=/sbin/cardctl
26 elif test -e /sbin/pccardctl; then
27 CARDCTL=/sbin/pccardctl
28 else
29 exit 0
30 fi
31
32 if [ "`lsmod | grep hci_uart`" != "" ]; then
33 #If the hci_usb module is still loaded then there's a serial based
34 # Bluetooth CF card in the slot, which only needs a resume to get it going
35 # again.
36 rfcomm bind all
37 $CARDCTL resume
38 hciconfig hci0 up
39 else
40 # only works for nokia dtl1 cards
41 for f in /lib/modules/`uname -r`/kernel/drivers/bluetooth/dtl1_cs.$k
42 do
43 #Enumerate all the self-contained Bluetooth CF card drivers
44 f=`echo $f | sed 's/\.'$k'$//'`
45 f=`basename $f`
46 if [ "`lsmod | grep $f`" != "" ]; then
47 #If one of these drivers is still loaded, then there is probably
48 #a non-serial based Bluetooth CF card in the slot that needs
49 #ejecting and reinserting to get it going again
50 rfcomm bind all
51 $CARDCTL eject
52 $CARDCTL insert
53 hciconfig hci0 up
54 fi
55 done
56 fi
57esac
diff --git a/meta-extras/packages/bluez/bluez-utils/hciattach-ti-bts.patch b/meta-extras/packages/bluez/bluez-utils/hciattach-ti-bts.patch
deleted file mode 100644
index 217c32619d..0000000000
--- a/meta-extras/packages/bluez/bluez-utils/hciattach-ti-bts.patch
+++ /dev/null
@@ -1,489 +0,0 @@
1--- bluez-utils-3.1/tools/hciattach.c.orig 2006-07-23 14:02:14.000000000 +0200
2+++ bluez-utils-3.1/tools/hciattach.c 2006-07-23 14:06:29.000000000 +0200
3@@ -58,6 +58,8 @@
4 #define HCI_UART_3WIRE 2
5 #define HCI_UART_H4DS 3
6
7+#include "ti_bts.h"
8+
9 struct uart_t {
10 char *type;
11 int m_id;
12@@ -67,6 +69,7 @@
13 int speed;
14 int flags;
15 int (*init) (int fd, struct uart_t *u, struct termios *ti);
16+ char *bts; /* bluetooth script */
17 };
18
19 #define FLOW_CTL 0x0001
20@@ -256,6 +259,114 @@
21 return 0;
22 }
23
24+static int brf6150(int fd, struct uart_t *u, struct termios *ti)
25+{
26+ bts_t *bfp;
27+ int i;
28+ unsigned long vers;
29+ unsigned char actionbuf[256];
30+ unsigned char resp[128]; /* Response */
31+ unsigned long count;
32+ unsigned short atype;
33+
34+ if (u->bts == NULL) /* no script, ignore */
35+ return 0;
36+
37+ bfp = bts_load_script( u->bts, &vers );
38+ if (bfp == NULL)
39+ return -1;
40+
41+ fprintf( stderr, "Loading BTS script version %lu\n", vers );
42+
43+ while ((count = bts_next_action( bfp, actionbuf,
44+ sizeof actionbuf - 1, &atype )) != 0) {
45+ if (atype == ACTION_REMARKS) {
46+ if (actionbuf[0] != 0)
47+ fprintf( stderr, "%s\n", actionbuf );
48+ }
49+ else if (atype == ACTION_SEND_COMMAND) {
50+#if 0
51+ fprintf( stderr, "ACTION_SEND_COMMAND: ", (int)atype );
52+ for (i=0; i<count; i++) {
53+ fprintf( stderr, "0x%02x ", actionbuf[i] );
54+ }
55+ fprintf( stderr, "\n" );
56+#endif
57+ int n;
58+ n = write(fd, actionbuf, count);
59+ if (n < 0 || n < count) {
60+ perror("Failed to write TI action command");
61+ return -1;
62+ }
63+ }
64+ else if (atype == ACTION_WAIT_EVENT) {
65+ action_wait_t *wait = (action_wait_t *)actionbuf;
66+#if 0
67+ fprintf( stderr, "ACTION_WAIT_EVENT: %u msec, %u size, data = ", wait->msec, wait->size );
68+ for (i=0; i<wait->size; i++) {
69+ fprintf( stderr, "0x%02x ", wait->data[i] );
70+ }
71+ fprintf( stderr, "\n" );
72+#endif
73+ usleep(wait->msec); /* seems they give usec, not msec */
74+ /* Read reply. */
75+ if ((count = read_hci_event(fd, resp, sizeof resp)) < 0) {
76+ perror("Failed to read TI command response");
77+ return -1;
78+ }
79+ if (count < wait->size) {
80+ fprintf( stderr, "TI command response is short.");
81+ }
82+ for (i=0; i<wait->size; i++) {
83+ if (i == 3) continue; /* ignore */
84+ if (resp[i] != wait->data[i]) {
85+ fprintf( stderr, "TI command response does not match expected result.\n" );
86+ }
87+ }
88+ }
89+ else if (atype == ACTION_SERIAL_PORT_PARAMETERS) {
90+ action_serial_t *sercmd = (action_serial_t *)actionbuf;
91+
92+ /* Set actual baudrate */
93+ fprintf( stderr,
94+ "BTS changing baud rate to %u, flow control to %u\n",
95+ sercmd->baud, sercmd->flow_control );
96+
97+ tcflush(fd, TCIOFLUSH);
98+
99+ if (sercmd->flow_control)
100+ ti->c_cflag |= CRTSCTS;
101+ else
102+ ti->c_cflag &= ~CRTSCTS;
103+ if (tcsetattr(fd, TCSANOW, ti) < 0) {
104+ perror("Can't set port settings");
105+ return -1;
106+ }
107+
108+ u->speed = sercmd->baud;
109+
110+ tcflush(fd, TCIOFLUSH);
111+ if (set_speed(fd, ti, sercmd->baud) < 0) {
112+ perror("Can't set baud rate");
113+ return -1;
114+ }
115+ }
116+ else if (atype == ACTION_DELAY) {
117+ action_delay_t *delay = (action_delay_t *)actionbuf;
118+ usleep(delay->msec); /* seems they give usec, not msec */
119+ }
120+ else {
121+ fprintf( stderr, "BTS action type = %d: ", (int)atype );
122+ for (i=0; i<count; i++) {
123+ fprintf( stderr, "0x%02x ", actionbuf[i] );
124+ }
125+ fprintf( stderr, "\n" );
126+ }
127+ }
128+ bts_unload_script( bfp );
129+ return 0;
130+}
131+
132 static int texas(int fd, struct uart_t *u, struct termios *ti)
133 {
134 struct timespec tm = {0, 50000};
135@@ -296,15 +407,26 @@
136 } while (resp[4] != cmd[1] && resp[5] != cmd[2]);
137
138 /* Verify manufacturer */
139- if ((resp[11] & 0xFF) != 0x0d)
140+ if (resp[11] != 0x0d)
141 fprintf(stderr,"WARNING : module's manufacturer is not Texas Instrument\n");
142
143 /* Print LMP version */
144- fprintf(stderr, "Texas module LMP version : 0x%02x\n", resp[10] & 0xFF);
145+ fprintf(stderr, "TI module LMP version : 0x%02x\n", resp[10]);
146
147 /* Print LMP subversion */
148- fprintf(stderr, "Texas module LMP sub-version : 0x%02x%02x\n", resp[14] & 0xFF, resp[13] & 0xFF);
149+ fprintf(stderr, "TI module LMP sub-version : 0x%02x%02x\n", resp[14], resp[13]);
150+ if ((resp[14] >> 2) == 3) {
151+ int err;
152+ nanosleep(&tm, NULL);
153
154+ /* BRF6150 */
155+ if ((err=brf6150( fd, u, ti )) != 0) {
156+ fprintf( stderr, "TI script failed (err=%d)\n",
157+ err );
158+ return -1;
159+ }
160+ }
161+
162 nanosleep(&tm, NULL);
163 return 0;
164 }
165@@ -1103,7 +1225,7 @@
166 {
167 printf("hciattach - HCI UART driver initialization utility\n");
168 printf("Usage:\n");
169- printf("\thciattach [-n] [-p] [-b] [-t timeout] [-s initial_speed] <tty> <type | id> [speed] [flow|noflow]\n");
170+ printf("\thciattach [-n] [-p] [-b] [-t timeout] [-s initial_speed] [-S bts-script] <tty> <type | id> [speed] [flow|noflow]\n");
171 printf("\thciattach -l\n");
172 }
173
174@@ -1118,11 +1240,12 @@
175 struct sigaction sa;
176 struct pollfd p;
177 char dev[PATH_MAX];
178+ char *bts = NULL;
179
180 detach = 1;
181 printpid = 0;
182
183- while ((opt=getopt(argc, argv, "bnpt:s:l")) != EOF) {
184+ while ((opt=getopt(argc, argv, "bnpt:s:S:l")) != EOF) {
185 switch(opt) {
186 case 'b':
187 send_break = 1;
188@@ -1144,6 +1267,10 @@
189 init_speed = atoi(optarg);
190 break;
191
192+ case 'S':
193+ bts = optarg;
194+ break;
195+
196 case 'l':
197 for (i = 0; uart[i].type; i++) {
198 printf("%-10s0x%04x,0x%04x\n", uart[i].type,
199@@ -1215,6 +1342,8 @@
200 if (init_speed)
201 u->init_speed = init_speed;
202
203+ u->bts = bts;
204+
205 memset(&sa, 0, sizeof(sa));
206 sa.sa_flags = SA_NOCLDSTOP;
207 sa.sa_handler = sig_alarm;
208--- bluez-utils-3.1/tools/Makefile.am.orig 2006-07-23 14:06:59.000000000 +0200
209+++ bluez-utils-3.1/tools/Makefile.am 2006-07-23 14:07:18.000000000 +0200
210@@ -37,7 +37,7 @@
211
212 noinst_PROGRAMS = hcisecfilter ppporc
213
214-hciattach_SOURCES = hciattach.c hciattach_st.c
215+hciattach_SOURCES = hciattach.c hciattach_st.c ti_bts.h ti_bts.c
216
217 hciconfig_SOURCES = hciconfig.c csr.h csr.c
218 hciconfig_LDADD = @BLUEZ_LIBS@ $(top_builddir)/common/libhelper.a
219--- bluez-utils-3.1/tools/ti_bts.h.orig 2006-07-23 14:07:26.000000000 +0200
220+++ bluez-utils-3.1/tools/ti_bts.h 2006-07-23 14:07:46.000000000 +0200
221@@ -0,0 +1,116 @@
222+/*
223+ * Copyright (c) 2005 Texas Instruments, Inc.
224+ * Ported by SDG Systems, LLC
225+ *
226+ * This program is free software; you can redistribute it and/or modify
227+ * it under the terms of the GNU General Public License version 2 as
228+ * published by the Free Software Foundation;
229+ *
230+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
231+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
232+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
233+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
234+ * CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
235+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
236+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
237+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
238+ *
239+ * ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
240+ * COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
241+ * SOFTWARE IS DISCLAIMED.
242+ *
243+ */
244+
245+#ifndef BT_SCRIPT_H
246+#define BT_SCRIPT_H
247+
248+#ifdef __cplusplus
249+extern "C" {
250+#endif
251+
252+/*
253+ * Define the interface of Bluetooth Script
254+ */
255+
256+typedef void bts_t;
257+
258+
259+#define ACTION_SEND_COMMAND 1 /* Send out raw data (as is) */
260+#define ACTION_WAIT_EVENT 2 /* Wait for data */
261+#define ACTION_SERIAL_PORT_PARAMETERS 3
262+#define ACTION_DELAY 4
263+#define ACTION_RUN_SCRIPT 5
264+#define ACTION_REMARKS 6
265+
266+/*
267+ * Structure for ACTION_SEND_COMMAND
268+ */
269+typedef struct tagCActionCommand
270+{
271+ unsigned char data[1]; /* Data to send */
272+} action_command_t;
273+
274+/*
275+ * Structure for ACTION_WAIT_EVENT
276+ */
277+typedef struct tagCActionWaitEvent
278+{
279+ unsigned long msec; /* in milliseconds */
280+ unsigned long size;
281+ unsigned char data[1]; /* Data to wait for */
282+} action_wait_t;
283+
284+
285+/*
286+ * Structure for ACTION_SERIAL_PORT_PARAMETERS
287+ */
288+typedef struct tagCActionSerialPortParameters
289+{
290+ unsigned long baud;
291+ unsigned long flow_control;
292+} action_serial_t;
293+
294+/* Flow Control Type */
295+#define FCT_NONE 0
296+#define FCT_HARDWARE 1
297+
298+#define DONT_CHANGE 0xFFFFFFFF /* For both baud rate and flow control */
299+
300+
301+/*
302+ * Structure for ACTION_DELAY
303+ */
304+typedef struct tagCActionDelay
305+{
306+ unsigned long msec; /* in milliseconds */
307+} action_delay_t;
308+
309+/*
310+ * Structure for ACTION_RUN_SCRIPT
311+ */
312+typedef struct tagCActionRunScript
313+{
314+ char filename[1];
315+} action_run_t;
316+
317+/*
318+ * Structure for ACTION_REMARKS
319+ */
320+typedef struct tagCActionRemarks
321+{
322+ char m_szRemarks[1];
323+} action_remarks_t;
324+
325+
326+const char *cis_create_filename(const unsigned char* cmdparms);
327+bts_t * bts_load_script(const char* fname, unsigned long* version);
328+unsigned long bts_next_action(const bts_t* bts_fp, unsigned char* action_buf,
329+ unsigned long nMaxSize, unsigned short* ptype);
330+void bts_unload_script(bts_t* bts_fp);
331+
332+#ifdef __cplusplus
333+};
334+#endif
335+
336+#endif /* BT_SCRIPT_H */
337+
338--- bluez-utils-3.1/tools/ti_bts.c.orig 2006-07-23 14:07:28.000000000 +0200
339+++ bluez-utils-3.1/tools/ti_bts.c 2006-07-23 14:07:46.000000000 +0200
340@@ -0,0 +1,149 @@
341+/*
342+ * Copyright (c) 2005 Texas Instruments, Inc.
343+ * Ported by SDG Systems, LLC
344+ *
345+ * This program is free software; you can redistribute it and/or modify
346+ * it under the terms of the GNU General Public License version 2 as
347+ * published by the Free Software Foundation;
348+ *
349+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
350+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
351+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
352+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
353+ * CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
354+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
355+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
356+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
357+ *
358+ * ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
359+ * COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
360+ * SOFTWARE IS DISCLAIMED.
361+ *
362+ */
363+
364+
365+#include <stdio.h>
366+#include <stdlib.h>
367+#include "ti_bts.h"
368+
369+#ifndef MAKEWORD
370+#define MAKEWORD(a, b) ((unsigned short)(((unsigned char)(a)) | ((unsigned short)((unsigned char)(b))) << 8))
371+#endif
372+
373+#define TI_MANUFACTURER_ID 13
374+
375+/*
376+ * Common Init Script specific
377+ */
378+const char *
379+cis_create_filename(const unsigned char* cmdparms)
380+{
381+ static char bts_file[50];
382+
383+ /* Check for TI's id */
384+ unsigned short manfid = MAKEWORD(cmdparms[8], cmdparms[9]);
385+
386+ if (TI_MANUFACTURER_ID == manfid) {
387+ unsigned short version = MAKEWORD(cmdparms[10], cmdparms[11]);
388+
389+ unsigned short chip = (version & 0x7C00) >> 10;
390+ unsigned short min_ver = (version & 0x007F);
391+ unsigned short maj_ver = (version & 0x0380) >> 7;
392+
393+ if (0 != (version & 0x8000)) {
394+ maj_ver |= 0x0008;
395+ }
396+
397+ sprintf( bts_file, "TIInit_%d.%d.%d.bts",
398+ (int)chip, (int)maj_ver, (int)min_ver);
399+
400+ return &bts_file[0];
401+ }
402+ return NULL;
403+}
404+
405+typedef struct tagCHeader
406+{
407+ unsigned long magic;
408+ unsigned long version;
409+ unsigned char future[24];
410+} cheader_t;
411+
412+
413+/* The value 0x42535442 stands for (in ASCII) BTSB */
414+/* which is Bluetooth Script Binary */
415+#define FILE_HEADER_MAGIC 0x42535442
416+
417+
418+bts_t *
419+bts_load_script(const char* fname, unsigned long* version)
420+{
421+ bts_t* bts = NULL;
422+ FILE* fp = fopen(fname, "rb");
423+
424+ if (NULL != fp) {
425+ /* Read header */
426+ cheader_t header;
427+
428+ /* Read header */
429+ if (1 == fread(&header, sizeof(header), 1, fp)) {
430+ /* Check magic number for correctness */
431+ if (header.magic == FILE_HEADER_MAGIC) {
432+ /* If user wants the version number */
433+ if (NULL != version) {
434+ *version = header.version;
435+ }
436+ bts = (bts_t*)fp;
437+ }
438+ }
439+ /* If failed reading the file, close it */
440+ if (NULL == bts) {
441+ fclose(fp);
442+ }
443+ }
444+ return bts;
445+}
446+
447+unsigned long
448+bts_next_action(const bts_t* bts_fp, unsigned char* action_buf,
449+ unsigned long nMaxSize, unsigned short* ptype)
450+{
451+ unsigned long bytes = 0;
452+ FILE* fp = (FILE*)bts_fp;
453+ unsigned char action_hdr[4];
454+
455+ if (bts_fp == NULL)
456+ return 0;
457+
458+ /* Each Action has the following: */
459+ /* UINT16 type of this action */
460+ /* UINT16 size of rest */
461+ /* BYTE[] action buffer (for HCI, includes the type byte e.g. 1 for hci command) */
462+
463+ if (1 == fread(&action_hdr[0], sizeof(action_hdr), 1, fp)) {
464+ unsigned short type = *(unsigned short*)&action_hdr[0];
465+ unsigned short size = *(unsigned short*)&action_hdr[2];
466+
467+ if (size <= nMaxSize) {
468+ int nread = fread(action_buf, sizeof(action_buf[0]), size, fp);
469+
470+ if (nread == size) {
471+ *ptype = type;
472+ bytes = (unsigned long)size;
473+ }
474+ }
475+ }
476+
477+ return bytes;
478+}
479+
480+void
481+bts_unload_script(bts_t* bts_fp)
482+{
483+ FILE* fp = (FILE*)bts_fp;
484+
485+ if (NULL != fp) {
486+ fclose(fp);
487+ }
488+}
489+
diff --git a/meta-extras/packages/bluez/bluez-utils/hcid.conf b/meta-extras/packages/bluez/bluez-utils/hcid.conf
deleted file mode 100644
index bb935aa23d..0000000000
--- a/meta-extras/packages/bluez/bluez-utils/hcid.conf
+++ /dev/null
@@ -1,57 +0,0 @@
1#
2# HCI daemon configuration file.
3#
4
5# HCId options
6options {
7 # Automatically initialize new devices
8 autoinit yes;
9
10 # Security Manager mode
11 # none - Security manager disabled
12 # auto - Use local PIN for incoming connections
13 # user - Always ask user for a PIN
14 #
15 security auto;
16
17 # Pairing mode
18 # none - Pairing disabled
19 # multi - Allow pairing with already paired devices
20 # once - Pair once and deny successive attempts
21 pairing multi;
22
23 # Default PIN code for incoming connections
24 passkey "BlueZ";
25}
26
27# Default settings for HCI devices
28device {
29 # Local device name
30 # %d - device id
31 # %h - host name
32 name "BlueZ (%d)";
33
34 # Local device class
35 class 0x120112;
36
37 # Default packet type
38 #pkt_type DH1,DM1,HV1;
39
40 # Inquiry and Page scan
41 iscan enable; pscan enable;
42
43 # Default link mode
44 # none - no specific policy
45 # accept - always accept incoming connections
46 # master - become master on incoming connections,
47 # deny role switch on outgoing connections
48 lm accept;
49
50 # Default link policy
51 # none - no specific policy
52 # rswitch - allow role switch
53 # hold - allow hold mode
54 # sniff - allow sniff mode
55 # park - allow park mode
56 lp rswitch,hold,sniff,park;
57}
diff --git a/meta-extras/packages/bluez/bluez-utils_3.4.bb b/meta-extras/packages/bluez/bluez-utils_3.4.bb
deleted file mode 100644
index 49e6ded250..0000000000
--- a/meta-extras/packages/bluez/bluez-utils_3.4.bb
+++ /dev/null
@@ -1,53 +0,0 @@
1DESCRIPTION = "Linux Bluetooth Stack Userland Utilities."
2SECTION = "console"
3PRIORITY = "optional"
4DEPENDS = "bluez-libs-${PV} dbus"
5PROVIDES = "bluez-utils-dbus"
6RPROVIDES_${PN} = "bluez-pan bluez-sdp bluez-utils-dbus"
7RREPLACES = "bluez-utils-dbus"
8RCONFLICTS_${PN} = "bluez-utils-nodbus"
9LICENSE = "GPL"
10PR = "r1"
11
12SRC_URI = "http://bluez.sourceforge.net/download/bluez-utils-${PV}.tar.gz \
13 file://hcid.conf \
14 file://02dtl1_cs.sh \
15 file://hciattach-ti-bts.patch;patch=1"
16
17# Almost all serial CF cards w/ manfid 0x0000,0x0000 seem to use the bcs protocol
18# Let's default to that instead of 'any' until further notice...
19SRC_URI += " file://default-manfid-0x0-to-bcps.patch;patch=1"
20
21S = "${WORKDIR}/bluez-utils-${PV}"
22
23EXTRA_OECONF = "--enable-initscripts --enable-bcm203x --enable-hid2hci"
24# --enable-obex enable OBEX support
25# --enable-alsa enable ALSA support
26# --enable-cups install CUPS backend support
27# --enable-bccmd install BCCMD interface utility
28# --enable-avctrl install Audio/Video control utility
29# --enable-hid2hci install HID mode switching utility
30# --enable-dfutool install DFU firmware upgrade utility
31
32inherit autotools update-rc.d
33
34INITSCRIPT_NAME = "bluetooth"
35INITSCRIPT_PARAMS = "defaults 23 19"
36
37do_install_append() {
38 install -d ${D}${base_sbindir} ${D}${base_bindir}/ ${D}${sysconfdir}/apm/event.d/
39 mv ${D}${sbindir}/* ${D}${base_sbindir}/
40 mv ${D}${bindir}/* ${D}${base_bindir}/
41 rmdir ${D}${bindir} ${D}${sbindir}
42 chmod u+s ${D}${base_sbindir}/hciattach ${D}${base_sbindir}/hciconfig
43 install -m 0644 ${WORKDIR}/hcid.conf ${D}${sysconfdir}/bluetooth/
44 install -m 0755 ${WORKDIR}/02dtl1_cs.sh ${D}${sysconfdir}/apm/event.d/
45}
46
47CONFFILES_${PN} = "${sysconfdir}/bluetooth/hcid.conf ${sysconfdir}/bluetooth/rfcomm.conf \
48 ${sysconfdir}/default/bluetooth"
49
50PACKAGES =+ "${PN}-ciptool"
51FILES_${PN}-ciptool = "/bin/ciptool"
52RREPLACES_${PN}-ciptool = "bluez-utils-dbus-ciptool"
53RCONFLICTS_${PN}-ciptool = "bluez-utils-dbus-ciptool bluez-utils-nodbus"
diff --git a/meta-extras/packages/bluez/files/02dtl1_cs.sh b/meta-extras/packages/bluez/files/02dtl1_cs.sh
deleted file mode 100644
index fefc72e07a..0000000000
--- a/meta-extras/packages/bluez/files/02dtl1_cs.sh
+++ /dev/null
@@ -1,57 +0,0 @@
1#!/bin/sh
2
3case "$1" in
4 suspend)
5 if [ "`/sbin/hciconfig`" != "" ]; then
6 #If hciconfig outputs anything then there's probably a Bluetooth
7 # CF card in the slot so shut it down.
8 hcitool dc `hcitool con | grep ACL | sed 's/^.*\([0-9A-F]\{2\}\(:[0-9A-F]\{2\}\)\{5\}\).*$/\1/'`
9 hciconfig hci0 down
10 killall hciattach > /dev/null 2>&1
11 fi
12 ;;
13
14 resume)
15 #check for kernel version
16 if [ "`uname -r | grep 2.4.`" != "" ]; then
17 k="o"
18 elif [ "`uname -r | grep 2.6.`" != "" ]; then
19 k="ko"
20 else
21 exit 0
22 fi
23
24 if test -e /sbin/cardctl; then
25 CARDCTL=/sbin/cardctl
26 elif test -e /sbin/pccardctl; then
27 CARDCTL=/sbin/pccardctl
28 else
29 exit 0
30 fi
31
32 if [ "`lsmod | grep hci_uart`" != "" ]; then
33 #If the hci_usb module is still loaded then there's a serial based
34 # Bluetooth CF card in the slot, which only needs a resume to get it going
35 # again.
36 rfcomm bind all
37 $CARDCTL resume
38 hciconfig hci0 up
39 else
40 # only works for nokia dtl1 cards
41 for f in /lib/modules/`uname -r`/kernel/drivers/bluetooth/dtl1_cs.$k
42 do
43 #Enumerate all the self-contained Bluetooth CF card drivers
44 f=`echo $f | sed 's/\.'$k'$//'`
45 f=`basename $f`
46 if [ "`lsmod | grep $f`" != "" ]; then
47 #If one of these drivers is still loaded, then there is probably
48 #a non-serial based Bluetooth CF card in the slot that needs
49 #ejecting and reinserting to get it going again
50 rfcomm bind all
51 $CARDCTL eject
52 $CARDCTL insert
53 hciconfig hci0 up
54 fi
55 done
56 fi
57esac
diff --git a/meta-extras/packages/bluez/files/base.patch b/meta-extras/packages/bluez/files/base.patch
deleted file mode 100644
index 337c9aa73e..0000000000
--- a/meta-extras/packages/bluez/files/base.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1
2#
3# Patch managed by http://www.holgerschurig.de/patcher.html
4#
5
6--- bluez-utils-2.17/pcmcia/bluetooth~base.patch
7+++ bluez-utils-2.17/pcmcia/bluetooth
8@@ -15,9 +15,16 @@
9
10 if [ -r ./shared ]; then . ./shared ; else . /etc/pcmcia/shared ; fi
11
12+# Give the port some time to complete initialization
13+sleep 5
14+
15 # Get device attributes
16 get_info $DEVICE
17
18+test "$DEVICE" = "ttyS7" && DEVICE="/dev/tts/7"
19+test -z "$MANFID" && MANFID="bcsp"
20+test "$MANFID" = "0000,0000" && MANFID="bcsp"
21+
22 #
23 # Serial devices
24 #
25@@ -25,7 +32,7 @@
26 IRQ=`setserial /dev/$DEVICE | sed -e 's/.*IRQ: //'`
27 setserial /dev/$DEVICE irq 0 ; setserial /dev/$DEVICE irq $IRQ
28
29- /usr/sbin/hciattach $DEVICE $MANFID
30+ /sbin/hciattach $DEVICE $MANFID
31 }
32 stop_serial() {
33 do_fuser -k -HUP /dev/$DEVICE > /dev/null
diff --git a/meta-extras/packages/bluez/files/blueboxes.patch b/meta-extras/packages/bluez/files/blueboxes.patch
deleted file mode 100644
index c429b06c06..0000000000
--- a/meta-extras/packages/bluez/files/blueboxes.patch
+++ /dev/null
@@ -1,18 +0,0 @@
1
2#
3# Patch managed by http://www.holgerschurig.de/patcher.html
4#
5
6--- bluez-utils-2.14/pcmcia/bluetooth.conf~base
7+++ bluez-utils-2.14/pcmcia/bluetooth.conf
8@@ -26,6 +26,10 @@
9 version "Brain Boxes", "Bluetooth PC Card"
10 bind "serial_cs" class "bluetooth"
11
12+card "F+ Bluetooth_Card, BCSP"
13+ manfid 0x0160, 0xaba0
14+ bind "serial_cs" class "bluetooth"
15+
16 card "IBM Bluetooth PC Card II"
17 version "IBM", "Bluetooth PC Card II"
18 bind "serial_cs" class "bluetooth"
diff --git a/meta-extras/packages/bluez/files/bluetooth.conf b/meta-extras/packages/bluez/files/bluetooth.conf
deleted file mode 100644
index 872084702a..0000000000
--- a/meta-extras/packages/bluez/files/bluetooth.conf
+++ /dev/null
@@ -1,13 +0,0 @@
1#
2# additional cards for /etc/pcmcia/bluetooth.conf
3# Note for OE: This file is _appended_ to the stock
4# bluetooth.conf in bluez-utils, so no need to duplicate
5# entries for individual cards.
6#
7card "CSR BT01x0M Bluetooth CF Card"
8 version "Bluetooth BT0100M", "", ""
9 bind "serial_cs" class "bluetooth"
10
11card "Socket Bluetooth CF Card Rev. G"
12 manfid 0x0104, 0x0096
13 bind "serial_cs" class "bluetooth"
diff --git a/meta-extras/packages/bluez/files/bluetooth.default b/meta-extras/packages/bluez/files/bluetooth.default
deleted file mode 100644
index 4817d38c60..0000000000
--- a/meta-extras/packages/bluez/files/bluetooth.default
+++ /dev/null
@@ -1,37 +0,0 @@
1# Bluetooth configuraton file
2
3# Start of hcid (allowed values are "true" and "false")
4HCID_ENABLE=true
5
6# Config file for hcid
7HCID_CONFIG="/etc/bluetooth/hcid.conf"
8
9# Start sdpd (allowed values are "true" and "false")
10SDPD_ENABLE=true
11
12# Start hidd (allowed values are "true" and "false")
13HIDD_ENABLE=true
14
15# Arguments to hidd
16HIDD_OPTIONS=""
17
18# Run hid2hci (allowed values are "true" and "false")
19HID2HCI_ENABLE=true
20
21# Bind rfcomm devices (allowed values are "true" and "false")
22RFCOMM_ENABLE=true
23
24# Config file for rfcomm
25RFCOMM_CONFIG="/etc/bluetooth/rfcomm.conf"
26
27# Start dund (allowed values are "true" and "false")
28DUND_ENABLE=false
29
30# Arguments to dund
31DUND_OPTIONS="--listen --persist"
32
33# Start pand (allowed values are "true" and "false")
34PAND_ENABLE=false
35
36# Arguments to pand
37PAND_OPTIONS="--listen --role NAP"
diff --git a/meta-extras/packages/bluez/files/default-manfid-0x0-to-bcps.patch b/meta-extras/packages/bluez/files/default-manfid-0x0-to-bcps.patch
deleted file mode 100644
index 3d993543b3..0000000000
--- a/meta-extras/packages/bluez/files/default-manfid-0x0-to-bcps.patch
+++ /dev/null
@@ -1,22 +0,0 @@
1
2#
3# Patch managed by http://www.holgerschurig.de/patcher.html
4#
5
6--- bluez-utils-2.16/tools/hciattach.c~default-manfid-0x0-to-bcps
7+++ bluez-utils-2.16/tools/hciattach.c
8@@ -796,13 +796,12 @@
9 }
10
11 struct uart_t uart[] = {
12+ { "bcsp", 0x0000, 0x0000, HCI_UART_BCSP, 115200, 115200, 0, bcsp },
13 { "any", 0x0000, 0x0000, HCI_UART_H4, 115200, 115200, FLOW_CTL, NULL },
14 { "ericsson", 0x0000, 0x0000, HCI_UART_H4, 57600, 115200, FLOW_CTL, ericsson },
15 { "digi", 0x0000, 0x0000, HCI_UART_H4, 9600, 115200, FLOW_CTL, digi },
16 { "texas", 0x0000, 0x0000, HCI_UART_H4, 115200, 115200, FLOW_CTL, texas },
17
18- { "bcsp", 0x0000, 0x0000, HCI_UART_BCSP, 115200, 115200, 0, bcsp },
19-
20 /* Xircom PCMCIA cards: Credit Card Adapter and Real Port Adapter */
21 { "xircom", 0x0105, 0x080a, HCI_UART_H4, 115200, 115200, FLOW_CTL, NULL },
22
diff --git a/meta-extras/packages/bluez/files/hciattach-ti-bts.patch b/meta-extras/packages/bluez/files/hciattach-ti-bts.patch
deleted file mode 100644
index 8fe37de9d3..0000000000
--- a/meta-extras/packages/bluez/files/hciattach-ti-bts.patch
+++ /dev/null
@@ -1,489 +0,0 @@
1--- bluez-utils-2.24/tools/hciattach.c.orig 2005-12-10 15:14:36.000000000 +0100
2+++ bluez-utils-2.24/tools/hciattach.c 2006-01-22 13:56:13.000000000 +0100
3@@ -57,6 +57,8 @@
4 #define HCI_UART_3WIRE 2
5 #define HCI_UART_H4DS 3
6
7+#include "ti_bts.h"
8+
9 struct uart_t {
10 char *type;
11 int m_id;
12@@ -66,6 +68,7 @@
13 int speed;
14 int flags;
15 int (*init) (int fd, struct uart_t *u, struct termios *ti);
16+ char *bts; /* bluetooth script */
17 };
18
19 #define FLOW_CTL 0x0001
20@@ -241,6 +244,114 @@
21 return 0;
22 }
23
24+static int brf6150(int fd, struct uart_t *u, struct termios *ti)
25+{
26+ bts_t *bfp;
27+ int i;
28+ unsigned long vers;
29+ unsigned char actionbuf[256];
30+ unsigned char resp[128]; /* Response */
31+ unsigned long count;
32+ unsigned short atype;
33+
34+ if (u->bts == NULL) /* no script, ignore */
35+ return 0;
36+
37+ bfp = bts_load_script( u->bts, &vers );
38+ if (bfp == NULL)
39+ return -1;
40+
41+ fprintf( stderr, "Loading BTS script version %lu\n", vers );
42+
43+ while ((count = bts_next_action( bfp, actionbuf,
44+ sizeof actionbuf - 1, &atype )) != 0) {
45+ if (atype == ACTION_REMARKS) {
46+ if (actionbuf[0] != 0)
47+ fprintf( stderr, "%s\n", actionbuf );
48+ }
49+ else if (atype == ACTION_SEND_COMMAND) {
50+#if 0
51+ fprintf( stderr, "ACTION_SEND_COMMAND: ", (int)atype );
52+ for (i=0; i<count; i++) {
53+ fprintf( stderr, "0x%02x ", actionbuf[i] );
54+ }
55+ fprintf( stderr, "\n" );
56+#endif
57+ int n;
58+ n = write(fd, actionbuf, count);
59+ if (n < 0 || n < count) {
60+ perror("Failed to write TI action command");
61+ return -1;
62+ }
63+ }
64+ else if (atype == ACTION_WAIT_EVENT) {
65+ action_wait_t *wait = (action_wait_t *)actionbuf;
66+#if 0
67+ fprintf( stderr, "ACTION_WAIT_EVENT: %u msec, %u size, data = ", wait->msec, wait->size );
68+ for (i=0; i<wait->size; i++) {
69+ fprintf( stderr, "0x%02x ", wait->data[i] );
70+ }
71+ fprintf( stderr, "\n" );
72+#endif
73+ usleep(wait->msec); /* seems they give usec, not msec */
74+ /* Read reply. */
75+ if ((count = read_hci_event(fd, resp, sizeof resp)) < 0) {
76+ perror("Failed to read TI command response");
77+ return -1;
78+ }
79+ if (count < wait->size) {
80+ fprintf( stderr, "TI command response is short.");
81+ }
82+ for (i=0; i<wait->size; i++) {
83+ if (i == 3) continue; /* ignore */
84+ if (resp[i] != wait->data[i]) {
85+ fprintf( stderr, "TI command response does not match expected result.\n" );
86+ }
87+ }
88+ }
89+ else if (atype == ACTION_SERIAL_PORT_PARAMETERS) {
90+ action_serial_t *sercmd = (action_serial_t *)actionbuf;
91+
92+ /* Set actual baudrate */
93+ fprintf( stderr,
94+ "BTS changing baud rate to %u, flow control to %u\n",
95+ sercmd->baud, sercmd->flow_control );
96+
97+ tcflush(fd, TCIOFLUSH);
98+
99+ if (sercmd->flow_control)
100+ ti->c_cflag |= CRTSCTS;
101+ else
102+ ti->c_cflag &= ~CRTSCTS;
103+ if (tcsetattr(fd, TCSANOW, ti) < 0) {
104+ perror("Can't set port settings");
105+ return -1;
106+ }
107+
108+ u->speed = sercmd->baud;
109+
110+ tcflush(fd, TCIOFLUSH);
111+ if (set_speed(fd, ti, sercmd->baud) < 0) {
112+ perror("Can't set baud rate");
113+ return -1;
114+ }
115+ }
116+ else if (atype == ACTION_DELAY) {
117+ action_delay_t *delay = (action_delay_t *)actionbuf;
118+ usleep(delay->msec); /* seems they give usec, not msec */
119+ }
120+ else {
121+ fprintf( stderr, "BTS action type = %d: ", (int)atype );
122+ for (i=0; i<count; i++) {
123+ fprintf( stderr, "0x%02x ", actionbuf[i] );
124+ }
125+ fprintf( stderr, "\n" );
126+ }
127+ }
128+ bts_unload_script( bfp );
129+ return 0;
130+}
131+
132 static int texas(int fd, struct uart_t *u, struct termios *ti)
133 {
134 struct timespec tm = {0, 50000};
135@@ -281,14 +392,25 @@
136 } while (resp[4] != cmd[1] && resp[5] != cmd[2]);
137
138 /* Verify manufacturer */
139- if ((resp[11] & 0xFF) != 0x0d)
140+ if (resp[11] != 0x0d)
141 fprintf(stderr,"WARNING : module's manufacturer is not Texas Instrument\n");
142
143 /* Print LMP version */
144- fprintf(stderr, "Texas module LMP version : 0x%02x\n", resp[10] & 0xFF);
145+ fprintf(stderr, "TI module LMP version : 0x%02x\n", resp[10]);
146
147 /* Print LMP subversion */
148- fprintf(stderr, "Texas module LMP sub-version : 0x%02x%02x\n", resp[14] & 0xFF, resp[13] & 0xFF);
149+ fprintf(stderr, "TI module LMP sub-version : 0x%02x%02x\n", resp[14], resp[13]);
150+ if ((resp[14] >> 2) == 3) {
151+ int err;
152+ nanosleep(&tm, NULL);
153+
154+ /* BRF6150 */
155+ if ((err=brf6150( fd, u, ti )) != 0) {
156+ fprintf( stderr, "TI script failed (err=%d)\n",
157+ err );
158+ return -1;
159+ }
160+ }
161
162 nanosleep(&tm, NULL);
163 return 0;
164@@ -953,7 +1075,7 @@
165 {
166 printf("hciattach - HCI UART driver initialization utility\n");
167 printf("Usage:\n");
168- printf("\thciattach [-n] [-p] [-b] [-t timeout] [-s initial_speed] <tty> <type | id> [speed] [flow|noflow]\n");
169+ printf("\thciattach [-n] [-p] [-b] [-t timeout] [-s initial_speed] [-S bts-script] <tty> <type | id> [speed] [flow|noflow]\n");
170 printf("\thciattach -l\n");
171 }
172
173@@ -970,11 +1092,12 @@
174 pid_t pid;
175 struct sigaction sa;
176 char dev[PATH_MAX];
177+ char *bts = NULL;
178
179 detach = 1;
180 printpid = 0;
181
182- while ((opt=getopt(argc, argv, "bnpt:s:l")) != EOF) {
183+ while ((opt=getopt(argc, argv, "bnpt:s:S:l")) != EOF) {
184 switch(opt) {
185 case 'b':
186 send_break = 1;
187@@ -996,6 +1119,10 @@
188 init_speed = atoi(optarg);
189 break;
190
191+ case 'S':
192+ bts = optarg;
193+ break;
194+
195 case 'l':
196 for (i = 0; uart[i].type; i++) {
197 printf("%-10s0x%04x,0x%04x\n", uart[i].type,
198@@ -1067,6 +1194,8 @@
199 if (init_speed)
200 u->init_speed = init_speed;
201
202+ u->bts = bts;
203+
204 memset(&sa, 0, sizeof(sa));
205 sa.sa_flags = SA_NOCLDSTOP;
206 sa.sa_handler = sig_alarm;
207--- bluez-utils-2.24/tools/Makefile.am.orig 2005-12-03 07:22:16.000000000 +0100
208+++ bluez-utils-2.24/tools/Makefile.am 2006-01-22 13:53:59.000000000 +0100
209@@ -37,6 +37,9 @@
210
211 noinst_PROGRAMS = hcisecfilter ppporc
212
213+hciattach_SOURCES = hciattach.c ti_bts.h ti_bts.c
214+hciattach_LDADD = @BLUEZ_LIBS@
215+
216 hciconfig_SOURCES = hciconfig.c csr.h csr.c
217 hciconfig_LDADD = @BLUEZ_LIBS@ $(top_builddir)/common/libtextfile.a
218
219--- bluez-utils-2.24/tools/ti_bts.h.orig 2006-01-22 13:56:38.000000000 +0100
220+++ bluez-utils-2.24/tools/ti_bts.h 2006-01-22 13:53:59.000000000 +0100
221@@ -0,0 +1,116 @@
222+/*
223+ * Copyright (c) 2005 Texas Instruments, Inc.
224+ * Ported by SDG Systems, LLC
225+ *
226+ * This program is free software; you can redistribute it and/or modify
227+ * it under the terms of the GNU General Public License version 2 as
228+ * published by the Free Software Foundation;
229+ *
230+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
231+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
232+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
233+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
234+ * CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
235+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
236+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
237+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
238+ *
239+ * ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
240+ * COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
241+ * SOFTWARE IS DISCLAIMED.
242+ *
243+ */
244+
245+#ifndef BT_SCRIPT_H
246+#define BT_SCRIPT_H
247+
248+#ifdef __cplusplus
249+extern "C" {
250+#endif
251+
252+/*
253+ * Define the interface of Bluetooth Script
254+ */
255+
256+typedef void bts_t;
257+
258+
259+#define ACTION_SEND_COMMAND 1 /* Send out raw data (as is) */
260+#define ACTION_WAIT_EVENT 2 /* Wait for data */
261+#define ACTION_SERIAL_PORT_PARAMETERS 3
262+#define ACTION_DELAY 4
263+#define ACTION_RUN_SCRIPT 5
264+#define ACTION_REMARKS 6
265+
266+/*
267+ * Structure for ACTION_SEND_COMMAND
268+ */
269+typedef struct tagCActionCommand
270+{
271+ unsigned char data[1]; /* Data to send */
272+} action_command_t;
273+
274+/*
275+ * Structure for ACTION_WAIT_EVENT
276+ */
277+typedef struct tagCActionWaitEvent
278+{
279+ unsigned long msec; /* in milliseconds */
280+ unsigned long size;
281+ unsigned char data[1]; /* Data to wait for */
282+} action_wait_t;
283+
284+
285+/*
286+ * Structure for ACTION_SERIAL_PORT_PARAMETERS
287+ */
288+typedef struct tagCActionSerialPortParameters
289+{
290+ unsigned long baud;
291+ unsigned long flow_control;
292+} action_serial_t;
293+
294+/* Flow Control Type */
295+#define FCT_NONE 0
296+#define FCT_HARDWARE 1
297+
298+#define DONT_CHANGE 0xFFFFFFFF /* For both baud rate and flow control */
299+
300+
301+/*
302+ * Structure for ACTION_DELAY
303+ */
304+typedef struct tagCActionDelay
305+{
306+ unsigned long msec; /* in milliseconds */
307+} action_delay_t;
308+
309+/*
310+ * Structure for ACTION_RUN_SCRIPT
311+ */
312+typedef struct tagCActionRunScript
313+{
314+ char filename[1];
315+} action_run_t;
316+
317+/*
318+ * Structure for ACTION_REMARKS
319+ */
320+typedef struct tagCActionRemarks
321+{
322+ char m_szRemarks[1];
323+} action_remarks_t;
324+
325+
326+const char *cis_create_filename(const unsigned char* cmdparms);
327+bts_t * bts_load_script(const char* fname, unsigned long* version);
328+unsigned long bts_next_action(const bts_t* bts_fp, unsigned char* action_buf,
329+ unsigned long nMaxSize, unsigned short* ptype);
330+void bts_unload_script(bts_t* bts_fp);
331+
332+#ifdef __cplusplus
333+};
334+#endif
335+
336+#endif /* BT_SCRIPT_H */
337+
338--- bluez-utils-2.24/tools/ti_bts.c.orig 2006-01-22 13:56:36.000000000 +0100
339+++ bluez-utils-2.24/tools/ti_bts.c 2006-01-22 13:56:31.000000000 +0100
340@@ -0,0 +1,149 @@
341+/*
342+ * Copyright (c) 2005 Texas Instruments, Inc.
343+ * Ported by SDG Systems, LLC
344+ *
345+ * This program is free software; you can redistribute it and/or modify
346+ * it under the terms of the GNU General Public License version 2 as
347+ * published by the Free Software Foundation;
348+ *
349+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
350+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
351+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
352+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
353+ * CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
354+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
355+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
356+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
357+ *
358+ * ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
359+ * COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
360+ * SOFTWARE IS DISCLAIMED.
361+ *
362+ */
363+
364+
365+#include <stdio.h>
366+#include <stdlib.h>
367+#include "ti_bts.h"
368+
369+#ifndef MAKEWORD
370+#define MAKEWORD(a, b) ((unsigned short)(((unsigned char)(a)) | ((unsigned short)((unsigned char)(b))) << 8))
371+#endif
372+
373+#define TI_MANUFACTURER_ID 13
374+
375+/*
376+ * Common Init Script specific
377+ */
378+const char *
379+cis_create_filename(const unsigned char* cmdparms)
380+{
381+ static char bts_file[50];
382+
383+ /* Check for TI's id */
384+ unsigned short manfid = MAKEWORD(cmdparms[8], cmdparms[9]);
385+
386+ if (TI_MANUFACTURER_ID == manfid) {
387+ unsigned short version = MAKEWORD(cmdparms[10], cmdparms[11]);
388+
389+ unsigned short chip = (version & 0x7C00) >> 10;
390+ unsigned short min_ver = (version & 0x007F);
391+ unsigned short maj_ver = (version & 0x0380) >> 7;
392+
393+ if (0 != (version & 0x8000)) {
394+ maj_ver |= 0x0008;
395+ }
396+
397+ sprintf( bts_file, "TIInit_%d.%d.%d.bts",
398+ (int)chip, (int)maj_ver, (int)min_ver);
399+
400+ return &bts_file[0];
401+ }
402+ return NULL;
403+}
404+
405+typedef struct tagCHeader
406+{
407+ unsigned long magic;
408+ unsigned long version;
409+ unsigned char future[24];
410+} cheader_t;
411+
412+
413+/* The value 0x42535442 stands for (in ASCII) BTSB */
414+/* which is Bluetooth Script Binary */
415+#define FILE_HEADER_MAGIC 0x42535442
416+
417+
418+bts_t *
419+bts_load_script(const char* fname, unsigned long* version)
420+{
421+ bts_t* bts = NULL;
422+ FILE* fp = fopen(fname, "rb");
423+
424+ if (NULL != fp) {
425+ /* Read header */
426+ cheader_t header;
427+
428+ /* Read header */
429+ if (1 == fread(&header, sizeof(header), 1, fp)) {
430+ /* Check magic number for correctness */
431+ if (header.magic == FILE_HEADER_MAGIC) {
432+ /* If user wants the version number */
433+ if (NULL != version) {
434+ *version = header.version;
435+ }
436+ bts = (bts_t*)fp;
437+ }
438+ }
439+ /* If failed reading the file, close it */
440+ if (NULL == bts) {
441+ fclose(fp);
442+ }
443+ }
444+ return bts;
445+}
446+
447+unsigned long
448+bts_next_action(const bts_t* bts_fp, unsigned char* action_buf,
449+ unsigned long nMaxSize, unsigned short* ptype)
450+{
451+ unsigned long bytes = 0;
452+ FILE* fp = (FILE*)bts_fp;
453+ unsigned char action_hdr[4];
454+
455+ if (bts_fp == NULL)
456+ return 0;
457+
458+ /* Each Action has the following: */
459+ /* UINT16 type of this action */
460+ /* UINT16 size of rest */
461+ /* BYTE[] action buffer (for HCI, includes the type byte e.g. 1 for hci command) */
462+
463+ if (1 == fread(&action_hdr[0], sizeof(action_hdr), 1, fp)) {
464+ unsigned short type = *(unsigned short*)&action_hdr[0];
465+ unsigned short size = *(unsigned short*)&action_hdr[2];
466+
467+ if (size <= nMaxSize) {
468+ int nread = fread(action_buf, sizeof(action_buf[0]), size, fp);
469+
470+ if (nread == size) {
471+ *ptype = type;
472+ bytes = (unsigned long)size;
473+ }
474+ }
475+ }
476+
477+ return bytes;
478+}
479+
480+void
481+bts_unload_script(bts_t* bts_fp)
482+{
483+ FILE* fp = (FILE*)bts_fp;
484+
485+ if (NULL != fp) {
486+ fclose(fp);
487+ }
488+}
489+
diff --git a/meta-extras/packages/bluez/files/hciattach_devlength.patch b/meta-extras/packages/bluez/files/hciattach_devlength.patch
deleted file mode 100644
index 8d84cb1b00..0000000000
--- a/meta-extras/packages/bluez/files/hciattach_devlength.patch
+++ /dev/null
@@ -1,11 +0,0 @@
1--- bluez-utils-2.21/tools/hciattach.c.orig 2005-12-15 16:29:55.000000000 +0100
2+++ bluez-utils-2.21/tools/hciattach.c 2005-12-15 16:29:37.000000000 +0100
3@@ -973,7 +973,7 @@
4 int send_break = 0;
5 pid_t pid;
6 struct sigaction sa;
7- char dev[20];
8+ char dev[25];
9
10 detach = 1;
11 printpid = 0;
diff --git a/meta-extras/packages/bluez/files/hcid.conf b/meta-extras/packages/bluez/files/hcid.conf
deleted file mode 100644
index 44e9c46fb0..0000000000
--- a/meta-extras/packages/bluez/files/hcid.conf
+++ /dev/null
@@ -1,72 +0,0 @@
1#
2# HCI daemon configuration file.
3#
4# $Id: hcid.conf,v 1.4 2004/04/29 20:14:21 holtmann Exp $
5#
6
7# HCId options
8options {
9 # Automatically initialize new devices
10 autoinit yes;
11
12 # Security Manager mode
13 # none - Security manager disabled
14 # auto - Use local PIN for incoming connections
15 # user - Always ask user for a PIN
16 #
17 security auto;
18
19 # Pairing mode
20 # none - Pairing disabled
21 # multi - Allow pairing with already paired devices
22 # once - Pair once and deny successive attempts
23 pairing multi;
24
25 # PIN helper
26 pin_helper /bin/bluepin;
27
28 # D-Bus PIN helper
29 # dbus_pin_helper;
30}
31
32# Default settings for HCI devices
33device {
34 # Local device name
35 # %d - device id
36 # %h - host name
37 name "%h";
38
39 # Local device class
40 class 0x120112;
41
42 # Default packet type
43 #pkt_type DH1,DM1,HV1;
44
45 # Inquiry and Page scan
46 iscan enable; pscan enable;
47
48 # Default link mode
49 # none - no specific policy
50 # accept - always accept incoming connections
51 # master - become master on incoming connections,
52 # deny role switch on outgoing connections
53 #
54 #lm accept,master;
55 #
56 lm accept;
57
58 # Default link policy
59 # none - no specific policy
60 # rswitch - allow role switch
61 # hold - allow hold mode
62 # sniff - allow sniff mode
63 # park - allow park mode
64 #
65 #lp hold,sniff;
66 #
67 lp rswitch,hold,sniff,park;
68
69 # Authentication and Encryption
70 #auth enable;
71 encrypt enable;
72}
diff --git a/meta-extras/packages/bluez/files/no-user-include.patch b/meta-extras/packages/bluez/files/no-user-include.patch
deleted file mode 100644
index 8c1b1b6d6d..0000000000
--- a/meta-extras/packages/bluez/files/no-user-include.patch
+++ /dev/null
@@ -1,18 +0,0 @@
1Do not add -I/usr/include to the compile line just because we will
2install bluez-utils there says zecke...
3
4Index: bluez-utils-2.25/acinclude.m4
5===================================================================
6--- bluez-utils-2.25.orig/acinclude.m4 2006-05-18 12:39:57.473577920 +0200
7+++ bluez-utils-2.25/acinclude.m4 2006-05-19 00:58:52.694599848 +0200
8@@ -69,7 +69,9 @@
9 ac_save_LDFLAGS=$LDFLAGS
10
11 BLUEZ_CFLAGS=""
12- test -d "${bluez_prefix}/include" && BLUEZ_CFLAGS="$BLUEZ_CFLAGS -I${bluez_prefix}/include"
13+ if test "$cross_compiling" = no; then
14+ test -d "${bluez_prefix}/include" && BLUEZ_CFLAGS="$BLUEZ_CFLAGS -I${bluez_prefix}/include"
15+ fi
16
17 CPPFLAGS="$CPPFLAGS $BLUEZ_CFLAGS"
18 AC_CHECK_HEADER(bluetooth/bluetooth.h, dummy=yes, AC_MSG_ERROR(Bluetooth header files not found))
diff --git a/meta-extras/packages/bluez/files/openmn/bluetooth.default b/meta-extras/packages/bluez/files/openmn/bluetooth.default
deleted file mode 100644
index 06c52d7960..0000000000
--- a/meta-extras/packages/bluez/files/openmn/bluetooth.default
+++ /dev/null
@@ -1,37 +0,0 @@
1# Bluetooth configuraton file
2
3# Start of hcid (allowed values are "true" and "false")
4HCID_ENABLE=true
5
6# Config file for hcid
7HCID_CONFIG="/etc/bluetooth/hcid.conf"
8
9# Start sdpd (allowed values are "true" and "false")
10SDPD_ENABLE=false
11
12# Start hidd (allowed values are "true" and "false")
13HIDD_ENABLE=false
14
15# Arguments to hidd
16HIDD_OPTIONS=""
17
18# Run hid2hci (allowed values are "true" and "false")
19HID2HCI_ENABLE=false
20
21# Bind rfcomm devices (allowed values are "true" and "false")
22RFCOMM_ENABLE=false
23
24# Config file for rfcomm
25RFCOMM_CONFIG="/etc/bluetooth/rfcomm.conf"
26
27# Start dund (allowed values are "true" and "false")
28DUND_ENABLE=false
29
30# Arguments to dund
31DUND_OPTIONS="--listen --persist"
32
33# Start pand (allowed values are "true" and "false")
34PAND_ENABLE=false
35
36# Arguments to pand
37PAND_OPTIONS="--listen --role NAP"
diff --git a/meta-extras/packages/bluez/files/openmn/hcid.conf b/meta-extras/packages/bluez/files/openmn/hcid.conf
deleted file mode 100644
index 46a5d5fd54..0000000000
--- a/meta-extras/packages/bluez/files/openmn/hcid.conf
+++ /dev/null
@@ -1,70 +0,0 @@
1#
2# HCI daemon configuration file.
3#
4# $Id: hcid.conf,v 1.4 2004/04/29 20:14:21 holtmann Exp $
5#
6
7# HCId options
8options {
9 # Automatically initialize new devices
10 autoinit yes;
11
12 # Security Manager mode
13 # none - Security manager disabled
14 # auto - Use local PIN for incoming connections
15 # user - Always ask user for a PIN
16 #
17 security auto;
18
19 # Pairing mode
20 # none - Pairing disabled
21 # multi - Allow pairing with already paired devices
22 # once - Pair once and deny successive attempts
23 pairing multi;
24
25 # PIN helper
26 # pin_helper /bin/bluepin;
27
28 # D-Bus PIN helper
29 # dbus_pin_helper;
30}
31
32# Default settings for HCI devices
33device {
34 # Local device name
35 # %d - device id
36 # %h - host name
37 name "%h";
38
39 # Local device class
40 class 0x820100;
41
42 # Default packet type
43 #pkt_type DH1,DM1,HV1;
44
45 # Inquiry and Page scan
46 iscan enable; pscan enable;
47
48 # Default link mode
49 # none - no specific policy
50 # accept - always accept incoming connections
51 # master - become master on incoming connections,
52 # deny role switch on outgoing connections
53 #
54 lm accept,master;
55
56 # Default link policy
57 # none - no specific policy
58 # rswitch - allow role switch
59 # hold - allow hold mode
60 # sniff - allow sniff mode
61 # park - allow park mode
62 #
63 #lp hold,sniff;
64 #
65 lp rswitch,hold,sniff,park;
66
67 # Authentication and Encryption
68 auth enable;
69 encrypt enable;
70}
diff --git a/meta-extras/packages/bluez/files/openzaurus/bluetooth.default b/meta-extras/packages/bluez/files/openzaurus/bluetooth.default
deleted file mode 100644
index e63ab137cc..0000000000
--- a/meta-extras/packages/bluez/files/openzaurus/bluetooth.default
+++ /dev/null
@@ -1,37 +0,0 @@
1# Bluetooth configuraton file
2
3# Start of hcid (allowed values are "true" and "false")
4HCID_ENABLE=true
5
6# Config file for hcid
7HCID_CONFIG="/etc/bluetooth/hcid.conf"
8
9# Start sdpd (allowed values are "true" and "false")
10SDPD_ENABLE=true
11
12# Start hidd (allowed values are "true" and "false")
13HIDD_ENABLE=false
14
15# Arguments to hidd
16HIDD_OPTIONS=""
17
18# Run hid2hci (allowed values are "true" and "false")
19HID2HCI_ENABLE=true
20
21# Bind rfcomm devices (allowed values are "true" and "false")
22RFCOMM_ENABLE=true
23
24# Config file for rfcomm
25RFCOMM_CONFIG="/etc/bluetooth/rfcomm.conf"
26
27# Start dund (allowed values are "true" and "false")
28DUND_ENABLE=false
29
30# Arguments to dund
31DUND_OPTIONS="--listen --persist"
32
33# Start pand (allowed values are "true" and "false")
34PAND_ENABLE=false
35
36# Arguments to pand
37PAND_OPTIONS="--listen --role NAP"
diff --git a/meta-extras/packages/bluez/files/slugos/bluetooth.default b/meta-extras/packages/bluez/files/slugos/bluetooth.default
deleted file mode 100644
index 10f628e314..0000000000
--- a/meta-extras/packages/bluez/files/slugos/bluetooth.default
+++ /dev/null
@@ -1,37 +0,0 @@
1# Bluetooth configuraton file
2
3# Start of hcid (allowed values are "true" and "false")
4HCID_ENABLE=true
5
6# Config file for hcid
7HCID_CONFIG="/etc/bluetooth/hcid.conf"
8
9# Start sdpd (allowed values are "true" and "false")
10SDPD_ENABLE=true
11
12# Start hidd (allowed values are "true" and "false")
13HIDD_ENABLE=false
14
15# Arguments to hidd
16HIDD_OPTIONS=""
17
18# Run hid2hci (allowed values are "true" and "false")
19HID2HCI_ENABLE=false
20
21# Bind rfcomm devices (allowed values are "true" and "false")
22RFCOMM_ENABLE=true
23
24# Config file for rfcomm
25RFCOMM_CONFIG="/etc/bluetooth/rfcomm.conf"
26
27# Start dund (allowed values are "true" and "false")
28DUND_ENABLE=true
29
30# Arguments to dund
31DUND_OPTIONS="--listen --persist"
32
33# Start pand (allowed values are "true" and "false")
34PAND_ENABLE=true
35
36# Arguments to pand
37PAND_OPTIONS="--listen --role NAP"
diff --git a/meta-extras/packages/bluez/files/slugos/hcid.conf b/meta-extras/packages/bluez/files/slugos/hcid.conf
deleted file mode 100644
index 46a5d5fd54..0000000000
--- a/meta-extras/packages/bluez/files/slugos/hcid.conf
+++ /dev/null
@@ -1,70 +0,0 @@
1#
2# HCI daemon configuration file.
3#
4# $Id: hcid.conf,v 1.4 2004/04/29 20:14:21 holtmann Exp $
5#
6
7# HCId options
8options {
9 # Automatically initialize new devices
10 autoinit yes;
11
12 # Security Manager mode
13 # none - Security manager disabled
14 # auto - Use local PIN for incoming connections
15 # user - Always ask user for a PIN
16 #
17 security auto;
18
19 # Pairing mode
20 # none - Pairing disabled
21 # multi - Allow pairing with already paired devices
22 # once - Pair once and deny successive attempts
23 pairing multi;
24
25 # PIN helper
26 # pin_helper /bin/bluepin;
27
28 # D-Bus PIN helper
29 # dbus_pin_helper;
30}
31
32# Default settings for HCI devices
33device {
34 # Local device name
35 # %d - device id
36 # %h - host name
37 name "%h";
38
39 # Local device class
40 class 0x820100;
41
42 # Default packet type
43 #pkt_type DH1,DM1,HV1;
44
45 # Inquiry and Page scan
46 iscan enable; pscan enable;
47
48 # Default link mode
49 # none - no specific policy
50 # accept - always accept incoming connections
51 # master - become master on incoming connections,
52 # deny role switch on outgoing connections
53 #
54 lm accept,master;
55
56 # Default link policy
57 # none - no specific policy
58 # rswitch - allow role switch
59 # hold - allow hold mode
60 # sniff - allow sniff mode
61 # park - allow park mode
62 #
63 #lp hold,sniff;
64 #
65 lp rswitch,hold,sniff,park;
66
67 # Authentication and Encryption
68 auth enable;
69 encrypt enable;
70}