1

我正在运行 Android 4.1.2 的三星 Note II 和运行 CM10.1 的 HTC ONE X 上测试 StarIOSDK v340。将演示应用程序安装到两部手机后,应用程序能够看到通过蓝牙连接的 SM-S301(ARM) (Firmware v1.0 2010/01/05),但是当我点击“获取状态”按钮时,应用程序提示如下错误:

失败 连接打印机失败

这就是我从 DDMS (HTC ONE X) 得到的

> 03-08 13:48:42.573: W/BluetoothAdapter(32065): getBluetoothService()
> called with no BluetoothManagerCallback 03-08 13:48:42.583:
> D/BluetoothSocket(32065): connect(), SocketState: INIT, mPfd:
> {ParcelFileDescriptor: FileDescriptor[48]}

这是来自 logcat(HTC ONE X):

    D/BluetoothAdapterService(1090961856)(14494): getState(): mAdapterProperties: com.android.bluetooth.btservice.AdapterProperties@4106c550
    D/BluetoothAdapterService(1090961856)(14494): getState(): mAdapterProperties: com.android.bluetooth.btservice.AdapterProperties@4106c550
    D/BluetoothAdapterService(1090961856)(14494): Get Bonded Devices being called
    D/BluetoothAdapterService(1090961856)(14494): getState(): mAdapterProperties: com.android.bluetooth.btservice.AdapterProperties@4106c550
    W/BluetoothAdapter(19922): getBluetoothService() called with no BluetoothManagerCallback
    D/BTIF_SOCK(14494): service_uuid: 00001101-0000-1000-8000-00805f9b34fb
    D/BluetoothSocket(19922): connect(), SocketState: INIT, mPfd: {ParcelFileDescriptor: FileDescriptor[49]}
    I/        (14494): vendor op - 7
    D/dalvikvm( 1562): GC_EXPLICIT freed <1K, 79% free 2366K/10876K, paused 1ms+2ms, total 17ms
    I/        (14494): vendor op - 7
    I/        (14494): vendor op - 7
    I/        (14494): vendor op - 7
    I/        (14494): vendor op - 7
    I/        (14494): vendor op - 7
    I/        (14494): vendor op - 7
    I/        (14494): vendor op - 7
    I/        (14494): vendor op - 7
    I/        (14494): vendor op - 7
    W/bt-btif (14494): info:x10
    I/        (14494): vendor op - 7
    I/        (14494): vendor op - 7
    D/BluetoothAdapterService(1090961856)(14494): getState(): mAdapterProperties: com.android.bluetooth.btservice.AdapterProperties@4106c550
    D/BluetoothManagerService(  607): Message: 20
    D/BluetoothManagerService(  607): Added callback: android.bluetooth.IBluetoothManagerCallback$Stub$Proxy@419cda80:true
    I/HeadsetService(18313): Headset=false; Bluetooth=false
    I/        (14494): vendor op - 7
    I/        (14494): vendor op - 7
    I/        (14494): vendor op - 7
    I/        (14494): vendor op - 7
    I/        (14494): vendor op - 7
    W/bt-sdp  (14494): process_service_search_attr_rsp
    I/        (14494): vendor op - 7
    I/        (14494): vendor op - 7
    I/        (14494): vendor op - 7
    I/        (14494): vendor op - 7
    I/        (14494): vendor op - 7
    I/        (14494): vendor op - 7
    I/        (14494): vendor op - 7
    I/        (14494): vendor op - 7
    I/        (14494): vendor op - 7
    I/        (14494): vendor op - 7
    I/        (14494): vendor op - 7
E/bt-rfcomm(14494): RFCOMM_CreateConnection - already opened state:2, RFC state:4, MCB state:5
E/bt-btif (14494): bta_jv_rfcomm_connect, RFCOMM_CreateConnection failed
W/bt-btif (14494): invalid rfc slot id: 105

这是 DDMS(注 2):

03-08 15:56:14.950: I/System.out(24466): debugger has settled (1446)
03-08 15:56:15.085: D/libEGL(24466): loaded /system/lib/egl/libEGL_mali.so
03-08 15:56:15.085: D/libEGL(24466): loaded /system/lib/egl/libGLESv1_CM_mali.so
03-08 15:56:15.090: D/libEGL(24466): loaded /system/lib/egl/libGLESv2_mali.so
03-08 15:56:15.090: D/(24466): Device driver API match
03-08 15:56:15.090: D/(24466): Device driver API version: 10
03-08 15:56:15.090: D/(24466): User space API version: 10 
03-08 15:56:15.090: D/(24466): mali: REVISION=Linux-r2p4-02rel0 BUILD_DATE=Tue Oct 16 15:37:13 KST 2012 
03-08 15:56:15.120: D/OpenGLRenderer(24466): Enabling debug mode 0
03-08 15:56:27.650: D/GestureDetector(24466): [Surface Touch Event] mSweepDown False, mLRSDCnt : -1 mTouchCnt : 2 mFalseSizeCnt:0
03-08 15:56:27.770: E/SensorManager(24466): thread start
03-08 15:56:27.775: D/SensorManager(24466): registerListener :: handle = 0  name= LSM330DLC Acceleration Sensor delay= 200000 Listener= android.view.OrientationEventListener$SensorEventListenerImpl@41d35578
03-08 15:56:27.795: D/dalvikvm(24466): GC_CONCURRENT freed 63K, 5% free 12560K/13191K, paused 4ms+1ms, total 14ms
03-08 15:56:27.795: D/dalvikvm(24466): WAIT_FOR_CONCURRENT_GC blocked 3ms
03-08 15:56:27.870: D/SensorManager(24466): unregisterListener::  Listener= android.view.OrientationEventListener$SensorEventListenerImpl@41d35578
03-08 15:56:27.870: D/Sensors(24466): Remain listener = Sending .. normal delay 200ms
03-08 15:56:27.870: I/Sensors(24466): sendDelay --- 200000000
03-08 15:56:27.870: D/SensorManager(24466): JNI - sendDelay
03-08 15:56:27.870: I/SensorManager(24466): Set normal delay = true
03-08 15:56:27.895: D/SensorManager(24466): registerListener :: handle = 0  name= LSM330DLC Acceleration Sensor delay= 200000 Listener= android.view.OrientationEventListener$SensorEventListenerImpl@41d35578
03-08 15:56:30.825: D/GestureDetector(24466): [Surface Touch Event] mSweepDown False, mLRSDCnt : -1 mTouchCnt : 2 mFalseSizeCnt:0
03-08 15:56:30.865: D/dalvikvm(24466): GC_CONCURRENT freed 80K, 5% free 12917K/13575K, paused 1ms+1ms, total 11ms
03-08 15:56:30.870: D/AbsListView(24466): Get MotionRecognitionManager
03-08 15:56:30.950: D/dalvikvm(24466): GC_CONCURRENT freed 54K, 5% free 13336K/13959K, paused 1ms+12ms, total 26ms
03-08 15:56:30.980: E/Dynamiclayout(24466): java.lang.IndexOutOfBoundsException: charAt: 0 >= length 0
03-08 15:56:30.990: E/Dynamiclayout(24466): java.lang.IndexOutOfBoundsException: charAt: 0 >= length 0
03-08 15:56:31.000: E/Dynamiclayout(24466): java.lang.IndexOutOfBoundsException: charAt: 0 >= length 0
03-08 15:56:31.005: E/Dynamiclayout(24466): java.lang.IndexOutOfBoundsException: charAt: 0 >= length 0
03-08 15:56:31.015: E/Dynamiclayout(24466): java.lang.IndexOutOfBoundsException: charAt: 0 >= length 0
03-08 15:56:31.025: E/Dynamiclayout(24466): java.lang.IndexOutOfBoundsException: charAt: 0 >= length 0
03-08 15:56:31.055: E/Dynamiclayout(24466): java.lang.IndexOutOfBoundsException: charAt: 0 >= length 0
03-08 15:56:31.060: E/Dynamiclayout(24466): java.lang.IndexOutOfBoundsException: charAt: 0 >= length 0
03-08 15:56:31.095: E/Dynamiclayout(24466): java.lang.IndexOutOfBoundsException: charAt: 0 >= length 0
03-08 15:56:31.105: E/Dynamiclayout(24466): java.lang.IndexOutOfBoundsException: charAt: 0 >= length 0
03-08 15:56:31.115: E/Dynamiclayout(24466): java.lang.IndexOutOfBoundsException: charAt: 0 >= length 0
03-08 15:56:31.125: E/Dynamiclayout(24466): java.lang.IndexOutOfBoundsException: charAt: 0 >= length 0
03-08 15:56:31.135: E/Dynamiclayout(24466): java.lang.IndexOutOfBoundsException: charAt: 0 >= length 0
03-08 15:56:31.145: E/Dynamiclayout(24466): java.lang.IndexOutOfBoundsException: charAt: 0 >= length 0
03-08 15:56:31.185: D/SensorManager(24466): unregisterListener::  Listener= android.view.OrientationEventListener$SensorEventListenerImpl@41d35578
03-08 15:56:31.185: D/Sensors(24466): Remain listener = Sending .. normal delay 200ms
03-08 15:56:31.185: I/Sensors(24466): sendDelay --- 200000000
03-08 15:56:31.185: D/SensorManager(24466): JNI - sendDelay
03-08 15:56:31.185: I/SensorManager(24466): Set normal delay = true
03-08 15:56:31.210: E/Dynamiclayout(24466): java.lang.IndexOutOfBoundsException: charAt: 0 >= length 0
03-08 15:56:31.215: E/Dynamiclayout(24466): java.lang.IndexOutOfBoundsException: charAt: 0 >= length 0
03-08 15:56:31.225: E/Dynamiclayout(24466): java.lang.IndexOutOfBoundsException: charAt: 0 >= length 0
03-08 15:56:31.235: E/Dynamiclayout(24466): java.lang.IndexOutOfBoundsException: charAt: 0 >= length 0
03-08 15:56:31.245: E/Dynamiclayout(24466): java.lang.IndexOutOfBoundsException: charAt: 0 >= length 0
03-08 15:56:31.255: E/Dynamiclayout(24466): java.lang.IndexOutOfBoundsException: charAt: 0 >= length 0
03-08 15:56:31.995: D/GestureDetector(24466): [Surface Touch Event] mSweepDown False, mLRSDCnt : -1 mTouchCnt : 2 mFalseSizeCnt:0
03-08 15:56:32.145: D/SensorManager(24466): registerListener :: handle = 0  name= LSM330DLC Acceleration Sensor delay= 200000 Listener= android.view.OrientationEventListener$SensorEventListenerImpl@41d35578
03-08 15:56:33.175: D/GestureDetector(24466): [Surface Touch Event] mSweepDown False, mLRSDCnt : -1 mTouchCnt : 2 mFalseSizeCnt:0
03-08 15:56:33.210: V/BluetoothSocket.cpp(24466): initSocketNative
03-08 15:56:33.210: V/BluetoothSocket.cpp(24466): ...fd 53 created (RFCOMM, lm = 26)
03-08 15:56:33.210: V/BluetoothSocket.cpp(24466): initSocketFromFdNative
03-08 15:56:33.220: D/BluetoothUtils(24466): isSocketAllowedBySecurityPolicy start : device null
03-08 15:56:36.685: V/BluetoothSocket.cpp(24466): connectNative
03-08 15:56:37.015: V/BluetoothSocket.cpp(24466): ...connect(53, RFCOMM) = 111 (errno 111)
03-08 15:56:37.160: D/SensorManager(24466): unregisterListener::  Listener= android.view.OrientationEventListener$SensorEventListenerImpl@41d35578
03-08 15:56:37.160: D/Sensors(24466): Remain listener = Sending .. normal delay 200ms
03-08 15:56:37.160: I/Sensors(24466): sendDelay --- 200000000
03-08 15:56:37.160: D/SensorManager(24466): JNI - sendDelay
03-08 15:56:37.160: I/SensorManager(24466): Set normal delay = true
03-08 15:56:38.740: D/GestureDetector(24466): [Surface Touch Event] mSweepDown False, mLRSDCnt : -1 mTouchCnt : 2 mFalseSizeCnt:0
03-08 15:56:38.785: D/SensorManager(24466): registerListener :: handle = 0  name= LSM330DLC Acceleration Sensor delay= 200000 Listener= android.view.OrientationEventListener$SensorEventListenerImpl@41d35578

这是 logcat(注 2):

V/BluetoothSocket.cpp( 8598): initSocketNative
V/BluetoothSocket.cpp( 8598): ...fd 53 created (RFCOMM, lm = 26)
V/BluetoothSocket.cpp( 8598): initSocketFromFdNative
I/BluetoothPolicyService( 2480): getBluetoothDataTransferAllowed 
W/BluetoothPolicyService( 2480): com.android.server.enterprise.EdmStorageProvider$SettingNotFoundException: Admin data is null
D/BluetoothPolicyService( 2480): MDM: isProfileEnabled = true
W/BluetoothPolicyService( 2480): com.android.server.enterprise.EdmStorageProvider$SettingNotFoundException: Admin data is null
D/BluetoothUtils( 8598): isSocketAllowedBySecurityPolicy start : device null
V/BluetoothService.cpp( 2480): createDeviceNative
V/BluetoothService.cpp( 2480): createDeviceNative
V/BluetoothEventLoop.cpp( 2480): onCreateDeviceResult
V/BluetoothEventLoop.cpp( 2480): onCreateDeviceResult
E/BluetoothEventLoop.cpp( 2480): onCreateDeviceResult: D-Bus error: org.bluez.Error.AlreadyExists (Already Exists)
V/BluetoothService.cpp( 2480): discoverServicesNative
V/BluetoothService.cpp( 2480): ... Object Path = /org/bluez/12444/hci0/dev_00_15_0E_E0_BC_79
V/BluetoothService.cpp( 2480): ... Pattern = , strlen = 0
W/AlarmManager( 2480): FACTORY_ON= 0
V/BluetoothEventLoop.cpp( 2480): event_filter: Received signal org.bluez.Device:PropertyChanged from /org/bluez/12444/hci0/dev_00_15_0E_E0_BC_79
D/BluetoothEventLoop( 2480): Device property changed
D/BluetoothA2DPStateReceiver(12420): BluetoothA2DPStateReceiver constructor call()
D/BluetoothA2DPStateReceiver(12420): onReceive(): action = android.bluetooth.device.action.ACL_CONNECTED
D/BluetoothA2DPStateReceiver(12420): ACTION_ACL_CONNECTED
D/BluetoothA2DPSinkInfo(12420): checkBlackListCarkit() : isBlackListCarkit false
D/BluetoothNotiBroadcastReceiver( 6443): onReceive
V/BluetoothEventLoop.cpp( 2480): onDiscoverServicesResult
V/BluetoothEventLoop.cpp( 2480): ... Device Path = /org/bluez/12444/hci0/dev_00_15_0E_E0_BC_79
V/BluetoothService.cpp( 2480): getDevicePropertiesNative
V/BluetoothService.cpp( 2480): getDeviceServiceChannelNative
V/BluetoothService.cpp( 2480): ... pattern = 00001101-0000-1000-8000-00805f9b34fb
V/BluetoothService.cpp( 2480): ... attr_id = 0X4
V/BluetoothSocket.cpp( 8598): connectNative
V/BluetoothEventManager( 6443): Received android.bluetooth.device.action.UUID
I/CachedBluetoothDevice( 6443): updateProfiles
I/LocalBluetoothProfileManager( 6443): updateProfiles
D/BluetoothDevicePreference( 6443): Is my device connected::false
I/BluetoothDevicePreference( 6443): summaryResId != 0
D/BluetoothDevicePreference( 6443): Is my device connected::false
I/BluetoothDevicePreference( 6443): summaryResId != 0
D/BluetoothDevicePreference( 6443): Is my device connected::false
I/BluetoothDevicePreference( 6443): summaryResId != 0
D/BluetoothDevicePreference( 6443): Is my device connected::false
I/BluetoothDevicePreference( 6443): summaryResId != 0
D/BluetoothDevicePreference( 6443): Is my device connected::false
I/BluetoothDevicePreference( 6443): summaryResId != 0
D/BluetoothDevicePreference( 6443): Is my device connected::false
I/BluetoothDevicePreference( 6443): summaryResId != 0
D/BluetoothDevicePreference( 6443): Is my device connected::false
I/BluetoothDevicePreference( 6443): summaryResId != 0
V/AlarmManager( 2480): waitForAlarm result :1
V/AlarmManager( 2480): trigger ELAPSED_REALTIME_WAKEUP or RTC_WAKEUP
I/EventLogService( 6454): Aggregate from 1362723789949 (log), 1362723789949 (data)
W/AlarmManager( 2480): FACTORY_ON= 0
D/dalvikvm( 6454): GC_CONCURRENT freed 409K, 8% free 13296K/14407K, paused 2ms+2ms, total 17ms
V/BluetoothSocket.cpp( 8598): ...connect(53, RFCOMM) = 111 (errno 111)

然后我尝试从商店安装演示应用程序,甚至抛出了模糊的错误消息。

有什么建议吗?

4

0 回答 0