cuijinquan / backport-android-bluetooth

Automatically exported from code.google.com/p/backport-android-bluetooth
0 stars 0 forks source link

Exception "Transport endpoint is not connected" when sending chat from Android #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Download and build backport-android-bluetooth201
2. Install on 1.6 device (HTC mytouch)
3. "Connect a device", then send a chat string
4. Android device throws an exception (full exception log is attached)

02-03 19:04:56.725: ERROR/BluetoothChatService(1088): Exception during write

02-03 19:04:56.725: ERROR/BluetoothChatService(1088): java.io.IOException:
Transport endpoint is not connected

What is the expected output? What do you see instead?
No exceptions, and some data over the bluetooth path.

What version of the product are you using? On what operating system?
Android FW 1.6, backport-android-bluetooth201

Please provide any additional information below.

Discovery and pairing works fine.  It just that I can't send a chat over
bluetooth.  I should also mention that I am connecting my android device to
a notebook.  Is that possible the problem?  Have you seen this code to work
with Android <-> notebook?

Original issue reported on code.google.com by RobCho...@gmail.com on 4 Feb 2010 at 3:53

Attachments:

GoogleCodeExporter commented 8 years ago
Does the notebook program to accept SPP request made?

Original comment by esma...@gmail.com on 5 Feb 2010 at 3:28

GoogleCodeExporter commented 8 years ago
The notebook is a Macbook with OSX 10.6, and I don't think it had an 
application that
accepted SPP.  But I tried it on another device that has RFCOMM for data 
transfer.  

Is the exception related to not having a proper SPP program on the notebook?  
How
about the RFCOMM, does the Chat work over that?

Original comment by RobCho...@gmail.com on 8 Feb 2010 at 5:14

GoogleCodeExporter commented 8 years ago
setting up virtual COM port on your MAC.

http://www.acroname.com/garcia/tutorials/bluetooth/connection/connection.html

Original comment by esma...@gmail.com on 11 Feb 2010 at 11:12

GoogleCodeExporter commented 8 years ago
Hello -- I found the source of the problem.  It was the listener channel on my 
remote
bluetooth device.   Your code worked fine out of the box.  You can close this 
issue.

Original comment by RobCho...@gmail.com on 25 Feb 2010 at 4:08

GoogleCodeExporter commented 8 years ago

Original comment by esma...@gmail.com on 3 Mar 2010 at 8:19

GoogleCodeExporter commented 8 years ago
Hi Robchohan,

How did you fix your problem finally?

I have totally the same issue on my environment, with WinXP notebook.

With your relevant experience, I might be able to solve the issue and would be 
very 
appreciative of your kindness.

Original comment by K...@cis.nctu.edu.tw on 15 Mar 2010 at 7:13

GoogleCodeExporter commented 8 years ago
The problem does not have to do with the Backport software, that works as 
expected. 
The problem lies in the remote or non-Android device.  In my case I had to make 
sure
my device made an L2CAP connection, then an RFCOMM connection.  I don't know 
how to
do that in windows, but in our device's firmware, we had to ensure we made
connections in that order.

I should mention that when I solved my problem, that I was able to document my
findings here:

http://bluetooth.roblabs.com/home/bluecove

My architecture is an Android 1.6 device + a BT sensor device.  

Original comment by RobCho...@gmail.com on 19 Mar 2010 at 4:27