2

I want to make a device that will take a Bluetooth stream and play it on speakers via the USB port for speakers that do not have Bluetooth.

I think it may be possible by taking the stream and using an Arduino to convert the stream to a virtual file so that the speaker will see the USB as a mass storage and play the file.

I am not sure that is just an idea, any thoughts or solutions?

2
  • What kind of speakers do you have that can play a file on a USB mass storage device? I think you are barking up the wrong tree and need to examine your terminology and what can actually be done a little better.
    – Majenko
    Sep 12 '15 at 17:29
  • What's an Arduino raspberry pi? I didn't know Arduino had bought out Eban and co...
    – Majenko
    Sep 14 '15 at 19:26
1

If your target is a USB audio device - like a USB headset or USB speakers (NOT an MP3 player with USB interface) then you could connect it to something which can act as a USB host with USB audio device drivers. That means not an Arduino, but something much more powerful like a Raspberry Pi or BeagleBone Black for instance.

If your target is basically an MP3 player that allows you to connect a USB stick with songs on it then you're completely out of luck. There's this small thing called time that gets in your way. You can't stream data to something that expects the data to already be there. You can't seek in a file that doesn't exist until the moment you try to read from it. Also you have to act as if you were a USB memory stick, and that's not easy, and certainly not something an Arduino can do. Even things like the Pi would have a lot of difficulty in managing that since they are hosts, not devices, as far as USB is concerned.

The key word here is stream. Your target as to be able to receive a stream of data rather than request blocks of data from a file. USB audio devices can do that, but USB audio hosts cannot.

3
  • Thank You majenko, one more question. So when you stream via bluetooth to any bluetooth speaker, how is the music able to play live? as in how does the speaker read the stream and play it live? And above you mentioned that if the target is a usb audio device. if it is a usb audio device, how would that be able to take a live stream via the rasberry pi and play it. Isn't that the same idea as if it was an mp3 player that plays music off an usb? I appreciate your help, I am just trying to figure this out.
    – Solankill
    Sep 14 '15 at 21:14
  • The concept is completely different. An MP3 is like a CD. A stream is like the radio. A bluetooth or USB audio device is sent a digital representation of the sound at that instant in time. An MP3 player reads blocks of compressed audio data, decompresses them, and generates the digital audio representation.
    – Majenko
    Sep 14 '15 at 21:15
  • Ok that make a lot of sense. Thank You so much.
    – Solankill
    Sep 14 '15 at 21:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.