I have done what you trying some time ago with a standard rs232 port.

I also have seen some usb serial converters that the rts and dtr simply do not work....maybe you should first be sure your converter works.

Rafael

Em 24/03/2012 18:35, "William Pretty Security" <bill.pretty@xplornet.com> escreveu:
Hi Markus;

I tried your suggestions, but they don't seem to effect DTR.

I tried:
stty -F /dev/ttyUSB0 raw ispeed 2400 ospeed 2400

Followed by:
stty -F /dev/ttyUSB0 raw ispeed 0 ospeed 0

As suggested by a Google search, to turn DTR on and off. But nothing
happened to DTR and I got an error
message after the second command.

I found the following python code but I am not sure which tty number to use.
The Kernal seems to use 0,1, and 2. So is ttyUSB0 number 3 ??

Python:
--------------------------------------------

import time
import serial

ser = serial.Serial(0)
ser.setDTR(False)
time.sleep(0.5)
ser.setDTR(True)
time.sleep(0.5)
ser.setDTR(False)

------------------------------------------

Any suggestions, anyone ?

Bill

-----Original Message-----
From: Markus Svilans [mailto:msvilans@aeonyx.ca]
Sent: Saturday, March 24, 2012 1:21 PM
To: gumstix-users@lists.sourceforge.net
Subject: Re: [Gumstix-users] ttyUSB0 control ??

Check out the stty and setserial commands.

man stty
man setserial

Regards,
Markus




On 24-Mar-2012 13:11, William Pretty Security wrote:
> Hello List.
>
> What I am trying to do should be quite simple.
> As a hardware guy I'm not sure how to go about it :-)
>
> I connected a Sparkfun USB-Serial port board to a powered hub, which
> is connected to the USB-OTG port of my Tobi board.
>
> Everything works fine. See below:
> ----------------------------------------------------------------------
> - USB Serial support registered for FTDI USB Serial Device ftdi_sio
> 2-2.2:1.0: FTDI USB Serial Device converter detected usb 2-2.2:
> Detected FT232RL usb 2-2.2: Number of endpoints 2 usb 2-2.2: Endpoint
> 1 MaxPacketSize 64 usb 2-2.2: Endpoint 2 MaxPacketSize 64 usb 2-2.2:
> Setting MaxPacketSize 64 usb 2-2.2: FTDI USB Serial Device converter
> now attached to ttyUSB0
> usbcore: registered new interface driver ftdi_sio
> ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver
> ----------------------------------------------------------------------
> -
>
> What I would like to do is simply toggle DTR from the command line.
> What I am doing is using the Sparkfun board as a simple relay
> controller :-)
>
> Can I do something like "set ttyUSB0 up / down" to toggle DTR ??
>
> Thanks;
>
> Bill
>
>
> ----------------------------------------------------------------------
> --------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here
> http://p.sf.net/sfu/sfd2d-msazure
> _______________________________________________
> gumstix-users mailing list
> gumstix-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gumstix-users

----------------------------------------------------------------------------
--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
gumstix-users mailing list
gumstix-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gumstix-users


-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.1913 / Virus Database: 2114/4891 - Release Date: 03/24/12


------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
gumstix-users mailing list
gumstix-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gumstix-users