libaums
libaums copied to clipboard
Wrong CSW status
Some USB devices seem to return an invalid CSW status, even when the operation apears to be correct. If I return TRUE in cases where csw.getbCswStatus== 1 in "transferCommand" (line 134) with these USB devices, the data transfer seems to be OK. For now I ignore csw.getbCswStatus== 1, but like to solve this problem.
Maarten
Hey there,
and sorry for the late response.
Thanks for this information, I never had this problem, to be honest. Can you maybe elaborate a little which phone and pen drive you use? Is there a pattern?
Dear Magnusja,
I am running the code on a Enybox 'Android box' with Android 6 (I tried several pieces). It seems that about 50% of the USB sticks do not work, but I have at least one official Sandisk 32G that works fine. I also noticed that (smaller) FAT formatted devices do not work, but that can of course eailly be solved.
Maarten
Thanks for solving my problem.
Hi, I have the same problem now, ScsiInquiryResponse [peripheralQualifier=0, peripheralDeviceType=0, removableMedia=false, spcVersion=2, responseDataFormat=2] java.io.IOException: Unsuccessful Csw status: 1
I get this error when i setupDevice() as in your MainActivity code, it happens to me with 2 usb different sticks, both fat 32 and mbr. 06:11:09.200 2229-2229/com.usb E/2: error setting up device java.io.IOException: Unsuccessful Csw status: 1 at com.github.mjdev.libaums.driver.scsi.ScsiBlockDevice.transferCommand(ScsiBlockDevice.java:185) at com.github.mjdev.libaums.driver.scsi.ScsiBlockDevice.init(ScsiBlockDevice.java:98) at com.github.mjdev.libaums.UsbMassStorageDevice.setupDevice(UsbMassStorageDevice.java:232) at com.github.mjdev.libaums.UsbMassStorageDevice.init(UsbMassStorageDevice.java:192) i always get same error with some usb sticks
Please help
Hi!, i solved the problem, just need a delay before calling discover function and all usb sticks work.
Hi there! I sleep the thread 1 second before i call device.init();
and it works!
Nice!!! its great to hear it, you can try timer Countdown in order to avoid sleeping the thread
I'm still getting this. The 1 second sleep doesn't help.
Try with 3 seconds delay
[https://ci3.googleusercontent.com/proxy/GYeW-WfXrv_SHe0fBJj--7wGxKXhXu22PUhEGDHeEPu98HxeGrUyMeXjFyLdSYJTwwajU6av-6Y9Fw=s0-d-e1-ft#http://bizintek.es/logo-bizintek.png]
C/ Nemesio Mogrobejo 9A 48015 - Bilbao (Vizcaya) Tel: +34 94 437 26 96 Fax: +34 94 434 47 05 www.bizintek.eshttp://www.bizintek.es/ Álvaro Valtierra De Pablo Firmware Engineer
[email protected]mailto:[email protected]
[https://ci4.googleusercontent.com/proxy/iN-a4agKdd_Pwr0dNwJWrzAozdp2wO52fOLxMKG7ANaQPfRy5EglRL8zAbD_oS4=s0-d-e1-ft#http://bizintek.es/bg.png]
De: Bryan E Beale [email protected] Enviado: jueves, 25 de octubre de 2018 21:38:00 Para: magnusja/libaums Cc: Alvaro Valtierra; Comment Asunto: Re: [magnusja/libaums] Wrong CSW status (#124)
I'm still getting this. The 1 second sleep doesn't help.
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/magnusja/libaums/issues/124#issuecomment-433178835, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AnixcmGtKmoKiNBLONtkACmA6GtnX1Nnks5uohMYgaJpZM4REueP.