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

  • Home
  • SEARCH
  • 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 882141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T12:22:51+00:00 2026-05-15T12:22:51+00:00

I am developing an application which uses Bluetooth to connect to a device and

  • 0

I am developing an application which uses Bluetooth to connect to a device and send/receive data. I am doing all of my testing with a Nexus One phone.

I have never been able to establish a SPP (serial port) connection from my phone to any device. However, I have been able to connect from a device (my laptop) to my phone using a Mac equivalent of PuTTY (The only exception to this is the “Bluetooth File Transfer” app from the Marketplace seems to work, but I don’t think that uses RFCOM/SPP…).

I keep seeing this message in my LogCat logs:

ERROR/BluetoothService.cpp(78): stopDiscoveryNative: D-Bus error in StopDiscovery: org.bluez.Error.Failed (Invalid discovery session)

as well as these:

java.io.IOException: Operation Canceled
java.io.IOException: Software caused connection abort

I have tried using the UUID of “00001101-0000-1000-8000-00805F9B34FB” and I have also tried using the:

Method m = device.getClass().getMethod("createRfcommSocket", new Class[] { int.class });
sock = (BluetoothSocket) m.invoke(device, Integer.valueOf(1));

method instead of device.createRfcommSocketToServiceRecord(UUID); as well–with no luck.

I am using the BluetoothChat example and variations of that code to do all of my testing…

Solutions or suggestions would be great…or even a better/less complex example of some testing code I can run on the phone, or a python script or something I can run on my computer to help debug?

Thanks! I hope this isn’t a bug with the Android OS, but if it is I hope to find a workaround.


EDIT: I should also note that most devices show up as “paired, but not connected” in the Bluetooth settings.


EDIT 2: The solution seems to be simply disabling any Bluetooth listening. See my answer post for more information.

  • 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-05-15T12:22:52+00:00Added an answer on May 15, 2026 at 12:22 pm

    The solution, as it turns out, was to disable the server functionality of the Bluetooth service. By only using createRfcommSocketToServiceRecord and never calling listenUsingRfcommWithServiceRecord (in the BluetoothChat example this means never starting the “AcceptThread”) the problem was fixed.

    Even though these two calls are supposed to be totally separated and have no affect on each other (according to the Android docs), simply commenting out listenUsingRfcommWithServiceRecord fixed my supposedly unrelated issue.

    I can take the Bluetooth Chat program unedited and it will not be able to establish an outgoing connection to ANY bluetooth device I have tested (laptops, desktops, headsets, etc.), but if I remove that one thing it works flawlessly as a client.

    Anyway, I hope this will help someone else if they come across the same issue. This must be a bug with the Android OS, or possibly the firmware on the Nexus One.

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

Sidebar

Ask A Question

Stats

  • Questions 542k
  • Answers 542k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer TZOFFSETFROM is the local time offset from GMT when daylight… May 17, 2026 at 3:12 am
  • Editorial Team
    Editorial Team added an answer See the relevel() function. Here is an example: set.seed(123) x… May 17, 2026 at 3:12 am
  • Editorial Team
    Editorial Team added an answer ElementAt is useful if you need to provide indexing semantics… May 17, 2026 at 3:12 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I'm developing an iPhone application which uses a TableView to display XML data. The
I am developing grails application which uses file searching.For that I wrote the following
I am developing an application which uses .js files stored in the Resources/javascript folder
I'm currently developing an application which uses the iTunes COM (Win32) to hook into
I am developing an application which uses both video recording and photo shoting.So i
I'm developing an application which uses different components to create an XHTML document, I
I am very very new to xml. I am developing an application which uses
I am developing a grails application which uses lot of ajax.If the request is
I have heard that when developing application which uses a database you should do
I am in the process of developing an application which uses a legacy USB

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.