1

I am testing the StarIOSDK v340 on my Samsung Note II running Android 4.1.2 and HTC ONE X running CM10.1. After installing the demo application into both phones, the app was able to see the SM-S301(ARM) (Firmware v1.0 2010/01/05) attached via Bluetooth, but when I tap the "Get Status" button, the app prompts the following error:

Failure Failed to connect to printer

This is what I got from 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]}

This is from 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

This is DDMS (NOTE 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

This is logcat (NOTE 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)

I then tried install the demo app from the store and even that threw the vague error message.

Any advice?

Ivan Ling
  • 11
  • 3
  • I added a blockquote to your error message, so that it jumps out at forum users. This makes it more useable and increases the likelihood of you getting a response. – Ashwin Balamohan Mar 08 '13 at 06:21
  • Thanks. Apologies for the horrendous formatting. I'm new to Stack Overflow. – Ivan Ling Mar 08 '13 at 06:24
  • Not horrendous at all! I'm fairly new myself, but from what I've seen, nice formatting, clear questions and posting past attempts as well as error messages all go a long way. Unfortunately I'm not able to answer your question. Good luck! – Ashwin Balamohan Mar 08 '13 at 06:30

0 Answers0