aboutsummaryrefslogtreecommitdiff
path: root/recipes-connectivity/bluez
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-connectivity/bluez')
-rw-r--r--recipes-connectivity/bluez/bluez5_5.41.bbappend10
-rw-r--r--recipes-connectivity/bluez/files/bluetooth.service20
2 files changed, 30 insertions, 0 deletions
diff --git a/recipes-connectivity/bluez/bluez5_5.41.bbappend b/recipes-connectivity/bluez/bluez5_5.41.bbappend
new file mode 100644
index 0000000..2d2fc91
--- /dev/null
+++ b/recipes-connectivity/bluez/bluez5_5.41.bbappend
@@ -0,0 +1,10 @@
+#for SDP example we need bluez4 compatiblity
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+SRC_URI_append = "\
+ file://bluetooth.service \
+ "
+
+do_install_append() {
+ install -m 644 ${WORKDIR}/bluetooth.service ${D}${base_libdir}/systemd/system
+}
+
diff --git a/recipes-connectivity/bluez/files/bluetooth.service b/recipes-connectivity/bluez/files/bluetooth.service
new file mode 100644
index 0000000..af693f9
--- /dev/null
+++ b/recipes-connectivity/bluez/files/bluetooth.service
@@ -0,0 +1,20 @@
+[Unit]
+Description=Bluetooth service
+Documentation=man:bluetoothd(8)
+ConditionPathIsDirectory=/sys/class/bluetooth
+
+[Service]
+Type=dbus
+BusName=org.bluez
+ExecStart=/usr/libexec/bluetooth/bluetoothd --compat
+NotifyAccess=main
+#WatchdogSec=10
+#Restart=on-failure
+CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
+LimitNPROC=1
+ProtectHome=true
+ProtectSystem=full
+
+[Install]
+WantedBy=bluetooth.target
+Alias=dbus-org.bluez.service