Bluetooth connect/ disconnect still happening if not streaming music
Ok, since this is still occuring, we will require your help to debug this. Can you please try and collect logs from the device and send them here? It might help to enable persistent logs. You can ssh into the hostOS to collect logs. Check out our masterclass on debugging for more details Balena Device Debugging Masterclass - Balena Documentation
I set up persistent logging. This is what’s showing up in the journal:
Sep 18 07:32:55 9373d69 dbus-daemon[1289]: [system] Rejected send message, 1 matched rules; type="method_return", sender=":1.134" (uid=0 pid=2056 comm="pulseaudio --file /etc/pulse/balena-sound.pa ") interface="(unset)" member="(unset)" error name="(unset)" requested_reply="0" destination=":1.10" (uid=0 pid=1485 comm="/usr/libexec/bluetooth/bluetoothd --experimental ")
Sep 18 07:33:00 9373d69 259bd384c7b0[1408]: W: [pulseaudio] module-loopback.c: Configured latency of 200.00 ms is smaller than minimum latency, using minimum instead
Sep 18 07:33:00 9373d69 259bd384c7b0[1408]: W: [pulseaudio] module-loopback.c: Cannot set requested source latency of 66.67 ms, adjusting to 250.00 ms
Sep 18 07:33:00 9373d69 kernel: input: 94:8B:C1:11:F0:13 as /devices/virtual/input/input82
Sep 18 07:33:00 9373d69 systemd-logind[1313]: Watching system buttons on /dev/input/event0 (94:8B:C1:11:F0:13)
Sep 18 07:33:24 9373d69 dbus-daemon[1289]: [system] Rejected send message, 1 matched rules; type="method_return", sender=":1.134" (uid=0 pid=2056 comm="pulseaudio --file /etc/pulse/balena-sound.pa ") interface="(unset)" member="(unset)" error name="(unset)" requested_reply="0" destination=":1.10" (uid=0 pid=1485 comm="/usr/libexec/bluetooth/bluetoothd --experimental ")
Sep 18 07:33:29 9373d69 259bd384c7b0[1408]: W: [pulseaudio] module-loopback.c: Configured latency of 200.00 ms is smaller than minimum latency, using minimum instead
Sep 18 07:33:29 9373d69 259bd384c7b0[1408]: W: [pulseaudio] module-loopback.c: Cannot set requested source latency of 66.67 ms, adjusting to 250.00 ms
Sep 18 07:33:29 9373d69 kernel: input: 94:8B:C1:11:F0:13 as /devices/virtual/input/input83
Sep 18 07:33:29 9373d69 systemd-logind[1313]: Watching system buttons on /dev/input/event0 (94:8B:C1:11:F0:13)
Sep 18 07:33:53 9373d69 dbus-daemon[1289]: [system] Rejected send message, 1 matched rules; type="method_return", sender=":1.134" (uid=0 pid=2056 comm="pulseaudio --file /etc/pulse/balena-sound.pa ") interface="(unset)" member="(unset)" error name="(unset)" requested_reply="0" destination=":1.10" (uid=0 pid=1485 comm="/usr/libexec/bluetooth/bluetoothd --experimental ")
Sep 18 07:33:58 9373d69 259bd384c7b0[1408]: W: [pulseaudio] module-loopback.c: Configured latency of 200.00 ms is smaller than minimum latency, using minimum instead
Sep 18 07:33:58 9373d69 259bd384c7b0[1408]: W: [pulseaudio] module-loopback.c: Cannot set requested source latency of 66.67 ms, adjusting to 250.00 ms
Sep 18 07:33:58 9373d69 kernel: input: 94:8B:C1:11:F0:13 as /devices/virtual/input/input84
Sep 18 07:33:58 9373d69 systemd-logind[1313]: Watching system buttons on /dev/input/event0 (94:8B:C1:11:F0:13)
Sep 18 07:34:22 9373d69 dbus-daemon[1289]: [system] Rejected send message, 1 matched rules; type="method_return", sender=":1.134" (uid=0 pid=2056 comm="pulseaudio --file /etc/pulse/balena-sound.pa ") interface="(unset)" member="(unset)" error name="(unset)" requested_reply="0" destination=":1.10" (uid=0 pid=1485 comm="/usr/libexec/bluetooth/bluetoothd --experimental ")
Sep 18 07:34:26 9373d69 259bd384c7b0[1408]: W: [pulseaudio] module-loopback.c: Configured latency of 200.00 ms is smaller than minimum latency, using minimum instead
Sep 18 07:34:26 9373d69 259bd384c7b0[1408]: W: [pulseaudio] module-loopback.c: Cannot set requested source latency of 66.67 ms, adjusting to 250.00 ms
Sep 18 07:34:27 9373d69 kernel: input: 94:8B:C1:11:F0:13 as /devices/virtual/input/input85
Sep 18 07:34:27 9373d69 systemd-logind[1313]: Watching system buttons on /dev/input/event0 (94:8B:C1:11:F0:13)
Sep 18 07:34:34 9373d69 balenad[1408]: time="2020-09-18T07:34:34.747122500Z" level=info msg="shim balena-engine-containerd-shim started" address=/containerd-shim/df3aa6a8d502b4746fe5fe8ad9fccbabff8699dc44975ac54a18fd842565965a.sock debug=false pid=7795
Sep 18 07:34:35 9373d69 balenad[1408]: time="2020-09-18T07:34:35.277546162Z" level=warning msg="OOM monitoring failed" error="cgroups: memory cgroup not supported on this system"
Sep 18 07:34:35 9373d69 balenad[1408]: time="2020-09-18T07:34:35.954601067Z" level=info msg="shim reaped" id=f51b7df2c0659013efa8ae7d45ab885a47512e15aa5ab86480b4b597983fdc4d
Sep 18 07:34:35 9373d69 balenad[1408]: time="2020-09-18T07:34:35.960724474Z" level=info msg="ignoring event" module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
Sep 18 07:34:50 9373d69 dbus-daemon[1289]: [system] Rejected send message, 1 matched rules; type="method_return", sender=":1.134" (uid=0 pid=2056 comm="pulseaudio --file /etc/pulse/balena-sound.pa ") interface="(unset)" member="(unset)" error name="(unset)" requested_reply="0" destination=":1.10" (uid=0 pid=1485 comm="/usr/libexec/bluetooth/bluetoothd --experimental ")
Sep 18 07:34:56 9373d69 259bd384c7b0[1408]: W: [pulseaudio] module-loopback.c: Configured latency of 200.00 ms is smaller than minimum latency, using minimum instead
Sep 18 07:34:56 9373d69 259bd384c7b0[1408]: W: [pulseaudio] module-loopback.c: Cannot set requested source latency of 66.67 ms, adjusting to 250.00 ms
Sep 18 07:34:56 9373d69 kernel: input: 94:8B:C1:11:F0:13 as /devices/virtual/input/input86
Sep 18 07:34:56 9373d69 systemd-logind[1313]: Watching system buttons on /dev/input/event0 (94:8B:C1:11:F0:13)
Sep 18 07:35:20 9373d69 dbus-daemon[1289]: [system] Rejected send message, 1 matched rules; type="method_return", sender=":1.134" (uid=0 pid=2056 comm="pulseaudio --file /etc/pulse/balena-sound.pa ") interface="(unset)" member="(unset)" error name="(unset)" requested_reply="0" destination=":1.10" (uid=0 pid=1485 comm="/usr/libexec/bluetooth/bluetoothd --experimental ")
Sep 18 07:35:25 9373d69 259bd384c7b0[1408]: W: [pulseaudio] module-loopback.c: Configured latency of 200.00 ms is smaller than minimum latency, using minimum instead
Sep 18 07:35:25 9373d69 259bd384c7b0[1408]: W: [pulseaudio] module-loopback.c: Cannot set requested source latency of 66.67 ms, adjusting to 250.00 ms
Sep 18 07:35:26 9373d69 kernel: input: 94:8B:C1:11:F0:13 as /devices/virtual/input/input87
Sep 18 07:35:26 9373d69 systemd-logind[1313]: Watching system buttons on /dev/input/event0 (94:8B:C1:11:F0:13)
Also, here’s the output of systemctl status bluetooth
:
root@9373d69:/var/log/journal/87739a2c083a4d1c93d04b934c50ed11# systemctl status bluetooth
â—Ź bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/bluetooth.service.d
└─bluetooth.conf
Active: active (running) since Fri 2020-09-18 00:27:13 UTC; 7h ago
Docs: man:bluetoothd(8)
Main PID: 1485 (bluetoothd)
Status: "Running"
Tasks: 1 (limit: 1962)
CGroup: /system.slice/bluetooth.service
└─1485 /usr/libexec/bluetooth/bluetoothd --experimental
Sep 18 00:27:13 9373d69 bluetoothd[1485]: Bluetooth daemon 5.50
Sep 18 00:27:13 9373d69 bluetoothd[1485]: Starting SDP server
Sep 18 00:27:13 9373d69 bluetoothd[1485]: Bluetooth management interface 1.14 initialized
Sep 18 00:27:13 9373d69 bluetoothd[1485]: Failed to set privacy: Rejected (0x0b)
Sep 18 06:42:57 9373d69 bluetoothd[1485]: Endpoint registered: sender=:1.134 path=/MediaEndpoint/A2DPSink/sbc
Sep 18 06:42:57 9373d69 bluetoothd[1485]: Endpoint registered: sender=:1.134 path=/MediaEndpoint/A2DPSource/sbc
Sep 18 07:23:57 9373d69 bluetoothd[1485]: /org/bluez/hci0/dev_94_8B_C1_11_F0_13/fd69: fd(24) ready
Lost Bluetooth volume control from the phone. In the old version, I was able to control the volume through the phone now I can’t. It’s either 0 or 100.
This shouldn’t be the case. I will ask the maintainer for an update. but in the meantime, you can use the SOUND_VOLUME
variable to control the volume. See balenaHub - IoT embedded device apps, edge computing resources, and developer tools for more details.
I can confirm this issue. But it’s not totally on/off. The full volume is reached at a very low setting on the phone. You can achieve volume adjustment, but it’s all within a short space toward the lowest setting. Using the volume up/down buttons jumps too far to hear it. But if you set the slider with your finger, you can find a volume setting that is quieter without going totally mute.