Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 6 of 6
  1. #1
    Senior Member Max2Play's Avatar
    Join Date
    Oct 2016
    Posts
    155

    Bluetooth Streaming to Squeezebox Server with Smartphone/Tablet

    Hi guys,
    I wanted to start a new thread for the huge update we did for our Bluetooth plugin.

    - Stream directly to Squeezebox Server from your Smartphone/Tablet via Bluetooth
    - Creates a favorite channel named by your device in the Squeezebox Server Interface to select for Bluetooth playback
    - Option to automatically stop normal playback for Bluetooth and resume the previous playlist afterwards
    - Automatic Repairing with Bluetooth device

    Previously, the Bluetooth plugin was only able to pair Bluetooth speakers with the Raspberry Pi to use them as an additional audio output for an instance of Squeezelite, Shairport or MPD. The automatic repairing and simple interface allowed for just one easy configuration with a one-click search of the BT devices, a click on "Reconnect" and the speaker could be used time and again afterwards without any effort.

    Now, the Bluetooth pairing is also possible with smartphones and tablets. In the same vein as the connection with a BT speaker would occur, you can now pair and automatically repair your Raspberry Pi 3 with a Bluetooth-enabled device for input. In order to make this possibility worthwhile, especially for users of the Squeezebox Server, we added two distinct options to channel that Bluetooth input through your RPi3.
    One is the simple, direct connection with Squeezelite or Shairport; by selecting the "Pulse" feature in both players. This way, the active player automatically selects your primary sound output device (e.g. dedicated I2S sound card) and feeds it with the playback coming from your smartphone or tablet. This allows you to use apps and sound files you might not have been able to put out through your Raspberry Pi before like the Audible App for Android which does not allow DLnA output or a direct output of your voice to use as a PA.
    And therein lies the other, even better option to connect your Bluetooth stream to your RPi3. We made a one-click solution that automatically adds a favorite channel to your Squeezebox Server (installed on your RPi3) which will put out the stream from your Bluetooth device to all selected Squeeze players. This enhances the possibilities of a PA solution with your Squeezebox Server even further. You could now easily make an announcement to all your players in the house with your phone. The great thing about this feature is that we added the possibility for the Bluetooth stream to interject itself into the Squeezebox Server once started to automatically play the output of Bluetooth once active (beta update required).

    I urge you to check it out, flysurfer has been putting a lot of work into it and is working on enhancing the experience as I write this. Just to prevent the inevitable criticism, we are aware of the limitations of Pulse Audio output. This solution is not intended to replace HiFi sound systems, or AirPlay, or anything for that matter. It is just a great new feature we thought up that has not been done yet in this capacity and was requested by a lot of our users.

    You can find the link for the plugin here. For the beta version of the plugin (which we recommend for full use of the new features), either change the "currentversion" to "beta" or add the plugin normally and make a beta update afterwards.

    Here are a few pictures to show you what the new plugin looks like in action:
    Name:  sbsinterfacebt.png
Views: 1191
Size:  39.3 KBName:  streamtosbs.png
Views: 1184
Size:  36.5 KB
    Last edited by Max2Play; 2016-11-18 at 05:49.

  2. #2
    Senior Member Max2Play's Avatar
    Join Date
    Oct 2016
    Posts
    155
    Hi guys,
    I have now made a video on how to set up Bluetooth playback with the new plugin:

  3. #3

    Issue report: Bluetooth pairing with Smartphone for Max2Play

    Hi Team! Happy Holidays!

    I have been really enjoying my Max2Play+Logitec Media Server image running on my Raspberry Pi 3. Recently I've been trying to get stability when using the new Bluetooth app released just this month. I see the following issues:

    - While the Bluetooth link between my iphone 6S and the RP3 appears stable, either Max2Play or LMS is intermittent. The playback randomly stops and eventually restarts. I see a long trail of "Dave's Iphone" shown in the playlist, and at each intermittent stop and restart, a new listing will appear in the playlist.

    - This behavior is independent of whether I'm controlling LMS via my windows 10 chrome browser or my iPeng app running on my iphone.

    - Also noted - after attempting to run the bluetooth plugin, having it fail, and then going back to listen to either another plugin (i.e., pandora, etc.), or just listening to a networked audio file, the bluetooth app "reasserts" itself... the selected audio file will start playing, stop, and the bluetooth plugin will reappear (and still not work).

    While I'm really rocking on the abilities afforded by Max2Play + LMS, I really want the ability to drive the input from my smartphone via bluetooth (in order to play Sirius XM from the iPhone app, stream podcasts, etc.).

    Is this a user error, or a real issue?

    In any case - Thanks! And any/all help would be gratefully appreciated.
    Last edited by mnvelocitypilot; 2016-12-26 at 12:20.

  4. #4
    Junior Member
    Join Date
    Jul 2017
    Posts
    4
    Hi. Im using Squeezelite (along with LMS) under Max2play on my Pi3 to play on a (paired & trusted) bluetooth speaker. At present i have to click Connect on BT tab of M2P web ui (or ma ually run a simple 'connect' script every time to 'wake up' my speaker (after going into standby mode for example).
    Id like to run the connect script when my squeezelite instance is switched on through ipeng or orange squeeze (and poss disconnect on switch off). Anyone done that? I've noticed a -S squeezelite command switch that looks promising but havent been able to find any more info / example usage.
    It would be good to solve this because when connected, output on my Samsung R1 is reliable & top notch (for the size of the room). Ta.

    Sent from my SM-G935F using Tapatalk

  5. #5
    Senior Member Max2Play's Avatar
    Join Date
    Oct 2016
    Posts
    155
    Hi guys,

    Sorry about the late response. I was off work a little while, but back now

    @mnvelocitypilot:
    Thanks for the detailed feedback. Bluetooth is a fickle thing, we have also had some issues in the past that vary widely depending on the device. If possible, you could try using DLNA (LMS plugin or gmedia render Audio Player) instead. However, will look into the BT issue and see whether its a chronic problem and we can recreate it here.

    @bfddld:
    The Squeezelite start options and their uses can be found here, in detail: http://manpages.ubuntu.com/manpages/...ezelite.1.html
    Also, we have a very active discussion on our BT plugin in our forums, where you might be able to find some pointers: http://www.max2play.com/forums/topic...th-addon-beta/

  6. #6
    Junior Member
    Join Date
    Jul 2017
    Posts
    4
    Quote Originally Posted by bfddld View Post
    Hi. Im using Squeezelite (along with LMS) under Max2play on my Pi3 to play on a (paired & trusted) bluetooth speaker. At present i have to click Connect on BT tab of M2P web ui (or ma ually run a simple 'connect' script every time to 'wake up' my speaker (after going into standby mode for example).
    Id like to run the connect script when my squeezelite instance is switched on through ipeng or orange squeeze (and poss disconnect on switch off). Anyone done that? I've noticed a -S squeezelite command switch that looks promising but havent been able to find any more info / example usage.
    It would be good to solve this because when connected, output on my Samsung R1 is reliable & top notch (for the size of the room). Ta.

    Sent from my SM-G935F using Tapatalk
    Hi.
    In case anyone is interested, I managed to solve this myself.
    I had to:
    1) Via Max2Play web UI, Update to Beta, then Update Squeezelite
    - this was necessary to get the GPIO squeezelite build option that -S command line option depends on.
    2) In Squeezelite advanced options, set Command Line Options to -B -S /opt/squeezelite/btrecon.sh
    - this tells squeezelite to run my btrecon.sh script passing a 1 or 0 command line arg when play is switched on or off via iPeng / OrangeSqueeze.
    3) Create the script below (and make executable) at /opt/squeezelite/btrecon.sh
    - the script just runs bluetoothctl and either issues a connect or disconnect command to my BT speaker.

    #!/bin/bash
    power_state=$1
    if [ "$power_state" = "1" ]
    then
    # echo $(date) " $power_state Power switch on " >> /opt/squeezelite/log/btrecon.log
    bluetoothctl <<EOF
    connect CC:B1:1A:8C:45:E6
    EOF

    else
    # echo $(date) " $power_state Power switch off " >> /opt/squeezelite/log/btrecon.log
    bluetoothctl <<EOF
    disconnect CC:B1:1A:8C:45:E6
    EOF
    fi

    Works a treat!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •