cac0ns3c / arduino

Automatically exported from code.google.com/p/arduino
Other
0 stars 0 forks source link

autoreset for FTDI programming cable for lilypad & other devices without embedded USB (LINUX ONLY) #309

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. use the external FTDI USB-Serial converter to program Arduino compatible 
board, Lilypad, Arduino mini, etc
2. the board will not reset
3. this happens only in Linux (at least I have tested it only in Linux)

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

The board should auto reset, however it doesn't. The reason for this is that 
the cable is not using DTR but RTS. The way to patch this requires two changes:

 - on Serial.java (approx. line 500):

add the method:

  public void setRTS(boolean state) {
    port.setRTS(state);
  }

RXTX is already having that method, in this way we are instantiating it for the 
IDE

- on Uploader.java (approx. lines 80 to 90):

add calls to:

 serialPort.setRTS(false);

and

 serialPort.setRTS(true);

side by side to the setDTR() calls to force the autoreset on the board.

Please use labels and text to provide additional information.

Original issue reported on code.google.com by dcuartie...@gmail.com on 31 Jul 2010 at 5:48

GoogleCodeExporter commented 9 years ago
Looks reasonable.

Original comment by dmel...@gmail.com on 31 Jul 2010 at 5:50

GoogleCodeExporter commented 9 years ago
Fixed: r1046.

Original comment by dmel...@gmail.com on 10 Aug 2010 at 1:32