bluez: workaround aclmtu issue on OBEX transfers 30/24130/5
authorMatt Ranostay <matt.ranostay@konsulko.com>
Wed, 26 Feb 2020 06:23:38 +0000 (08:23 +0200)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Thu, 12 Mar 2020 17:14:13 +0000 (17:14 +0000)
Default MTU of 310 causes PBAP/OBEX transactions to timeout before
completing the entire transfer from coming from paired iOS device.

Change this to 930 to avoid timeouts. This is a workaround till
a better solution is devised.

Bug-AGL: SPEC-3206
Change-Id: I48bdc6107ac9176397bc0137496946c42b1c95d7
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
meta-agl-profile-core/recipes-connectivity/bluez5/bluez5/bluetooth.service [new file with mode: 0644]
meta-agl-profile-core/recipes-connectivity/bluez5/bluez5_%.bbappend

diff --git a/meta-agl-profile-core/recipes-connectivity/bluez5/bluez5/bluetooth.service b/meta-agl-profile-core/recipes-connectivity/bluez5/bluez5/bluetooth.service
new file mode 100644 (file)
index 0000000..e389e1a
--- /dev/null
@@ -0,0 +1,21 @@
+[Unit]
+Description=Bluetooth service
+Documentation=man:bluetoothd(8)
+ConditionPathIsDirectory=/sys/class/bluetooth
+
+[Service]
+Type=dbus
+BusName=org.bluez
+ExecStartPre=/usr/bin/hciconfig hci0 aclmtu 930:10
+ExecStart=/usr/libexec/bluetooth/bluetoothd
+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
index 9ee1db2..db5b095 100644 (file)
@@ -3,6 +3,7 @@ SRC_URI_append = " \
     file://bluetooth.conf \
     file://tmpdir.conf \
     file://obex.service \
+    file://bluetooth.service \
     file://0001-obex-report-notification-status-on-incoming-message.patch \
 "
 
@@ -18,5 +19,7 @@ do_install_append() {
         install -m 0644 ${WORKDIR}/tmpdir.conf ${D}${systemd_user_unitdir}/obex.service.d/tmpdir.conf
         mkdir -p ${D}/etc/systemd/user
         ln -sf ${systemd_user_unitdir}/obex.service ${D}/etc/systemd/user/dbus-org.bluez.obex.service
+        mkdir -p ${systemd_system_unitdir}
+        install -m 0644 ${WORKDIR}/bluetooth.service ${D}${systemd_system_unitdir}
     fi
 }