Re: [Ftdi-usb-sio-devel] Problems with FT245 on ttyUSB0
Brought to you by:
bryder
From: Ralph L. <suc...@ih...> - 2013-04-18 23:21:36
|
Also, is the board designed to operate with the FT245 in synchronous or async mode? The sync. mode requires the strobes on the FT245 to be driven externally (e.g., by a microcontroller) - this is the default I think. The easiest way to set the mode is probably to use libftdi - it has python bindings. Ralph. On Thu, 18 Apr 2013 13:19:19 -0400 Ryan Neve <ne...@em...> wrote: > I'm having trouble with a FT245RL based USB-relay board. It should be > easy enough to use. When I plug it in it appears as a serial port. I > send it three bytes which tell it what to turn on and off. E.g. > \xFF\x01\x01 turns on just relay 1 and \xff\x01\x00 turns everything off. > > I wrote a very simple python program to test this on a Debian squeeze > machine: > > import serial > ser = serial.Serial('/dev/ttyUSB0') # Defaults to 9600 8N1 > ser.open() > ser.write(chr(255) + chr(1) + chr(1)) > ser.close > > ...and nothing happened no matter how much I fiddled. usually I get > nothing, and sometimes it blocks when I write. I installed the drivers > on a win7x64 machine, and changed one line to point to COM3, it works > great. I then tried it on a CentOS5 machine and it doesn't work here > either. I don't think it is permissions, I've added the users to the > dialout and uucp groups respectively. I've also tried it as root. I was > able to set up a udev rule on Debian which seems to work. > > I'm wondering if there might be a problem with ftdi_sio? I'm a little > over my head, but I did this: > > #/sbin/modprobe ftdi_sio vendor=0x403 product=0x6001 debug > > and > > #dmesg | grep ftdi > [71621.091869] ftdi_sio ttyUSB0: ftdi_submit_read_urb - failed > submitting read urb, error -1 > [74607.375564] ftdi_sio ttyUSB0: ftdi_submit_read_urb - failed > submitting read urb, error -1 > > Ftdi has a Linux driver on their web site, but I think my kernels should > be new enough (2.6.33.7.2-rt30-1-686 and > 2.6.18-348.3.1.el5.centos.plusPAE) to not need it. If I do need it, is > there a guide on how to install available? > > Thanks. > -- > *Ryan Neve* > University of North Carolina > Institute of Marine Sciences > 3431 Arendell St > Morehead City, NC 28557 > (252) 726-6841 x179 > (252) 726.2426 Fax > |