title: Raspberry Pi3, bluealsa - connected but no sound output on bluetooth speaker?
body: <h1>Summary: Everything is connected, and appears to work, but no sound comes out of the speaker - how to diagnose or fix?</h1>
  
  <p>I am trying to play sound from my Raspberry Pi 3 to a bluetooth speaker, but it is not working.</p>
  
  <p>The pi connects to the bluetooth speaker (confirmed by automated audio on the speaker when it connects, "raspberrypi connected", and checking <code>echo "info 04:52:C7:5A:3B:A1" | bluetoothctl</code> on the pi also shows it is connected).</p>
  
  <p>The speaker volume is not muted and other devices can connect to it and play through it. Checking <code>alsamixer</code> verifies that audio is not muted.</p>
  
  <p>But using aplay to play sound through the bluetooth speaker leads only to a deafening silence. Although it looks like it works:</p>
  
  <pre><code>$ aplay -D bluealsa:HCI=hci0,DEV=04:52:C7:5A:3B:A1,PROFILE=a2dp /usr/share/sounds/alsa/Front_Center.wav
  Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
  </code></pre>
  
  <p>I have looked for log files that might have information in them, but haven't found anything.</p>
  
  <h1>bluealsa configuration</h1>
  
  <p>I set this up following the instructions <a href="https://www.sigmdel.ca/michel/ha/rpi/bluetooth_02_en.html" rel="nofollow noreferrer">here</a>. The details of this set up are:</p>
  
  <ul>
  <li>Raspbian Stretch, 2018-10-09 image (bluealsa v5.43 installed out of box)</li>
  <li>bluez v5.49 downloaded, built and installed (no errors)</li>
  <li><code>/etc/dbus-1/system.d/bluetooth.conf</code> edited, following lines added to <code>root</code> element:
  
  <ul>
  <li><code>&lt;allow send_interface="org.bluez.ThermometerWatcher1"/&gt;</code></li>
  <li><code>&lt;allow send_interface="org.bluez.HeartRateWatcher1"/&gt;</code></li>
  <li><code>&lt;allow send_interface="org.bluez.CyclingSpeedWatcher1"/&gt;</code></li>
  </ul></li>
  <li>And following also added to the top level <code>busconfig</code> element:
  
  <ul>
  <li><code>&lt;policy group="bluetooth"&gt;&lt;allow send_destination="org.bluez"/&gt;&lt;/policy&gt;</code></li>
  </ul></li>
  <li>pi user added to bluetooth group</li>
  </ul>
  
  <p>I have tried moving the HCI, device and profile details into .asoundrc and /etc/asound.conf files but these produce the same results (console output suggests successful, but no sound comes from the speaker when I use aplay).</p>
  
  <h1>Other things (probably not relevant but including for completeness)</h1>
  
  <ul>
  <li>pi access is via SSH (it's headless)</li>
  <li>on booting the pi, <code>sudo systemctl status blueto*</code> shows an error message on the bluetooth service: <code>Failed to set privacy: Rejected (0x0b)</code>, apparently a boot-related issue (<a href="https://www.spinics.net/lists/linux-bluetooth/msg68904.html" rel="nofollow noreferrer">link</a>) which is fixed by manually restarting the bluetooth service after boot using systemctl (ugly, but fine as a workaround for now)</li>
  <li>no suspicious looking messages in dmesg, user.log or boot.log</li>
  <li>but the following was in daemon.log, it correlates with an execution of the aplay command above (but I have tried that command several times with the same console output, it generates them sometimes only):</li>
  </ul>
  
  <p>.</p>
  
  <pre><code>Nov 10 21:02:16 rpi_3e5ccf bluealsa[789]: /usr/bin/bluealsa: Unsupported AT message: SET: command:+CLIP, value:1
  Nov 10 21:02:16 rpi_3e5ccf bluealsa[789]: /usr/bin/bluealsa: Unsupported AT message: CMD: command:+CLCC, value:(null)
  Nov 10 21:02:16 rpi_3e5ccf bluealsa[789]: /usr/bin/bluealsa: Unsupported AT message: SET: command:+CSRSF, value:0,0,0,1,0,0,0
  </code></pre>