android bluetooth discovery, device type - android

I have a bluetooth module that is LE and Classic that is set up to advertise and be discoverable at the same time.
In my android app i start a discovery and add all but LE devices to a listView as i want to make a classic connection to the device.
When i am discovering devices i find that it takes multiple scans to find my device, due to this i added some debug statements and found that my device shows up as 3 different device types, LE, Classic and dual.
Android dev site only says that a duel device is this;
"Bluetooth device type, Dual Mode - BR/EDR/LE
Constant Value: 3 (0x00000003)"
http://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#DEVICE_TYPE_DUAL
i am using
device.getType() != BluetoothDevice.DEVICE_TYPE_LE
to filter devices
and this to find the device type
DebugWrapper.infoMsg(device.getAddress(), "CYCLOPS C");
DebugWrapper.infoMsg(""+device.getType(), "CYCLOPS TYPE");"
LogCat showing a single scan and the devices found
08-12 10:32:08.226: D/BtClassicDeviceBase(18064): isConnected
08-12 10:32:08.226: D/BluetoothAdapterWrapper(18064): startDiscovery
08-12 10:32:08.236: D/BtClassicDeviceBase(18064): isConnected
08-12 10:32:08.357: I/System.out(18064): rssi: -67
08-12 10:32:08.597: I/System.out(18064): rssi: -76
08-12 10:32:08.647: I/System.out(18064): rssi: -83
08-12 10:32:08.697: I/BTC device(18064): 00:16:A4:09:3A:AF
08-12 10:32:08.697: I/BTC TYPE(18064): 1
08-12 10:32:08.697: I/System.out(18064): rssi: -46
08-12 10:32:09.628: I/System.out(18064): rssi: -84
08-12 10:32:09.768: I/System.out(18064): rssi: -78
08-12 10:32:10.349: I/System.out(18064): rssi: -65
08-12 10:32:11.059: I/BTC device(18064): 00:16:A4:09:3A:AF
08-12 10:32:11.059: I/BTC TYPE(18064): 3
08-12 10:32:11.059: I/System.out(18064): rssi: -47
08-12 10:32:11.460: I/System.out(18064): rssi: -73
08-12 10:32:12.871: I/System.out(18064): rssi: -100
08-12 10:32:13.512: I/System.out(18064): rssi: -70
08-12 10:32:14.142: I/System.out(18064): rssi: -89
08-12 10:32:15.454: I/System.out(18064): rssi: -67
08-12 10:32:15.594: I/System.out(18064): rssi: -72
08-12 10:32:15.694: I/System.out(18064): rssi: -83
08-12 10:32:17.095: I/System.out(18064): rssi: -73
08-12 10:32:17.255: I/BTC device(18064): 00:16:A4:09:3A:AF
08-12 10:32:17.255: I/BTC TYPE(18064): 3
08-12 10:32:17.255: I/System.out(18064): rssi: -47
08-12 10:32:20.148: I/System.out(18064): rssi: -91
08-12 10:32:21.079: D/BtClassicDeviceBase(18064): isConnected
Does anyone know how android defines what type of device it has found and what determines a duel device?

Related

Flutter: Unable to debug to Live Device or Simulator/ Android version works

This is the error I get while debugging Flutter app from Android Studio.
App works fine in android in both live device and emulator, but when it comes to iOS, this is what i face.
I am working on macOS Catalina (10.15.5) with XCode version 11.5 and My physical device is running on iOS Version 13.5.1 and Simulator on iOS 13.5.
All apps are pushed to Android devices and it works fine but the problem persists only with iOS.
Please help.. thanks in advance
Launching lib/main.dart on iPhone 11 in debug mode...
Running Xcode build...
Xcode build done. 732.3s
Failed to build iOS app
Error output from Xcode build:
↳
2020-06-18 02:18:53.084 xcodebuild[91466:1355893] DTDeviceKit: deviceType from 5a3807b8f9f37a9db278516812a79610081c144f was NULL
2020-06-18 02:18:53.179 xcodebuild[91466:1355892] DTDeviceKit: deviceType from 5a3807b8f9f37a9db278516812a79610081c144f was NULL
2020-06-18 02:18:53.668 xcodebuild[91466:1355892] DTDeviceKit: deviceType from 5adc0eb0c458564d461badbe6dfea015d6822b24 was NULL
2020-06-18 02:18:53.672 xcodebuild[91466:1355903] DTDeviceKit: deviceType from 5adc0eb0c458564d461badbe6dfea015d6822b24 was NULL
2020-06-18 02:19:27.169 xcodebuild[91466:1355892] DTDeviceKit: Failed to mount DDI from '<DVTFilePath:0x7fdf5c0db8f0:'/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/DeviceSupport/4.3/DeveloperDiskImage.dmg'>', error=-402653183: Error Domain=com.apple.dtdevicekit Code=806 "Failed to prepare device for development." UserInfo={AssociatedMobileDeviceFunction=AMDeviceMountImage, NSUnderlyingError=0x7fdf5c086b50 {Error Domain=com.apple.dt.MobileDeviceErrorDomain Code=-402653183 "An unknown error occurred." UserInfo={MobileDeviceErrorCode=(0xE8000001), com.apple.dtdevicekit.stacktrace=(
0 DTDeviceKitBase 0x0000000110cab81a DTDKCreateNSErrorFromAMDErrorCode + 233
1 DTDeviceKitBase 0x0000000110cea8a9 -[DTDKMobileDeviceToken _mountDeveloperDiskImage:withError:] + 1034
2 DTDeviceKitBase 0x0000000110ceb5e7 __58-[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:]_block_invoke + 779
3 libdispatch.dylib 0x00007fff6a551658 _dispatch_client_callout + 8
4 libdispatch.dylib 0x00007fff6a55d6ec _dispatch_lane_barrier_sync_invoke_and_complete + 60
5 DTDeviceKitBase 0x0000000110ceb27a -[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:] + 199
6 IDEiOSSupportCore 0x000000011082c0c9 __28-[DVTiOSDevice attachToken:]_block_invoke_4 + 254
7 DVTFoundation 0x0000000102d207f4 __DVT_CALLING_CLIENT_BLOCK__ + 7
8 DVTFoundation 0x0000000102d22436 __DVTDispatchAsync_block_invoke + 1194
9 libdispatch.dylib 0x00007fff6a5506c4 _dispatch_call_block_and_release + 12
10 libdispatch.dylib 0x00007fff6a551658 _dispatch_client_callout + 8
11 libdispatch.dylib 0x00007fff6a553818 _dispatch_continuation_pop + 414
12 libdispatch.dylib 0x00007fff6a552f16 _dispatch_async_redirect_invoke + 703
13 libdispatch.dylib 0x00007fff6a55f957 _dispatch_root_queue_drain + 326
14 libdispatch.dylib 0x00007fff6a560097 _dispatch_worker_thread2 + 92
15 libsystem_pthread.dylib 0x00007fff6a7af9f7 _pthread_wqthread + 220
16 libsystem_pthread.dylib 0x00007fff6a7aeb77 start_wqthread + 15
), DVTRadarComponentKey=261622, NSLocalizedDescription=An unknown error occurred.}}, NSLocalizedRecoverySuggestion=If you are certain that Xcode supports development on this device, try disconnecting and reconnecting the device., NSLocalizedFailure=This operation can fail if the version of the OS on the device is newer than the version of Xcode that is running., DVTRadarComponentKey=487927, NSLocalizedDescription=Failed to prepare device for development.}
2020-06-18 02:19:27.169 xcodebuild[91466:1355892] iPhoneSupport: 📱<DVTiOSDevice (0x7fdf5c3581c0), iPhone, iPhone, 13.5.1 (17F80), 5a3807b8f9f37a9db278516812a79610081c144f> unable to mount DeveloperDiskImage (Error Domain=com.apple.dtdevicekit Code=806 "Failed to prepare device for development." UserInfo={AssociatedMobileDeviceFunction=AMDeviceMountImage, NSUnderlyingError=0x7fdf5c086b50 {Error Domain=com.apple.dt.MobileDeviceErrorDomain Code=-402653183 "An unknown error occurred." UserInfo={MobileDeviceErrorCode=(0xE8000001), com.apple.dtdevicekit.stacktrace=(
0 DTDeviceKitBase 0x0000000110cab81a DTDKCreateNSErrorFromAMDErrorCode + 233
1 DTDeviceKitBase 0x0000000110cea8a9 -[DTDKMobileDeviceToken _mountDeveloperDiskImage:withError:] + 1034
2 DTDeviceKitBase 0x0000000110ceb5e7 __58-[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:]_block_invoke + 779
3 libdispatch.dylib 0x00007fff6a551658 _dispatch_client_callout + 8
4 libdispatch.dylib 0x00007fff6a55d6ec _dispatch_lane_barrier_sync_invoke_and_complete + 60
5 DTDeviceKitBase 0x0000000110ceb27a -[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:] + 199
6 IDEiOSSupportCore 0x000000011082c0c9 __28-[DVTiOSDevice attachToken:]_block_invoke_4 + 254
7 DVTFoundation 0x0000000102d207f4 __DVT_CALLING_CLIENT_BLOCK__ + 7
8 DVTFoundation 0x0000000102d22436 __DVTDispatchAsync_block_invoke + 1194
9 libdispatch.dylib 0x00007fff6a5506c4 _dispatch_call_block_and_release + 12
10 libdispatch.dylib 0x00007fff6a551658 _dispatch_client_callout + 8
11 libdispatch.dylib 0x00007fff6a553818 _dispatch_continuation_pop + 414
12 libdispatch.dylib 0x00007fff6a552f16 _dispatch_async_redirect_invoke + 703
13 libdispatch.dylib 0x00007fff6a55f957 _dispatch_root_queue_drain + 326
14 libdispatch.dylib 0x00007fff6a560097 _dispatch_worker_thread2 + 92
15 libsystem_pthread.dylib 0x00007fff6a7af9f7 _pthread_wqthread + 220
16 libsystem_pthread.dylib 0x00007fff6a7aeb77 start_wqthread + 15
), DVTRadarComponentKey=261622, NSLocalizedDescription=An unknown error occurred.}}, NSLocalizedRecoverySuggestion=If you are certain that Xcode supports development on this device, try disconnecting and reconnecting the device., NSLocalizedFailure=This operation can fail if the version of the OS on the device is newer than the version of Xcode that is running., DVTRadarComponentKey=487927, NSLocalizedDescription=Failed to prepare device for development.})
2020-06-18 02:19:42.440 xcodebuild[91466:1355903] DTDeviceKit: Failed to mount DDI from '<DVTFilePath:0x7fdf5c0db8f0:'/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/DeviceSupport/4.3/DeveloperDiskImage.dmg'>', error=-402653183: Error Domain=com.apple.dtdevicekit Code=806 "Failed to prepare device for development." UserInfo={AssociatedMobileDeviceFunction=AMDeviceMountImage, NSUnderlyingError=0x7fdf5c2602b0 {Error Domain=com.apple.dt.MobileDeviceErrorDomain Code=-402653183 "An unknown error occurred." UserInfo={MobileDeviceErrorCode=(0xE8000001), com.apple.dtdevicekit.stacktrace=(
0 DTDeviceKitBase 0x0000000110cab81a DTDKCreateNSErrorFromAMDErrorCode + 233
1 DTDeviceKitBase 0x0000000110cea8a9 -[DTDKMobileDeviceToken _mountDeveloperDiskImage:withError:] + 1034
2 DTDeviceKitBase 0x0000000110ceb5e7 __58-[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:]_block_invoke + 779
3 libdispatch.dylib 0x00007fff6a551658 _dispatch_client_callout + 8
4 libdispatch.dylib 0x00007fff6a55da38 _dispatch_sync_invoke_and_complete_recurse + 65
5 libdispatch.dylib 0x00007fff6a55d5ab _dispatch_sync_f_slow + 195
6 DTDeviceKitBase 0x0000000110ceb27a -[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:] + 199
7 IDEiOSSupportCore 0x000000011082c0c9 __28-[DVTiOSDevice attachToken:]_block_invoke_4 + 254
8 DVTFoundation 0x0000000102d207f4 __DVT_CALLING_CLIENT_BLOCK__ + 7
9 DVTFoundation 0x0000000102d22436 __DVTDispatchAsync_block_invoke + 1194
10 libdispatch.dylib 0x00007fff6a5506c4 _dispatch_call_block_and_release + 12
11 libdispatch.dylib 0x00007fff6a551658 _dispatch_client_callout + 8
12 libdispatch.dylib 0x00007fff6a553818 _dispatch_continuation_pop + 414
13 libdispatch.dylib 0x00007fff6a552f16 _dispatch_async_redirect_invoke + 703
14 libdispatch.dylib 0x00007fff6a55f957 _dispatch_root_queue_drain + 326
15 libdispatch.dylib 0x00007fff6a560097 _dispatch_worker_thread2 + 92
16 libsystem_pthread.dylib 0x00007fff6a7af9f7 _pthread_wqthread + 220
17 libsystem_pthread.dylib 0x00007fff6a7aeb77 start_wqthread + 15
), DVTRadarComponentKey=261622, NSLocalizedDescription=An unknown error occurred.}}, NSLocalizedRecoverySuggestion=If you are certain that Xcode supports development on this device, try disconnecting and reconnecting the device., NSLocalizedFailure=This operation can fail if the version of the OS on the device is newer than the version of Xcode that is running., DVTRadarComponentKey=487927, NSLocalizedDescription=Failed to prepare device for development.}
2020-06-18 02:19:42.441 xcodebuild[91466:1355903] iPhoneSupport: 📱<DVTiOSDevice (0x7fdf5c3581c0), iPhone, iPhone, 13.5.1 (17F80), 5a3807b8f9f37a9db278516812a79610081c144f> unable to mount DeveloperDiskImage (Error Domain=com.apple.dtdevicekit Code=806 "Failed to prepare device for development." UserInfo={AssociatedMobileDeviceFunction=AMDeviceMountImage, NSUnderlyingError=0x7fdf5c2602b0 {Error Domain=com.apple.dt.MobileDeviceErrorDomain Code=-402653183 "An unknown error occurred." UserInfo={MobileDeviceErrorCode=(0xE8000001), com.apple.dtdevicekit.stacktrace=(
0 DTDeviceKitBase 0x0000000110cab81a DTDKCreateNSErrorFromAMDErrorCode + 233
1 DTDeviceKitBase 0x0000000110cea8a9 -[DTDKMobileDeviceToken _mountDeveloperDiskImage:withError:] + 1034
2 DTDeviceKitBase 0x0000000110ceb5e7 __58-[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:]_block_invoke + 779
3 libdispatch.dylib 0x00007fff6a551658 _dispatch_client_callout + 8
4 libdispatch.dylib 0x00007fff6a55da38 _dispatch_sync_invoke_and_complete_recurse + 65
5 libdispatch.dylib 0x00007fff6a55d5ab _dispatch_sync_f_slow + 195
6 DTDeviceKitBase 0x0000000110ceb27a -[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:] + 199
7 IDEiOSSupportCore 0x000000011082c0c9 __28-[DVTiOSDevice attachToken:]_block_invoke_4 + 254
8 DVTFoundation 0x0000000102d207f4 __DVT_CALLING_CLIENT_BLOCK__ + 7
9 DVTFoundation 0x0000000102d22436 __DVTDispatchAsync_block_invoke + 1194
10 libdispatch.dylib 0x00007fff6a5506c4 _dispatch_call_block_and_release + 12
11 libdispatch.dylib 0x00007fff6a551658 _dispatch_client_callout + 8
12 libdispatch.dylib 0x00007fff6a553818 _dispatch_continuation_pop + 414
13 libdispatch.dylib 0x00007fff6a552f16 _dispatch_async_redirect_invoke + 703
14 libdispatch.dylib 0x00007fff6a55f957 _dispatch_root_queue_drain + 326
15 libdispatch.dylib 0x00007fff6a560097 _dispatch_worker_thread2 + 92
16 libsystem_pthread.dylib 0x00007fff6a7af9f7 _pthread_wqthread + 220
17 libsystem_pthread.dylib 0x00007fff6a7aeb77 start_wqthread + 15
), DVTRadarComponentKey=261622, NSLocalizedDescription=An unknown error occurred.}}, NSLocalizedRecoverySuggestion=If you are certain that Xcode supports development on this device, try disconnecting and reconnecting the device., NSLocalizedFailure=This operation can fail if the version of the OS on the device is newer than the version of Xcode that is running., DVTRadarComponentKey=487927, NSLocalizedDescription=Failed to prepare device for development.})
2020-06-18 02:19:57.683 xcodebuild[91466:1356057] DTDeviceKit: Failed to mount DDI from '<DVTFilePath:0x7fdf5c0db8f0:'/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/DeviceSupport/4.3/DeveloperDiskImage.dmg'>', error=-402653183: Error Domain=com.apple.dtdevicekit Code=806 "Failed to prepare device for development." UserInfo={AssociatedMobileDeviceFunction=AMDeviceMountImage, NSUnderlyingError=0x7fdf5c22fdc0 {Error Domain=com.apple.dt.MobileDeviceErrorDomain Code=-402653183 "An unknown error occurred." UserInfo={MobileDeviceErrorCode=(0xE8000001), com.apple.dtdevicekit.stacktrace=(
0 DTDeviceKitBase 0x0000000110cab81a DTDKCreateNSErrorFromAMDErrorCode + 233
1 DTDeviceKitBase 0x0000000110cea8a9 -[DTDKMobileDeviceToken _mountDeveloperDiskImage:withError:] + 1034
2 DTDeviceKitBase 0x0000000110ceb5e7 __58-[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:]_block_invoke + 779
3 libdispatch.dylib 0x00007fff6a551658 _dispatch_client_callout + 8
4 libdispatch.dylib 0x00007fff6a55da38 _dispatch_sync_invoke_and_complete_recurse + 65
5 libdispatch.dylib 0x00007fff6a55d5ab _dispatch_sync_f_slow + 195
6 DTDeviceKitBase 0x0000000110ceb27a -[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:] + 199
7 IDEiOSSupportCore 0x000000011082c0c9 __28-[DVTiOSDevice attachToken:]_block_invoke_4 + 254
8 DVTFoundation 0x0000000102d207f4 __DVT_CALLING_CLIENT_BLOCK__ + 7
9 DVTFoundation 0x0000000102d22436 __DVTDispatchAsync_block_invoke + 1194
10 libdispatch.dylib 0x00007fff6a5506c4 _dispatch_call_block_and_release + 12
11 libdispatch.dylib 0x00007fff6a551658 _dispatch_client_callout + 8
12 libdispatch.dylib 0x00007fff6a553818 _dispatch_continuation_pop + 414
13 libdispatch.dylib 0x00007fff6a552f16 _dispatch_async_redirect_invoke + 703
14 libdispatch.dylib 0x00007fff6a55f957 _dispatch_root_queue_drain + 326
15 libdispatch.dylib 0x00007fff6a560097 _dispatch_worker_thread2 + 92
16 libsystem_pthread.dylib 0x00007fff6a7af9f7 _pthread_wqthread + 220
17 libsystem_pthread.dylib 0x00007fff6a7aeb77 start_wqthread + 15
), DVTRadarComponentKey=261622, NSLocalizedDescription=An unknown error occurred.}}, NSLocalizedRecoverySuggestion=If you are certain that Xcode supports development on this device, try disconnecting and reconnecting the device., NSLocalizedFailure=This operation can fail if the version of the OS on the device is newer than the version of Xcode that is running., DVTRadarComponentKey=487927, NSLocalizedDescription=Failed to prepare device for development.}
2020-06-18 02:19:57.683 xcodebuild[91466:1356057] iPhoneSupport: 📱<DVTiOSDevice (0x7fdf5c3581c0), iPhone, iPhone, 13.5.1 (17F80), 5a3807b8f9f37a9db278516812a79610081c144f> unable to mount DeveloperDiskImage (Error Domain=com.apple.dtdevicekit Code=806 "Failed to prepare device for development." UserInfo={AssociatedMobileDeviceFunction=AMDeviceMountImage, NSUnderlyingError=0x7fdf5c22fdc0 {Error Domain=com.apple.dt.MobileDeviceErrorDomain Code=-402653183 "An unknown error occurred." UserInfo={MobileDeviceErrorCode=(0xE8000001), com.apple.dtdevicekit.stacktrace=(
0 DTDeviceKitBase 0x0000000110cab81a DTDKCreateNSErrorFromAMDErrorCode + 233
1 DTDeviceKitBase 0x0000000110cea8a9 -[DTDKMobileDeviceToken _mountDeveloperDiskImage:withError:] + 1034
2 DTDeviceKitBase 0x0000000110ceb5e7 __58-[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:]_block_invoke + 779
3 libdispatch.dylib 0x00007fff6a551658 _dispatch_client_callout + 8
4 libdispatch.dylib 0x00007fff6a55da38 _dispatch_sync_invoke_and_complete_recurse + 65
5 libdispatch.dylib 0x00007fff6a55d5ab _dispatch_sync_f_slow + 195
6 DTDeviceKitBase 0x0000000110ceb27a -[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:] + 199
7 IDEiOSSupportCore 0x000000011082c0c9 __28-[DVTiOSDevice attachToken:]_block_invoke_4 + 254
8 DVTFoundation 0x0000000102d207f4 __DVT_CALLING_CLIENT_BLOCK__ + 7
9 DVTFoundation 0x0000000102d22436 __DVTDispatchAsync_block_invoke + 1194
10 libdispatch.dylib 0x00007fff6a5506c4 _dispatch_call_block_and_release + 12
11 libdispatch.dylib 0x00007fff6a551658 _dispatch_client_callout + 8
12 libdispatch.dylib 0x00007fff6a553818 _dispatch_continuation_pop + 414
13 libdispatch.dylib 0x00007fff6a552f16 _dispatch_async_redirect_invoke + 703
14 libdispatch.dylib 0x00007fff6a55f957 _dispatch_root_queue_drain + 326
15 libdispatch.dylib 0x00007fff6a560097 _dispatch_worker_thread2 + 92
16 libsystem_pthread.dylib 0x00007fff6a7af9f7 _pthread_wqthread + 220
17 libsystem_pthread.dylib 0x00007fff6a7aeb77 start_wqthread + 15
), DVTRadarComponentKey=261622, NSLocalizedDescription=An unknown error occurred.}}, NSLocalizedRecoverySuggestion=If you are certain that Xcode supports development on this device, try disconnecting and reconnecting the device., NSLocalizedFailure=This operation can fail if the version of the OS on the device is newer than the version of Xcode that is running., DVTRadarComponentKey=487927, NSLocalizedDescription=Failed to prepare device for development.})
** BUILD FAILED **
Xcode's output:
↳
/Users/MAVERICK/AndroidStudioProjects/muddledchat/ios/Runner/GeneratedPluginRegistrant.m:10:9: fatal error: module 'cloud_firestore' not found
#import cloud_firestore;
~~~~~~~^~~~~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone 11.

Eclipse crashing on launch

I recently deleted eclipse and the ADT bundle because some files got accidentally deleted and I wanted to install it fresh over again but when I unzipped the file and opened eclipse I am getting this crash log I am unsure of how to fix this and would appreciate if anybody could help me that has any knowledge on this.
Process: eclipse [1032]
Path: /Volumes/VOLUME/*/Eclipse.app/Contents/MacOS/eclipse
Identifier: org.eclipse.eclipse
Version: 3.8 (3.8)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: eclipse [1032]
User ID: 501
Date/Time: 2016-12-23 22:49:53.824 -0600
OS Version: Mac OS X 10.12.2 (16C67)
Report Version: 12
Anonymous UUID: 7EB9EBB2-D3B9-8F3B-EC33-B888DDDA4C54
Time Awake Since Boot: 1900 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x000000000000003c
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [0]
VM Regions Near 0x3c:
-->
__TEXT 0000000100000000-0000000100004000 [ 16K] r-x/rwx SM=COW /var/folders/*/Eclipse.app/Contents/MacOS/eclipse
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.apple.CoreFoundation 0x00007fffb27d3544 CFBundleGetFunctionPointerForName + 36
1 org.eclipse.eclipse 0x00000001000030bd findSymbol + 66
2 org.eclipse.eclipse 0x00000001000018be original_main + 1572
3 org.eclipse.eclipse 0x0000000100001f7d main + 1230
4 org.eclipse.eclipse 0x0000000100001158 start + 52
Thread 1:
0 libsystem_pthread.dylib 0x00007fffc7edd1e0 start_wqthread + 0
Thread 2:
0 libsystem_pthread.dylib 0x00007fffc7edd1e0 start_wqthread + 0
Thread 3:
0 libsystem_pthread.dylib 0x00007fffc7edd1e0 start_wqthread + 0
1 ??? 0x000070000965bb40 0 + 123145459972928
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000610000020140 rbx: 0x0000000000000000 rcx: 0x6974696e49746573 rdx: 0x0000000000000006
rdi: 0x0000000000000000 rsi: 0x0000610000020140 rbp: 0x00007fff5fbff9b0 rsp: 0x00007fff5fbff580
r8: 0x736772416c616974 r9: 0x0000000000000600 r10: 0x0000000000000002 r11: 0x00007fffb27d3520
r12: 0x00000001000043f8 r13: 0x00006100000a0000 r14: 0x0000610000020140 r15: 0x02b18d72892400a7
rip: 0x00007fffb27d3544 rfl: 0x0000000000010202 cr2: 0x000000010d7c7000
Logical CPU: 0
Error Code: 0x02000170
Trap Number: 133

Bluetooth connection lost issue

This is not really something I'm developing, more like something I'm trying to debug. For some reason my HTC Desire HD keeps disconnecting from my car's bluetooth. It worked fine on phone's original rom, then I upgraded to Gingerbread (HTC rom) and it started to disconnect. I'm not sure what happened next (possibly I've installed something? mb the car's computer was reset as I had a service?) but it actually started to work after a few months and all was good until I upgraded again to 2.3.5 (HTC official upgrade). The phone connects to my car without any issues, then looses the connection within a minute and will not reconnect until the phone or the car's restarted. Here's some log data that I was able to collect in case someone might be familiar with how the bluetooth works on android:
I//system/bin/btld(23506): ##### USERIAL_Ioctl: BT_Sleep, USERIAL_IO_BT_WAKE_DEASSERT ####
W/ (23507): bta_dm_pm_timer_cback 0x255fa4
W/ (23507): dm_pm_timer expires 0
W/ (23507): proc dm_pm_timer expires
I//system/bin/btld(23506): ##### USERIAL_Ioctl: BT_Wake, USERIAL_IO_BT_WAKE_ASSERT ####
I/PTIM (23507): Call GKI_add_to_timer_list in ptim_start_timer
W/ (23507): start dm_pm_timer:0, 5000
D/dalvikvm(23586): GC_CONCURRENT freed 381K, 48% free 3295K/6279K, external 0K/0K, paused 2ms+3ms
I/keystore( 1264): uid: 1000 action: e -> 7 state: 1 -> 1 retry: 4
I/BtAtPhonebook( 1631): Refreshed phonebook ME with 255 results
I/keystore( 1264): uid: 1000 action: e -> 7 state: 1 -> 1 retry: 4
I/BtAtPhonebook( 1631): Refreshed phonebook ME with 255 results
D/dalvikvm(15887): GC_EXPLICIT freed 124K, 44% free 4129K/7303K, external 0K/512K, paused 79ms
I//system/bin/btld(23506): ##### USERIAL_Ioctl: BT_Sleep, USERIAL_IO_BT_WAKE_DEASSERT ####
W/ (23507): stop dm_pm_timer:0
W/HeadsetBase.cpp( 1631): RFCOMM poll() returned success (1), but with an unexpected revents bitmask: 0x11
I/HeadsetBase( 1631): headset read error 5
I//system/bin/btld(23506): send_ctrl_msg: [BTL_IFS CTRL] send BTLIF_DISCONNECT_IND (AG) 8 pbytes (hdl 18)
I//system/bin/btld(23506): BTL_IF_DisconnectDatapath: Disconnect datapath on handle 21
I//system/bin/btld(23506): wrp_setup_rxflow: wrp_setup_rxflow : 0 (fd 21)
I//system/bin/btld(23506): wsactive_del: delete wsock 21 from active list [212ef8]
I//system/bin/btld(23506): wrp_close_data: wrp_close 21 [brcm.bt.btlif]
I//system/bin/btld(23506): wsactive_del: delete wsock 21 from active list [212ef8]
I/BTL_IFC ( 1631): btl_ifc_ctrl_rx: [BTL_IFC CTRL] recv BTLIF_DISCONNECT_IND (AG) 10 pbytes (hdl 92)
D/BLZ_WRAPPER( 1631): blz_ctrl_msg: [blz ctrl] received message [BTLIF_DISCONNECT_IND]
D/BLZ_WRAPPER( 1631): blz_ctrl_msg: Channel disconnected remotely, rf_ch 65535
I/BTL_IFC_WRP( 1631): wrp_find_wsock_by_rfhdl: wrp_find_wsock_by_rfhdl : no entry found, lst 0, rfchan 65535
I/BLZ_WRAPPER( 1631): btl_if_close: btl_if_close (105)
D/BLZ_WRAPPER( 1631): btl_if_close: [btl_if_close] : (105:100), disc_pending 0, asnc 0, selct 0, flags 2
I/BTL_IFC ( 1631): send_ctrl_msg: [BTL_IFC CTRL] send BTLIF_DISCONNECT_REQ (AG) 8 pbytes (hdl 92)
W/ (23507): Could not find conn_info for chdl=0x3
D/BluetoothHeadsetService( 1631): Device: 00:13:A9:A1:19:1E Headset state 2 -> 0, result = 0
W/ (23507): BTA_DM_LINK_DOWN_EVT::bdaddr 00:13:a9:a1:19:1e reason x15
D/DTUN_HCID4(23540): dtun_dm_sig_link_down()
I/DTUN_HCID4(23540): dtun_dm_sig_link_down device = 0xf750 handle = 256 reason = 0x15
I//system/bin/btld(23506): send_ctrl_msg: [BTL_IFS CTRL] send BTLIF_DTUN_SIGNAL_EVT (CTRL) 11 pbytes (hdl 17)
D/BTL_IFC_WRP( 1631): wrp_close_s_only: wrp_close_s_only [105] (105:100) [brcm.bt.btlif]
D/BTL_IFC_WRP( 1631): wrp_close_s_only: data socket closed
D/BTL_IFC_WRP( 1631): wsactive_del: delete wsock 105 from active list [ad3ca3c0]
I/DTUN_HCID4(23540): [embedded]LINK_DOWN name = UHP, address = 00:13:A9:A1:19:1E, reason = 0x15
D/BluetoothService( 1379): Device property changed:00:13:A9:A1:19:1E property:Connected
I/BluetoothHeadsetService( 1631): [embedded] HSP/HFP state : address: 00:13:A9:A1:19:1E name: UHP State:2->0
I/BTL_IFC ( 1631): send_ctrl_msg: [BTL_IFC CTRL] send BTLIF_DISCONNECT_REQ (SCO) 0 pbytes (hdl 102)
W/ (23507): Could not find conn_info with active SCO
I/BluetoothA2dpService( 1379): BluetoothHeadset disconnected, remove AV CONNECT_TO msg
I/StatusBarPolicy( 1577): updateBluetooth bt icon:true,HS:0,A2DP:false
D/AudioPolicyManagerBase( 1260): setDeviceConnectionState() device: 40, state 0, address 00:13:A9:A1:19:1E
I/AudioPolicyManagerBase( 1260): setOutputDevice() output 4 device 0 delayMs 0
I/AudioPolicyManagerBase( 1260): setOutputDevice() setting same device 0 or null device for output 4
I/BluetoothDeviceProfileState( 1379): Entering IncomingHandsfree state with: 6
I/BluetoothDeviceProfileState( 1379): Processing command:6
I/BluetoothDeviceProfileState( 1379): Entering ACL Connected state with: 102
I/NaviReceiver(23556): Got BluetoothHeadset.ACTION_STATE_CHANGED
I/NaviReceiver(23556): conn state = 0

With just one particular Bluetooth SPP module, .createRfcommSocketToServiceRecord() suddenly no longer works, but reflection method works

My application connects to Bluetooth SPP modules by making and handling connections pretty much as described in the Android Bluetooth documentation. That is, in my connection thread, I have been used to making a connection simply using:
socket = device.createRfcommSocketToServiceRecord(MY_UUID)
where the UUID is the 'well known' SPP UUID, 00001101-0000-1000-8000-00805F9B34FB.
The Bluetooth devices I am connecting to are little Bluetooth / serial adapters. I have three that I've been using for test. Two of them are the "Linvor" Bluetooth to TTL-level serial PCBs that are all over eBay at the moment, which are identical; and the third is a completely enclosed adapter of manufacturer unknown.
Over the time I have been developing this application, I have routinely tested on various devices that range from Android version 2.2.1 (my old Archos 101) through to an Archos Honeycomb device. The device I have been testing on mostly is my Desire HD, which presently has Android version 2.3.5. Over the year or so I have been working on this, I can confidently say that I've never had any connection problems.
Yesterday during testing with my Desire HD (2.3.5) I found that the application would no longer connect to my Linvor Bluetooth PCB I have been working with mostly lately. After obtaining the socket using the line of code quoted above, when attempting socket.connect(), I would immediately get an IOException of Unable to start discovery.
The next thing I did was to swap over to my other spare Linvor module and attempt to pair and connect. The application connected just fine. I also then swapped in my third packaged Bluetooth adapter, and the application connected to that just fine, too. Going back to my first Linvor module, the application still refuses to connect. I ensure that I unpair the 'faulty' Linvor device on my Desire HD, turn off Bluetooth, power down the phone, remove and re-insert battery, power-up, re-pair etc. and then try once again. The application still refuses to connect to that first Linvor module, but connects fine to the second Linvor module and other adapter module.
I then grab my Archos 101 (2.2.1) and fire up a somewhat older build of my application that is still installed on it. The Archos 101 immediately connects to the 'faulty' Linvor module just fine.
At this point I am starting to wonder if either device - i.e. my Desire HD, or perhaps more likely the Linvor module - could have some corrupt entry in its flash memory table for paired devices. In other words, something within that first Linvor module that means it no longer accepts a connection (although it does accept a pairing) from my Desire HD, and yet it will still accept connections from other devices; and also at the same time my Desire HD can happily connect to other devices just as it always has done, including the other spare Linvor module.
After hours of head-scratching and desperation, I decided to try out the reflection connection method as described in Michael's answer here. This is something I have heard about quite a lot and I was under the impression that it's applicable to Android 2.2 and below. However, for the entire year that I have been working with Bluetooth SPP from my various Android devices, I have never needed to use it as .createRfcommSocketToServiceRecord() has always worked for me. So I use the code as given in Michael's answer to that question to create my socket, and to my amazement, my Desire HD connects to the 'faulty' Linvor module.
So to recap, the situation seems to be like this:
For the past year, I have been able to use .createRfcommSocketToServiceRecord() routinely on my 2.2.1 and 2.3.5 devices to connect to my three Bluetooth SPP adapters.
Then, one particular day, without any change to software on phones or on my Bluetooth adapters, the first of the adapters suddenly requires the reflection method for a connection to work; the other two adapters (one of which is the same type as the first) continue to connect with my application just fine using .createRfcommSocketToServiceRecord(). Note that there had been absolutely no changes made to my Bluetooth code immediately prior to this sudden changes in behaviour.
What on earth is going on here?
Can anyone advise me on what Android version level the reflection 'hack' should not be required? I was under the impression that it should not longer be necessary on, say, 2.3.5 (my Desire HD). Is that correct?
Is / was the nature of the bug with .createRfcommSocketToServiceRecord() such that connections would usually work, but sometimes not work depending on the phase of the moon?
Here is a Logcat output from when a connection fails with that particular Linvor module when using .createRfcommSocketToServiceRecord():
01-29 10:22:00.004: D/View(8165): onTouchEvent: viewFlags: 0x18005001
01-29 10:22:00.014: D/View(8165): onTouchEvent: isFocusable: true, isFocusableInTouchMode: false, isFocused: false; focusTaken: false
01-29 10:22:00.034: D/WindowManagerImpl(8165): finishRemoveViewLocked, mViews2: com.android.internal.policy.impl.PhoneWindow$DecorView#406215d8
01-29 10:22:00.074: I/BLZ20_WRAPPER(8165): blz20_wrp_socket: fam 31, type 1, prot BTPROTO_RFCOMM
01-29 10:22:00.084: D/BLZ20_WRAPPER(8165): blz20_init: initializing...
01-29 10:22:00.084: D/BTL_IFC_WRP(8165): wsactive_init: init active list
01-29 10:22:00.084: I/BTL_IFC(8165): main_client_thread: Client main thread starting
01-29 10:22:00.194: D/BLZ20_WRAPPER(8165): blz20_init: success
01-29 10:22:00.194: I/BTL_IFC(8165): BTL_IFC_RegisterSubSystem: Register subsystem [BTS]
01-29 10:22:00.194: I/BTL_IFC(8165): btl_ifc_ctrl_connect: Connect control channel for subsystem [BTS]
01-29 10:22:00.194: D/BTL_IFC_WRP(8165): wrp_sock_create: CTRL
01-29 10:22:00.194: D/BTL_IFC_WRP(8165): wrp_alloc_new_sock: wrp_alloc_new_sock sub 1
01-29 10:22:00.194: D/BTL_IFC_WRP(8165): wrp_sock_create: 66
01-29 10:22:00.194: D/BTL_IFC_WRP(8165): wrp_sock_connect: wrp_sock_connect brcm.bt.btlif:9000 (66)
01-29 10:22:00.194: D/BTL_IFC_WRP(8165): wrp_sock_connect: BTLIF_MAKE_LOCAL_SERVER_NAME return name: brcm.bt.btlif.9000
01-29 10:22:00.194: D/BTL_IFC_WRP(8165): wrp_sock_connect: wrp_sock_connect ret:0 server name:brcm.bt.btlif.9000
01-29 10:22:00.194: I/BTL_IFC_WRP(8165): wrp_sock_connect: Connected. (66)
01-29 10:22:00.194: I/BTL_IFC(8165): send_ctrl_msg: [BTL_IFC CTRL] send BTLIF_REGISTER_SUBSYS_REQ (BTS) 0 pbytes (hdl 66)
01-29 10:22:00.194: D/BTL_IFC(8165): BTL_IFC_RegisterSubSystem: add new ctrl fd to active set
01-29 10:22:00.194: D/BTL_IFC_WRP(8165): wrp_wsock_create: BTS
01-29 10:22:00.194: D/BTL_IFC_WRP(8165): wrp_alloc_new_sock: wrp_alloc_new_sock sub 16
01-29 10:22:00.194: D/BTL_IFC_WRP(8165): wrp_wsock_create: 67
01-29 10:22:00.194: D/BLZ20_WRAPPER(8165): btsk_alloc_add: success
01-29 10:22:00.194: D/BLZ20_WRAPPER(8165): btsk_dump_list: fd (-1:67), bta -1, rc 0, wflags 0x0, cflags 0x0, port 0
01-29 10:22:00.194: I/BLZ20_WRAPPER(8165): blz20_wrp_socket: return 67
01-29 10:22:00.194: D/BLZ20_WRAPPER(8165): blz20_wrp_setsockopt: fd (-1:67), bta -1, rc 0, wflags 0x0, cflags 0x0, port 0
01-29 10:22:00.194: I/BLZ20_WRAPPER(8165): blz20_wrp_setsockopt: configure rfcomm lm mode 0x26, (master:0, auth 1, enc 1)
01-29 10:22:00.194: I/BLZ20_WRAPPER(8165): blz20_wrp_setsockopt: success
01-29 10:22:00.194: D/BLZ20_WRAPPER(8165): blz20_wrp_setsockopt: fd (-1:67), bta -1, rc 0, wflags 0x0, cflags 0x0, port 0
01-29 10:22:00.194: I/BLZ20_WRAPPER(8165): blz20_wrp_setsockopt: configure rfcomm sndbuf len 71680 bytes
01-29 10:22:00.194: I/BLZ20_WRAPPER(8165): blz20_wrp_setsockopt: success
01-29 10:22:00.194: D/BLZ20_ASOCKWRP(8165): asocket_init
01-29 10:22:00.194: I/BLZ20_WRAPPER(8165): blz20_wrp_fcntl: s 67, cmd 3
01-29 10:22:00.194: D/BLZ20_WRAPPER(8165): blz20_wrp_fcntl: fd (-1:67), bta -1, rc 0, wflags 0x0, cflags 0x0, port 0
01-29 10:22:00.194: I/BLZ20_WRAPPER(8165): blz20_wrp_fcntl: s 67, cmd 4
01-29 10:22:00.194: D/BLZ20_WRAPPER(8165): blz20_wrp_fcntl: fd (-1:67), bta -1, rc 0, wflags 0x0, cflags 0x0, port 0
01-29 10:22:00.194: D/BLZ20_WRAPPER(8165): blz20_wrp_fcntl: transparant fcntl
01-29 10:22:00.194: I/BLZ20_WRAPPER(8165): blz20_wrp_fcntl: s 69, cmd 3
01-29 10:22:00.194: I/BLZ20_WRAPPER(8165): blz20_wrp_fcntl: wsock not found, pass through transparantly
01-29 10:22:00.194: I/BLZ20_WRAPPER(8165): blz20_wrp_fcntl: s 69, cmd 4
01-29 10:22:00.194: I/BLZ20_WRAPPER(8165): blz20_wrp_fcntl: wsock not found, pass through transparantly
01-29 10:22:00.194: I/BLZ20_WRAPPER(8165): blz20_set_asocket: success (67,68,69)
01-29 10:22:00.214: I/BluetoothIF(8165): BEGIN mConnectThread
01-29 10:22:00.234: E/BluetoothIF(8165): TP: IOException error: java.io.IOException: Unable to start Service Discovery
01-29 10:22:00.234: E/BluetoothIF(8165): Unable to start Service Discovery
01-29 10:22:00.234: E/BluetoothIF(8165): Unable to start Service Discovery
01-29 10:22:00.234: D/BluetoothSocket(8165): close(): android.bluetooth.BluetoothSocket#405c8f78
01-29 10:22:00.234: D/BLZ20_ASOCKWRP(8165): asocket_abort [67,68,69]
01-29 10:22:00.234: I/BLZ20_WRAPPER(8165): blz20_wrp_shutdown: s 67, how 2
01-29 10:22:00.234: D/BLZ20_WRAPPER(8165): blz20_wrp_shutdown: fd (-1:67), bta -1, rc 0, wflags 0x0, cflags 0x0, port 0
01-29 10:22:00.234: I/BLZ20_WRAPPER(8165): blz20_wrp_shutdown: shutdown socket
01-29 10:22:00.234: D/BLZ20_WRAPPER(8165): blz20_wrp_write: wrote 1 bytes out of 1 on fd 69
01-29 10:22:00.234: D/BLZ20_ASOCKWRP(8165): asocket_destroy
01-29 10:22:00.234: D/BLZ20_ASOCKWRP(8165): asocket_abort [67,68,69]
01-29 10:22:00.234: I/BLZ20_WRAPPER(8165): blz20_wrp_shutdown: s 67, how 2
01-29 10:22:00.234: D/BLZ20_WRAPPER(8165): blz20_wrp_shutdown: fd (-1:67), bta -1, rc 0, wflags 0x0, cflags 0x0, port 0
01-29 10:22:00.234: I/BLZ20_WRAPPER(8165): blz20_wrp_shutdown: shutdown socket
01-29 10:22:00.234: D/BLZ20_WRAPPER(8165): blz20_wrp_write: wrote 1 bytes out of 1 on fd 69
01-29 10:22:00.234: I/BLZ20_WRAPPER(8165): blz20_wrp_close: s 69
01-29 10:22:00.234: D/BLZ20_WRAPPER(8165): blz20_wrp_close: std close (69)
01-29 10:22:00.244: I/BLZ20_WRAPPER(8165): blz20_wrp_close: s 68
01-29 10:22:00.244: D/BLZ20_WRAPPER(8165): blz20_wrp_close: std close (68)
01-29 10:22:00.244: I/BLZ20_WRAPPER(8165): blz20_wrp_close: s 67
01-29 10:22:00.244: D/BLZ20_WRAPPER(8165): blz20_wrp_close: fd (-1:67), bta -1, rc 0, wflags 0x0, cflags 0x0, port 0
01-29 10:22:00.244: I/BLZ20_WRAPPER(8165): __close_prot_rfcomm: fd 67
01-29 10:22:00.244: I/BTL_IFC(8165): send_ctrl_msg: [BTL_IFC CTRL] send BTLIF_BTS_RFC_CLOSE (BTS) 8 pbytes (hdl 66)
01-29 10:22:00.244: D/BTL_IFC_WRP(8165): wrp_close_s_only: wrp_close_s_only [67] (67:-1) []
01-29 10:22:00.244: D/BTL_IFC_WRP(8165): wrp_close_s_only: data socket closed
01-29 10:22:00.244: D/BTL_IFC_WRP(8165): wsactive_del: delete wsock 67 from active list [ad40f904]
01-29 10:22:00.244: D/BTL_IFC_WRP(8165): wrp_close_s_only: wsock fully closed, return to pool
01-29 10:22:00.244: D/BLZ20_WRAPPER(8165): btsk_free: success
At present, the best course of action that I see is to design my code so that if the .createRfcommSocketToServiceRecord() method immediately fails with the "unable to start discovery" exception then to fall back to the relection method which, until today, I have never needed to use.
Additional information: My application targets API level 8. Suspecting that the RFCOMM connect bug affects Android 2.2 and below, I tried switching to API level 10 just to see if it would have any effect on the behaviour of .createRfcommSocketToServiceRecord(), but the problem persisted: attempts to connect to the one Linvor module resulted in immediate IOException as described above.
Thanks - Trev
Struggling the same problem. Using API 10 on 2 phones. Both with Android 4.0.4.
One phone constantly failing with "Unable to start discovery" but works with reflection.
Second phone giving "Permission denied" with reflection but works with createRfcommSocketToServiceRecord().
And for research I checked android sources.
So it fails here in BluetoothSocket.java:
boolean inProgress = false;
try {
inProgress = service.fetchRemoteUuids(device.getAddress(), uuid, this);
} catch (RemoteException e) {Log.e(TAG, "", e);}
if (!inProgress) throw new IOException("Unable to start Service Discovery");
But fetchRemoteUuids() has many fail points and no, they don't throw exceptions just return false.
BluetoothService.java:
public synchronized boolean fetchRemoteUuids(String address, ParcelUuid uuid,
IBluetoothCallback callback) {
mContext.enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission");
if (!BluetoothAdapter.checkBluetoothAddress(address)) {
return false;
}
RemoteService service = new RemoteService(address, uuid);
if (uuid != null && mUuidCallbackTracker.get(service) != null) {
// An SDP query for this address & uuid is already in progress
// Do not add this callback for the uuid
return false;
}
if (mUuidIntentTracker.contains(address)) {
// An SDP query for this address is already in progress
// Add this uuid onto the in-progress SDP query
if (uuid != null) {
mUuidCallbackTracker.put(new RemoteService(address, uuid), callback);
}
return true;
}
boolean ret;
if (getBondState(address) == BluetoothDevice.BOND_BONDED) {
String path = getObjectPathFromAddress(address);
if (path == null) return false;
// Use an empty string for the UUID pattern
ret = discoverServicesNative(path, "");
} else {
ret = createDeviceNative(address);
}
mUuidIntentTracker.add(address);
if (uuid != null) {
mUuidCallbackTracker.put(new RemoteService(address, uuid), callback);
}
Message message = mHandler.obtainMessage(MESSAGE_UUID_INTENT);
message.obj = address;
mHandler.sendMessageDelayed(message, UUID_INTENT_DELAY);
return ret;
}
Either native methods fail which leads us to drivers? Or "uuid is already in progress" part fails, because I don't see even a try to connect/scan uuid, just instantly getting exception.
Linvor 1.8 here.
I struggle with this device a lot. Your particular problem is one of the issues I encountered.
It can be resolved by pulling the reset pin down (jump the pin to GND with jumper wire) when the device is fully powered.
The reset pin is the 3rd pin from the bottom left of the device.
For me this will allow me to connect to the device once without reflection, but it can go back to the bad behavior again.
My suggestion is that you implement watchdog ping from android to the device and trigger reset command with the remaining GPIO pin when the timer reached.
As for why and what triggered the behavior. I still don't know, but hopefully someone will figure it out.
My suspect is that the device got stuck in an unknown state.

Problem with bluetooth on android 2.1 (samsung spica i5700) where pairing works but connection does not work

I have a Samsung Spica i5700 which I already have updated to Android 2.1. I am using the phone with an application called Run.GPS (http://www.rungps.net). This application logs data such as GPS position, route, speed, bearing etc. It can also log heartrate provided the user has a Zephyr HxM bluetooth heart rate monitor ("HxM"), which I do have.
I can pair the HxM to the phone through the standard bluetooth utility. I'm prompted for the PIN, which I enter and the device is shown as 'Paired but not connected'.
In the Run.GPS application itself, I click on 'Connect Heartrate Monitor'. This times out after about 30 seconds and the error message is 'Could not connect to heartrate monitor. Please try other settings'.
I used a friend's HTC Windows Mobile as a control device to see if the HxM works there. It does. The Run.GPS application automatically sets the baud rate (initially to 9600 IIRC, though the connection also worked with higher baud rates) and it is possible to choose between various COM ports as well as a .Net COM port.
I did some testing on my Spica Android, to try to find out why the bluetooth connection doesn't work. Below are some log files that I connected over adb when I clicked on 'Connect to Heartrate Monitor' in the Run.GPS application.
I would be interested in any tips (including if I'm posting to the wrong forum here ;-)) - whether or not it's possible to experiment with the baud rate in Android etc. I still don't know if the problem is with the Run.GPS application (I've posted already on the development forum there) or with Android 2.1. I checked out another application - Endomondo - which is also a sport tracking application which supports heartrate monitor only with the HxM. There, what looked like exactly the same error occurred - I clicked on 'Connect Zephyr HxM'. For a few seconds I was shown the 'Connecting...' status, but then it timed out into 'Not Connected'. I'm thus tending towards looking at Android for the problem.
Here's the output of adb logcat while trying to connect
./adb logcat | grep Run.GPS
D/WYNEX> (11551): Excute :: Run.GPS Trainer UV, (null)
E/Run.GPS (11997): Cannot connect to BT device
E/Run.GPS (11997): java.io.IOException: Service discovery failed
E/Run.GPS (11997): at android.bluetooth.BluetoothSocket$SdpHelper.doSdp(BluetoothSocket.java:374)
E/Run.GPS (11997): at android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:184)
E/Run.GPS (11997): at ju.a(Unknown Source)
E/Run.GPS (11997): at qk.j(Unknown Source)
E/Run.GPS (11997): at fs.c(Unknown Source)
E/Run.GPS (11997): at le.a(Unknown Source)
E/Run.GPS (11997): at s.b(Unknown Source)
E/Run.GPS (11997): at pb.a(Unknown Source)
E/Run.GPS (11997): at as.a(Unknown Source)
E/Run.GPS (11997): at am.b(Unknown Source)
E/Run.GPS (11997): at gf.onTouchEvent(Unknown Source)
E/Run.GPS (11997): at android.view.View.dispatchTouchEvent(View.java:3709)
E/Run.GPS (11997): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
E/Run.GPS (11997): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
E/Run.GPS (11997): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1665)
E/Run.GPS (11997): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107)
E/Run.GPS (11997): at android.app.Activity.dispatchTouchEvent(Activity.java:2061)
E/Run.GPS (11997): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1649)
E/Run.GPS (11997): at android.view.ViewRoot.handleMessage(ViewRoot.java:1694)
E/Run.GPS (11997): at android.os.Handler.dispatchMessage(Handler.java:99)
E/Run.GPS (11997): at android.os.Looper.loop(Looper.java:123)
E/Run.GPS (11997): at android.app.ActivityThread.main(ActivityThread.java:4363)
E/Run.GPS (11997): at java.lang.reflect.Method.invokeNative(Native Method)
E/Run.GPS (11997): at java.lang.reflect.Method.invoke(Method.java:521)
E/Run.GPS (11997): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
E/Run.GPS (11997): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
E/Run.GPS (11997): at dalvik.system.NativeStart.main(Native Method)
E/Run.GPS (11997): Cannot connect to BT device
E/Run.GPS (11997): java.io.IOException: Service discovery failed
Here's the output of dmesg while trying to connect the heartrate monitor
<4>[74726.239833] select 11691 (.serviceModeApp), adj 15, size 3205, to kill
<4>[74726.240741] select 11739 (com.wssnps), adj 15, size 3207, to kill
<4>[74726.246870] select 11750 (id.partnersetup), adj 15, size 3219, to kill
<4>[74726.253390] select 11857 (p.bluetoothicon), adj 15, size 3299, to kill
<4>[74726.259879] select 13131 (ndroid.settings), adj 15, size 4586, to kill
<4>[74726.266372] send sigkill to 13131 (ndroid.settings), adj 15, size 4586
<7>[74733.945097] [BT] GPIO_BT_WAKE = 1
<7>[74733.945121] [BT] wake_lock(bt_wake_lock)
<7>[74733.951799] [BT] GPIO_BT_HOST_WAKE = 1
<7>[74733.951822] [BT] wake_lock timeout = 5 sec
<7>[74735.890196] [BT] GPIO_BT_HOST_WAKE = 0
<7>[74736.150987] [BT] GPIO_BT_HOST_WAKE = 1
<7>[74736.151009] [BT] wake_lock timeout = 5 sec
<7>[74737.490185] [BT] GPIO_BT_HOST_WAKE = 0
<7>[74740.073913] [BT] GPIO_BT_HOST_WAKE = 1
<7>[74740.073948] [BT] wake_lock timeout = 5 sec
<7>[74741.315336] [BT] GPIO_BT_HOST_WAKE = 0
<7>[74743.249747] [BT] GPIO_BT_HOST_WAKE = 1
<7>[74743.249768] [BT] wake_lock timeout = 5 sec
<7>[74744.865099] [BT] GPIO_BT_HOST_WAKE = 0
<7>[74745.154487] [BT] GPIO_BT_HOST_WAKE = 1
<7>[74745.154509] [BT] wake_lock timeout = 5 sec
<7>[74748.852534] [BT] GPIO_BT_HOST_WAKE = 0
<7>[74749.156256] [BT] GPIO_BT_HOST_WAKE = 1
<7>[74749.156278] [BT] wake_lock timeout = 5 sec
<7>[74750.490018] [BT] GPIO_BT_HOST_WAKE = 0
<4>[74754.230424] select 11691 (.serviceModeApp), adj 15, size 3191, to kill
<4>[74754.231326] select 11739 (com.wssnps), adj 15, size 3193, to kill
<4>[74754.237473] select 11750 (id.partnersetup), adj 15, size 3205, to kill
<4>[74754.243950] select 11857 (p.bluetoothicon), adj 15, size 3283, to kill
<4>[74754.250452] select 13140 (com.svox.pico), adj 15, size 3465, to kill
<4>[74754.256787] send sigkill to 13140 (com.svox.pico), adj 15, size 3465
Here's the logcat output when I click 'connect zephyr' in Endomondo
I/PUSH Event(19147): MotionEvent : QueuedEvent{43d7d480 MotionEvent{440b5680 action=1 x=228.28438 y=212.55624 pressure=0.0 size=0.0}}
D/BluetoothZephyrService(23605): connect to: 00:07:80:88:F5:AD
D/BluetoothSocket(23605): BluetoothSocket created fd: -1uuid00001101-0000-1000-8000-00805f9b34fbport -1
D/BluetoothSocket.cpp(23605): initSocketNative
I/BLZ20_WRAPPER(23605): blz20_wrp_socket: fam 31, type 1, prot BTPROTO_RFCOMM
D/BLZ20_WRAPPER(23605): blz20_init: initializing...
D/BTL_IFC_WRP(23605): wsactive_init: init active list
I/BTL_IFC (23605): main_client_thread: Client main thread starting
D/BLZ20_WRAPPER(23605): blz20_init: success
I/BTL_IFC (23605): BTL_IFC_RegisterSubSystem: Register subsystem [(null)]
I/BTL_IFC (23605): btl_ifc_ctrl_connect: Connect control channel for subsystem [(null)]
D/BTL_IFC_WRP(23605): wrp_sock_create: CTRL
D/BTL_IFC_WRP(23605): wrp_alloc_new_sock: wrp_alloc_new_sock sub 1
D/BTL_IFC_WRP(23605): wrp_sock_create: 28
D/BTL_IFC_WRP(23605): wrp_sock_connect: wrp_sock_connect 127.0.0.1:9000 (28)
I/BTL-IFS (21889): main_server_thread: [CTRL] Client connected (14)
I/BTL_IFC_WRP(23605): wrp_sock_connect: Connected. (28)
I/BTL_IFC (23605): send_ctrl_msg: [BTL_IFC CTRL] send BTLIF_REGISTER_SUBSYS_REQ ((null)) 0 pbytes (hdl 28)
I/BTL-IFS (21889): attach_client: multiclient index 1
I/BTL-IFS (21889): attach_client: ######## Attached client subsystem (14) ########
I/BTL-IFS (21889): btl_if_notify_local_event: Notify local event BTLIF_SUBSYSTEM_ATTACHED
D/ (21889): btlif_bts_api_ctrl_cb: btlif_bts_api_ctrl_cb : id BTLIF_SUBSYSTEM_ATTACHED (4112) on hdl 14
I/ (21889): btlif_rfc_ctrl_chan_attached: client attached ctrl handle 14
D/BTL-IFS (21889): send_registration_rsp: send_registration_rsp [0]
I/BTL-IFS (21889): send_ctrl_msg: [BTL_IFS CTRL] send BTLIF_REGISTER_SUBSYS_RSP (CTRL) 2 pbytes (hdl 14)
D/BTL_IFC (23605): BTL_IFC_RegisterSubSystem: add new ctrl fd to active set
D/BTL_IFC_WRP(23605): wrp_wsock_create: (null)
D/BTL_IFC_WRP(23605): wrp_alloc_new_sock: wrp_alloc_new_sock sub 15
D/BTL_IFC_WRP(23605): wrp_wsock_create: 32
D/BLZ20_WRAPPER(23605): btsk_alloc_add: success
I/BLZ20_WRAPPER(23605): blz20_wrp_socket: return 32
D/BLZ20_WRAPPER(23605): blz20_wrp_setsockopt: fd (-1:32), bta -1, rc 0, wflags 0x0
I/BLZ20_WRAPPER(23605): blz20_wrp_setsockopt: configure rfcomm lm mode 0x26, (master:0, auth 1, enc 1)
I/BLZ20_WRAPPER(23605): blz20_wrp_setsockopt: success
D/BLZ20_WRAPPER(23605): blz20_wrp_setsockopt: fd (-1:32), bta -1, rc 0, wflags 0x0
I/BLZ20_WRAPPER(23605): blz20_wrp_setsockopt: configure rfcomm sndbuf len 71680 bytes
I/BLZ20_WRAPPER(23605): blz20_wrp_setsockopt: success
D/BluetoothSocket.cpp(23605): ...fd 32 created (RFCOMM, lm = 26)
D/BluetoothSocket.cpp(23605): initSocketFromFdNative
D/BluetoothZephyrService(23605): setState() 0 -> 2
I/BluetoothZephyrService(23605): BEGIN mConnectThread
E/BluetoothService.cpp(19147): stopDiscoveryNative: D-Bus error in StopDiscovery: org.bluez.Error.Failed (Invalid discovery session)
D/BluetoothSocket(23605): connect
D/BluetoothSocket(23605): doSdp
I/BluetoothService.cpp(19147): ... Object Path = /org/bluez/21902/hci0/dev_00_07_80_88_F5_AD
I/BluetoothService.cpp(19147): ... Pattern = 00001101-0000-1000-8000-00805f9b34fb, strlen = 36
I/BluetoothZephyr(23605): MESSAGE_STATE_CHANGE: 2
D/DEVICE (21902): *************DiscoverServices********
I/DTUN_HCID(21902): dtun_client_get_remote_svc_channel: starting discovery on (uuid16=0x0011)
I/DTUN_HCID(21902): bdaddr=00:07:80:88:F5:AD
I/DTUN_CLNT(21902): Client calling DTUN_METHOD_DM_GET_REMOTE_SERVICE_CHANNEL (id 4)
I/ (21889): DTUN_ReceiveCtrlMsg: [DTUN] Received message [BTLIF_DTUN_METHOD_CALL] 4354
I/ (21889): handle_method_call: handle_method_call :: received DTUN_METHOD_DM_GET_REMOTE_SERVICE_CHANNEL (id 4), len 134
E/BTLD (21889): ****************search UUID = 1101***********
I//system/bin/btld(21888): btapp_dm_GetRemoteServiceChannel()
W/BTLD (21889): SDP - Rcvd conn cnf with error: 0x4 CID 0x42
I/BTL-IFS (21889): send_ctrl_msg: [BTL_IFS CTRL] send BTLIF_DTUN_SIGNAL_EVT (CTRL) 13 pbytes (hdl 10)
I/DTUN_CLNT(21902): dtun-rx signal [DTUN_SIG_DM_RMT_SERVICE_CHANNEL] (id 42) len 15
I/DTUN_HCID(21902): dtun_dm_sig_rmt_service_channel: success=1, service=00000000
E/DTUN_HCID(21902): discovery unsuccessful!
V/BluetoothEventRedirector(21741): Received android.bleutooth.device.action.UUID
E/CachedBluetoothDevice(21741): onUuidChanged: Time since last connect9266997
D/BluetoothService(19147): Cleaning up failed UUID channel lookup: 00:07:80:88:F5:AD 00001101-0000-1000-8000-00805f9b34fb
D/BluetoothSocket(23605): onRfcommChannelFound -1
D/BluetoothZephyrService(23605): setState() 2 -> 1
D/BluetoothSocket(23605): close
D/BluetoothSocket(23605): cancel
D/BluetoothSocket.cpp(23605): abortNative
D/BluetoothSocket.cpp(23605): ...asocket_abort(32) complete
D/BluetoothSocket.cpp(23605): destroyNative
D/BluetoothSocket.cpp(23605): ...asocket_destroy(32) complete
D/BluetoothZephyrService(23605): start
D/BluetoothSocket(23605): close
D/BluetoothSocket(23605): BluetoothSocket created fd: -1uuidnullport 1
D/BluetoothSocket.cpp(23605): initSocketNative
I/BLZ20_WRAPPER(23605): blz20_wrp_socket: fam 31, type 1, prot BTPROTO_RFCOMM
D/BTL_IFC_WRP(23605): wrp_wsock_create: (null)
D/BTL_IFC_WRP(23605): wrp_alloc_new_sock: wrp_alloc_new_sock sub 15
D/BTL_IFC_WRP(23605): wrp_wsock_create: 32
D/BLZ20_WRAPPER(23605): btsk_alloc_add: success
D/BLZ20_WRAPPER(23605): btsk_dump_list: fd (-1:32), bta -1, rc 0, wflags 0x0
I/BLZ20_WRAPPER(23605): blz20_wrp_socket: return 32
E/BLZ20_WRAPPER(23605): ##### ERROR : btsk_check_duplicates: WARNING : duplicate entries found for key 4, val 32#####
D/BLZ20_WRAPPER(23605): btsk_check_duplicates: fd (-1:32), bta -1, rc 0, wflags 0x0
D/BLZ20_WRAPPER(23605): btsk_check_duplicates: fd (-1:32), bta -1, rc 0, wflags 0x0
E/BLZ20_WRAPPER(23605): ##### ERROR : btsk_check_duplicates: ### ASSERT : frameworks/base/core/jni/../../../../vendor/brcm/adaptation/btl-if/client/blz20_wrapper.c line 534 duplicates found (2) ########
D/BLZ20_WRAPPER(23605): blz20_wrp_setsockopt: fd (-1:32), bta -1, rc 0, wflags 0x0
I/BLZ20_WRAPPER(23605): blz20_wrp_setsockopt: configure rfcomm lm mode 0x26, (master:0, auth 1, enc 1)
I/BLZ20_WRAPPER(23605): blz20_wrp_setsockopt: success
E/BLZ20_WRAPPER(23605): ##### ERROR : btsk_check_duplicates: WARNING : duplicate entries found for key 4, val 32#####
D/BLZ20_WRAPPER(23605): btsk_check_duplicates: fd (-1:32), bta -1, rc 0, wflags 0x0
D/BLZ20_WRAPPER(23605): btsk_check_duplicates: fd (-1:32), bta -1, rc 0, wflags 0x0
E/BLZ20_WRAPPER(23605): ##### ERROR : btsk_check_duplicates: ### ASSERT : frameworks/base/core/jni/../../../../vendor/brcm/adaptation/btl-if/client/blz20_wrapper.c line 534 duplicates found (2) ########
D/BLZ20_WRAPPER(23605): blz20_wrp_setsockopt: fd (-1:32), bta -1, rc 0, wflags 0x0
I/BLZ20_WRAPPER(23605): blz20_wrp_setsockopt: configure rfcomm sndbuf len 71680 bytes
I/BLZ20_WRAPPER(23605): blz20_wrp_setsockopt: success
D/BluetoothSocket.cpp(23605): ...fd 32 created (RFCOMM, lm = 26)
D/BluetoothSocket.cpp(23605): initSocketFromFdNative
D/BluetoothSocket(23605): bindListen
D/BluetoothSocket.cpp(23605): bindListenNative
I/BLZ20_WRAPPER(23605): blz20_wrp_bind: s 32
E/BLZ20_WRAPPER(23605): ##### ERROR : btsk_check_duplicates: WARNING : duplicate entries found for key 4, val 32#####
D/BLZ20_WRAPPER(23605): btsk_check_duplicates: fd (-1:32), bta -1, rc 0, wflags 0x0
D/BLZ20_WRAPPER(23605): btsk_check_duplicates: fd (-1:32), bta -1, rc 0, wflags 0x0
E/BLZ20_WRAPPER(23605): ##### ERROR : btsk_check_duplicates: ### ASSERT : frameworks/base/core/jni/../../../../vendor/brcm/adaptation/btl-if/client/blz20_wrapper.c line 534 duplicates found (2) ########
D/BLZ20_WRAPPER(23605): blz20_wrp_bind: bind socket fd (-1:32), bta -1, rc 0, wflags 0x0
D/BLZ20_WRAPPER(23605): __bind_prot_rfcomm: rc_chan 1
D/BTL_IFC_WRP(23605): wrp_sock_bind: wrp_sock_bind on port 9050
I/BLZ20_WRAPPER(23605): blz20_wrp_listen: s 32, backlog 1
E/BLZ20_WRAPPER(23605): ##### ERROR : btsk_check_duplicates: WARNING : duplicate entries found for key 4, val 32#####
D/BLZ20_WRAPPER(23605): btsk_check_duplicates: fd (-1:32), bta -1, rc 1, wflags 0x0
D/BLZ20_WRAPPER(23605): btsk_check_duplicates: fd (-1:32), bta -1, rc 0, wflags 0x0
E/BLZ20_WRAPPER(23605): ##### ERROR : btsk_check_duplicates: ### ASSERT : frameworks/base/core/jni/../../../../vendor/brcm/adaptation/btl-if/client/blz20_wrapper.c line 534 duplicates found (2) ########
D/BLZ20_WRAPPER(23605): blz20_wrp_listen: fd (-1:32), bta -1, rc 1, wflags 0x0
D/BLZ20_WRAPPER(23605): btlif_send_msg_wait_response: send BTLIF_BTS_RFC_LISTEN_REQ, wait for |BTLIF_BTS_RFC_LISTEN_RSP|
D/BTL_IFC (23605): BTL_IFC_CtrlSend: BTL_IFC_CtrlSend
I/BTL_IFC (23605): send_ctrl_msg: [BTL_IFC CTRL] send BTLIF_BTS_RFC_LISTEN_REQ ((null)) 20 pbytes (hdl 28)
D/ (21889): btlif_bts_api_ctrl_cb: btlif_bts_api_ctrl_cb : id BTLIF_BTS_RFC_LISTEN_REQ (4433) on hdl 14
I/ (21889): btlif_rfc_listen_req: Allocated dynamic server channel 4
D/ (21889): bts_chan_alloc_add: bts_chan_alloc_add : success (tot 1)
D/ (21889): bts_chan_dump_all: ### channel list ###
D/ (21889): bts_chan_dump_all: type 3, dhdl -1, bta_hdl -1, scn -1, phdl 65535, lstpnd 0, -1:-1 (L:D)
I/ (21889): btlif_rfc_listen_req: start rfcomm server on scn 4, role 1, sec_mask 0x30
D/ (21889): jw_if_rfcomm_srv_cback: event=BTA_JV_RFCOMM_START_EVT
I/ (21889): jw_if_rfcomm_srv_cback: [BTA_JV_RFCOMM_START_EVT] start status: 0, handle:0, security id: 47
I/ (21889): jv_rfc_srv_listen_started: jv_rfc_srv_listen_started
I/BTL-IFS (21889): send_ctrl_msg: [BTL_IFS CTRL] send BTLIF_BTS_RFC_LISTEN_RSP () 17 pbytes (hdl 14)
I/BTL_IFC (23605): btl_ifc_ctrl_rx: [BTL_IFC CTRL] recv BTLIF_BTS_RFC_LISTEN_RSP ((null)) 19 pbytes (hdl 28)
I/BLZ20_WRAPPER(23605): btlif_ctrl_callback: btlif_ctrl_callback : msg id BTLIF_BTS_RFC_LISTEN_RSP
E/BLZ20_WRAPPER(23605): ##### ERROR : btsk_check_duplicates: WARNING : duplicate entries found for key 4, val 32#####
D/BLZ20_WRAPPER(23605): btsk_check_duplicates: fd (-1:32), bta -1, rc 1, wflags 0x2
D/BLZ20_WRAPPER(23605): btsk_check_duplicates: fd (-1:32), bta -1, rc 0, wflags 0x0
E/BLZ20_WRAPPER(23605): ##### ERROR : btsk_check_duplicates: ### ASSERT : frameworks/base/core/jni/../../../../vendor/brcm/adaptation/btl-if/client/blz20_wrapper.c line 534 duplicates found (2) ########
I/BLZ20_WRAPPER(23605): btlif_process_listen_rsp: listen response for bta hdl 0
D/BLZ20_WRAPPER(23605): btlif_signal_event: fd (-1:32), bta 0, rc 1, wflags 0x2
D/BLZ20_WRAPPER(23605): btlif_signal_event: event BTLIF_BTS_RFC_LISTEN_RSP matched
D/BLZ20_WRAPPER(23605): btlif_send_msg_wait_response: unblocked fd (-1:32), bta 0, rc 1, wflags 0x0
I/BLZ20_WRAPPER(23605): __listen_prot_rfcomm: success, scn 4
D/BTL_IFC_WRP(23605): wrp_sock_listen_bl: wrp_sock_listen_bl : fd 32 127.0.0.1:9050 backlog 1
I/BLZ20_WRAPPER(23605): __listen_prot_rfcomm: success
D/BluetoothSocket.cpp(23605): ...bindListenNative(32) success
I/DTUN_CLNT(21902): Client calling DTUN_METHOD_DM_ADD_SDP_REC (id 17)
I/ (21889): DTUN_ReceiveCtrlMsg: [DTUN] Received message [BTLIF_DTUN_METHOD_CALL] 4354
I/ (21889): handle_method_call: handle_method_call :: received DTUN_METHOD_DM_ADD_SDP_REC (id 17), len 270
I/ (21889): btapp_bts_convert_rc_chan_to_scn: found scn 4
I/BTL-IFS (21889): send_ctrl_msg: [BTL_IFS CTRL] send BTLIF_DTUN_SIGNAL_EVT (CTRL) 12 pbytes (hdl 10)
I/DTUN_CLNT(21902): dtun-rx signal [DTUN_SIG_DM_SDP_REC_HANDLE] (id 50) len 14
I/DTUN_HCID(21902): dtun_dm_sig_sdp_rec_handle: handle = 0x10006
D/BluetoothService(19147): new handle 0
I/BluetoothZephyr(23605): MESSAGE_STATE_CHANGE: 1
I/BluetoothZephyr(23605): Unable to connect device
D/BluetoothZephyrService(23605): setState() 1 -> 1
D/BluetoothZephyrService(23605): BEGIN mAcceptThreadThread[Thread-9,5,main]
D/BluetoothSocket(23605): accept
D/BluetoothSocket.cpp(23605): acceptNative
I/BluetoothZephyr(23605): MESSAGE_STATE_CHANGE: 1
D/WynexActivity(19215): <><><>ACTION ::android.intent.action.TIME_TICK
D/LocationMasfClient(19147): getNetworkLocation(): Location not found in cache, making network request
D/ProtoRequestListener(19147): requestFailed()
I/power (19147): *** set_screen_state 0
I got this information from the gps-sport forum. Not sure what to do with it though...
See also http://www.gps-sport.net/forums/thread/1532-0/Keine-Sprachausgabe-auf-HTC-Desire
Cross posting this entry from the software category. The thread over there deals with the Zephyr HxM as a secondary issue - meaning it mightn't be easy to find...
24.04.2010 16:47:05 UTC geändert am 24.04.2010 17:03:03 UTC
A fix to the bluetooth connection problem
Hi
If this problem still is not resolved, the code below describes how to make the connection work with Android 2.1 (Tested on HTC Desire). Just replace "00:07:80:89:EE:EB" with the MAC of your HXM to make it connect. After the connection is successful, a regular method with input = socket.getInputStream() can be used.
BluetoothDevice hxm = BluetoothAdapter.getDefaultAdapter().getRemoteDevice("00:07:80:89:EE:EB");
Method m = hxm.getClass().getMethod("createRfcommSocket", new Class[]{int.class});
socket = (BluetoothSocket)m.invoke(hxm, Integer.valueOf(1));
socket.connect();
Hope the fix will be out very soon =)
Best regards
Espen S. Nygaard
Ok, solved it.
The solution is to update the firmware on the phone. I now have:
PDA: I570EXXJE1
PHONE: i570EXXJD1
CSC: I570EOXEJE1
and bluetooth spp worked 'out of the box'.
Look at http://samsung-firmwares.com for both the latest firmware as well as programs to flash the phone (odin) and details/tutorials.
This thread over at Google Groups (android-developers) is also interesting:
'
Is Google working on the Bluetooth bug? Any estimated date of completion? '
------ VERSION INFO ------
currenttime=Sat May 1 21:31:48 CEST 2010
kernel.version=Linux version 2.6.29 (root#SE-S611) (gcc version 4.3.1
(for S3C64XX Samsung Electronics AP Development Team) ) #2 Sat Mar 13
02:28:48 KST 2010
kernel.cmdline=# begin build properties
autogenerated by buildinfo.sh
ro.build.id=ECLAIR
ro.build.display.id=ECLAIR.XXJCB
ro.build.version.incremental=XXJCB
ro.build.version.sdk=7
ro.build.version.codename=REL
ro.build.version.release=2.1-update1
ro.build.date=2010. 03. 13. (토) 02:07:55 KST
ro.build.date.utc=1268413675
ro.build.type=user
ro.build.user=root
ro.build.host=SE-S611
ro.build.tags=ota-rel-keys,release-keys
ro.product.model=GT-I5700
ro.product.brand=Samsung
ro.product.name=GT-I5700
ro.product.device=GT-I5700
ro.product.board=GT-I5700
ro.product.cpu.abi=armeabi
ro.product.manufacturer=Samsung
ro.product.locale.language=en
ro.product.locale.region=GB
ro.wifi.channels=
ro.board.platform=s3c6410
ro.build.product is obsolete; use ro.product.device
ro.build.product=GT-I5700
Do not try to parse ro.build.description or .fingerprint
ro.build.description=GT-I5700-user 2.1-update1 ECLAIR XXJCB ota-rel-
keys,release-keys
ro.build.fingerprint=Samsung/GT-I5700/GT-I5700/GT-I5700:2.1-update1/
ECLAIR/XXJCB:user/ota-rel-keys,release-keys
Samsung Specific Properties
ro.build.PDA=I570EXXJCB
ro.build.Phone=I570EXXJCB
ro.build.HW=REV 0.1
ro.build.RFCallDate=2009.02.25
ro.build.hidden_ver=I570EXXJCB
ro.build.changelist=193516
ro.build.FUSDLMode=Change
ro.build.SupportFUS=TRUE
ro.build.CGMM=GT-I5700
ro.build.GMM=GT-I5700
end build properties
#
system.prop for spica
I found this exact problem happens when one of the devices has the Bluetooth turned off.
https://android.git.kernel.org/?p=platform/system/wlan/broadcom.git;a=commit;h=e10efcc0c020caa486fa9d8cd05c986fd86f7c44
may solve this. The commit log is:
"Add firmware for BCM4325"
If there was no firmware in the kernel to support this before, then it obviously would cause problems.
I guess I'll have to see if I can build android from source and install it on my phone :-(

Categories

Resources