0

Is it possible to connect 4 speakers together and these 4 speakers need to connect to a phone to play music ? I don't need the 4 speakers to play music at the same time.

I just want 1 of the 4 speakers to play music, but I need to control which one should play the music (The closest speaker to the phone should play only).

I want 4 speakers to be able to communicate with each other to vote for 1 speaker to play the music, that's why I need to connect those speakers together. There is no application required for the phone to choose the right speaker, the speakers have to choose for themselves.

UPDATE 1:

  1. To communicate between speakers I will create a piconet between them. The speakers then update their distance to the phone to each other. The closet speaker will play music.

  2. To calculate the distance, I wonder if I could use the Proximity Profile. Is it possile to use Proximity Profile to calculate distance in which the Phone is reporter and speakers are monitors?

Assume the 2 points are possible. Can I just disconnect a playing speaker and connect another speaker to the phone to switch playing music role?

Steps are as bellow:
Speaker 1 is playing music -----> phone is moving toward speaker 2.
Speaker 1 disconnects to the phone, speaker 2 connects to the phone.
Speaker 2 is playing music, speaker 1 stops.

UPDATE 2:
I gave up the idea of making the speaker so intelligent. Instead, I will have an application running on the smart phone to take care of distance monitoring and switching to nearest speaker.

I will accept the answer from @Floris to close this question. Thanks

trandatnh
  • 351
  • 8
  • 26

4 Answers4

1

Yes, basically, it is possible. But then, if what you want is that ONLY the speakers should decide which one plays the music, you will need to program them. So you will need a chip in each speaker, or a controller that controls all four speaker, but anyways, you will need some hardware to program. In my opinion, the best way to do this, is to do this in an app, even if that's not what you want.

DevBob
  • 835
  • 2
  • 9
  • 29
  • Thanks @Florian.C. Yes, I exactly want to program the speakers. Could you give a specific way of doing so. Having an application must be easier but I choose not to have an application. I want the speaker to work with any device regardless its OS. – trandatnh Jun 16 '14 at 16:21
1

This is a big project... Why?

1.) Assuming that Proximity Profile is really working... You need to know which speaker that your phone is currently connected while checking the distance of 4 speakers.

2.) I disagree for what you said about the speaker will decide on which the right speaker it will connect. Because you need to make a program in your phone that will decide for that.. If that really the case, well just like the above post you need to have wide understanding about hardware and chips. Well, I prefer make the phone decides.

3.) You need a program to check the distance of your phone to other 4 speakers every second.. and then you're gonna configure it to connect automatically (in case password is required or any other security issue) once it discovers that there's a nearer speaker.

This idea is possible... and great...

Lance
  • 11
  • 1
  • I agree with the your 2nd point. I need an application running on the smartphone to control this. – trandatnh Jun 25 '14 at 10:56
  • Actually once you know how to make an app on smartphones and use the "Proximity Profile" you are saying... well, everything is good... – Lance Jun 26 '14 at 03:44
  • I am thinking how to make an app to use `Proximity Profile` on multiple speakers. Anyway, this approach is more feasible than the original one. – trandatnh Jun 26 '14 at 04:28
  • You must read this: http://stackoverflow.com/questions/19639891/detect-proximity-using-bluetooth-le-proximity-profile-android This post have a problem with android support.. so better to read the Proximity Profile before using but base on this link: https://developer.bluetooth.org/DevelopmentResources/DevelopmentPlatforms/Pages/Development-Platforms.aspx well I think it supports on some devices. – Lance Jun 26 '14 at 08:18
1

For this to work, your speakers need to be pretty intelligent - in essence each would be a little Android device. Assuming you want to give them that much smarts, then the steps would be:

  • each speaker is "paired" with the phone (assuming that they are connected with Bluetooth)
  • each speaker is "paired" with all the other speakers (so they know the others exist)
  • each of these pairings has its own set of communications protocols:
    1) for phone-to-speaker, the closest speaker should communicate its availability to play music
    2) phone-to-phone, they must compare distances. Each phone communicates its distance to the others. If in a given time period it does not seem to be the closest, it communicates "I am not playing music" to the other three. If it had been playing music until the last update, it communicates to the phone "I am out of reach" and disconnects.
    3) On the other hand, if a speaker becomes "king of the hill" it should communicate this to the phone, so the phone will start sending information to it.

This leaves the problem "which is the closest" - in other words, how well does a speaker know its distance to the phone. The detailed specification explains how to get the path loss and in particular the transmit power level which is not the same thing as the distance, but a reasonable proxy (the further away you are the greater the path loss) - and in general you care more about signal strength than distance.

Finally, you need to build in a mechanism for preventing that two speakers that are "almost the same distance" start fighting each other over the channel - usually you do this by creating hysteresis (the current speaker gets a '5 point advantage' over any others, and so it will appear to be the closest unless it really isn't - at that point a new speaker becomes the master, it gets the advantage, and it will remain so until it is really no longer closest).

For "5 point advantage" you can read anything - perhaps the link loss is expressed in dB, and you report the loss as smaller than it is (e.g. if the loss is -43 dB, you might report -40 dB)

This is a big project - I have a hard time thinking of a use case (perhaps a person walking through a museum, getting the narration over nearby speakers). Good luck.

Floris
  • 45,857
  • 6
  • 70
  • 122
  • Your 2nd point about "phone-to-phone" communication is invalid IMHO, since the implementation has `one smart phone` and `four speakers`. Please correct me if I am wrong. – trandatnh Jun 25 '14 at 11:07
  • @trandatnh - no, the application requires "smart speakers" since it is intended to work with a "dumb phone" (i.e. a phone without a specific application). This requires the speakers to communicate among themselves - which makes this a very complicated (but quite interesting) problem. – Floris Jun 25 '14 at 12:06
-1

No not possible. You can not connect speakers to a phone. Not even one. Only a headphone.

greenapps
  • 11,154
  • 2
  • 16
  • 19
  • Why not speakers? There are many [bluetooth speaker](https://www.google.com.sg/search?q=bluetooth+speakers&rlz=1C1CHFX_en-gbMY593SG593&espv=2&source=lnms&tbm=isch&sa=X&ei=WRifU_KIDcSPuAT-s4KoDA&ved=0CAYQ_AUoAQ&biw=1280&bih=699) in the market. – trandatnh Jun 16 '14 at 16:17
  • Do you call that speakers? – greenapps Jun 24 '14 at 19:58