r3n4ud / ligo

ligō: virtual accessories for Android
Apache License 2.0
3 stars 0 forks source link

Fix `submit_transfer': error TRANSFER_STALL (LIBUSB::ERROR_PIPE) error on UMS Android devices #2

Open r3n4ud opened 11 years ago

r3n4ud commented 11 years ago

ligo-sample trace:

/home/renaud/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/libusb-0.2.2/lib/libusb/dev_handle.rb:432:in submit_transfer': error TRANSFER_STALL (LIBUSB::ERROR_PIPE) from /home/renaud/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/libusb-0.2.2/lib/libusb/dev_handle.rb:408:incontrol_transfer' from /home/renaud/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/ligo-0.1.0/lib/ligo/device.rb:196:in block in get_protocol' from /home/renaud/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/libusb-0.2.2/lib/libusb/device.rb:62:inopen' from /home/renaud/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/ligo-0.1.0/lib/ligo/device.rb:192:in get_protocol' from /home/renaud/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/ligo-0.1.0/lib/ligo/device.rb:167:inaoap?' from /home/renaud/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/ligo-0.1.0/lib/ligo/context.rb:38:in block in device_list' from /home/renaud/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/ligo-0.1.0/lib/ligo/context.rb:31:intimes' from /home/renaud/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/ligo-0.1.0/lib/ligo/context.rb:31:in device_list' from /home/renaud/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/libusb-0.2.2/lib/libusb/context.rb:179:indevices' from /home/renaud/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/ligo-0.1.0/lib/ligo/device.rb:238:in wait_and_retrieve_by_serial' from /home/renaud/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/ligo-0.1.0/lib/ligo/device.rb:129:instart_accessory_mode' from /home/renaud/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/ligo-0.1.0/lib/ligo/device.rb:102:in attach_accessory' from /home/renaud/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/ligo-0.1.0/bin/ligo-sample:21:in<top (required)>' from /home/renaud/.rbenv/versions/1.9.3-p327/bin/ligo-sample:23:in load' from /home/renaud/.rbenv/versions/1.9.3-p327/bin/ligo-sample:23:in

'

Observed on HTC Flyer 3.2. To be tested on Nexus S with the latest factory rom.

The device has successfully switched to accessory mode…

get_protocol is called from https://github.com/nibua-r/ligo/blob/master/lib/ligo/device.rb#L238

r3n4ud commented 11 years ago

See 2890c3ccffe8bcd5d84a01c7f5f7318bcd353f15 for the associated specs.

r3n4ud commented 11 years ago
I, [2012-12-10T23:24:01.024690 #4032]  INFO -- Ligo::Device: #<Ligo::Device 1/15 0bb4:0ca9 HTC Android Phone HT15NJNXXXXX (MassStorage SCSI Bulk-Only, Vendor specific (42,01))> supports AOAP version 1.
D, [2012-12-10T23:24:01.025435 #4032] DEBUG -- Ligo::Device: attach_accessory(#<Ligo::Accessory:0x00000001a2f0e8>)
D, [2012-12-10T23:24:01.025500 #4032] DEBUG -- Ligo::Device: start_accessory_mode
D, [2012-12-10T23:24:01.025577 #4032] DEBUG -- Ligo::Device: send_accessory_id
E, [2012-12-10T23:24:01.026310 #4032] ERROR -- Ligo::Device: Failed to send manufacturer string:
E, [2012-12-10T23:24:01.027416 #4032] ERROR -- Ligo::Device: Failed to send description string:
D, [2012-12-10T23:24:01.027916 #4032] DEBUG -- Ligo::Device: send_start