Connection to FTDI UM245R chip

Thaens Tim <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <1186126815.5422.22.camel@spippo-laptop>
Hi all,

I'm trying to write an application to send and receive data from a PC
through a FTDI UM245R chip to a hardware board.
When plug the USB-cable with the chip into my PC, dmesg gives me the
following information:

usb 1-2: new full speed USB device using ohci_hcd and address 6
usb 1-2: configuration #1 chosen from 1 choice
ftdi_sio 1-2:1.0: FTDI USB Serial Device converter detected
drivers/usb/serial/ftdi_sio.c: Detected FT232BM
usb 1-2: FTDI USB Serial Device converter now attached to ttyUSB0
usb 1-2: usbfs: interface 0 claimed by ftdi_sio while 'brltty' sets
config #1
ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from
ttyUSB0
ftdi_sio 1-2:1.0: device disconnected

I have searched the device description on the internet and found this:

Device is used to communicate with 8-bit MCU. it provides serial
interface to the MCU via USB bus. From the OSes side USB device is seen
as serail port (/dev/ttyUSB0). You need USB support, usb serial
converter support and ftdi serial conv. support.

So I think I should connect to /dev/ttyUSB0, but that 'file' doesn't
exist. When I use USBview, I get the following information:

UM245R
Manufacturer: FTDI
Serial Number: FTCSJNN3
Speed: 12Mb/s (full)
USB Version: 2.00
Device Class: 00(>ifc)
Device Subclass: 00
Device Protocol: 00
Maximum Default Endpoint Size: 8
Number of Configurations: 1
Vendor Id: 0403
Product Id: 6001
Revision Number: 6.00

Config Number: 1
	Number of Interfaces: 1
	Attributes: a0
	MaxPower Needed: 100mA

	Interface Number: 0
		Name: usbfs
		Alternate Number: 0
		Class: ff(vend.)
		Sub Class: 0
		Protocol: 0
		Number of Endpoints: 2

			Endpoint Address: 81
			Direction: in
			Attribute: 2
			Type: Bulk
			Max Packet Size: 64
			Interval: 0ms		

			Endpoint Address: 02
			Direction: out
			Attribute: 2
			Type: Bulk
			Max Packet Size: 64

When I plug the device in, I get 3 more devices then when it's not
plugged in:

usbdev1.x_ep00
usbdev1.x_ep02
usbdev1.x_ep81

where x is the same number as the address from dmesg (in this case '6').
So what I think is that this is the device I should communicate with. I
should use the _ep02 to write (USBview says it's OUT) and _ep81 to read
(USBview says it's IN). 

But when I use things like:

echo 1234567890 > /dev/usbdev1.6_ep02
echo < /dev/usbdev1.6_ep81
stty -F /dev/usbdev1.6_ep02 sane speed 300 -brkint -imaxbel -echo ixon
stty -F /dev/usbdev1.6_ep81 sane speed 300 -brkint -imaxbel -echo ixon

It always says: "access denied" or "no such file or directory" , even
with sudo.

What should I do to connect with this device? Anybody have an example in
C?
Is it good to use echo or stty in console to do a quick test if I can
read/write?



Thanks

Tim


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.