Bluetooth Auto Connect

Hi!

I’ve installed a balenaSound-Raspberry Pi 4 in my car to stream audio over bluetooth. The raspberry pi’s audio is being passed via the headphone jack and plugged into my car’s AUX input.

Everything is working great; I’m able to connect via bluetooth and stream audio. Unfortunately, each time I start my car, I have to manually connect to the pi’s bluetooth. Is there a way to have my iPhone auto connect to the pi’s bluetooth like it does for all other bluetooth audio devices?

Any help would be greatly appreciated. Thanks!

Hi.

Are you running the latest balenaOS version together with the latest release of balenaSound?

I assume that every time the car is started your RPi gets a fresh boot, and maybe that disrupts the connectivity.
Can you see if the behavior is different when you move in and out of the Bluetooth range with the device consistently powered on?
Additionally, can you test it with another device to see if it makes a difference?

Cheers.

Happy New Years. Thank you for the suggestions. I’m running balenaOS 2.65.0+rev1. Please see the attached screenshot for my current versioning.
Screen Shot 2021-01-01 at 9.33.41 PM

Each time I start the car, the RPi does get a fresh boot. When I move in and out of Bluetooth range, unfortunately I need to go back to my phone’s bluetooth settings and reconnect to the RPi. I tested on another phone (android) and I received the same experience.

I thought perhaps it had something to do with not shutting down the RPi properly so I brought the RPi into my home. I turned the RPi on, went to my iPhone’s bluetooth settings and connected to the RPi. I shutdown the RPi correctly and rebooted. Once the RPi was up and running, my phone did not auto connect to the RPi bluetooth.

It seems the RPi does not remember my phone, thus does not auto connect upon boot. Is there a way to get the RPi to remember my phone as a bluetooth device?

Thanks!

Hello @oivivio ,

Can you make sure you’re running the latest version of balenaSound? It seems there was an issue filed for this a while back but it was fixed in this PR. Also, can you confirm that you still see this issue if you go out of range and then back in range (without turning off/restarting the Rpi)?

Cheers,
Nico.

Hi @ntzovanis, it looks like I’m currently running Version :“2.1”. I tried a search on the forum, “how to update”, but seems quite complex; creating SSH key in Github, etc. Is there a more simple way to upgrade to the latest version of balenaSound on my RPi?

Thanks!

Hello, Did you deploy using the “Deploy with balena” button? If so, you can click the same button again, and when the dashboard loads and modal pops up, you can deploy it to your existing application rather than creating a new one. The new version will then be built and deployed to your device(s).

Hi @srlowe, thank you for the quick reply. I clicked the “deploy with balena” button from the balenaSound Get Started Doc located https://sound.balenalabs.io/docs/getting-started/

When I check the release deployed in my dashboard, it shows “Version 2.1”.

I believe version 3.4.2 is the latest?

Hi,

The 2.1 shown here is the version of the Docker Compose version (2.1 is the highest currently available in balena apps). The latest version of balenaSound is 3.4.5 (available in this GitHub repo and linked from the Deploy with balena button from the main balenaSound website.

John

Sorry, the current stable release is 3.4.2, which should be what you have.

Thank you for confirming my balenaSound version @jtonello. I performed the following tests to see if I could get bluetooth to auto pair with the last recognized device.

Setup

  1. Clicked the “deploy with balena” from the main balenaSound website.
  2. Pushed the release to my app
  3. Created a new device, flashed to an SD card, placed in RPi 4, booted up and allowed downloads and updates to complete
  4. I paired my iPhone to the RPi via bluetooth and began to perform the following tests

Test 1 - Reboot, restart, shutdown and boot up RPi
Outcome - iPhone did not automatically pair with RPi upon boot completion

Test 2 - Go out and in of bluetooth range
Outcome - iPhone did automatically pair with the RPi once back in range

Based upon these results, it seems like the RPi does not remember bluetooth devices once it turns off and on again; thus does not bluetooth auto pair upon boot.

Has anyone else experienced this issue?

Hey @oivivio, we’ve reproduced the issue where bluetooth devices do not reconnect after a power cycle and I’ve opened an issue for tracking:

I suggest subscribing to notifications on that issue so you can see when some progress is made!

Hi @klutchell, thanks for the update! I’ll be sure to monitor this issue. Cheers!