kkohase / usb-serial-for-android

Automatically exported from code.google.com/p/usb-serial-for-android
GNU Lesser General Public License v3.0
0 stars 0 forks source link

setDtr/setRTS is not implemented for FTDI imll #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. invoke setDtr/setRts (true)

What is the expected output? What do you see instead?

Expected it to set to true, but nothing happens

What version of the product are you using? On what operating system?

Please provide any additional information below.

Just not implemented in FtdiSerialDriver class

Original issue reported on code.google.com by d...@antonsmirnov.name on 17 Mar 2013 at 6:18

GoogleCodeExporter commented 9 years ago
this links can be helpful:
http://www.ftdichip.com/Support/Documents/TechnicalNotes/TN_147_Java_D2xx_for_An
droid.pdf
http://code.google.com/p/android-ftdi-usb2serial-driver-package/

Original comment by d...@antonsmirnov.name on 17 Mar 2013 at 8:00

GoogleCodeExporter commented 9 years ago
I've implemented setDTR to reset my Arduino.

This is how it works for me: 
    public void setDTR(boolean value) throws IOException {
        int SET_CONTROL_LINE_STATE=0x1;
        int DTR_HIGH =257;
        int DTR_LOW=256;
        int result = mConnection.controlTransfer(FTDI_DEVICE_OUT_REQTYPE,
                 SET_CONTROL_LINE_STATE, value?DTR_HIGH:DTR_LOW, 0 /* index */,
                 null, 0, USB_WRITE_TIMEOUT_MILLIS);

        if (result != 0) {
             throw new IOException("Setting DTR failed: result=" + result);
        }
    }

Original comment by die...@gmail.com on 5 Jul 2013 at 9:54

GoogleCodeExporter commented 9 years ago
moved to github: https://github.com/mik3y/usb-serial-for-android/issues/13

Original comment by mike.wak...@gmail.com on 13 Sep 2013 at 4:36