Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7927329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T19:15:28+00:00 2026-06-03T19:15:28+00:00

i am creating an application which connects 4 devices. one of them acts as

  • 0

i am creating an application which connects 4 devices. one of them acts as a server and the 3 others as client. the server also acts as a client. it is a card game. i have given it 7 UUIDs. when i created the server, 2 of the 3 clients are able to connect but when the 3rd one joins, the app crashes. here is part of the logcat when the 3rd devices try to connect.

        05-12 15:41:55.453: E/ConnectionService(10793): getConnectedSocket : 503c7432-bc23-11de-8a39-0800200c9a66
05-12 15:41:55.463: I/net.clc.bt.ConnectionService(10793): IOException in getConnectedSocket
05-12 15:41:55.463: I/net.clc.bt.ConnectionService(10793): java.io.IOException: Service discovery failed
05-12 15:41:55.463: I/net.clc.bt.ConnectionService(10793):  at android.bluetooth.BluetoothSocket$SdpHelper.doSdp(BluetoothSocket.java:377)
05-12 15:41:55.463: I/net.clc.bt.ConnectionService(10793):  at android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:201)
05-12 15:41:55.463: I/net.clc.bt.ConnectionService(10793):  at net.clc.bt.ConnectionService.getConnectedSocket(ConnectionService.java:191)
05-12 15:41:55.463: I/net.clc.bt.ConnectionService(10793):  at net.clc.bt.ConnectionService.access$5(ConnectionService.java:185)
05-12 15:41:55.463: I/net.clc.bt.ConnectionService(10793):  at net.clc.bt.ConnectionService$1.connect(ConnectionService.java:225)
05-12 15:41:55.463: I/net.clc.bt.ConnectionService(10793):  at net.clc.bt.Connection.connect(Connection.java:191)
05-12 15:41:55.463: I/net.clc.bt.ConnectionService(10793):  at net.dillen.satat.Satat.onActivityResult(Satat.java:308)
05-12 15:41:55.463: I/net.clc.bt.ConnectionService(10793):  at android.app.Activity.dispatchActivityResult(Activity.java:3835)
05-12 15:41:55.463: I/net.clc.bt.ConnectionService(10793):  at android.app.ActivityThread.deliverResults(ActivityThread.java:3332)
05-12 15:41:55.463: I/net.clc.bt.ConnectionService(10793):  at android.app.ActivityThread.handleSendResult(ActivityThread.java:3378)
05-12 15:41:55.463: I/net.clc.bt.ConnectionService(10793):  at android.app.ActivityThread.access$2700(ActivityThread.java:123)
05-12 15:41:55.463: I/net.clc.bt.ConnectionService(10793):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1900)
05-12 15:41:55.463: I/net.clc.bt.ConnectionService(10793):  at android.os.Handler.dispatchMessage(Handler.java:99)
05-12 15:41:55.463: I/net.clc.bt.ConnectionService(10793):  at android.os.Looper.loop(Looper.java:123)
05-12 15:41:55.463: I/net.clc.bt.ConnectionService(10793):  at android.app.ActivityThread.main(ActivityThread.java:4370)
05-12 15:41:55.463: I/net.clc.bt.ConnectionService(10793):  at java.lang.reflect.Method.invokeNative(Native Method)
05-12 15:41:55.463: I/net.clc.bt.ConnectionService(10793):  at java.lang.reflect.Method.invoke(Method.java:521)
05-12 15:41:55.463: I/net.clc.bt.ConnectionService(10793):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
05-12 15:41:55.463: I/net.clc.bt.ConnectionService(10793):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
05-12 15:41:55.463: I/net.clc.bt.ConnectionService(10793):  at dalvik.system.NativeStart.main(Native Method)

minSdkVersion="7" 
device OS = 2.3.3 , 2.3.3, 2.1.1, 2.1.1

the problem does not seem to arise with the OS version.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T19:15:30+00:00Added an answer on June 3, 2026 at 7:15 pm

    I have no comment on the stack trace that you’ve provided, but the fact that the problem occurs when you try to add your third peer makes me suspicious that you are bumping into a core Bluetooth limitation. Let me explain.

    Bluetooth comm takes place in piconets with 1 master (who sets the timing) and up to 7 slaves. For one device to participate in multiple piconets is tricky and inefficient because it has to jump back and forth between the clock cycles of the different piconets. In my experience, a device can only be a slave in 2 piconets, so it would fail when you try to enter a 3rd piconet (though it should fail more gracefully and informatively then this, of course).

    The general solution is to designate one device as the piconet master and all the other devices should only connect to this one device. In practise, I’ve only tried this on systems that allow much more control then Android (where I can, for example, explicitly control master vs. slave) so I can’t say how this will work on Android, but you should start with the rule of the thumb that the device that initiates the connection will be the master.

    Or I could be over thinking the whole thing. I’m finding the Bluetooth stacks on Android to be very buggy so you might just have encountered a bug. BTW, I’m assuming that the four phones you tested it on are from more then one manufacturer?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application running in IIS which connects to a SQL Server 2008
I am creating C# winforms application, which connects to the Database. Because I have
I am creating an application which connects to the server using username/password and I
I'm creating an ASP.NET application which uses Facebook Connect and fbml tags. It also
I'm creating an application which works on Froyo until Jelly Beans. I have two
I'm creating .NET application which connects to WindowsCE device using Active Sync. I'm using
I have an Android Bluetooth application which manages a couple of remote devices( Capsules
I have a perl web application ( CGI::Application with ModPerl::Registry ) which connects to
I am creating a chat application that will also have the ability for file
I am creating an Android application which connects my device to an embedded chip

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.