update the bluez-utils to 3.24.

this package depends on dbus. there is an open ticked about dbus (#2562) which needs to be fixed, else bluez-utils will NOT work.

tested with an usb bluetooth stick and nokia 6110 slide on brcm47xx-2.6.

Signed-off-by: Michael Vogt <michu at neophob.com>

---

Index: package/utils/bluez-utils/files/bluez-utils.init
===================================================================
--- package/utils/bluez-utils/files/bluez-utils.init	(revision 10204)
+++ package/utils/bluez-utils/files/bluez-utils.init	(working copy)
@@ -1,7 +1,8 @@
 #!/bin/sh /etc/rc.common
 # Copyright (C) 2007 OpenWrt.org
 
-START=60
+#start after dbus (60)
+START=62
 
 append_bool() {
 	local section="$1"
@@ -107,6 +108,16 @@
 	config_foreach rfcomm_config rfcomm
 	config_foreach dund_config dund
 	config_foreach pand_config pand
+	
+        #start passkey agent
+        passkey-agent --default 1234&
+
+        hcitool hci0 up
+        rfcomm release 0
+
+        #set up serial conenction
+        #rfcomm connect /dev/rfcomm0 00:1D:E9:5B:92:8D&
+
 }
 
 stop() {
Index: package/utils/bluez-utils/Makefile
===================================================================
--- package/utils/bluez-utils/Makefile	(revision 10204)
+++ package/utils/bluez-utils/Makefile	(working copy)
@@ -9,12 +9,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bluez-utils
-PKG_VERSION:=2.24
-PKG_RELEASE:=3
+PKG_VERSION:=3.24
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://bluez.sourceforge.net/download
-PKG_MD5SUM:=5f5488ff3d31bdb9cd36b7991fe68408
+PKG_MD5SUM:=cc3582da827bc4c468147af1afaa5aff
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
@@ -24,35 +24,27 @@
 define Package/bluez-utils
   SECTION:=utils
   CATEGORY:=Utilities
-  DEPENDS:=+bluez-libs +libpthread
+  DEPENDS:=+bluez-libs +libpthread +dbus
   TITLE:=Bluetooth utilities
   URL:=http://www.bluez.org/
 endef
 
 define Package/bluez-utils/conffiles
-/etc/bluetooth/givepin
 /etc/bluetooth/hcid.conf
 /etc/bluetooth/rfcomm.conf
 /etc/config/bluetooth
 endef
 
+
 define Build/Configure
 	$(call Build/Configure/Default, \
-		--disable-dbus \
-		--disable-fuse \
-		--disable-obex \
-		--disable-alsa \
-		--disable-cups \
-		--disable-pcmcia \
-		--disable-initscripts \
-		--disable-bccmd \
-		--disable-avctrl \
-		--disable-hid2hci \
-		--disable-dfutool \
-		--disable-bcm203x \
-		--disable-bluepin \
+		--enable-debug \
+		--enable-usb \
+		--enable-input \
+		--enable-serial \
+		--enable-network \
 		--with-bluez="$(STAGING_DIR)/usr/include" \
-		--with-usb=no \
+		--with-usb=yes \
 	)
 endef
 
@@ -62,17 +54,21 @@
 		all install
 endef
 
+#copy bluetooth.conf nach /etc/dbus-1/system.d/
+
 define Package/bluez-utils/install
 	$(INSTALL_DIR) $(1)/usr/bin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
 	$(INSTALL_DIR) $(1)/usr/sbin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/../daemon/passkey-agent $(1)/usr/sbin/	
 	$(INSTALL_DIR) $(1)/etc/bluetooth
 	$(CP) $(PKG_INSTALL_DIR)/../hcid/hcid.conf $(1)/etc/bluetooth/
 	$(CP) $(PKG_INSTALL_DIR)/../rfcomm/rfcomm.conf $(1)/etc/bluetooth/
-	install -m0700 ./files/givepin $(1)/etc/bluetooth/
 	$(INSTALL_DIR) $(1)/etc/config
-	$(INSTALL_DATA) ./files/bluetooth.conf $(1)/etc/config/bluetooth
+	$(INSTALL_DATA) ./files/bluetooth.conf $(1)/etc/config/bluetooth	
+	$(INSTALL_DIR) $(1)/etc/dbus-1/system.d/
+	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/../daemon/bluetooth.conf $(1)/etc/dbus-1/system.d/
 	$(INSTALL_DIR) $(1)/etc/init.d
 	$(INSTALL_BIN) ./files/bluez-utils.init $(1)/etc/init.d/bluez-utils
 endef
Index: package/utils/bluez-utils/patches/100-enokey1.patch
===================================================================
--- package/utils/bluez-utils/patches/100-enokey1.patch	(revision 0)
+++ package/utils/bluez-utils/patches/100-enokey1.patch	(revision 0)
@@ -0,0 +1,11 @@
+--- bluez-utils-3.24/input/device.orig	2007-12-08 20:04:42.000000000 +0100
++++ bluez-utils-3.24/input/device.c	2008-01-16 09:20:41.000000000 +0100
+@@ -25,6 +25,8 @@
+ #include <config.h>
+ #endif
+ 
++#define ENOKEY          161     /* Required key not available */
++
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <fcntl.h>
Index: package/utils/bluez-utils/patches/101-enokey1.patch
===================================================================
--- package/utils/bluez-utils/patches/101-enokey1.patch	(revision 0)
+++ package/utils/bluez-utils/patches/101-enokey1.patch	(revision 0)
@@ -0,0 +1,11 @@
+--- bluez-utils-3.24/input/storage.orig	2007-10-05 09:17:06.000000000 +0200
++++ bluez-utils-3.24/input/storage.c	2008-01-16 09:26:23.000000000 +0100
+@@ -25,6 +25,8 @@
+ #include <config.h>
+ #endif
+ 
++#define ENOKEY          161     /* Required key not available */
++
+ #include <stdio.h>
+ #include <errno.h>
+ #include <ctype.h>
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to