diff options
Diffstat (limited to 'recipes/bluez/bluez-utils-dbus')
-rw-r--r-- | recipes/bluez/bluez-utils-dbus/dbus-2.24.patch | 53 | ||||
-rw-r--r-- | recipes/bluez/bluez-utils-dbus/dbus.patch | 58 | ||||
-rw-r--r-- | recipes/bluez/bluez-utils-dbus/hcid-alignment-fix.patch | 42 | ||||
-rw-r--r-- | recipes/bluez/bluez-utils-dbus/hcid.conf | 72 | ||||
-rw-r--r-- | recipes/bluez/bluez-utils-dbus/smash.patch | 11 |
5 files changed, 236 insertions, 0 deletions
diff --git a/recipes/bluez/bluez-utils-dbus/dbus-2.24.patch b/recipes/bluez/bluez-utils-dbus/dbus-2.24.patch new file mode 100644 index 0000000000..d8ec946a0b --- /dev/null +++ b/recipes/bluez/bluez-utils-dbus/dbus-2.24.patch @@ -0,0 +1,53 @@ +--- bluez-utils-2.24/acinclude.m4.orig 2006-01-12 08:21:38.000000000 +0100 ++++ bluez-utils-2.24/acinclude.m4 2006-01-12 08:23:18.000000000 +0100 +@@ -131,46 +131,15 @@ + ]) + + AC_DEFUN([AC_PATH_DBUS], [ +- dbus_prefix=${prefix} +- +- AC_ARG_WITH(dbus, AC_HELP_STRING([--with-dbus=DIR], [D-BUS library is installed in DIR]), [ +- if (test "${withval}" != "yes"); then +- dbus_prefix=${withval} +- fi +- ]) +- +- ac_save_CPPFLAGS=$CPPFLAGS +- ac_save_LDFLAGS=$LDFLAGS +- +- DBUS_CFLAGS="-DDBUS_API_SUBJECT_TO_CHANGE" +- test -d "${dbus_prefix}/include/dbus-1.0" && DBUS_CFLAGS="$DBUS_CFLAGS -I${dbus_prefix}/include/dbus-1.0" +- if (test "${prefix}" = "${bluez_prefix}"); then +- test -d "${libdir}/dbus-1.0/include" && DBUS_CFLAGS="$DBUS_CFLAGS -I${libdir}/dbus-1.0/include" +- else +- test -d "${dbus_prefix}/lib64/dbus-1.0/include" && DBUS_CFLAGS="$DBUS_CFLAGS -I${dbus_prefix}/lib64/dbus-1.0/include" +- test -d "${dbus_prefix}/lib/dbus-1.0/include" && DBUS_CFLAGS="$DBUS_CFLAGS -I${dbus_prefix}/lib/dbus-1.0/include" +- fi ++ if pkg-config --exists dbus-1; then ++ dbus_found=yes ; DBUS_CFLAGS="`pkg-config --cflags dbus-1` -DDBUS_API_SUBJECT_TO_CHANGE" ++ DBUS_LIBS="`pkg-config --libs dbus-1`" + + CPPFLAGS="$CPPFLAGS $DBUS_CFLAGS" +- AC_CHECK_HEADER(dbus/dbus.h, dbus_found=yes, dbus_found=no) +- +- DBUS_LIBS="" +- if (test "${prefix}" = "${dbus_prefix}"); then +- test -d "${libdir}" && DBUS_LIBS="$DBUS_LIBS -L${libdir}" +- else +- test -d "${dbus_prefix}/lib64" && DBUS_LIBS="$DBUS_LIBS -L${dbus_prefix}/lib64" +- test -d "${dbus_prefix}/lib" && DBUS_LIBS="$DBUS_LIBS -L${dbus_prefix}/lib" +- fi +- + LDFLAGS="$LDFLAGS $DBUS_LIBS" +- AC_CHECK_LIB(dbus-1, dbus_error_init, DBUS_LIBS="$DBUS_LIBS -ldbus-1", dbus_found=no) +- AC_CHECK_LIB(dbus-1, dbus_message_iter_get_basic, dummy=yes, dbus_found=no) +- +- CPPFLAGS=$ac_save_CPPFLAGS +- LDFLAGS=$ac_save_LDFLAGS +- + AC_SUBST(DBUS_CFLAGS) + AC_SUBST(DBUS_LIBS) ++ fi + ]) + + AC_DEFUN([AC_PATH_FUSE], [ diff --git a/recipes/bluez/bluez-utils-dbus/dbus.patch b/recipes/bluez/bluez-utils-dbus/dbus.patch new file mode 100644 index 0000000000..c5ab129469 --- /dev/null +++ b/recipes/bluez/bluez-utils-dbus/dbus.patch @@ -0,0 +1,58 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- bluez-utils-2.20/acinclude.m4~dbus.patch ++++ bluez-utils-2.20/acinclude.m4 +@@ -211,46 +211,15 @@ + ]) + + AC_DEFUN([AC_PATH_DBUS], [ +- dbus_prefix=${prefix} +- +- AC_ARG_WITH(dbus, AC_HELP_STRING([--with-dbus=DIR], [D-BUS library is installed in DIR]), [ +- if (test "${withval}" != "yes"); then +- dbus_prefix=${withval} +- fi +- ]) +- +- ac_save_CPPFLAGS=$CPPFLAGS +- ac_save_LDFLAGS=$LDFLAGS +- +- DBUS_CFLAGS="-DDBUS_API_SUBJECT_TO_CHANGE" +- test -d "${dbus_prefix}/include/dbus-1.0" && DBUS_CFLAGS="$DBUS_CFLAGS -I${dbus_prefix}/include/dbus-1.0" +- if (test "${prefix}" = "${bluez_prefix}"); then +- test -d "${libdir}/dbus-1.0/include" && DBUS_CFLAGS="$DBUS_CFLAGS -I${libdir}/dbus-1.0/include" +- else +- test -d "${dbus_prefix}/lib64/dbus-1.0/include" && DBUS_CFLAGS="$DBUS_CFLAGS -I${dbus_prefix}/lib64/dbus-1.0/include" +- test -d "${dbus_prefix}/lib/dbus-1.0/include" && DBUS_CFLAGS="$DBUS_CFLAGS -I${dbus_prefix}/lib/dbus-1.0/include" +- fi ++ if pkg-config --exists dbus-1; then ++ dbus_found=yes ; DBUS_CFLAGS="`pkg-config --cflags dbus-1` -DDBUS_API_SUBJECT_TO_CHANGE" ++ DBUS_LIBS="`pkg-config --libs dbus-1`" + + CPPFLAGS="$CPPFLAGS $DBUS_CFLAGS" +- AC_CHECK_HEADER(dbus/dbus.h, dbus_found=yes, dbus_found=no) +- +- DBUS_LIBS="" +- if (test "${prefix}" = "${dbus_prefix}"); then +- test -d "${libdir}" && DBUS_LIBS="$DBUS_LIBS -L${libdir}" +- else +- test -d "${dbus_prefix}/lib64" && DBUS_LIBS="$DBUS_LIBS -L${dbus_prefix}/lib64" +- test -d "${dbus_prefix}/lib" && DBUS_LIBS="$DBUS_LIBS -L${dbus_prefix}/lib" +- fi +- + LDFLAGS="$LDFLAGS $DBUS_LIBS" +- AC_CHECK_LIB(dbus-1, dbus_error_init, DBUS_LIBS="$DBUS_LIBS -ldbus-1", dbus_found=no) +- 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.])) +- +- CPPFLAGS=$ac_save_CPPFLAGS +- LDFLAGS=$ac_save_LDFLAGS +- + AC_SUBST(DBUS_CFLAGS) + AC_SUBST(DBUS_LIBS) ++ fi + ]) + + AC_DEFUN([AC_ARG_BLUEZ], [ diff --git a/recipes/bluez/bluez-utils-dbus/hcid-alignment-fix.patch b/recipes/bluez/bluez-utils-dbus/hcid-alignment-fix.patch new file mode 100644 index 0000000000..276281c14e --- /dev/null +++ b/recipes/bluez/bluez-utils-dbus/hcid-alignment-fix.patch @@ -0,0 +1,42 @@ +--- bluez-utils-2.20/hcid/dbus.c.orig 2005-09-21 11:27:26 +0200 ++++ bluez-utils-2.20/hcid/dbus.c 2005-09-21 11:27:35 +0200 +@@ -120,6 +121,7 @@ + DBusMessage *message; + #ifdef HAVE_DBUS_MESSAGE_ITER_GET_BASIC + uint8_t *addr = (uint8_t *) &ci->bdaddr; ++ uint32_t ci_out = ci->out; + #else + DBusMessageIter iter; + #endif +@@ -138,7 +140,7 @@ + bacpy(&req->bda, &ci->bdaddr); + + #ifdef HAVE_DBUS_MESSAGE_ITER_GET_BASIC +- dbus_message_append_args(message, DBUS_TYPE_BOOLEAN, &ci->out, ++ dbus_message_append_args(message, DBUS_TYPE_BOOLEAN, &ci_out, + DBUS_TYPE_ARRAY, DBUS_TYPE_BYTE, + &addr, sizeof(bdaddr_t), DBUS_TYPE_INVALID); + #else +@@ -261,6 +263,8 @@ + DBusMessage *message; + #ifndef HAVE_DBUS_MESSAGE_ITER_GET_BASIC + DBusMessageIter iter; ++#else ++ int32_t tmp_rssi = rssi; + #endif + char *local_addr, *peer_addr; + bdaddr_t tmp; +@@ -276,11 +280,12 @@ + } + + #ifdef HAVE_DBUS_MESSAGE_ITER_GET_BASIC ++ + dbus_message_append_args(message, + DBUS_TYPE_STRING, &local_addr, + DBUS_TYPE_STRING, &peer_addr, + DBUS_TYPE_UINT32, &class, +- DBUS_TYPE_INT32, &rssi, ++ DBUS_TYPE_INT32, &tmp_rssi, + DBUS_TYPE_INVALID); + #else + dbus_message_append_iter_init(message, &iter); diff --git a/recipes/bluez/bluez-utils-dbus/hcid.conf b/recipes/bluez/bluez-utils-dbus/hcid.conf new file mode 100644 index 0000000000..ab3ca2aaee --- /dev/null +++ b/recipes/bluez/bluez-utils-dbus/hcid.conf @@ -0,0 +1,72 @@ +# +# HCI daemon configuration file. +# +# $Id: hcid.conf,v 1.4 2004/04/29 20:14:21 holtmann Exp $ +# + +# HCId options +options { + # Automatically initialize new devices + autoinit yes; + + # Security Manager mode + # none - Security manager disabled + # auto - Use local PIN for incoming connections + # user - Always ask user for a PIN + # + security auto; + + # Pairing mode + # none - Pairing disabled + # multi - Allow pairing with already paired devices + # once - Pair once and deny successive attempts + pairing multi; + + # PIN helper + # pin_helper /usr/bin/bluepin; + + # D-Bus PIN helper + dbus_pin_helper; +} + +# Default settings for HCI devices +device { + # Local device name + # %d - device id + # %h - host name + name "%h"; + + # Local device class + class 0x120112; + + # Default packet type + #pkt_type DH1,DM1,HV1; + + # Inquiry and Page scan + iscan enable; pscan enable; + + # Default link mode + # none - no specific policy + # accept - always accept incoming connections + # master - become master on incoming connections, + # deny role switch on outgoing connections + # + #lm accept,master; + # + lm accept; + + # Default link policy + # none - no specific policy + # rswitch - allow role switch + # hold - allow hold mode + # sniff - allow sniff mode + # park - allow park mode + # + #lp hold,sniff; + # + lp rswitch,hold,sniff,park; + + # Authentication and Encryption + #auth enable; + encrypt enable; +} diff --git a/recipes/bluez/bluez-utils-dbus/smash.patch b/recipes/bluez/bluez-utils-dbus/smash.patch new file mode 100644 index 0000000000..55cdbb7284 --- /dev/null +++ b/recipes/bluez/bluez-utils-dbus/smash.patch @@ -0,0 +1,11 @@ +--- bluez-utils-2.11/hcid/dbus.c.old 2004-12-31 16:35:12.000000000 +0000 ++++ bluez-utils-2.11/hcid/dbus.c 2004-12-31 16:39:58.000000000 +0000 +@@ -89,6 +89,8 @@ + + memset(&pr, 0, sizeof(pr)); + bacpy(&pr.bdaddr, &req->bda); ++ if (len > sizeof (pr.pin_code)) ++ goto error; + memcpy(pr.pin_code, pin, len); + pr.pin_len = len; + hci_send_cmd(req->dev, OGF_LINK_CTL, OCF_PIN_CODE_REPLY, |