mik3y/usb-serial-for-android

FTDI: Filtering out all modem status bytes + some new requests

mik3y opened this issue · 6 comments

From wolneyk...@gmail.com on October 15, 2012 05:18:20

Hi,

I'm using the library on Android 4.0.4 phone for interfacing with a measurment device via the FTDI232RL chip. Failing to read 2KB data block I've realized that the two status bytes are included in each transfered packet, not only the first one. That issue is already handled in the original libftdi ( http://www.intra2net.com/en/developer/libftdi/documentation/ftdi_8c_source.html#l01593 ). Thus I've implement the filtering procedure.

Also, I've implemented the FTDI purge, flow control and line parameters requests.

Feel free to pull/merge the code: http://git.altlinux.org/people/manowar/public/usb-serial-for-android.git And I would be very grateful if someone could test it for regresses (Haven't I broken something?).

Regards,

  Paul.

Original issue: http://code.google.com/p/usb-serial-for-android/issues/detail?id=4

From mike.wak...@gmail.com on November 27, 2012 08:45:25

Hi Paul,

Thanks for the report!

I'd like to incorporate your changes, but before I can, my employer (Google) requires that contributors sign the following agreement, which is standard for all Google open source projects: http://code.google.com/legal/individual-cla-v1.0.html (There's a simple form a the bottom).

Do you mind doing so and would you let me know when? Thanks,
mike

Status: Accepted

From wolneyk...@gmail.com on November 30, 2012 12:50:04

27.11.2012 20:45, usb-serial-for-android@googlecode.com пишет:

Hi, Mike.

Why LGPL alone is not enough? In the case of GPL, Google would have
problems on linking their non-free programs with the library, but _L_GPL
doesn't make that kind of problems. Do Google want to sub-license the
USB serial library project as a part of a major product distribution?

Regards,

  Paul.

From mike.wak...@gmail.com on December 05, 2012 00:13:58

Hi Paul,

I think you may be misunderstanding. This doesn't change the license of usb-serial-for-android (which is LGPL). This has more to do with copyright, which is a separate matter.

The CLA is an agreement between a contributor (you) and the copyright holder (Google, in this case), where you authorize Google to use the code you submit. It's something of a formality; most open source projects don't have CLAs, but many do: http://en.wikipedia.org/wiki/Contributor_License_Agreement If you take a look at the link I gave, it spells out the exact terms; I think you'll find it's fairly straightforward. As it says, "This license is for your protection as a Contributor as well as the protection of Google; it does not change your rights to use your own Contributions for any other purpose."

(I'm really sorry for the formality, but since Google lets me work on this project on their dime, it's something they require.)

thanks!
mike

From felix.ha...@gmail.com on May 15, 2013 14:43:28

I ran into the same problem yesterday and had overlookes this bug report. So I developed an own bugfix.

But maybe this helps you, because I have signed the Google CLA a while ago.

The fix does however not work when ENABLE_ASYNC_READS is set to true, because the status bytes are not at the beginning of the buffer then.

Attachment: FTDI_filterStatusBytes.diff

From felix.ha...@gmail.com on May 15, 2013 14:53:49

The same patch with corrected intendeation (4 spaces)

Attachment: FTDI_filterStatusBytes.diff

Merged as eca40d6.