USBtoSerial App has Flow Control always ON. Cannot turn off.

16 views
Skip to first unread message

Gustavo Corona

unread,
Dec 5, 2012, 6:37:38 PM12/5/12
to microp...@googlegroups.com
I compiled the USBtoSerial application for a atmega32u4 and flow control is working fine. The only problem I found is that I can't turn it off. I am using C# 2012 to turn off hand shaking and it is not working, some how flow control remains always on. 

The same C# code works on a FTDI FT232R chip. 

Any ideas?

Opendous Inc.

unread,
Dec 6, 2012, 1:10:34 AM12/6/12
to Micropendous
The code as-is has flow control permanently enabled. If you do not
need flow control you can use the stock LUFA USBtoSerial which does
not implement flow control.

A simple hardware hack would be to connect the CTS (pin D4) and RTS
(pin D1) pins together and the DSR (D5), DTR (D0), and DCD (D6) pins
for permanent hardware flow control.

Unfortunately, there is no unilateral method to disable/enable flow
control in standard Serial devices. You can choose flow control based
on what the connected device expects but not change the device's
behaviour. FTDI devices have a custom driver.
http://www.intra2net.com/en/developer/libftdi/documentation/group__libftdi.html#gac3b3d2cc69edf567e653340f434c91e0
http://www.tldp.org/HOWTO/Serial-Programming-HOWTO/

If you need this sort of behavior, the tricky part is figuring out
which communication method to use to enable/disable flow control. If
your code has direct USB access, you can communicate through the
control endpoint but your code will not be portable. If you can only
access the device through a Serial Port API, your best bet would be
some sort of port knocking sequence. For example, "Set_RTS, Set_RTS,
Change Baud to 1200, Back to Default" can signal the connected device
to disable flow control while not affecting proper function of other
devices.
http://en.wikipedia.org/wiki/Port_knocking
Reply all
Reply to author
Forward
0 new messages