Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UsbConnection.bulkTransfer returns "-1". What does it mean?

Tags:

android

usb

According to the doc negative response means failure. How to know what's wrong? is there any full doc about error types?

For more curious: I'm trying to upload arduino sketch via USB. First i'm getting bootloader attention by turning DTR/RTS off/on and then sending data using Stk500 protocol. It's working fine if running on mac/arduino via usb (rxtx serial is used) so i think it should work on android AS-IS (just change serial), but it fails to send the data after DTR/RTS toggling.

like image 337
4ntoine Avatar asked Nov 13 '22 09:11

4ntoine


1 Answers

Well, after diving into log i was able to handle it - don't close/open usb few times in a row

like image 74
4ntoine Avatar answered Nov 15 '22 13:11

4ntoine