ytai / ioio

Software, firmware and hardware of the IOIO - I/O for Android
Apache License 2.0
747 stars 355 forks source link

IOIO should work with Nexus 5 over OpenAccessory but doesn't #76

Closed ericroy closed 10 years ago

ericroy commented 10 years ago

I have a Nexus 5 and I'm available to help out with diagnostics/troubleshooting

ytai commented 10 years ago

Have you tried v5? I've made some changes that might help.

masshabit commented 10 years ago

Yes, I've tried the new v5 release with no luck - seems to exhibit the same problem as with v4

masshabit commented 10 years ago

Let me know if you'd like to see a log of HelloIOIO running with v5 firmware

ytai commented 10 years ago

Yes please. We're talking about HelloIOIO from the v5 software bundle, right?

On Thu, Jan 16, 2014 at 9:31 AM, MassHabit Games notifications@github.comwrote:

Let me know if you'd like to see a log of IOIOHello running with v5 firmware

— Reply to this email directly or view it on GitHubhttps://github.com/ytai/ioio/issues/76#issuecomment-32491273 .

masshabit commented 10 years ago

Correct, i'll do this today and get back to you

ericroy commented 10 years ago
ioio\software\IOIODude\bin>ioiodude.bat --port=COM4 write ..\..\..\release\firmware\application\App-IOIO0500.ioioapp --force
Writing image...
[########################################]
Writing fingerprint...
Done.
ioio\software\IOIODude\bin>ioiodude.bat --port=COM4 versions
IOIO Bootloader detected.

Hardware version: SPRK0020
Bootloader version: IOIO0400
Platform version: IOIO0030
ioio\release\software\App-IOIO0500>adb install HelloIOIO.apk
4461 KB/s (77676 bytes in 0.017s)
        pkg: /data/local/tmp/HelloIOIO.apk
Success

Here's the log showing what happens when I connect the phone to the IOIO (with usb debugging disabled):

D/UsbDeviceManager( 5727): entering USB accessory mode: UsbAccessory[mManufacturer=IOIO Open Source Project, mModel=IOIO, mDescription=IOIO Standard Applic
ation, mVersion=IOIO0500, mUri=https://github.com/ytai/ioio/wiki/ADK, mSerial=N/A]
I/ActivityManager( 5727): START u0 {flg=0x10000000 cmp=com.android.systemui/.usb.UsbResolverActivity (has extras)} from pid 5727
D/dalvikvm( 5727): GC_FOR_ALLOC freed 2303K, 20% free 43525K/53996K, paused 74ms, total 74ms
I/SearchController(22754): #onHotwordDetectorStopped
I/MicrophoneInputStream(22754): mic_close
W/IntentResolver( 5727): resolveIntent failed: found match, but none with CATEGORY_DEFAULT
V/SearchControllerCache(22754): disposing SearchController
I/ActivityManager( 5727): Killing 23142:com.android.externalstorage/u0a6 (adj 15): empty #17
D/dalvikvm(22754): threadid=38: thread exiting, not yet detached (count=0)
D/dalvikvm(22754): threadid=35: thread exiting, not yet detached (count=0)
D/dalvikvm(22754): threadid=40: thread exiting, not yet detached (count=0)
D/dalvikvm(22754): threadid=37: thread exiting, not yet detached (count=0)
I/decoder (22754): INFO: recognition time wall: 8.32259 sec user: 1.24 sec sys: 0.09 sec
D/dalvikvm( 5796): GC_CONCURRENT freed 1222K, 53% free 21963K/46540K, paused 3ms+2ms, total 17ms
I/ActivityManager( 5727): Displayed com.android.systemui/.usb.UsbResolverActivity: +114ms
D/audio_hw_primary( 5402): out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=2
D/audio_hw_primary( 5402): select_devices: out_snd_device(2: speaker) in_snd_device(0: )
D/audio_hw_primary( 5402): out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=2
I/ActivityManager( 5727): START u0 {act=android.hardware.usb.action.USB_ACCESSORY_ATTACHED flg=0x13000000 cmp=ioio.examples.hello/.MainActivity (has extras
)} from pid 5796
D/dalvikvm( 5727): GC_FOR_ALLOC freed 1828K, 20% free 43554K/53996K, paused 49ms, total 49ms
D/dalvikvm(23896): Late-enabling CheckJNI
I/ActivityManager( 5727): Start proc ioio.examples.hello for activity ioio.examples.hello/.MainActivity: pid=23896 uid=10098 gids={50098, 3002, 3003}
I/dalvikvm(23896): Enabling JNI app bug workarounds for target SDK version 10...
V/PhoneStatusBar( 5796): setLightsOn(true)
D/IOIOConnectionRegistry(23896): Successfully added bootstrap class: ioio.lib.impl.SocketIOIOConnectionBootstrap
D/IOIOConnectionRegistry(23896): Successfully added bootstrap class: ioio.lib.android.accessory.AccessoryConnectionBootstrap
D/BluetoothManagerService( 5727): Message: 20
D/BluetoothManagerService( 5727): Added callback: android.bluetooth.IBluetoothManagerCallback$Stub$Proxy@43ba91f0:true
D/IOIOConnectionRegistry(23896): Successfully added bootstrap class: ioio.lib.android.bluetooth.BluetoothIOIOConnectionBootstrap
D/IOIOConnectionRegistry(23896): Successfully added bootstrap class: ioio.lib.android.device.DeviceConnectionBootstrap
V/DeviceConnectionBootstrap(23896): onCreate()
V/DeviceConnectionBootstrap(23896): open()
V/DeviceConnectionBootstrap(23896): state <= WAIT_DEVICE_ATTACHED
D/BluetoothAdapter(23896): 1113998408: getState() :  mService = null. Returning STATE_OFF
D/IOIOImpl(23896): Waiting for IOIO connection
V/IOIOImpl(23896): Waiting for underlying connection
V/SocketIOIOConnection(23896): Creating server socket
V/SocketIOIOConnection(23896): Waiting for TCP connection
D/IOIOImpl(23896): Waiting for IOIO connection
V/IOIOImpl(23896): Waiting for underlying connection
D/IOIOImpl(23896): Waiting for IOIO connection
V/IOIOImpl(23896): Waiting for underlying connection
V/DeviceConnectionBootstrap(23896): waitForConnect()
D/dalvikvm(23896): GC_CONCURRENT freed 94K, 1% free 16988K/17116K, paused 2ms+1ms, total 15ms
I/ActivityManager( 5727): Displayed ioio.examples.hello/.MainActivity: +181ms
W/ActivityManager( 5727): Duplicate finish request for ActivityRecord{42afa3f0 u0 com.android.systemui/.usb.UsbResolverActivity t107 f}
V/QcrilMsgTunnelSocket( 6714): After reading offset = 0 remaining = 4 countRead = 4
D/QcrilMsgTunnelSocket( 6714): messageLength extracted from first 4 inputStream reads = 29
V/QcrilMsgTunnelSocket( 6714): offset = 0 remaining = 29 countRead = 0
V/QcrilMsgTunnelSocket( 6714): offset = 0 remaining = 29 countRead = 29
D/QcrilMsgTunnelSocket( 6714): readRilMessage: Buffer = [B@4265d350 HexData = [0100000004040000110000005155414c434f4d4def0308000100000001]
V/QcrilMsgTunnelSocket( 6714): Read packet: 29 bytes. Data Available = 32 Position = 0
D/QcrilMsgTunnelSocket( 6714): processResponse. message type = 1. Data Available = 28
D/QcrilMsgTunnelSocket( 6714): ByteArray from parcel = 5155414c434f4d4def0308000100000001
D/QcrilMsgTunnelSocket( 6714): Received RIL_UNSOL_OEM_HOOK_RAW message
D/QcrilMsgTunnelSocket( 6714): Oem ID in RIL_UNSOL_OEM_HOOK_RAW is QUALCOMM
D/QcrilMsgTunnelSocket( 6714): OEM ID check Passed
D/QcrilMsgTunnelSocket( 6714): Response ID in RIL_UNSOL_OEM_HOOK_RAW is 525295
D/QcrilMsgTunnelSocket( 6714): Response ID 525295is not served in this process.
D/QcrilMsgTunnelSocket( 6714): To broadcast an Intent via the notifier to external apps
V/QcrilMsgTunnelSocket( 6714): Before reading offset = 0 remaining = 4 countRead = 0
D/QcrilMsgTunnelIfaceManager( 6714): handleMessage what=0
D/QcrilMsgTunnelIfaceManager( 6714): Broadcasting intent ACTION_UNSOL_RESPONSE_OEM_HOOK_RAW
D/PicasaSyncManager(20429): battery info: false
D/IOIOImpl(23896): Physical disconnect.
D/IOIOImpl(23896): Connection lost / aborted
D/IOIOImpl(23896): Waiting for IOIO connection
V/IOIOImpl(23896): Waiting for underlying connection
D/UsbDeviceManager( 5727): exited USB accessory mode
D/IOIOImpl(23896): Physical disconnect.
D/IOIOImpl(23896): Connection lost / aborted
D/IOIOImpl(23896): Waiting for IOIO connection
V/IOIOImpl(23896): Waiting for underlying connection
V/PanelView( 5796): animationTick called with dtms=0; nothing to do (h=761.0 v=9000.0)
V/PanelView( 5796): animationTick called with dtms=-9; nothing to do (h=761.0 v=9000.0)
D/audio_hw_primary( 5402): out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=2
D/audio_hw_primary( 5402): select_devices: out_snd_device(2: speaker) in_snd_device(0: )
I/ActivityManager( 5727): START u0 {act=android.settings.SETTINGS flg=0x14000000 cmp=com.android.settings/.Settings} from pid 5796
D/audio_hw_primary( 5402): out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=2
D/dalvikvm( 5727): GC_FOR_ALLOC freed 2303K, 20% free 43563K/53996K, paused 54ms, total 54ms
V/PanelView( 5796): animationTick called with dtms=0; nothing to do (h=1776.0 v=-6000.0)
D/BluetoothAdapter(29753): 1115586880: getState() :  mService = null. Returning STATE_OFF
W/IInputConnectionWrapper(29753): showStatusIcon on inactive InputConnection
D/IOIOImpl(23896): Client requested disconnect.
V/SocketIOIOConnection(23896): Client initiated disconnect
D/IOIOImpl(23896): Client requested disconnect.
D/IOIOImpl(23896): Client requested disconnect.
V/DeviceConnectionBootstrap(23896): disconnect()
D/IOIOImpl(23896): Connection lost / aborted
D/IOIOBaseApplicationHelper(23896): IOIOThread is exiting
D/IOIOImpl(23896): Connection lost / aborted
D/IOIOBaseApplicationHelper(23896): IOIOThread is exiting
D/IOIOImpl(23896): Connection lost / aborted
D/IOIOBaseApplicationHelper(23896): IOIOThread is exiting
V/DeviceConnectionBootstrap(23896): close()
V/DeviceConnectionBootstrap(23896): state <= CLOSED
I/ActivityManager( 5727): START u0 {act=android.intent.action.MAIN cmp=com.android.settings/.SubSettings (has extras)} from pid 29753
D/audio_hw_primary( 5402): out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=2
D/SubSettings(29753): Launching fragment com.android.settings.DevelopmentSettings
W/Settings(29753): Setting bugreport_in_power_menu has moved from android.provider.Settings.Secure to android.provider.Settings.Global.
W/Settings(29753): Setting bugreport_in_power_menu has moved from android.provider.Settings.System to android.provider.Settings.Global
E/Cryptfs (  177): not running with encryption, aborting
I/ActivityManager( 5727): Displayed com.android.settings/.SubSettings: +150ms
D/audio_hw_primary( 5402): out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=2
D/audio_hw_primary( 5402): out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=2
W/InputMethodManagerService( 5727): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@4264d8e8 attrib
ute=null, token = android.os.BinderProxy@42ef41a0
E/UsbDebuggingManager( 5727): Communication error:
E/UsbDebuggingManager( 5727): java.io.IOException: Connection refused
E/UsbDebuggingManager( 5727):   at android.net.LocalSocketImpl.connectLocal(Native Method)
E/UsbDebuggingManager( 5727):   at android.net.LocalSocketImpl.connect(LocalSocketImpl.java:287)
E/UsbDebuggingManager( 5727):   at android.net.LocalSocket.connect(LocalSocket.java:130)
E/UsbDebuggingManager( 5727):   at com.android.server.usb.UsbDebuggingManager.listenToSocket(UsbDebuggingManager.java:75)
E/UsbDebuggingManager( 5727):   at com.android.server.usb.UsbDebuggingManager.run(UsbDebuggingManager.java:111)
E/UsbDebuggingManager( 5727):   at java.lang.Thread.run(Thread.java:841)
D/PicasaSyncManager(20429): battery info: true
I/EntropyMixer( 5727): Writing entropy...
D/YouTube (23787): apps.youtube.app.prefetch.PrefetchService$DeviceStateReceiver.onReceive:565 Got device state change intent: android.intent.action.ACTION
_POWER_CONNECTED
D/YouTube (23787): apps.youtube.app.prefetch.PrefetchService.onStartCommand:167 PrefetchService started at 17 Jan 2014 23:02:41 GMT
D/YouTube (23787): apps.youtube.app.prefetch.PrefetchService.p_:245 Download snapshot restored
D/YouTube (23787): apps.youtube.app.prefetch.PrefetchService.onDestroy:215 PrefetchService destroyed at 17 Jan 2014 23:02:41 GMT
D/MtpService( 5902): updating state; isCurrentUser=true, mMtpLocked=false
D/MtpService( 5902): addStorageLocked 65537 /storage/emulated/0
D/MtpService( 5902): updating state; isCurrentUser=true, mMtpLocked=false
D/MtpService( 5902): starting MTP server in MTP mode
D/MtpService( 5902): addStorageLocked 65537 /storage/emulated/0
D/dalvikvm( 5950): GC_CONCURRENT freed 395K, 3% free 18076K/18624K, paused 8ms+1ms, total 57ms
ytai commented 10 years ago

Not enough data here unfortunately. Do you feel competent to add some verbose logging to AccessoryConnectionBootstrap, so that we can have better visibility with regards to where it gets stuck at? Simply adding a Log.v(...) call at the entry of every method might shed some light. Thanks for helping out!

On Fri, Jan 17, 2014 at 3:09 PM, ericroy notifications@github.com wrote:

ioio\software\IOIODude\bin>ioiodude.bat --port=COM4 write ......\release\firmware\application\App-IOIO0500.ioioapp --force Writing image... [########################################] Writing fingerprint... Done.

ioio\software\IOIODude\bin>ioiodude.bat --port=COM4 versions IOIO Bootloader detected.

Hardware version: SPRK0020 Bootloader version: IOIO0400 Platform version: IOIO0030

ioio\release\software\App-IOIO0500>adb install HelloIOIO.apk 4461 KB/s (77676 bytes in 0.017s) pkg: /data/local/tmp/HelloIOIO.apk Success

Here's the log showing what happens when I connect the phone to the IOIO (with usb debugging disabled):

D/UsbDeviceManager( 5727): entering USB accessory mode: UsbAccessory[mManufacturer=IOIO Open Source Project, mModel=IOIO, mDescription=IOIO Standard Applic ation, mVersion=IOIO0500, mUri=https://github.com/ytai/ioio/wiki/ADK, mSerial=N/A] I/ActivityManager( 5727): START u0 {flg=0x10000000 cmp=com.android.systemui/.usb.UsbResolverActivity (has extras)} from pid 5727 D/dalvikvm( 5727): GC_FOR_ALLOC freed 2303K, 20% free 43525K/53996K, paused 74ms, total 74ms I/SearchController(22754): #onHotwordDetectorStopped I/MicrophoneInputStream(22754): mic_close W/IntentResolver( 5727): resolveIntent failed: found match, but none with CATEGORY_DEFAULT V/SearchControllerCache(22754): disposing SearchController I/ActivityManager( 5727): Killing 23142:com.android.externalstorage/u0a6 (adj 15): empty #17 https://github.com/ytai/ioio/pull/17 D/dalvikvm(22754): threadid=38: thread exiting, not yet detached (count=0) D/dalvikvm(22754): threadid=35: thread exiting, not yet detached (count=0) D/dalvikvm(22754): threadid=40: thread exiting, not yet detached (count=0) D/dalvikvm(22754): threadid=37: thread exiting, not yet detached (count=0) I/decoder (22754): INFO: recognition time wall: 8.32259 sec user: 1.24 sec sys: 0.09 sec D/dalvikvm( 5796): GC_CONCURRENT freed 1222K, 53% free 21963K/46540K, paused 3ms+2ms, total 17ms I/ActivityManager( 5727): Displayed com.android.systemui/.usb.UsbResolverActivity: +114ms D/audio_hw_primary( 5402): out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=2 D/audio_hw_primary( 5402): select_devices: out_snd_device(2: speaker) in_snd_device(0: ) D/audio_hw_primary( 5402): out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=2 I/ActivityManager( 5727): START u0 {act=android.hardware.usb.action.USB_ACCESSORY_ATTACHED flg=0x13000000 cmp=ioio.examples.hello/.MainActivity (has extras )} from pid 5796 D/dalvikvm( 5727): GC_FOR_ALLOC freed 1828K, 20% free 43554K/53996K, paused 49ms, total 49ms D/dalvikvm(23896): Late-enabling CheckJNI I/ActivityManager( 5727): Start proc ioio.examples.hello for activity ioio.examples.hello/.MainActivity: pid=23896 uid=10098 gids={50098, 3002, 3003} I/dalvikvm(23896): Enabling JNI app bug workarounds for target SDK version 10... V/PhoneStatusBar( 5796): setLightsOn(true) D/IOIOConnectionRegistry(23896): Successfully added bootstrap class: ioio.lib.impl.SocketIOIOConnectionBootstrap D/IOIOConnectionRegistry(23896): Successfully added bootstrap class: ioio.lib.android.accessory.AccessoryConnectionBootstrap D/BluetoothManagerService( 5727): Message: 20 D/BluetoothManagerService( 5727): Added callback: android.bluetooth.IBluetoothManagerCallback$Stub$Proxy@43ba91f0:true D/IOIOConnectionRegistry(23896): Successfully added bootstrap class: ioio.lib.android.bluetooth.BluetoothIOIOConnectionBootstrap D/IOIOConnectionRegistry(23896): Successfully added bootstrap class: ioio.lib.android.device.DeviceConnectionBootstrap V/DeviceConnectionBootstrap(23896): onCreate() V/DeviceConnectionBootstrap(23896): open() V/DeviceConnectionBootstrap(23896): state <= WAIT_DEVICE_ATTACHED D/BluetoothAdapter(23896): 1113998408: getState() : mService = null. Returning STATE_OFF D/IOIOImpl(23896): Waiting for IOIO connection V/IOIOImpl(23896): Waiting for underlying connection V/SocketIOIOConnection(23896): Creating server socket V/SocketIOIOConnection(23896): Waiting for TCP connection D/IOIOImpl(23896): Waiting for IOIO connection V/IOIOImpl(23896): Waiting for underlying connection D/IOIOImpl(23896): Waiting for IOIO connection V/IOIOImpl(23896): Waiting for underlying connection V/DeviceConnectionBootstrap(23896): waitForConnect() D/dalvikvm(23896): GC_CONCURRENT freed 94K, 1% free 16988K/17116K, paused 2ms+1ms, total 15ms I/ActivityManager( 5727): Displayed ioio.examples.hello/.MainActivity: +181ms W/ActivityManager( 5727): Duplicate finish request for ActivityRecord{42afa3f0 u0 com.android.systemui/.usb.UsbResolverActivity t107 f} V/QcrilMsgTunnelSocket( 6714): After reading offset = 0 remaining = 4 countRead = 4 D/QcrilMsgTunnelSocket( 6714): messageLength extracted from first 4 inputStream reads = 29 V/QcrilMsgTunnelSocket( 6714): offset = 0 remaining = 29 countRead = 0 V/QcrilMsgTunnelSocket( 6714): offset = 0 remaining = 29 countRead = 29 D/QcrilMsgTunnelSocket( 6714): readRilMessage: Buffer = [B@4265d35https://github.com/B/ioio/commit/4265d350HexData = [0100000004040000110000005155414c434f4d4def0308000100000001] V/QcrilMsgTunnelSocket( 6714): Read packet: 29 bytes. Data Available = 32 Position = 0 D/QcrilMsgTunnelSocket( 6714): processResponse. message type = 1. Data Available = 28 D/QcrilMsgTunnelSocket( 6714): ByteArray from parcel = 5155414c434f4d4def0308000100000001 D/QcrilMsgTunnelSocket( 6714): Received RIL_UNSOL_OEM_HOOK_RAW message D/QcrilMsgTunnelSocket( 6714): Oem ID in RIL_UNSOL_OEM_HOOK_RAW is QUALCOMM D/QcrilMsgTunnelSocket( 6714): OEM ID check Passed D/QcrilMsgTunnelSocket( 6714): Response ID in RIL_UNSOL_OEM_HOOK_RAW is 525295 D/QcrilMsgTunnelSocket( 6714): Response ID 525295is not served in this process. D/QcrilMsgTunnelSocket( 6714): To broadcast an Intent via the notifier to external apps V/QcrilMsgTunnelSocket( 6714): Before reading offset = 0 remaining = 4 countRead = 0 D/QcrilMsgTunnelIfaceManager( 6714): handleMessage what=0 D/QcrilMsgTunnelIfaceManager( 6714): Broadcasting intent ACTION_UNSOL_RESPONSE_OEM_HOOK_RAW D/PicasaSyncManager(20429): battery info: false D/IOIOImpl(23896): Physical disconnect. D/IOIOImpl(23896): Connection lost / aborted D/IOIOImpl(23896): Waiting for IOIO connection V/IOIOImpl(23896): Waiting for underlying connection D/UsbDeviceManager( 5727): exited USB accessory mode D/IOIOImpl(23896): Physical disconnect. D/IOIOImpl(23896): Connection lost / aborted D/IOIOImpl(23896): Waiting for IOIO connection V/IOIOImpl(23896): Waiting for underlying connection V/PanelView( 5796): animationTick called with dtms=0; nothing to do (h=761.0 v=9000.0) V/PanelView( 5796): animationTick called with dtms=-9; nothing to do (h=761.0 v=9000.0) D/audio_hw_primary( 5402): out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=2 D/audio_hw_primary( 5402): select_devices: out_snd_device(2: speaker) in_snd_device(0: ) I/ActivityManager( 5727): START u0 {act=android.settings.SETTINGS flg=0x14000000 cmp=com.android.settings/.Settings} from pid 5796 D/audio_hw_primary( 5402): out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=2 D/dalvikvm( 5727): GC_FOR_ALLOC freed 2303K, 20% free 43563K/53996K, paused 54ms, total 54ms V/PanelView( 5796): animationTick called with dtms=0; nothing to do (h=1776.0 v=-6000.0) D/BluetoothAdapter(29753): 1115586880: getState() : mService = null. Returning STATE_OFF W/IInputConnectionWrapper(29753): showStatusIcon on inactive InputConnection D/IOIOImpl(23896): Client requested disconnect. V/SocketIOIOConnection(23896): Client initiated disconnect D/IOIOImpl(23896): Client requested disconnect. D/IOIOImpl(23896): Client requested disconnect. V/DeviceConnectionBootstrap(23896): disconnect() D/IOIOImpl(23896): Connection lost / aborted D/IOIOBaseApplicationHelper(23896): IOIOThread is exiting D/IOIOImpl(23896): Connection lost / aborted D/IOIOBaseApplicationHelper(23896): IOIOThread is exiting D/IOIOImpl(23896): Connection lost / aborted D/IOIOBaseApplicationHelper(23896): IOIOThread is exiting V/DeviceConnectionBootstrap(23896): close() V/DeviceConnectionBootstrap(23896): state <= CLOSED I/ActivityManager( 5727): START u0 {act=android.intent.action.MAIN cmp=com.android.settings/.SubSettings (has extras)} from pid 29753 D/audio_hw_primary( 5402): out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=2 D/SubSettings(29753): Launching fragment com.android.settings.DevelopmentSettings W/Settings(29753): Setting bugreport_in_power_menu has moved from android.provider.Settings.Secure to android.provider.Settings.Global. W/Settings(29753): Setting bugreport_in_power_menu has moved from android.provider.Settings.System to android.provider.Settings.Global E/Cryptfs ( 177): not running with encryption, aborting I/ActivityManager( 5727): Displayed com.android.settings/.SubSettings: +150ms D/audio_hw_primary( 5402): out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=2 D/audio_hw_primary( 5402): out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=2 W/InputMethodManagerService( 5727): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@4264d8e8attrib ute=null, token = android.os.BinderProxy@42ef41ahttps://github.com/android.os.BinderProxy/ioio/commit/42ef41a0 E/UsbDebuggingManager( 5727): Communication error: E/UsbDebuggingManager( 5727): java.io.IOException: Connection refused E/UsbDebuggingManager( 5727): at android.net.LocalSocketImpl.connectLocal(Native Method) E/UsbDebuggingManager( 5727): at android.net.LocalSocketImpl.connect(LocalSocketImpl.java:287) E/UsbDebuggingManager( 5727): at android.net.LocalSocket.connect(LocalSocket.java:130) E/UsbDebuggingManager( 5727): at com.android.server.usb.UsbDebuggingManager.listenToSocket(UsbDebuggingManager.java:75) E/UsbDebuggingManager( 5727): at com.android.server.usb.UsbDebuggingManager.run(UsbDebuggingManager.java:111) E/UsbDebuggingManager( 5727): at java.lang.Thread.run(Thread.java:841) D/PicasaSyncManager(20429): battery info: true I/EntropyMixer( 5727): Writing entropy... D/YouTube (23787): apps.youtube.app.prefetch.PrefetchService$DeviceStateReceiver.onReceive:565 Got device state change intent: android.intent.action.ACTION _POWERCONNECTED D/YouTube (23787): apps.youtube.app.prefetch.PrefetchService.onStartCommand:167 PrefetchService started at 17 Jan 2014 23:02:41 GMT D/YouTube (23787): apps.youtube.app.prefetch.PrefetchService.p:245 Download snapshot restored D/YouTube (23787): apps.youtube.app.prefetch.PrefetchService.onDestroy:215 PrefetchService destroyed at 17 Jan 2014 23:02:41 GMT D/MtpService( 5902): updating state; isCurrentUser=true, mMtpLocked=false D/MtpService( 5902): addStorageLocked 65537 /storage/emulated/0 D/MtpService( 5902): updating state; isCurrentUser=true, mMtpLocked=false D/MtpService( 5902): starting MTP server in MTP mode D/MtpService( 5902): addStorageLocked 65537 /storage/emulated/0 D/dalvikvm( 5950): GC_CONCURRENT freed 395K, 3% free 18076K/18624K, paused 8ms+1ms, total 57ms

— Reply to this email directly or view it on GitHubhttps://github.com/ytai/ioio/issues/76#issuecomment-32661488 .

masshabit commented 10 years ago

You bet, i'll do that and post another log

ericroy commented 10 years ago

Here's another log with more verbose logging. If you need to see exactly where i've put the logging statements, you can look at my fork: https://github.com/ericroy/ioio

As far as I can tell, the localInputStream_.read() call in waitForConnect() is throwing: java.io.IOException: read failed: EIO (I/O error)

I/ActivityManager( 5727): START u0 {act=android.hardware.usb.action.USB_ACCESSORY_ATTACHED flg=0x13000000 cmp=ioio.examples.hello/.MainActivity (has extras
)} from pid 5796
D/audio_hw_primary( 5402): out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=2
D/dalvikvm( 5727): GC_FOR_ALLOC freed 2755K, 20% free 43624K/53996K, paused 57ms, total 57ms
I/ActivityManager( 5727): Start proc ioio.examples.hello for activity ioio.examples.hello/.MainActivity: pid=11471 uid=10100 gids={50100, 3002, 3003}
I/dalvikvm(11471): Enabling JNI app bug workarounds for target SDK version 10...
V/PhoneStatusBar( 5796): setLightsOn(true)
D/IOIOConnectionRegistry(11471): Successfully added bootstrap class: ioio.lib.impl.SocketIOIOConnectionBootstrap
V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::AccessoryConnectionBootstrap()
D/IOIOConnectionRegistry(11471): Successfully added bootstrap class: ioio.lib.android.accessory.AccessoryConnectionBootstrap
D/BluetoothManagerService( 5727): Message: 20
D/BluetoothManagerService( 5727): Added callback: android.bluetooth.IBluetoothManagerCallback$Stub$Proxy@4368ee10:true
D/IOIOConnectionRegistry(11471): Successfully added bootstrap class: ioio.lib.android.bluetooth.BluetoothIOIOConnectionBootstrap
D/IOIOConnectionRegistry(11471): Successfully added bootstrap class: ioio.lib.android.device.DeviceConnectionBootstrap
V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::onCreate()
V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::registerReceiver()
V/DeviceConnectionBootstrap(11471): onCreate()
V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::open()
V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::openStreams()
V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::setState(OPEN)
V/DeviceConnectionBootstrap(11471): open()
V/DeviceConnectionBootstrap(11471): state <= WAIT_DEVICE_ATTACHED
D/BluetoothAdapter(11471): 1113986360: getState() :  mService = null. Returning STATE_OFF
V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::createConnection()
D/IOIOImpl(11471): Waiting for IOIO connection
V/IOIOImpl(11471): Waiting for underlying connection
V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::Connection::waitForConnect()
V/AccessoryIOIOConnection(11471): instanceState_ is INIT
V/AccessoryIOIOConnection(11471): Waiting for instanceState_ to either be DEAD or OPEN
V/AccessoryIOIOConnection(11471): instanceState_ is OPEN
V/AccessoryIOIOConnection(11471): Writing a null byte to the IOIO
V/AccessoryIOIOConnection(11471): Blocking until IOIO responds with a single byte...
D/IOIOImpl(11471): Waiting for IOIO connection
V/IOIOImpl(11471): Waiting for underlying connection
V/DeviceConnectionBootstrap(11471): waitForConnect()
D/IOIOImpl(11471): Waiting for IOIO connection
V/IOIOImpl(11471): Waiting for underlying connection
V/SocketIOIOConnection(11471): Creating server socket
V/SocketIOIOConnection(11471): Waiting for TCP connection
D/dalvikvm(11471): GC_CONCURRENT freed 83K, 1% free 16993K/17112K, paused 3ms+1ms, total 15ms
I/ActivityManager( 5727): Displayed ioio.examples.hello/.MainActivity: +210ms
W/ActivityManager( 5727): Duplicate finish request for ActivityRecord{42a29780 u0 com.android.systemui/.usb.UsbResolverActivity t121 f}
D/dalvikvm(10358): GC_CONCURRENT freed 700K, 4% free 19996K/20788K, paused 4ms+3ms, total 37ms
D/Finsky  (10358): [1] 5.onFinished: Installation state replication succeeded.
V/AccessoryIOIOConnection(11471): IOException during soft open attempts: java.io.IOException: read failed: EIO (I/O error)
V/AccessoryIOIOConnection(11471): instanceState_ is DEAD
V/AccessoryIOIOConnection(11471): Sleeping for 1 second, then raising ConnectionLostException
V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::Connection::trySleep()
D/PicasaSyncManager( 9936): battery info: false
D/IOIOImpl(11471): Physical disconnect.
V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::Connection::disconnect()
D/IOIOImpl(11471): Connection lost / aborted
V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::createConnection()
D/IOIOImpl(11471): Waiting for IOIO connection
V/IOIOImpl(11471): Waiting for underlying connection
V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::Connection::waitForConnect()
V/AccessoryIOIOConnection(11471): instanceState_ is INIT
V/AccessoryIOIOConnection(11471): Waiting for instanceState_ to either be DEAD or OPEN
V/AccessoryIOIOConnection(11471): instanceState_ is OPEN
V/AccessoryIOIOConnection(11471): Writing a null byte to the IOIO
V/AccessoryIOIOConnection(11471): IOException during soft open attempts: java.io.IOException: write failed: ENODEV (No such device)
V/AccessoryIOIOConnection(11471): instanceState_ is DEAD
V/AccessoryIOIOConnection(11471): Sleeping for 1 second, then raising ConnectionLostException
V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::Connection::trySleep()
D/UsbDeviceManager( 5727): exited USB accessory mode
V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::onReceive()
V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::close()
V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::closeStreams()
V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::setState(CLOSED)
D/IOIOImpl(11471): Physical disconnect.
V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::Connection::disconnect()
D/IOIOImpl(11471): Connection lost / aborted
V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::createConnection()
D/IOIOImpl(11471): Waiting for IOIO connection
V/IOIOImpl(11471): Waiting for underlying connection
V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::Connection::waitForConnect()
V/AccessoryIOIOConnection(11471): instanceState_ is INIT
V/AccessoryIOIOConnection(11471): Waiting for instanceState_ to either be DEAD or OPEN
D/audio_hw_primary( 5402): out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=2
D/audio_hw_primary( 5402): select_devices: out_snd_device(2: speaker) in_snd_device(0: )
D/dalvikvm( 5727): GC_FOR_ALLOC freed 2005K, 20% free 43591K/53996K, paused 79ms, total 79ms
W/Settings(29753): Setting bugreport_in_power_menu has moved from android.provider.Settings.Secure to android.provider.Settings.Global.
W/Settings(29753): Setting bugreport_in_power_menu has moved from android.provider.Settings.System to android.provider.Settings.Global
E/Cryptfs (  177): not running with encryption, aborting
I/ActivityManager( 5727): Killing 10427:com.android.externalstorage/u0a6 (adj 15): empty #17
D/IOIOImpl(11471): Client requested disconnect.
V/SocketIOIOConnection(11471): Client initiated disconnect
D/IOIOImpl(11471): Client requested disconnect.
V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::Connection::disconnect()
D/IOIOImpl(11471): Client requested disconnect.
V/DeviceConnectionBootstrap(11471): disconnect()
V/AccessoryIOIOConnection(11471): instanceState_ is DEAD
D/IOIOImpl(11471): Connection lost / aborted
D/IOIOBaseApplicationHelper(11471): IOIOThread is exiting
D/IOIOImpl(11471): Connection lost / aborted
D/IOIOBaseApplicationHelper(11471): IOIOThread is exiting
D/IOIOImpl(11471): Connection lost / aborted
D/IOIOBaseApplicationHelper(11471): IOIOThread is exiting
V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::close()
V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::setState(CLOSED)
V/DeviceConnectionBootstrap(11471): close()
V/DeviceConnectionBootstrap(11471): state <= CLOSED
V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::onDestroy()
V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::unregisterReceiver()
V/DeviceConnectionBootstrap(11471): onDestroy()
D/audio_hw_primary( 5402): out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=2
D/audio_hw_primary( 5402): out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=2
E/UsbDebuggingManager( 5727): Communication error:
E/UsbDebuggingManager( 5727): java.io.IOException: No such file or directory
E/UsbDebuggingManager( 5727):   at android.net.LocalSocketImpl.connectLocal(Native Method)
E/UsbDebuggingManager( 5727):   at android.net.LocalSocketImpl.connect(LocalSocketImpl.java:287)
E/UsbDebuggingManager( 5727):   at android.net.LocalSocket.connect(LocalSocket.java:130)
E/UsbDebuggingManager( 5727):   at com.android.server.usb.UsbDebuggingManager.listenToSocket(UsbDebuggingManager.java:75)
E/UsbDebuggingManager( 5727):   at com.android.server.usb.UsbDebuggingManager.run(UsbDebuggingManager.java:111)
E/UsbDebuggingManager( 5727):   at java.lang.Thread.run(Thread.java:841)
W/InputMethodManagerService( 5727): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@42ee45b0 attrib
ute=null, token = android.os.BinderProxy@42ad6f68
V/QcrilMsgTunnelSocket( 6714): After reading offset = 0 remaining = 4 countRead = 4
D/QcrilMsgTunnelSocket( 6714): messageLength extracted from first 4 inputStream reads = 29
V/QcrilMsgTunnelSocket( 6714): offset = 0 remaining = 29 countRead = 0
V/QcrilMsgTunnelSocket( 6714): offset = 0 remaining = 29 countRead = 29
D/QcrilMsgTunnelSocket( 6714): readRilMessage: Buffer = [B@4265d350 HexData = [0100000004040000110000005155414c434f4d4def0308000100000001]
V/QcrilMsgTunnelSocket( 6714): Read packet: 29 bytes. Data Available = 32 Position = 0
D/QcrilMsgTunnelSocket( 6714): processResponse. message type = 1. Data Available = 28
D/QcrilMsgTunnelSocket( 6714): ByteArray from parcel = 5155414c434f4d4def0308000100000001
D/QcrilMsgTunnelSocket( 6714): Received RIL_UNSOL_OEM_HOOK_RAW message
D/QcrilMsgTunnelSocket( 6714): Oem ID in RIL_UNSOL_OEM_HOOK_RAW is QUALCOMM
D/QcrilMsgTunnelSocket( 6714): OEM ID check Passed
D/QcrilMsgTunnelSocket( 6714): Response ID in RIL_UNSOL_OEM_HOOK_RAW is 525295
D/QcrilMsgTunnelSocket( 6714): Response ID 525295is not served in this process.
D/QcrilMsgTunnelSocket( 6714): To broadcast an Intent via the notifier to external apps
D/QcrilMsgTunnelIfaceManager( 6714): handleMessage what=0
D/QcrilMsgTunnelIfaceManager( 6714): Broadcasting intent ACTION_UNSOL_RESPONSE_OEM_HOOK_RAW
V/QcrilMsgTunnelSocket( 6714): Before reading offset = 0 remaining = 4 countRead = 0
D/dalvikvm( 6714): GC_CONCURRENT freed 390K, 3% free 16728K/17152K, paused 4ms+3ms, total 24ms
ytai commented 10 years ago

Thanks, great work! Your logs output lacks timing info as well as any info on what you did externally between these messages. Specifically, there's a "IOException during soft open attempts" message, and it's not clear to me whether it came as a direct result of trying to open the connection or as a result of you giving up on waiting and doing something like exit the app or disconnect the IOIO. BTW, as a side-note, you should be able to connect the N5 to the IOIO without problem with the Android in host mode / the IOIO in device mode. The only difference in practice is that in that mode the IOIO would be powered by the N5, whereas in the way you're trying to connect the IOIO would charge the N5.

On Sat, Jan 18, 2014 at 1:34 PM, ericroy notifications@github.com wrote:

Here's another log with more verbose logging. If you need to see exactly where i've put the logging statements, you can look at my fork: https://github.com/ericroy/ioio

As far as I can tell, the localInputStream_.read() call in waitForConnect() is throwing: java.io.IOException: read failed: EIO (I/O error)

I/ActivityManager( 5727): START u0 {act=android.hardware.usb.action.USB_ACCESSORY_ATTACHED flg=0x13000000 cmp=ioio.examples.hello/. MainActivity (has extras )} from pid 5796 D/audio_hw_primary( 5402): out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=2 D/dalvikvm( 5727): GC_FOR_ALLOC freed 2755K, 20% free 43624K/53996K, paused 57ms, total 57ms I/ActivityManager( 5727): Start proc ioio.examples.hello for activity ioio.examples.hello/.MainActivity: pid=11471 uid=10100 gids={50100, 3002, 3003} I/dalvikvm(11471): Enabling JNI app bug workarounds for target SDK version 10... V/PhoneStatusBar( 5796): setLightsOn(true) D/IOIOConnectionRegistry(11471): Successfully added bootstrap class: ioio.lib.impl.SocketIOIOConnectionBootstrap V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::AccessoryConnectionBootstrap() D/IOIOConnectionRegistry(11471): Successfully added bootstrap class: ioio.lib.android.accessory.AccessoryConnectionBootstrap D/BluetoothManagerService( 5727): Message: 20 D/BluetoothManagerService( 5727): Added callback: android.bluetooth.IBluetoothManagerCallback$Stub$Proxy@4368ee10:true D/IOIOConnectionRegistry(11471): Successfully added bootstrap class: ioio.lib.android.bluetooth.BluetoothIOIOConnectionBootstrap D/IOIOConnectionRegistry(11471): Successfully added bootstrap class: ioio.lib.android.device.DeviceConnectionBootstrap V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::onCreate() V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::registerReceiver() V/DeviceConnectionBootstrap(11471): onCreate() V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::open() V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::openStreams() V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::setState(OPEN) V/DeviceConnectionBootstrap(11471): open() V/DeviceConnectionBootstrap(11471): state <= WAIT_DEVICE_ATTACHED D/BluetoothAdapter(11471): 1113986360: getState() : mService = null. Returning STATEOFF V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::createConnection() D/IOIOImpl(11471): Waiting for IOIO connection V/IOIOImpl(11471): Waiting for underlying connection V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::Connection::waitForConnect() V/AccessoryIOIOConnection(11471): instanceState is INIT V/AccessoryIOIOConnection(11471): Waiting for instanceState to either be DEAD or OPEN V/AccessoryIOIOConnection(11471): instanceState is OPEN V/AccessoryIOIOConnection(11471): Writing a null byte to the IOIO V/AccessoryIOIOConnection(11471): Blocking until IOIO responds with a single byte... D/IOIOImpl(11471): Waiting for IOIO connection V/IOIOImpl(11471): Waiting for underlying connection V/DeviceConnectionBootstrap(11471): waitForConnect() D/IOIOImpl(11471): Waiting for IOIO connection V/IOIOImpl(11471): Waiting for underlying connection V/SocketIOIOConnection(11471): Creating server socket V/SocketIOIOConnection(11471): Waiting for TCP connection D/dalvikvm(11471): GC_CONCURRENT freed 83K, 1% free 16993K/17112K, paused 3ms+1ms, total 15ms I/ActivityManager( 5727): Displayed ioio.examples.hello/.MainActivity: +210ms W/ActivityManager( 5727): Duplicate finish request for ActivityRecord{42a29780 u0 com.android.systemui/.usb.UsbResolverActivity t121 f} D/dalvikvm(10358): GCCONCURRENT freed 700K, 4% free 19996K/20788K, paused 4ms+3ms, total 37ms D/Finsky (10358): [1] 5.onFinished: Installation state replication succeeded. V/AccessoryIOIOConnection(11471): IOException during soft open attempts: java.io.IOException: read failed: EIO (I/O error) V/AccessoryIOIOConnection(11471): instanceState is DEAD V/AccessoryIOIOConnection(11471): Sleeping for 1 second, then raising ConnectionLostException V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::Connection::trySleep() D/PicasaSyncManager( 9936): battery info: false D/IOIOImpl(11471): Physical disconnect. V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::Connection::disconnect() D/IOIOImpl(11471): Connection lost / aborted V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::createConnection() D/IOIOImpl(11471): Waiting for IOIO connection V/IOIOImpl(11471): Waiting for underlying connection V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::Connection::waitForConnect() V/AccessoryIOIOConnection(11471): instanceState is INIT V/AccessoryIOIOConnection(11471): Waiting for instanceState to either be DEAD or OPEN V/AccessoryIOIOConnection(11471): instanceState is OPEN V/AccessoryIOIOConnection(11471): Writing a null byte to the IOIO V/AccessoryIOIOConnection(11471): IOException during soft open attempts: java.io.IOException: write failed: ENODEV (No such device) V/AccessoryIOIOConnection(11471): instanceState is DEAD V/AccessoryIOIOConnection(11471): Sleeping for 1 second, then raising ConnectionLostException V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::Connection::trySleep() D/UsbDeviceManager( 5727): exited USB accessory mode V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::onReceive() V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::close() V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::closeStreams() V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::setState(CLOSED) D/IOIOImpl(11471): Physical disconnect. V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::Connection::disconnect() D/IOIOImpl(11471): Connection lost / aborted V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::createConnection() D/IOIOImpl(11471): Waiting for IOIO connection V/IOIOImpl(11471): Waiting for underlying connection V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::Connection::waitForConnect() V/AccessoryIOIOConnection(11471): instanceState is INIT V/AccessoryIOIOConnection(11471): Waiting for instanceState to either be DEAD or OPEN D/audio_hw_primary( 5402): out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=2 D/audio_hw_primary( 5402): select_devices: out_snd_device(2: speaker) in_snd_device(0: ) D/dalvikvm( 5727): GC_FOR_ALLOC freed 2005K, 20% free 43591K/53996K, paused 79ms, total 79ms W/Settings(29753): Setting bugreport_in_power_menu has moved from android.provider.Settings.Secure to android.provider.Settings.Global. W/Settings(29753): Setting bugreport_in_powermenu has moved from android.provider.Settings.System to android.provider.Settings.Global E/Cryptfs ( 177): not running with encryption, aborting I/ActivityManager( 5727): Killing 10427:com.android.externalstorage/u0a6 (adj 15): empty #17 D/IOIOImpl(11471): Client requested disconnect. V/SocketIOIOConnection(11471): Client initiated disconnect D/IOIOImpl(11471): Client requested disconnect. V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::Connection::disconnect() D/IOIOImpl(11471): Client requested disconnect. V/DeviceConnectionBootstrap(11471): disconnect() V/AccessoryIOIOConnection(11471): instanceState is DEAD D/IOIOImpl(11471): Connection lost / aborted D/IOIOBaseApplicationHelper(11471): IOIOThread is exiting D/IOIOImpl(11471): Connection lost / aborted D/IOIOBaseApplicationHelper(11471): IOIOThread is exiting D/IOIOImpl(11471): Connection lost / aborted D/IOIOBaseApplicationHelper(11471): IOIOThread is exiting V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::close() V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::setState(CLOSED) V/DeviceConnectionBootstrap(11471): close() V/DeviceConnectionBootstrap(11471): state <= CLOSED V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::onDestroy() V/AccessoryIOIOConnection(11471): AccessoryConnectionBootstrap::unregisterReceiver() V/DeviceConnectionBootstrap(11471): onDestroy() D/audio_hw_primary( 5402): out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=2 D/audio_hw_primary( 5402): out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=2 E/UsbDebuggingManager( 5727): Communication error: E/UsbDebuggingManager( 5727): java.io.IOException: No such file or directory E/UsbDebuggingManager( 5727): at android.net.LocalSocketImpl.connectLocal(Native Method) E/UsbDebuggingManager( 5727): at android.net.LocalSocketImpl.connect(LocalSocketImpl.java:287) E/UsbDebuggingManager( 5727): at android.net.LocalSocket.connect(LocalSocket.java:130) E/UsbDebuggingManager( 5727): at com.android.server.usb.UsbDebuggingManager.listenToSocket(UsbDebuggingManager.java:75) E/UsbDebuggingManager( 5727): at com.android.server.usb.UsbDebuggingManager.run(UsbDebuggingManager.java:111) E/UsbDebuggingManager( 5727): at java.lang.Thread.run(Thread.java:841) W/InputMethodManagerService( 5727): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@42ee45b0 attrib ute=null, token = android.os.BinderProxy@42ad6f68 V/QcrilMsgTunnelSocket( 6714): After reading offset = 0 remaining = 4 countRead = 4 D/QcrilMsgTunnelSocket( 6714): messageLength extracted from first 4 inputStream reads = 29 V/QcrilMsgTunnelSocket( 6714): offset = 0 remaining = 29 countRead = 0 V/QcrilMsgTunnelSocket( 6714): offset = 0 remaining = 29 countRead = 29 D/QcrilMsgTunnelSocket( 6714): readRilMessage: Buffer = [B@4265d350 HexData = [0100000004040000110000005155414c434f4d4def0308000100000001] V/QcrilMsgTunnelSocket( 6714): Read packet: 29 bytes. Data Available = 32 Position = 0 D/QcrilMsgTunnelSocket( 6714): processResponse. message type = 1. Data Available = 28 D/QcrilMsgTunnelSocket( 6714): ByteArray from parcel = 5155414c434f4d4def0308000100000001 D/QcrilMsgTunnelSocket( 6714): Received RIL_UNSOL_OEM_HOOK_RAW message D/QcrilMsgTunnelSocket( 6714): Oem ID in RIL_UNSOL_OEM_HOOK_RAW is QUALCOMM D/QcrilMsgTunnelSocket( 6714): OEM ID check Passed D/QcrilMsgTunnelSocket( 6714): Response ID in RIL_UNSOL_OEM_HOOK_RAW is 525295 D/QcrilMsgTunnelSocket( 6714): Response ID 525295is not served in this process. D/QcrilMsgTunnelSocket( 6714): To broadcast an Intent via the notifier to external apps D/QcrilMsgTunnelIfaceManager( 6714): handleMessage what=0 D/QcrilMsgTunnelIfaceManager( 6714): Broadcasting intent ACTION_UNSOL_RESPONSE_OEM_HOOK_RAW V/QcrilMsgTunnelSocket( 6714): Before reading offset = 0 remaining = 4 countRead = 0 D/dalvikvm( 6714): GC_CONCURRENT freed 390K, 3% free 16728K/17152K, paused 4ms+3ms, total 24ms

— Reply to this email directly or view it on GitHubhttps://github.com/ytai/ioio/issues/76#issuecomment-32693818 .

ericroy commented 10 years ago

Good point, I've included another log with timing info, and also with a log statement showing when the app is stopped (as a result of me hitting the back button to kill it).

It would seem that a byte is written to the IOIO and then we just block, waiting for a byte in return. About 17 seconds later, I hit the back button to exit the app, which causes the exception to be thrown.

D/UsbDeviceManager(  765): entering USB accessory mode: UsbAccessory[mManufacturer=IOIO Open Source Project, mModel=IOIO, mDescription=IOIO Standard Applic
ation, mVersion=IOIO0500, mUri=https://github.com/ytai/ioio/wiki/ADK, mSerial=N/A]
I/ActivityManager(  765): START u0 {flg=0x10000000 cmp=com.android.systemui/.usb.UsbResolverActivity (has extras)} from pid 765
W/IntentResolver(  765): resolveIntent failed: found match, but none with CATEGORY_DEFAULT
I/ActivityManager(  765): Displayed com.android.systemui/.usb.UsbResolverActivity: +102ms
D/audio_hw_primary(  183): select_devices: out_snd_device(2: speaker) in_snd_device(0: )
I/ActivityManager(  765): START u0 {act=android.hardware.usb.action.USB_ACCESSORY_ATTACHED flg=0x13000000 cmp=ioio.examples.hello/.MainActivity (has extras
)} from pid 860
D/dalvikvm(  765): GC_FOR_ALLOC freed 2711K, 20% free 28634K/35708K, paused 38ms, total 38ms
I/ActivityManager(  765): Start proc ioio.examples.hello for activity ioio.examples.hello/.MainActivity: pid=16697 uid=10104 gids={50104, 3002, 3003}
I/dalvikvm(16697): Enabling JNI app bug workarounds for target SDK version 10...
V/PhoneStatusBar(  860): setLightsOn(true)
D/IOIOConnectionRegistry(16697): Successfully added bootstrap class: ioio.lib.impl.SocketIOIOConnectionBootstrap
V/AccessoryIOIOConnection(16697): 1390195500837: AccessoryConnectionBootstrap.AccessoryConnectionBootstrap()
D/IOIOConnectionRegistry(16697): Successfully added bootstrap class: ioio.lib.android.accessory.AccessoryConnectionBootstrap
D/BluetoothManagerService(  765): Message: 20
D/BluetoothManagerService(  765): Added callback: android.bluetooth.IBluetoothManagerCallback$Stub$Proxy@42cf95c8:true
D/IOIOConnectionRegistry(16697): Successfully added bootstrap class: ioio.lib.android.bluetooth.BluetoothIOIOConnectionBootstrap
D/IOIOConnectionRegistry(16697): Successfully added bootstrap class: ioio.lib.android.device.DeviceConnectionBootstrap
V/AccessoryIOIOConnection(16697): 1390195500842: AccessoryConnectionBootstrap.onCreate()
V/AccessoryIOIOConnection(16697): 1390195500842: AccessoryConnectionBootstrap.registerReceiver()
V/DeviceConnectionBootstrap(16697): onCreate()
V/AccessoryIOIOConnection(16697): 1390195500862: AccessoryConnectionBootstrap.open()
V/AccessoryIOIOConnection(16697): 1390195500863: AccessoryConnectionBootstrap.openStreams()
V/AccessoryIOIOConnection(16697): AccessoryConnectionBootstrap.setState(OPEN)
V/DeviceConnectionBootstrap(16697): open()
V/DeviceConnectionBootstrap(16697): state <= WAIT_DEVICE_ATTACHED
D/BluetoothAdapter(16697): 1113531408: getState() :  mService = null. Returning STATE_OFF
V/AccessoryIOIOConnection(16697): 1390195500870: AccessoryConnectionBootstrap.createConnection()
D/IOIOImpl(16697): Waiting for IOIO connection
V/IOIOImpl(16697): Waiting for underlying connection
V/SocketIOIOConnection(16697): Creating server socket
D/IOIOImpl(16697): Waiting for IOIO connection
V/IOIOImpl(16697): Waiting for underlying connection
V/AccessoryIOIOConnection(16697): 1390195500877: AccessoryConnectionBootstrap.Connection.waitForConnect()
V/AccessoryIOIOConnection(16697): 1390195500877: instanceState_ is INIT
V/AccessoryIOIOConnection(16697): 1390195500877: Waiting for instanceState_ to either be DEAD or OPEN
V/AccessoryIOIOConnection(16697): 1390195500877: instanceState_ is OPEN
V/AccessoryIOIOConnection(16697): 1390195500877: Writing a null byte to the IOIO
V/AccessoryIOIOConnection(16697): 1390195500877: Blocking until IOIO responds with a single byte...
D/IOIOImpl(16697): Waiting for IOIO connection
V/IOIOImpl(16697): Waiting for underlying connection
V/DeviceConnectionBootstrap(16697): waitForConnect()
V/SocketIOIOConnection(16697): Waiting for TCP connection
D/dalvikvm(16697): GC_CONCURRENT freed 96K, 1% free 16988K/17120K, paused 3ms+2ms, total 18ms
I/ActivityManager(  765): Displayed ioio.examples.hello/.MainActivity: +210ms
W/ActivityManager(  765): Duplicate finish request for ActivityRecord{43312680 u0 com.android.systemui/.usb.UsbResolverActivity t9 f}
D/audio_hw_primary(  183): select_devices: out_snd_device(2: speaker) in_snd_device(0: )
D/dalvikvm(  765): GC_FOR_ALLOC freed 2737K, 21% free 28552K/35708K, paused 44ms, total 44ms
W/Settings(16224): Setting bugreport_in_power_menu has moved from android.provider.Settings.Secure to android.provider.Settings.Global.
W/Settings(16224): Setting bugreport_in_power_menu has moved from android.provider.Settings.System to android.provider.Settings.Global
E/Cryptfs (  175): not running with encryption, aborting
W/InputMethodManagerService(  765): Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@42c6d9c0 (uid=10104 pid=16
697)
I/ActivityManager(  765): Killing 16090:com.android.externalstorage/u0a6 (adj 15): empty #17
V/HelloIOIOActivity(16697): 1390195518275: MainActivity.onStop()
D/IOIOImpl(16697): Client requested disconnect.
V/SocketIOIOConnection(16697): Client initiated disconnect
D/IOIOImpl(16697): Client requested disconnect.
V/AccessoryIOIOConnection(16697): 1390195518275: AccessoryConnectionBootstrap.Connection.disconnect()
D/IOIOImpl(16697): Client requested disconnect.
V/DeviceConnectionBootstrap(16697): disconnect()
D/IOIOImpl(16697): Connection lost / aborted
D/IOIOBaseApplicationHelper(16697): IOIOThread is exiting
D/IOIOImpl(16697): Connection lost / aborted
D/IOIOBaseApplicationHelper(16697): IOIOThread is exiting
V/AccessoryIOIOConnection(16697): 1390195520277: IOException during soft open attempts: java.io.IOException: read failed: EIO (I/O error)
W/System.err(16697): java.io.IOException: read failed: EIO (I/O error)
W/System.err(16697):    at libcore.io.IoBridge.read(IoBridge.java:435)
W/System.err(16697):    at java.io.FileInputStream.read(FileInputStream.java:179)
W/System.err(16697):    at libcore.io.Streams.readSingleByte(Streams.java:41)
W/System.err(16697):    at java.io.FileInputStream.read(FileInputStream.java:175)
W/System.err(16697):    at ioio.lib.android.accessory.AccessoryConnectionBootstrap$Connection.waitForConnect(AccessoryConnectionBootstrap.java:274)
W/System.err(16697):    at ioio.lib.impl.IOIOImpl.waitForConnect(IOIOImpl.java:117)
W/System.err(16697):    at ioio.lib.util.IOIOBaseApplicationHelper$IOIOThread.run(IOIOBaseApplicationHelper.java:58)
W/System.err(16697): Caused by: libcore.io.ErrnoException: read failed: EIO (I/O error)
W/System.err(16697):    at libcore.io.Posix.readBytes(Native Method)
W/System.err(16697):    at libcore.io.Posix.read(Posix.java:128)
W/System.err(16697):    at libcore.io.BlockGuardOs.read(BlockGuardOs.java:149)
W/System.err(16697):    at libcore.io.IoBridge.read(IoBridge.java:425)
W/System.err(16697):    ... 6 more
V/AccessoryIOIOConnection(16697): 1390195520278: instanceState_ is DEAD
V/AccessoryIOIOConnection(16697): 1390195520279: Sleeping for 1 second, then raising ConnectionLostException
V/AccessoryIOIOConnection(16697): 1390195520279: AccessoryConnectionBootstrap.Connection.trySleep()
D/PicasaSyncManager(16276): battery info: false
D/UsbDeviceManager(  765): exited USB accessory mode
D/IOIOImpl(16697): Connection lost / aborted
D/IOIOBaseApplicationHelper(16697): IOIOThread is exiting
V/AccessoryIOIOConnection(16697): 1390195521290: AccessoryConnectionBootstrap.close()
V/AccessoryIOIOConnection(16697): 1390195521290: AccessoryConnectionBootstrap.closeStreams()
V/AccessoryIOIOConnection(16697): AccessoryConnectionBootstrap.setState(CLOSED)
V/DeviceConnectionBootstrap(16697): close()
V/DeviceConnectionBootstrap(16697): state <= CLOSED
V/AccessoryIOIOConnection(16697): 1390195521291: AccessoryConnectionBootstrap.onDestroy()
V/AccessoryIOIOConnection(16697): 1390195521291: AccessoryConnectionBootstrap.unregisterReceiver()
V/DeviceConnectionBootstrap(16697): onDestroy()
D/audio_hw_primary(  183): select_devices: out_snd_device(2: speaker) in_snd_device(0: )
I/EntropyMixer(  765): Writing entropy...
D/PicasaSyncManager(16276): battery info: true
D/YouTube (16320): apps.youtube.app.prefetch.PrefetchService$DeviceStateReceiver.onReceive:565 Got device state change intent: android.intent.action.ACTION
_POWER_CONNECTED
D/YouTube (16320): apps.youtube.app.prefetch.PrefetchService.onStartCommand:167 PrefetchService started at 20 Jan 2014 05:25:25 GMT
D/YouTube (16320): apps.youtube.app.prefetch.PrefetchService.p_:245 Download snapshot restored
D/YouTube (16320): apps.youtube.app.prefetch.PrefetchService.onDestroy:215 PrefetchService destroyed at 20 Jan 2014 05:25:25 GMT
D/MtpService( 2286): updating state; isCurrentUser=true, mMtpLocked=false
D/MtpService( 2286): addStorageLocked 65537 /storage/emulated/0
D/MtpService( 2286): updating state; isCurrentUser=true, mMtpLocked=false
D/MtpService( 2286): starting MTP server in MTP mode
D/MtpService( 2286): addStorageLocked 65537 /storage/emulated/0
D/audio_hw_primary(  183): select_devices: out_snd_device(2: speaker) in_snd_device(0: )
W/InputMethodManagerService(  765): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@429f93d8 attrib
ute=null, token = android.os.BinderProxy@435fd730
D/MtpService( 2286): updating state; isCurrentUser=true, mMtpLocked=false
D/MtpService( 2286): addStorageLocked 65537 /storage/emulated/0
D/MtpService( 2286): updating state; isCurrentUser=true, mMtpLocked=false
D/MtpService( 2286): starting MTP server in MTP mode
D/MtpService( 2286): addStorageLocked 65537 /storage/emulated/0
ericroy commented 10 years ago

Last time I tried Nexus5 as host, I wasn't doing it right, so i'll get a cable for that and see if that will work for me.

ytai commented 10 years ago

Can't figure out from the logs what's wrong. Seems like the data being sent by either the Android or the IOIO doesn't get through. Given that this code does work on other KitKats, I'll have to guess that there's something funny with the N5. Having the N5 in host mode has been proven to work, so definitely give it a try.

On Sun, Jan 19, 2014 at 10:05 PM, ericroy notifications@github.com wrote:

Last time I tried Nexus5 as host, I wasn't doing it right, so i'll get a cable for that and see if that will work for me.

— Reply to this email directly or view it on GitHubhttps://github.com/ytai/ioio/issues/76#issuecomment-32736073 .

ytai commented 10 years ago

Just got my hands on a Nexus 5 and eventually got to this: https://code.google.com/p/android/issues/detail?id=59667

It's a known bug apparently. Couldn't yet figure out if there's a workaround.

On Mon, Jan 20, 2014 at 12:38 PM, Ytai Ben-Tsvi ytaibt@gmail.com wrote:

Can't figure out from the logs what's wrong. Seems like the data being sent by either the Android or the IOIO doesn't get through. Given that this code does work on other KitKats, I'll have to guess that there's something funny with the N5. Having the N5 in host mode has been proven to work, so definitely give it a try.

On Sun, Jan 19, 2014 at 10:05 PM, ericroy notifications@github.comwrote:

Last time I tried Nexus5 as host, I wasn't doing it right, so i'll get a cable for that and see if that will work for me.

Reply to this email directly or view it on GitHubhttps://github.com/ytai/ioio/issues/76#issuecomment-32736073 .

ytai commented 10 years ago

Fixed in v5.03

zaiddabaeen commented 10 years ago

Ytai,

I have been trying very hard to get it to work on the Nexus 5 on any of my IOIO-OTG. I have installed App-IOIO0500.ioioapp. And I am using 5.04 firmware.

Nexus 5 doesn't work in anyway with it. Tried it with my own app and on HelloIOIO. Accessory mode, Usb debugging off, OA mode doesn't give me anything, doesn't even open the app or show that an accessory is connected. Host mode, nothing happens at all.

My Nexus 7 (new) is doing fine on OA mode, not on host mode.

ericroy commented 10 years ago

Just for the record, after ytai's fix, I was able to get it to work just fine with my Nexus5

zaiddabaeen commented 10 years ago

How so exactly? On H or A mode? USB debugging on or off? Which version of libraries?

Update: I have just debugged. My Nexus 5 never sees an accessory connected or a USB device connected. I have set the USB HOST permission, and added this code to my activity:

    UsbManager usbman = (UsbManager) getSystemService(Context.USB_SERVICE);

    try{
        if(usbman.getAccessoryList().length>0) log("GOT ACCESSORY");
    } catch (Exception e){
        e.printStackTrace();
    }
    try{
        if(usbman.getDeviceList().size()>0) log("GOT DEVICE");
    } catch (Exception e){
        e.printStackTrace();
    }

And never saw that log coming. Tried it in A and H modes, USB debugging mode on and off. Tried it on multiple IOIO-OTGs. It charges however.

ytai commented 10 years ago

You should general always work in "A" mode. USB debugging needs to be off. Use the precompiled v5.x HelloIOIO app before you move further to develop your own. Make sure the trim-pot on the IOIO is fully clockwise. Make sure the IOIO is adequately powered (if working in the mode where the IOIO is host).

On Fri, Sep 19, 2014 at 4:05 PM, zaiddabaeen notifications@github.com wrote:

How so exactly? On H or A mode? USB debugging on or off? Which version of libraries?

— Reply to this email directly or view it on GitHub https://github.com/ytai/ioio/issues/76#issuecomment-56246833.

zaiddabaeen commented 10 years ago

All of that is done. Tried HelloIOIO, still didn't work. Tried 5.03 and 5.04, same result. It is an IOIO firmware issue as the Nexus 5 cannot detect that this USB device is attached, right?

I am powering through the 5V input. Nexus 7 4.4.4 is doing fine over accessory mode. Sony Ericsson Neo 4.0.3 is doing fine over any mode.

ytai commented 10 years ago

Given that you're bypassing the on-board regulator: are you sure that you have a good 5V supply? Have you tried measuring the 5V rail with / without the N5 connected? Are you getting any charging indication on the N5?

On Fri, Sep 19, 2014 at 4:56 PM, zaiddabaeen notifications@github.com wrote:

All of that is done. I am powering through the 5V input. Nexus 7 4.4.4 is doing fine over accessory mode. Sony Ericsson Neo 4.0.3 is doing fine over any mode.

— Reply to this email directly or view it on GitHub https://github.com/ytai/ioio/issues/76#issuecomment-56249814.

tetzschner commented 9 years ago

Hi ytai

I'm having the same problem with AOA/USB on Nexus 7 (2013, Android 5.1). The IOIO-OTG is flashed with the latest 0504 firmware and the HelloIOIO is installed on the Nexus 7. Debug is off, but there is no dialog shown when I connect the USB. Only Bluetooth works fine on Nexus 2013.

On my HTC One M7 (Android 5.0.2) both AOA/USB and bluetooth works fine.

Any wise words about my problem?

Kind regards, Ole

ytai commented 9 years ago

Someone just reported that switching to MTP mode on the USB settings menu might fix this. Let me know either way.

On Tue, May 12, 2015 at 6:50 AM, tetzschner notifications@github.com wrote:

Hi ytai

I'm having the same problem with AOA/USB on Nexus 7 (2013, Android 5.1). The IOIO-OTG is flashed with the latest 0504 firmware and the HelloIOIO is installed on the Nexus 7. Debug is off, but there is no dialog shown when I connect the USB. Only Bluetooth works fine on Nexus 2013.

On my HTC One M7 (Android 5.0.2) both AOA/USB and bluetooth works fine.

Any wise words about my problem?

Kind regards, Ole

— Reply to this email directly or view it on GitHub https://github.com/ytai/ioio/issues/76#issuecomment-101289596.

zaiddabaeen commented 9 years ago

Hey tetzschner, in my experience, Nexus 5 and Nexus 7 devices (which I both own and have tested on) cannot operate under Accessory mode, they must be the host. You can do this by setting the switch to A, and connecting the Micro-A side of the USB cable to your phone, leaving the Micro-B side to the IOIO-OTG board. However, Micro-A cannot be plugged into a Nexus device, so you will have to use a USB-OTG adapter with a Micro-B side to make it the host. The downside is that you will be using power from your phone. The magic is all in the USB.

I always operate it under MTP and USB Developer mode on. Have not tested otherwise.

ytai commented 9 years ago

Thanks for the input, but I must point out that I've seen the IOIO working in OpenAccessory mode, the IOIO being the host on both the Nexus 5 and 7. You have to disable USB debugging for that to work (as is the case in general for Android >= 4.2.2).

tetzschner commented 9 years ago

That was me :) Thanks Den 14/05/2015 1.47 AM skrev "Ytai Ben-Tsvi" notifications@github.com:

Someone just reported that switching to MTP mode on the USB settings menu might fix this. Let me know either way.

On Tue, May 12, 2015 at 6:50 AM, tetzschner notifications@github.com wrote:

Hi ytai

I'm having the same problem with AOA/USB on Nexus 7 (2013, Android 5.1). The IOIO-OTG is flashed with the latest 0504 firmware and the HelloIOIO is installed on the Nexus 7. Debug is off, but there is no dialog shown when I connect the USB. Only Bluetooth works fine on Nexus 2013.

On my HTC One M7 (Android 5.0.2) both AOA/USB and bluetooth works fine.

Any wise words about my problem?

Kind regards, Ole

— Reply to this email directly or view it on GitHub https://github.com/ytai/ioio/issues/76#issuecomment-101289596.

— Reply to this email directly or view it on GitHub https://github.com/ytai/ioio/issues/76#issuecomment-101851555.

hbmartin commented 8 years ago

On my Nexus 9 - with USB debug off and MTP on - I get the messages:

V/IOIOImpl( 4575): Waiting for underlying connection
V/SocketIOIOConnection( 4575): Waiting for TCP connection

and then get the error:

V/AccessoryConnectionBootstrap( 4575): Failed to open streams
V/AccessoryConnectionBootstrap( 4575): java.io.IOException: read failed: EIO (I/O error)
V/AccessoryConnectionBootstrap( 4575):  at libcore.io.IoBridge.read(IoBridge.java:482)
V/AccessoryConnectionBootstrap( 4575):  at java.io.FileInputStream.read(FileInputStream.java:177)
V/AccessoryConnectionBootstrap( 4575):  at java.io.InputStream.read(InputStream.java:162)
V/AccessoryConnectionBootstrap( 4575):  at ioio.lib.impl.FixedReadBufferedInputStream.fill(FixedReadBufferedInputStream.java:83)
V/AccessoryConnectionBootstrap( 4575):  at ioio.lib.impl.FixedReadBufferedInputStream.fillIfEmpty(FixedReadBufferedInputStream.java:77)
V/AccessoryConnectionBootstrap( 4575):  at ioio.lib.impl.FixedReadBufferedInputStream.read(FixedReadBufferedInputStream.java:52)
V/AccessoryConnectionBootstrap( 4575):  at ioio.lib.android.accessory.AccessoryConnectionBootstrap.tryOpen(AccessoryConnectionBootstrap.java:235)
V/AccessoryConnectionBootstrap( 4575):  at ioio.lib.android.accessory.AccessoryConnectionBootstrap.waitForConnect(AccessoryConnectionBootstrap.java:168)
V/AccessoryConnectionBootstrap( 4575):  at ioio.lib.android.accessory.AccessoryConnectionBootstrap.access$300(AccessoryConnectionBootstrap.java:59)
V/AccessoryConnectionBootstrap( 4575):  at ioio.lib.android.accessory.AccessoryConnectionBootstrap$Connection.waitForConnect(AccessoryConnectionBootstrap.java:310)
V/AccessoryConnectionBootstrap( 4575):  at ioio.lib.impl.IOIOImpl.waitForConnect(IOIOImpl.java:117)
V/AccessoryConnectionBootstrap( 4575):  at ioio.lib.util.IOIOBaseApplicationHelper$IOIOThread.run(IOIOBaseApplicationHelper.java:63)
V/AccessoryConnectionBootstrap( 4575): Caused by: android.system.ErrnoException: read failed: EIO (I/O error)
V/AccessoryConnectionBootstrap( 4575):  at libcore.io.Posix.readBytes(Native Method)
V/AccessoryConnectionBootstrap( 4575):  at libcore.io.Posix.read(Posix.java:165)
V/AccessoryConnectionBootstrap( 4575):  at libcore.io.BlockGuardOs.read(BlockGuardOs.java:230)
V/AccessoryConnectionBootstrap( 4575):  at libcore.io.IoBridge.read(IoBridge.java:472)
V/AccessoryConnectionBootstrap( 4575):  ... 11 more

Never reaching the "Waiting for handshake" that I get on other successful devices On the successful devices, I don't see the "SocketIOIOConnection", is that expected? What can I do to debug this?

zaiddabaeen commented 8 years ago

Are you sure you have your USB-OTG cable connector sides right? Try flipping them. Read this: https://github.com/ytai/ioio/issues/76#issuecomment-101942882

hbmartin commented 8 years ago

@zaiddabaeen as you noted, the connector cable cannot be flipped, since the Nexus does not accept micro-A (host) connector end of the cable. I tried with a micro-B to micro-B adapter (which violates OTG spec?), without external power to the IOIO since I was worried about blowing it out. In this case the IOIO wouldn't even turn on. I also noted that, with MTP set to off, my app does not even receive the IOIO's USB connected intent. (As opposed to MTP=on, where I get the error log above.)

zaiddabaeen commented 8 years ago

It will not work otherwise. You need a USB-OTG cable and the host side connected to your Nexus 5.