Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 8 of 8
  1. #1
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Posts
    1,347

    Raspberry Pi as Bluetooth-to-USB converter?

    I'm currently building an integrated amplifier based on a Hypex DLCP system and 6 channels of Hypex UcD amplification. As a long-time Squeezebox fan I'm also building in a Raspberry Pi 3B+ running pCP into the enclosure. This will be connected permanently to the single USB input on the DLCP.

    I thought it could be fun to add some kind of Bluetooth receiver to the amplifier. I know I could get a simple Bluetooth-to-3.5mm jack adapter (I have a couple already) and use one of the DLCP analogue inputs. But it occurred to me that the RPi already has all the necessary hardware to do this, so maybe there's a software solution out there to allow the RPi to receive audio on its built-in Bluetooth and redirect the stream to the USB. Is anyone aware of something like this?

    One major constraint is that the USB output will normally be assigned to the pCP Squeezelite, so to get this Bluetooth approach to work I think I'd have to temporarily stop Squeezelite and start the Bluetooth 'transceiver', so probably not a 'smooth' option. Is it possible that Squeezelite and this notional Bluetooth transceiver software could both output to the USB device at the same time, or would one make it unavailable to the other? If both could be connected simultaneously, all I'd have to watch for would be to make sure that only one source was actually playing at any one time.

  2. #2
    Senior Member
    Join Date
    Jan 2011
    Location
    Staffordshire. UK
    Posts
    2,894
    There is a command line option for squeezelite which allows it to drop the connection if not used (this may not be a technically correct way of expressing what occurs )


    Code:
    -C 5
    for example

    I have used this when running both squeezelite and shairport-sync on the same 'pi.

    I don't know about BlueTooth and squeezelite , but you can try it out if you want
    Last edited by Man in a van; 2019-01-10 at 06:40. Reason: wrong program name

  3. #3
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Posts
    1,347
    Quote Originally Posted by Man in a van View Post
    There is a command line option for squeezelite which allows it to drop the connection if not used
    Thank you, that could be useful - I'll investigate. I wonder if it picks the connection up again when Squeezelite tries to play music again.

    A similar option would be needed in the Bluetooth transceiver tool I guess.

  4. #4
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    1,878
    This might have some useful bits and pieces for you
    https://github.com/BaReinhard/Super-...ceiver-Install
    Paul Webster
    http://dabdig.blogspot.com
    Author Radio France (FIP etc) plugin

  5. #5
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Posts
    1,347
    Quote Originally Posted by chill View Post
    I wonder if it picks the connection up again when Squeezelite tries to play music again.
    Of course it does! This is the 'Close output setting' option in 'Change Squeezelite settings'. I tried a value of 5 seconds and it seems to make absolutely no difference to the apparent performance of Squeezelite - it plays again instantly after being powered off for longer than the 5 second delay. That's a good start. But I currently have no other options to play music on my pCP RPi, so I couldn't test toggling between them. I've never used Airport-sync - does it have the same option?

    Quote Originally Posted by Paul Webster View Post
    This might have some useful bits and pieces for you
    https://github.com/BaReinhard/Super-...ceiver-Install
    Thank you, that looks very useful. I have no idea whether I'd be up to the task of getting it working alongside pCP, but it's a good place to start.

  6. #6
    Senior Member
    Join Date
    Jan 2011
    Location
    Staffordshire. UK
    Posts
    2,894
    Quote Originally Posted by chill View Post
    Of course it does! This is the 'Close output setting' option in 'Change Squeezelite settings'. I tried a value of 5 seconds and it seems to make absolutely no difference to the apparent performance of Squeezelite - it plays again instantly after being powered off for longer than the 5 second delay. That's a good start. But I currently have no other options to play music on my pCP RPi, so I couldn't test toggling between them. I've never used Airport-sync - does it have the same option?



    Thank you, that looks very useful. I have no idea whether I'd be up to the task of getting it working alongside pCP, but it's a good place to start.
    I think that using pCp means that one can only use pCp.

    When I have used the '-C' command it has been on Raspbian. It is only need on Squeezelite I think, as the program "hogs" the output.

    At one time I had Squeezelite, ShairPort-Sync and a Spotify-Connect all on the one output (just playin and learnin)

    ronnie

  7. #7
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Posts
    1,347
    You know what? This is an Apple household, so I think Shairport-sync might be all I need. I hadn't paid much attention to it previously, but now that I see it is an option in pCP I'll have a play. It would be nice to have my amplifier as an Airport device.

  8. #8
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Posts
    1,347
    That was easy, and the result is perfect! My amp now shows up as an Airplay device, and I can play from my iPhone or my Macbook, or I can use Squeezelite - if one is already playing I just have to pause the output to let the other take over the DAC. Very smooth.

Posting Permissions

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