libftdi Archives

Subject: Re: Problems with some of the examples

From: Ryan Tennill <rtennill@xxxxxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Wed, 25 Feb 2015 17:39:44 -0600
The serial test example has a default PID value of 0 which probably doesn't match a device in your system. You can get a list of USB devices with vendor ID (VID) and product ID (PID) using the command lsusb -v. The FTDI VID is 0403 in case you don't get a string description in the output. I would then try running the serial test again with the appropriate PID value.

Stream test uses a default PID of 0x6010 so you'll need to provide the proper PID at the command line for this one too.

Other examples use the default combination 0x0403/0x6001 and serial test should do this as well. A patch is attached that makes this change to serial_test.c

Also there is a udev rule in the repo that you can install to give normal users access to ftdi devices. This would let you access the device without using sudo but you may need to add a line for the PID of your device. For it to take effect you will have to unplug and reconnect your USB device.

to install the provided rule: cp  libftdi/packages/99-libftdi.rules  /etc/udev/rules.d/

Ryan


On 02/25/2015 03:05 PM, Ian Carr-de Avelon wrote:
I work in a school which has some DMX lights and an AVT DMX511 USB interface:
http://sklep.avt.pl/konwerter-usb-dmx512.html
I'm trying to figure out a way to make a Python module so pupils can write programs to control the lights for discos and theatre productions and possibly also as a strobe for Physics lessons.
So far I've downloaded libftdi1-1.2 on ubuntu 14.04 LTS on a HP laptop and some of the examples work and some don't.
ian@HP-620:~/BISC/computing/lighting/libftdi1-1.2/build/examples$ sudo ./find_all
Number of FTDI devices found: 1
Checking device: 0
Manufacturer: FTDI, Description: FT232R USB UART

ian@HP-620:~/BISC/computing/lighting/libftdi1-1.2/build/examples$ sudo ./simple Initialized libftdi 1.2 (major: 1, minor: 2, micro: 0, snapshot ver: unknown)
ftdi_read_chipid: 0
FTDI chipid: 67194FCD
ian@HP-620:~/BISC/computing/lighting/libftdi1-1.2/build/examples$ sudo ./serial_test
unable to open ftdi device: -3 (device not found)
ian@HP-620:~/BISC/computing/lighting/libftdi1-1.2/build/examples$ sudo ./stream_test
Can't open ftdi device: device not found
ian@HP-620:~/BISC/computing/lighting/libftdi1-1.2/build/examples$ sudo ./baud_test
real baudrate used: 9600
this test should take 10.42 seconds
and took 41.0899 seconds, this is 2434 baud or factor 0.254

Do you have any ideas where I should start looking to solve these problems? I notice that there is a python directory in the source. Does this mean that some kind of wrapper already exists?
Yours
Ian



libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx



-- 

217-351-2655 ext. 126
Distant Focus Corporation
4114B Fieldstone Rd
Champaign, IL 61822
http://jupiter.distantfocus.com/projects/


libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx


Attachment: 0001-serial-test-change-default-PID-to-0x6001-instead-of-.patch
Description: Text Data

Current Thread