Giter Club home page Giter Club logo

backport-android-bluetooth's People

Contributors

esmasui avatar

Stargazers

 avatar

Watchers

 avatar

backport-android-bluetooth's Issues

IllegalArgumentException during getBondedDevices

What steps will reproduce the problem?
1. The phone is paired to, but not connected to, my laptop and a serial 
bluetooth dongle
2. Bluetooth is ON
3. I call Set<BluetoothDevice> pairedDevices = 
mBluetoothAdapter.getBondedDevices(); in my application


What is the expected output? What do you see instead?

I expected it to find two devices. Appearently one of them (the laptop) makes 
it crash with an IllegalArgumentException in BluetoothDevice.<init>

LogCat:
06-22 13:27:23.162: ERROR/AndroidRuntime(13303): Uncaught handler: thread main 
exiting due to uncaught exception
06-22 13:27:23.242: ERROR/AndroidRuntime(13303): java.lang.RuntimeException: 
Unable to start activity 
ComponentInfo{dk.jacobservatoriet.telescope/dk.jacobservatoriet.telescope.Telesc
opeActivity}: java.lang.IllegalArgumentException: 
00:30:91:40:08:9A,Jacob-PC,1179908 is not a valid Bluetooth address
06-22 13:27:23.242: ERROR/AndroidRuntime(13303):     at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2268)
06-22 13:27:23.242: ERROR/AndroidRuntime(13303):     at 
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2284)
06-22 13:27:23.242: ERROR/AndroidRuntime(13303):     at 
android.app.ActivityThread.access$1800(ActivityThread.java:112)
06-22 13:27:23.242: ERROR/AndroidRuntime(13303):     at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
06-22 13:27:23.242: ERROR/AndroidRuntime(13303):     at 
android.os.Handler.dispatchMessage(Handler.java:99)
06-22 13:27:23.242: ERROR/AndroidRuntime(13303):     at 
android.os.Looper.loop(Looper.java:123)
06-22 13:27:23.242: ERROR/AndroidRuntime(13303):     at 
android.app.ActivityThread.main(ActivityThread.java:3948)
06-22 13:27:23.242: ERROR/AndroidRuntime(13303):     at 
java.lang.reflect.Method.invokeNative(Native Method)
06-22 13:27:23.242: ERROR/AndroidRuntime(13303):     at 
java.lang.reflect.Method.invoke(Method.java:521)
06-22 13:27:23.242: ERROR/AndroidRuntime(13303):     at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
06-22 13:27:23.242: ERROR/AndroidRuntime(13303):     at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
06-22 13:27:23.242: ERROR/AndroidRuntime(13303):     at 
dalvik.system.NativeStart.main(Native Method)
06-22 13:27:23.242: ERROR/AndroidRuntime(13303): Caused by: 
java.lang.IllegalArgumentException: 00:30:91:40:08:9A,Jacob-PC,1179908 is not a 
valid Bluetooth address
06-22 13:27:23.242: ERROR/AndroidRuntime(13303):     at 
backport.android.bluetooth.BluetoothDevice.<init>(BluetoothDevice.java:372)
06-22 13:27:23.242: ERROR/AndroidRuntime(13303):     at 
backport.android.bluetooth.BluetoothAdapter.getBondedDevices(BluetoothAdapter.ja
va:367)
06-22 13:27:23.242: ERROR/AndroidRuntime(13303):     at 
dk.jacobservatoriet.telescope.TelescopeActivity.onCreate(TelescopeActivity.java:
47)
06-22 13:27:23.242: ERROR/AndroidRuntime(13303):     at 
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1132)
06-22 13:27:23.242: ERROR/AndroidRuntime(13303):     at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2231)
06-22 13:27:23.242: ERROR/AndroidRuntime(13303):     ... 11 more



What version of the product are you using? On what operating system?
HTC Magic with Android 1.5

Original issue reported on code.google.com by [email protected] on 22 Jun 2010 at 11:33

D-Bus error @ Hero

Hi,

I got an error when I call getName() of BluetoothDevice class.
I'm using Hero. The following are the logs.

03-21 23:05:27.961: INFO/bluetooth_common.cpp(63): com.ti.btips, 
/com/ti/btips, com.ti.btips.bmg, GetRemoteDeviceName
03-21 23:05:27.981: ERROR/bluetooth_common.cpp(63): btbus_func_args_argmap: 
D-Bus error in GetRemoteDeviceName: org.freedesktop.DBus.Error.ServiceUnknown 
(The name com.ti.btips was not provided by any .service files)
03-21 23:05:27.981: ERROR/BluetoothDeviceService.cpp(63): 
getRemoteNameNative.. FAIL

Original issue reported on code.google.com by [email protected] on 21 Mar 2010 at 3:16

Process crash on Samsung Galaxy I7500L

What steps will reproduce the problem?
1. Try to open a socket

What is the expected output? What do you see instead?
Expected: Open socket, or exception.
Actual: Process just crashes, and app restarts. No exceptions are thrown, but 
there is a BlueZ log:

11-07 06:02:26.540: ERROR/BLZ_WRAPPER(1517): btl_if_socket : blz wrapper not 
initialized
11-07 06:02:26.560: INFO/WindowManager(1063): WIN DEATH: Window{433b36b8 
com.acme.mypackage/com.acme.mypackage.activity.InitialScreen paused=false}
11-07 06:02:26.560: INFO/ActivityManager(1063): Process com.acme.mypackage (pid 
1517) has died.
11-07 06:02:26.560: WARN/ActivityManager(1063): Scheduling restart of crashed 
service com.acme.mypackage/.service.MyService in 5000ms
11-07 06:02:26.570: INFO/WindowManager(1063): WIN DEATH: Window{433210a8 
com.acme.mypackage/com.acme.mypackage.activity.Dashboard paused=false}
11-07 06:02:26.630: DEBUG/Zygote(1013): Process 1517 exited cleanly (1)
11-07 06:02:26.660: INFO/ActivityManager(1063): Start proc com.acme.mypackage 
for activity com.acme.mypackage/.activity.InitialScreen: pid=1528 uid=10042 
gids={3002, 3001}

What version of the product are you using? On what operating system?
backport-android-bluetooth: 2.2.2
Android OS: 1.5

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 7 Nov 2010 at 6:17

Sample code

Hi,

I'm just wondering if you have a sample application, you could make 
available to download, as i cant it working. I'm pretty sure its my 
implementation, so a sample application would be great.

Cheers

James

Original issue reported on code.google.com by [email protected] on 21 May 2010 at 7:49

Missing build instructions

Could one please provide instructions on how to build the jar from source?

I have tried javac'ing src path, gen, and resource, but lost on the actual 
correct procedure. Am I supposed to compile against 1.6 android.jar or possibly 
2.0?

Great work! Thanks a bunch for the effort thus far. I have been able to 
successfully use the jar as built but would like to make modifications and 
rebuild.

Thanks again.

Original issue reported on code.google.com by [email protected] on 28 Dec 2009 at 8:37

Developer contact

I was wondering if the developer of this backport API could contact me as I
have a few questions regarding this API.

I was wondering if it worked on the HTC Dream (G1) as well as how stable it is.

Original issue reported on code.google.com by [email protected] on 21 Mar 2010 at 10:02

BluetoothAdapter.getDefaultAdapter() causes uncaught Exception on Samsung Behold II

What steps will reproduce the problem?
1. BluetoothAdapter.getDefaultAdapter() causes unCaught Exception on Samsung 
Behold II
2.
3.

What is the expected output? What do you see instead?

Expect instance of BluetoothAdapter to be returned

What version of the product are you using? On what operating system?
jar version 2.2.2

Please provide any additional information below.
E/dalvikvm(  693): Could not find method 
android.bluetooth.IBluetoothDevice.enable, referenced from method 
backport.android.bluetooth.BluetoothAdapter.enable
W/dalvikvm(  693): VFY: unable to resolve interface method 521: 
Landroid/bluetooth/IBluetoothDevice;.enable ()Z
W/dalvikvm(  693): VFY:  rejecting opcode 0x72 at 0x0002
W/dalvikvm(  693): VFY:  rejected 
Lbackport/android/bluetooth/BluetoothAdapter;.enable ()Z
W/dalvikvm(  693): Verifier rejected class 
Lbackport/android/bluetooth/BluetoothAdapter;
D/AndroidRuntime(  693): Shutting down VM
W/dalvikvm(  693): threadid=3: thread exiting with uncaught exception 
(group=0x4001da08)
E/AndroidRuntime(  693): Uncaught handler: thread main exiting due to uncaught 
exception
E/AndroidRuntime(  693): java.lang.VerifyError: 
backport.android.bluetooth.BluetoothAdapter
E/AndroidRuntime(  693):        at 
airsMobile.SimCab.SimCabActivity$initBluetooth.run(SimCabActivity.java:2635)
E/AndroidRuntime(  693):        at 
android.os.Handler.handleCallback(Handler.java:587)
E/AndroidRuntime(  693):        at 
android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime(  693):        at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(  693):        at 
android.app.ActivityThread.main(ActivityThread.java:4203)
E/AndroidRuntime(  693):        at java.lang.reflect.Method.invokeNative(Native 
Method)
E/AndroidRuntime(  693):        at 
java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime(  693):        at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
E/AndroidRuntime(  693):        at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
E/AndroidRuntime(  693):        at dalvik.system.NativeStart.main(Native Method)
I/Process (   88): Sending signal. PID: 693 SIG: 3
I/dalvikvm(  693): threadid=7: reacting to signal 3
E/wpa_supplicant(  123): wpa_driver_priv_driver_cmd RSSI len = 4096
E/wpa_supplicant(  123): wpa_driver_priv_driver_cmd DCHome rssi -61  len = 16, 
16
E/wpa_supplicant(  123): wpa_driver_priv_driver_cmd LINKSPEED len = 4096
E/wpa_supplicant(  123): wpa_driver_priv_driver_cmd LinkSpeed 54 len = 12, 12

Original issue reported on code.google.com by [email protected] on 30 Apr 2011 at 5:27

error add build path

What steps will reproduce the problem?

1. backport-android-bluetooth2.jar  put src directory 
2. push eclipse menus [add build path] 

What is the expected output? What do you see instead?

I got massages .
[2010-01-19 00:59:07 - ConnectionTeam01]
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added:
Lbackport/android/bluetooth/BackportProperties;
[2010-01-19 00:59:07 - ConnectionTeam01]    at
com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:123)
[2010-01-19 00:59:07 - ConnectionTeam01]    at
com.android.dx.dex.file.DexFile.add(DexFile.java:143)
[2010-01-19 00:59:07 - ConnectionTeam01]    at
com.android.dx.command.dexer.Main.processClass(Main.java:299)
[2010-01-19 00:59:07 - ConnectionTeam01]    at
com.android.dx.command.dexer.Main.processFileBytes(Main.java:276)
[2010-01-19 00:59:07 - ConnectionTeam01]    at
com.android.dx.command.dexer.Main.access$100(Main.java:56)
[2010-01-19 00:59:07 - ConnectionTeam01]    at
com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:228)
[2010-01-19 00:59:07 - ConnectionTeam01]    at
com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:245
)
[2010-01-19 00:59:07 - ConnectionTeam01]    at
com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:130)
[2010-01-19 00:59:07 - ConnectionTeam01]    at
com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:108)
[2010-01-19 00:59:07 - ConnectionTeam01]    at
com.android.dx.command.dexer.Main.processOne(Main.java:245)
[2010-01-19 00:59:07 - ConnectionTeam01]    at
com.android.dx.command.dexer.Main.processAllFiles(Main.java:183)
[2010-01-19 00:59:07 - ConnectionTeam01]    at
com.android.dx.command.dexer.Main.run(Main.java:139)
[2010-01-19 00:59:07 - ConnectionTeam01]    at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2010-01-19 00:59:07 - ConnectionTeam01]    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[2010-01-19 00:59:07 - ConnectionTeam01]    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
[2010-01-19 00:59:07 - ConnectionTeam01]    at
java.lang.reflect.Method.invoke(Method.java:585)
[2010-01-19 00:59:07 - ConnectionTeam01]    at
com.android.ide.eclipse.adt.internal.sdk.DexWrapper.run(Unknown Source)
[2010-01-19 00:59:07 - ConnectionTeam01]    at
com.android.ide.eclipse.adt.internal.build.ApkBuilder.executeDx(Unknown Source)
[2010-01-19 00:59:07 - ConnectionTeam01]    at
com.android.ide.eclipse.adt.internal.build.ApkBuilder.build(Unknown Source)
[2010-01-19 00:59:07 - ConnectionTeam01]    at
org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:627)
[2010-01-19 00:59:07 - ConnectionTeam01]    at
org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
[2010-01-19 00:59:07 - ConnectionTeam01]    at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170)
[2010-01-19 00:59:07 - ConnectionTeam01]    at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
[2010-01-19 00:59:07 - ConnectionTeam01]    at
org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:253)
[2010-01-19 00:59:07 - ConnectionTeam01]    at
org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
[2010-01-19 00:59:07 - ConnectionTeam01]    at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256)
[2010-01-19 00:59:07 - ConnectionTeam01]    at
org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:3
09)
[2010-01-19 00:59:07 - ConnectionTeam01]    at
org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:341)
[2010-01-19 00:59:07 - ConnectionTeam01]    at
org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:140)
[2010-01-19 00:59:07 - ConnectionTeam01]    at
org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:238)
[2010-01-19 00:59:07 - ConnectionTeam01]    at
org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
[2010-01-19 00:59:07 - ConnectionTeam01]1 error; aborting
[2010-01-19 00:59:07 - ConnectionTeam01]Conversion to Dalvik format failed
with error 1

What version of the product are you using? On what operating system?
2.1.1 and 
Eclipse SDK Version: 3.5.1

Please provide any additional information below.

I tried other directory and add library path (i.e... make lib/
not get error.

but,can't getDefaultAdapter() method call.

Original issue reported on code.google.com by [email protected] on 18 Jan 2010 at 4:28

Class not found exception on Eclair

What steps will reproduce the problem?
1. just this line triggers a failure: BluetoothAdapter bluetooth =
BluetoothAdapter.getDefaultAdapter();


What is the expected output? What do you see instead?
Expected no output, got a Force Close

What version of the product are you using? On what operating system?
Eclair 2.0.1 Moto Droid

Please provide any additional information below.
Stack trace:

03-04 00:34:14.322: ERROR/ServiceLocator(19142):
java.lang.ClassNotFoundException: android.bluetooth.IBluetoothDevice$Stub
in loader dalvik.system.PathClassLoader@44baf150
03-04 00:34:14.322: ERROR/ServiceLocator(19142):     at
dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
03-04 00:34:14.322: ERROR/ServiceLocator(19142):     at
java.lang.ClassLoader.loadClass(ClassLoader.java:573)
03-04 00:34:14.322: ERROR/ServiceLocator(19142):     at
java.lang.ClassLoader.loadClass(ClassLoader.java:532)
03-04 00:34:14.322: ERROR/ServiceLocator(19142):     at
backport.android.bluetooth.ServiceLocator.getServiceStubClass(ServiceLocator.jav
a:109)
03-04 00:34:14.322: ERROR/ServiceLocator(19142):     at
backport.android.bluetooth.ServiceLocator.getServiceStubInternal(ServiceLocator.
java:143)
03-04 00:34:14.322: ERROR/ServiceLocator(19142):     at
backport.android.bluetooth.ServiceLocator.getServiceStub(ServiceLocator.java:62)
03-04 00:34:14.322: ERROR/ServiceLocator(19142):     at
backport.android.bluetooth.IBluetoothDeviceLocator.get(IBluetoothDeviceLocator.j
ava:41)
03-04 00:34:14.322: ERROR/ServiceLocator(19142):     at
backport.android.bluetooth.BluetoothAdapter.getDefaultAdapter(BluetoothAdapter.j
ava:399)



second error stack trace:

03-04 00:35:06.549: ERROR/AndroidRuntime(19142):
java.lang.NoClassDefFoundError: android.bluetooth.IBluetoothDevice
03-04 00:35:06.549: ERROR/AndroidRuntime(19142):     at
backport.android.bluetooth.IBluetoothDeviceLocator.get(IBluetoothDeviceLocator.j
ava:41)
03-04 00:35:06.549: ERROR/AndroidRuntime(19142):     at
backport.android.bluetooth.BluetoothAdapter.getDefaultAdapter(BluetoothAdapter.j
ava:399)



Original issue reported on code.google.com by [email protected] on 4 Mar 2010 at 5:35

NullPointerException when getting bonded devices

Imported backport bluetooth in my project
Set<BluetoothDevice> deviceSet = this.bluetoothAdapter.getBondedDevices();

I get a NullPointerException :(

04-04 19:46:03.669: ERROR/AndroidRuntime(1305): Caused by:
java.lang.NullPointerException
04-04 19:46:03.669: ERROR/AndroidRuntime(1305):     at
backport.android.bluetooth.BluetoothAdapter.getBondedDevices(BluetoothAdapter.ja
va:355)

Original issue reported on code.google.com by [email protected] on 4 Apr 2010 at 5:57

Exception occurred on starting MainActivity on LG GT 540 (Android v1.6)

After building and starting backport.android.bluetooth application, I see that 
exception occurred and program closed.

It seems that exception happens somewhere in 
ServiceLocator::getServiceStubInternal. Is it possible to avoid this issue on 
my device?

Device: LG GT540
Operating system: Android 1.6
Build: GT540-V10g-JUN-25-2010

Unfortunately I was not able to run debugging on device (i'm beginner in 
android). I hope that this information is enough to determine root cause.

Thanks

Original issue reported on code.google.com by [email protected] on 22 Sep 2010 at 5:15

Unable to start Service Discovery - Droid Eris

What steps will reproduce the problem?
1. Trying to connect socket using UUID for UUIDHelper.RFCOMM_PROTOCOL_UUID
and UUIDHelper.SERIAL_PORT_PROTOCOL_UUID and giving this exception
2- On debugging found that below line is returning value as false;

  mService.getRemoteServiceChannel(mDevice.getAddress(), uuid16, this);
in class BluetoothSocket$SdpHelper


What is the expected output? What do you see instead?
It should get connected properly to the already paired device but not
connecting. Stack trace is like 

03-18 16:55:12.334: ERROR/ConnectionThread(5544): java.io.IOException:
Unable to start Service Discovery
03-18 16:55:12.334: ERROR/ConnectionThread(5544):     at
backport.android.bluetooth.BluetoothSocket$SdpHelper.doSdp(BluetoothSocket.java:
289)
03-18 16:55:12.334: ERROR/ConnectionThread(5544):     at
backport.android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:143)
03-18 16:55:12.334: ERROR/ConnectionThread(5544):     at
.bluetoothtest.own.ConnectionThread.run(ConnectionThread.java:28)

What version of the product are you using? On what operating system?
Device- HTC DROID eris
Kernel Version 2.6.27-c77ff39d
Model Number ADR6200
Build Number- 1.17.605.1 CL104882 release-keys
Software version- 1.17.605.1
Hardware version- 0002
Android OS- 1.5 
Machine OS-Windows 7

Please provide any additional information below.
I am able to get the address and name of the devices available in range but
never able to connect to BluetoothSocket.

Can anyone help me to get solution or workaround of this?

Vishal 

Original issue reported on code.google.com by [email protected] on 18 Mar 2010 at 11:35

Cannot disable bluetooth

I was trying to turn bluetooth off,so I wrote this code:
BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter();
btAdapter.disable();

But it doesn't work.Instead,it throws an error.

04-07 16:43:23.865: ERROR/AndroidRuntime(639): Caused by:
java.lang.reflect.UndeclaredThrowableException
04-07 16:43:23.865: ERROR/AndroidRuntime(639):     at
$Proxy0.disable(Native Method)
04-07 16:43:23.865: ERROR/AndroidRuntime(639):     at
backport.android.bluetooth.BluetoothAdapter.disable(BluetoothAdapter.java:312)
04-07 16:43:23.865: ERROR/AndroidRuntime(639):     at
com.warwithinme.android.widgetwar.ButtonBluetooth.toggleSetting(ButtonBluetooth.
java:51)
04-07 16:43:23.865: ERROR/AndroidRuntime(639):     at
com.warwithinme.android.widgetwar.ToggleWidget.onReceive(ToggleWidget.java:66)
04-07 16:43:23.865: ERROR/AndroidRuntime(639):     at
android.app.ActivityThread.handleReceiver(ActivityThread.java:2451)
04-07 16:43:23.865: ERROR/AndroidRuntime(639):     ... 10 more
04-07 16:43:23.865: ERROR/AndroidRuntime(639): Caused by:
java.lang.reflect.InvocationTargetException
04-07 16:43:23.865: ERROR/AndroidRuntime(639):     at
android.bluetooth.IBluetoothDevice$Stub$Proxy.disable(IBluetoothDevice.java:527)
04-07 16:43:23.865: ERROR/AndroidRuntime(639):     at
java.lang.reflect.Method.invokeNative(Native Method)
04-07 16:43:23.865: ERROR/AndroidRuntime(639):     at
java.lang.reflect.Method.invoke(Method.java:521)
04-07 16:43:23.865: ERROR/AndroidRuntime(639):     at
backport.android.bluetooth.DelegateFactory$InvocationHandlerImpl.invoke(Delegate
Factory.java:49)
04-07 16:43:23.865: ERROR/AndroidRuntime(639):     ... 15 more
04-07 16:43:23.865: ERROR/AndroidRuntime(639): Caused by:
java.lang.SecurityException: Cannot write secure settings table
04-07 16:43:23.865: ERROR/AndroidRuntime(639):     at
android.os.Parcel.readException(Parcel.java:1245)
04-07 16:43:23.865: ERROR/AndroidRuntime(639):     at
android.os.Parcel.readException(Parcel.java:1233)
04-07 16:43:23.865: ERROR/AndroidRuntime(639):     at
android.bluetooth.IBluetoothDevice$Stub$Proxy.disable(IBluetoothDevice.java:522)

Original issue reported on code.google.com by [email protected] on 7 Apr 2010 at 8:46

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

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 [email protected] on 4 Feb 2010 at 3:53

Attachments:

How to determine a connection lost

What steps will reproduce the problem?
1. Connect to a remove device
2. Disconnect remote device from power

What is the expected output? What do you see instead?

The currently open socket should indicate a connect loss, but nothing
happens at all. When I disconnect the remote device by a disconnect command
rather than just remove them from power then it works and the socket throws
an expected exception. But why not when the remote device disappears by a
power loss?


What version of the product are you using? On what operating system?
HTC Magic with Android 1.6

Please provide any additional information below.


regards

spachner

Original issue reported on code.google.com by [email protected] on 24 Mar 2010 at 2:50

How to run backport on Android 2.0.1

Hi,

I run the backport successfully on a HTC Magic (Android 1.6), now I tried
to get the same app running on a Motorola Milestone (Android 2.0.1) which
does not work, see the log below. What do I miss? Any help is highly
appreciated.


03-19 17:33:38.662: WARN/dalvikvm(1841): VFY: unable to find class
referenced in signature (Landroid/bluetooth/IBluetoothDevice;)
03-19 17:33:38.662: ERROR/dalvikvm(1841): Could not find class
'android.bluetooth.IBluetoothDevice', referenced from method
backport.android.bluetooth.BluetoothAdapter.<init>
03-19 17:33:38.662: WARN/dalvikvm(1841): VFY: unable to resolve const-class
9 (Landroid/bluetooth/IBluetoothDevice;) in
Lbackport/android/bluetooth/BluetoothAdapter;
03-19 17:33:38.662: DEBUG/dalvikvm(1841): VFY: replacing opcode 0x1c at 0x0023
03-19 17:33:38.669: DEBUG/dalvikvm(1841): Making a copy of
Lbackport/android/bluetooth/BluetoothAdapter;.<init> code (148 bytes)
03-19 17:33:38.669: WARN/dalvikvm(1841): VFY: unable to find class
referenced in signature (Landroid/bluetooth/IBluetoothDevice;)
03-19 17:33:38.669: WARN/dalvikvm(1841): VFY: unable to find class
referenced in signature (Landroid/bluetooth/IBluetoothDevice;)
03-19 17:33:38.669: INFO/dalvikvm(1841): Could not find method
android.bluetooth.IBluetoothDevice.cancelDiscovery, referenced from method
backport.android.bluetooth.BluetoothAdapter.cancelDiscovery
03-19 17:33:38.669: WARN/dalvikvm(1841): VFY: unable to resolve interface
method 27: Landroid/bluetooth/IBluetoothDevice;.cancelDiscovery ()Z
03-19 17:33:38.669: DEBUG/dalvikvm(1841): VFY: replacing opcode 0x72 at 0x0002
03-19 17:33:38.669: DEBUG/dalvikvm(1841): Making a copy of
Lbackport/android/bluetooth/BluetoothAdapter;.cancelDiscovery code (64 bytes)
03-19 17:33:38.669: INFO/dalvikvm(1841): Could not find method
android.bluetooth.IBluetoothDevice.enable, referenced from method
backport.android.bluetooth.BluetoothAdapter.enable
03-19 17:33:38.677: WARN/dalvikvm(1841): VFY: unable to resolve interface
method 28: Landroid/bluetooth/IBluetoothDevice;.enable ()Z
03-19 17:33:38.677: DEBUG/dalvikvm(1841): VFY: replacing opcode 0x72 at 0x0002
03-19 17:33:38.677: DEBUG/dalvikvm(1841): Making a copy of
Lbackport/android/bluetooth/BluetoothAdapter;.enable code (64 bytes)
03-19 17:33:38.677: INFO/dalvikvm(1841): Could not find method
android.bluetooth.IBluetoothDevice.getAddress, referenced from method
backport.android.bluetooth.BluetoothAdapter.getAddress
03-19 17:33:38.677: WARN/dalvikvm(1841): VFY: unable to resolve interface
method 29: Landroid/bluetooth/IBluetoothDevice;.getAddress ()Ljava/lang/String;
03-19 17:33:38.677: DEBUG/dalvikvm(1841): VFY: replacing opcode 0x72 at 0x0002
03-19 17:33:38.677: DEBUG/dalvikvm(1841): Making a copy of
Lbackport/android/bluetooth/BluetoothAdapter;.getAddress code (64 bytes)
03-19 17:33:38.685: INFO/dalvikvm(1841): Could not find method
android.bluetooth.IBluetoothDevice.listBonds, referenced from method
backport.android.bluetooth.BluetoothAdapter.getBondedDevices
03-19 17:33:38.685: WARN/dalvikvm(1841): VFY: unable to resolve interface
method 39: Landroid/bluetooth/IBluetoothDevice;.listBonds ()[Ljava/lang/String;
03-19 17:33:38.685: DEBUG/dalvikvm(1841): VFY: replacing opcode 0x72 at 0x0002
03-19 17:33:38.685: DEBUG/dalvikvm(1841): Making a copy of
Lbackport/android/bluetooth/BluetoothAdapter;.getBondedDevices code (112 bytes)
03-19 17:33:38.685: INFO/dalvikvm(1841): Could not find method
android.bluetooth.IBluetoothDevice.getName, referenced from method
backport.android.bluetooth.BluetoothAdapter.getName
03-19 17:33:38.685: WARN/dalvikvm(1841): VFY: unable to resolve interface
method 32: Landroid/bluetooth/IBluetoothDevice;.getName ()Ljava/lang/String;
03-19 17:33:38.685: DEBUG/dalvikvm(1841): VFY: replacing opcode 0x72 at 0x0002
03-19 17:33:38.685: DEBUG/dalvikvm(1841): Making a copy of
Lbackport/android/bluetooth/BluetoothAdapter;.getName code (64 bytes)
03-19 17:33:38.685: INFO/dalvikvm(1841): Could not find method
android.bluetooth.IBluetoothDevice.getScanMode, referenced from method
backport.android.bluetooth.BluetoothAdapter.getScanMode
03-19 17:33:38.685: WARN/dalvikvm(1841): VFY: unable to resolve interface
method 36: Landroid/bluetooth/IBluetoothDevice;.getScanMode ()I
03-19 17:33:38.685: DEBUG/dalvikvm(1841): VFY: replacing opcode 0x72 at 0x0002
03-19 17:33:38.685: DEBUG/dalvikvm(1841): Making a copy of
Lbackport/android/bluetooth/BluetoothAdapter;.getScanMode code (104 bytes)
03-19 17:33:38.693: INFO/dalvikvm(1841): Could not find method
android.bluetooth.IBluetoothDevice.getBluetoothState, referenced from
method backport.android.bluetooth.BluetoothAdapter.getState
03-19 17:33:38.693: WARN/dalvikvm(1841): VFY: unable to resolve interface
method 30: Landroid/bluetooth/IBluetoothDevice;.getBluetoothState ()I
03-19 17:33:38.693: DEBUG/dalvikvm(1841): VFY: replacing opcode 0x72 at 0x0004
03-19 17:33:38.693: DEBUG/dalvikvm(1841): Making a copy of
Lbackport/android/bluetooth/BluetoothAdapter;.getState code (124 bytes)
03-19 17:33:38.693: INFO/dalvikvm(1841): Could not find method
android.bluetooth.IBluetoothDevice.isDiscovering, referenced from method
backport.android.bluetooth.BluetoothAdapter.isDiscovering
03-19 17:33:38.693: WARN/dalvikvm(1841): VFY: unable to resolve interface
method 37: Landroid/bluetooth/IBluetoothDevice;.isDiscovering ()Z
03-19 17:33:38.693: DEBUG/dalvikvm(1841): VFY: replacing opcode 0x72 at 0x0002
03-19 17:33:38.693: DEBUG/dalvikvm(1841): Making a copy of
Lbackport/android/bluetooth/BluetoothAdapter;.isDiscovering code (64 bytes)
03-19 17:33:38.693: INFO/dalvikvm(1841): Could not find method
android.bluetooth.IBluetoothDevice.isEnabled, referenced from method
backport.android.bluetooth.BluetoothAdapter.isEnabled
03-19 17:33:38.693: WARN/dalvikvm(1841): VFY: unable to resolve interface
method 38: Landroid/bluetooth/IBluetoothDevice;.isEnabled ()Z
03-19 17:33:38.701: DEBUG/dalvikvm(1841): VFY: replacing opcode 0x72 at 0x0002
03-19 17:33:38.701: DEBUG/dalvikvm(1841): Making a copy of
Lbackport/android/bluetooth/BluetoothAdapter;.isEnabled code (64 bytes)
03-19 17:33:38.701: INFO/dalvikvm(1841): Could not find method
android.bluetooth.RfcommSocket.bind, referenced from method
backport.android.bluetooth.BluetoothAdapter.listenUsingRfcommWithServiceRecord
03-19 17:33:38.701: WARN/dalvikvm(1841): VFY: unable to resolve virtual
method 47: Landroid/bluetooth/RfcommSocket;.bind (Ljava/lang/String;I)Z
03-19 17:33:38.701: DEBUG/dalvikvm(1841): VFY: replacing opcode 0x6e at 0x000f
03-19 17:33:38.701: DEBUG/dalvikvm(1841): Making a copy of
Lbackport/android/bluetooth/BluetoothAdapter;.listenUsingRfcommWithServiceRecord
code (251 bytes)
03-19 17:33:38.701: INFO/dalvikvm(1841): Could not find method
android.bluetooth.IBluetoothDevice.setName, referenced from method
backport.android.bluetooth.BluetoothAdapter.setName
03-19 17:33:38.701: WARN/dalvikvm(1841): VFY: unable to resolve interface
method 40: Landroid/bluetooth/IBluetoothDevice;.setName (Ljava/lang/String;)Z
03-19 17:33:38.701: DEBUG/dalvikvm(1841): VFY: replacing opcode 0x72 at 0x0002
03-19 17:33:38.701: DEBUG/dalvikvm(1841): Making a copy of
Lbackport/android/bluetooth/BluetoothAdapter;.setName code (64 bytes)
03-19 17:33:38.701: INFO/dalvikvm(1841): Could not find method
android.bluetooth.IBluetoothDevice.startDiscovery, referenced from method
backport.android.bluetooth.BluetoothAdapter.startDiscovery
03-19 17:33:38.708: WARN/dalvikvm(1841): VFY: unable to resolve interface
method 42: Landroid/bluetooth/IBluetoothDevice;.startDiscovery (Z)Z
03-19 17:33:38.708: DEBUG/dalvikvm(1841): VFY: replacing opcode 0x72 at 0x0003
03-19 17:33:38.708: DEBUG/dalvikvm(1841): Making a copy of
Lbackport/android/bluetooth/BluetoothAdapter;.startDiscovery code (68 bytes)
03-19 17:33:38.755: WARN/dalvikvm(1841): VFY: unable to find class
referenced in signature (Landroid/bluetooth/IBluetoothDevice;)
03-19 17:33:38.763: ERROR/dalvikvm(1841): Could not find class
'android.bluetooth.IBluetoothDevice', referenced from method
backport.android.bluetooth.IBluetoothDeviceLocator.get
03-19 17:33:38.763: WARN/dalvikvm(1841): VFY: unable to resolve check-cast
9 (Landroid/bluetooth/IBluetoothDevice;) in
Lbackport/android/bluetooth/IBluetoothDeviceLocator;
03-19 17:33:38.763: DEBUG/dalvikvm(1841): VFY: replacing opcode 0x1f at 0x0013
03-19 17:33:38.763: DEBUG/dalvikvm(1841): Making a copy of
Lbackport/android/bluetooth/IBluetoothDeviceLocator;.get code (123 bytes)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):
java.lang.ClassNotFoundException: android.bluetooth.IBluetoothDevice$Stub
in loader dalvik.system.PathClassLoader@44c78bd8
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
java.lang.ClassLoader.loadClass(ClassLoader.java:573)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
java.lang.ClassLoader.loadClass(ClassLoader.java:532)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
backport.android.bluetooth.ServiceLocator.getServiceStubClass(ServiceLocator.jav
a:109)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
backport.android.bluetooth.ServiceLocator.getServiceStubInternal(ServiceLocator.
java:143)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
backport.android.bluetooth.ServiceLocator.getServiceStub(ServiceLocator.java:62)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
backport.android.bluetooth.IBluetoothDeviceLocator.get(IBluetoothDeviceLocator.j
ava:41)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
backport.android.bluetooth.BluetoothAdapter.getDefaultAdapter(BluetoothAdapter.j
ava:399)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
de.tvr.mr10.testautobtpairbackport.Mr10BtSvc.startBTService(Mr10BtSvc.java:79)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
de.tvr.mr10.testautobtpairbackport.Mr10BtSvc.onCreate(Mr10BtSvc.java:56)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
android.app.ActivityThread.handleCreateService(ActivityThread.java:2765)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
android.app.ActivityThread.access$3200(ActivityThread.java:119)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1902)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
android.os.Handler.dispatchMessage(Handler.java:99)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
android.os.Looper.loop(Looper.java:123)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
android.app.ActivityThread.main(ActivityThread.java:4338)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
java.lang.reflect.Method.invokeNative(Native Method)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
java.lang.reflect.Method.invoke(Method.java:521)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
dalvik.system.NativeStart.main(Native Method)
03-19 17:33:38.779: DEBUG/AndroidRuntime(1841): Shutting down VM


regards

Stefan

Original issue reported on code.google.com by [email protected] on 19 Mar 2010 at 4:38

BluetoothSocket.connect() does not throw an Exception on failure

What steps will reproduce the problem?
1. Get a BluetoothSocket via 
BluetoothDevice.createRfcommSocketToServiceRecord(UUID) from a device which is 
known but has Bluetooth disabled,
2. Call BluetoothSocket.connect()
3.

What is the expected output? What do you see instead?
I expect to get the promised IOException because the connection was not build 
up properly. Instead the connection process seems to work fine.

BluetoothSocket.getInputStream()/.getOutputStream() also return objects but 
using read() and write() lead to IOExceptions.

What version of the product are you using? On what operating system?
Version 2.2.2

Please provide any additional information below.
See BluetoothSocket.connectNative() in the sources. When catching the 
IOException only a Log.e() is done but no IOException is thrown.

Original issue reported on code.google.com by [email protected] on 16 Aug 2010 at 4:30

Bluetooth Chat doesn't seem to work on Hero

Hi, I am using the latest svn version of backport-android-bluetooth and
just deployed it to my Hero (with rom HTC Generic 2.73.405.66 not rooted).

When I launch the bluetooth application it runs, but when I try to detect
devices I get null for every names.

I attached the logcat containing what happened starting from the run of the
app and I made my phone discoverable and after I tried to discover phones.

I didn't try yet to pair it with another phone and try exchanging message,
but I will in the next hour :)

Original issue reported on code.google.com by [email protected] on 29 Apr 2010 at 12:13

Attachments:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.