I want to connect 3 devices via bluetooth (My Droid must connect to 2 bluetooth devices). I \'ve connected my Droid to 1 device using Bluetooth chat How should I modify it f
You can take a look here ( this is not a solution but the idea is here)
sample multi client with the google chat example
what you have to change/do :
separate server and client logique in different classes
for the client you need an object to manage one connect thread and on connected thread
for the server you need an object to manage one listening thread per client, and one connected thread per client
the server open a listening thread on each UUID (one per client)
each client try to connect to each uuid (the uuid already taken will fail the connection => first come first served)
Any question ?
Two UE Boom Bluetooth speakers can form a stereo, which means the phone can stream simultaneously to two Bluetooth devices. The reason is Bluetooth 4.0 can support up to two synchronous connection oriented (SCO) links on the same piconet, and A2DP is based on SCO link.
Your demand "bluetooth chat" is based on SPP profile, and SPP is based on RFCOMM protocol. Luckily even Bluetooth 2.1 can support multiple RFCOMM channels, so yes, you can have multiple bluetooth connection to chat with each other.
Yes, your device can simultaneously connect to 7 other Bluetooth devices at the same time, in theory. Such a connection is called a piconet. A more complex connection pattern is the scatternet.
The reason it is limited to 7 other devices is because the assigned bit field for LT_ADDR in L2CAP protocol is only 3.
You can try my lib for multiple bluetooth connection :
http://arissa34.github.io/Android-Multi-Bluetooth-Library/
Have you looked into the BluetoothAdapter
Android class? You set up one device as a server and the other as a client. It may be possible (although I haven't looked into it myself) to connect multiple clients to the server.
I have had success connecting a BlueTooth audio device to a phone while it also had this BluetoothAdapter
connection to another phone, but I haven't tried with three phones. At least this tells me that the Bluetooth radio can tolerate multiple simultaneous connections :)
Please take a look at the Android documentation.
Using the Bluetooth APIs, an Android application can perform the following: