Closed mik3y closed 10 years ago
From mike.wak...@gmail.com on December 19, 2012 21:35:51
Are you cat'ing the device concurrently while using this driver, or was that just an example done at a separate time?
Are you running the v0.1.0 JAR, or the latest sources in git?
From mafish...@gmail.com on December 20, 2012 03:44:01
Not cat'ing the device concurrently. Yes, running v0.1.0 JAR.
Upon further investigation, it appears that nothing is being returned at all. The value returned from read(...) is 0.
From mike.wak...@gmail.com on April 07, 2013 22:47:59
Sorry for the delay in returning to this. Still an issue?
The driver will return 0 when there is (a) no data to be read, or (b) a timeout reading data. Is it possible you are calling read() on a device which doesn't have the baud rate set correctly, or with a very short timeout?
From ruZ...@gmail.com on May 13, 2013 11:05:38
I saw this while using source instead of prebuilt. 010 jar fixed it. (FTDI, Samsung S3(9300), CM 10.1).
commit 22c4c9b280da08207ea6abf7a17a51c465447e9a
I'm trying to connect to a MSP430G2 Launchpad. Same problem. The read() method returns the buffer size. And vector buffer remains zero all positions.
I had the same problem and had my comment all typed up and ready to click submit, then I noticed I was using the wrong baudrate. Hope this helps!
@iforce2d: :grin: thanks for following up. We should add this to the FAQ as it's a common ailment (even on desktops). Marking closed!
The problem was the index of the Endpoint. I solved this with the following code in the open() method: /* @author Marlon Scalabrin ( invent.to) / for (int j = 0; j < mDevice.getInterfaceCount(); j++) { UsbInterface mInterface = mDevice.getInterface(j); for (int i = 0; i < mInterface.getEndpointCount(); i++) { if (mInterface.getEndpoint(i).getType() == UsbConstants.USB_ENDPOINT_XFER_BULK) { if (mInterface.getEndpoint(i).getDirection() == UsbConstants.USB_DIR_OUT) { mWriteEndpoint = mInterface.getEndpoint(i); } if (mInterface.getEndpoint(i).getDirection() == UsbConstants.USB_DIR_IN) mReadEndpoint = mInterface.getEndpoint(i); } } } }
Att, []s Marlon Henrique Scalabrin invent.to http://invent.to - Soluções em Sistemas Computacionais
2014-08-20 2:46 GMT-03:00 mike w notifications@github.com:
Closed #6 https://github.com/mik3y/usb-serial-for-android/issues/6.
— Reply to this email directly or view it on GitHub https://github.com/mik3y/usb-serial-for-android/issues/6#event-154838943 .
@marlonscalabrin
I am also having the same problem with a Tiva MCU. Could please provide the complete modified code you put in open(..) method?
I only verify all "endpoints" looking for the correct type. And selecting the "in point" and the "out point". Do it in the open() method in CdcAcmSerialDriver.java. You need add your vendorID and productID in UsbId.java. And add its reference on CdcAcmSerialDriver.java#getSupportedDevices().
Att, []s Marlon Henrique Scalabrin invent.to http://invent.to - Soluções em Sistemas Computacionais
2015-08-18 8:16 GMT-03:00 mindentropy notifications@github.com:
@marlonscalabrin https://github.com/marlonscalabrin
I am also having the same problem with a Tiva MCU. Could please provide the complete modified code you put in open(..) method?
— Reply to this email directly or view it on GitHub https://github.com/mik3y/usb-serial-for-android/issues/6#issuecomment-132174694 .
From mafish...@gmail.com on December 18, 2012 09:07:23
What steps will reproduce the problem? 1. Connect /dev/ttyACM0 device
Original issue: http://code.google.com/p/usb-serial-for-android/issues/detail?id=6