After updating balena OS, bluetoothctl can not be used

When updating to Balena OS v2.38.0 of raspberry pi3, Bluetooth dongle can not be used as a controller with bluetoothctl at service of multicontainer application.
Originally, v2.32.0 was able to use with bluetoothctl.
I believe the following changes in BalenaOS are affecting, but I’m not sure.

docker-compose.yml

version: '2'
volumes:
  resin-data:
services:
  service1:
    build: ./service1
    labels:
      io.balena.features.kernel-modules: '1'
      io.balena.features.firmware: '1'
      io.balena.features.dbus: '1'
    privileged: true
    network_mode: host
  service2:
    build: ./service2
    depends_on:
      - service1
    labels:
      io.balena.features.balena-socket: '1'
      io.balena.features.kernel-modules: '1'
      io.balena.features.firmware: '1'
      io.balena.features.dbus: '1'
      io.balena.features.supervisor-api: '1'
    privileged: true
    network_mode: host
    volumes: 
      - 'resin-data:/var/lib/bluetooth'

How can I use bluetoothctl?

1 Like

Hi there,

Thanks for getting in touch. We’d like to try and determine exactly what may be causing this, and have determined there was a Bluetooth change post v2.36.0. Could you please try version v2.36.0+rev2 on your device and see if this works or not. This will help us narrow down what may be happening.

Best regards, Heds

2 Likes

Thank you for your reply. I tried it with Balena OS v2.36.0, but I could not use bluetoothctl.

I think that the cause is that the host OS’s systemd bluetooth service grabs the Bluetooth dongle attached to the device.

I want to know how to get the container’s bluetooth service, not the Host OS.

Thanks for the extra details. We have passed this internally and will get back to you soon.

2 Likes