openSUSE Forums > Hardware » usb serial

Go Back   openSUSE Forums > Hardware
Forums FAQ Members List Search Today's Posts Mark Forums Read


Hardware Questions about drivers, peripheral cabling, configuration

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 26-Oct-2009, 05:03
Puzzled Penguin
 
Join Date: Oct 2009
Posts: 4
luca72 hasn't been rated much yet
Default usb serial

Hello i have usb serial adapter that for my point of view is see from the sistem, but when i try to connect to a device i don't have any connection.
This are the data:

Bus 003 Device 002: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x0403 Future Technology Devices International, Ltd
idProduct 0x6001 FT232 USB-Serial (UART) IC
bcdDevice 4.00
iManufacturer 1 FTDI
iProduct 2 USB <-> Serial
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 90mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 2 USB <-> Serial
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Device Status: 0x0000
(Bus Powered)

and ls -l /dev/ttyUSB* give this answer:

crw-rw---- 1 root uucp 188, 0 26 ott 10:13 /dev/ttyUSB0

Can you help me to use this device
thanks Luca
Reply With Quote
  #2 (permalink)  
Old 26-Oct-2009, 07:03
smpoole7's Avatar
Parent Penguin
 
Join Date: Oct 2008
Location: Birmingham. AL
Posts: 580
smpoole7 is on a distinguished reputation roadsmpoole7 is on a distinguished reputation road
Default Re: usb serial

Quote:
Originally Posted by luca72 View Post
Hello i have usb serial adapter that for my point of view is see from the sistem, but when i try to connect to a device i don't have any connection.
What are you using to make the connection? Have you ensured that you're using "/dev/ttyUSB0" and not some other string?

How did you confirm that the appropriate driver was loaded? I see the string "ttyUSB0" in your output below, but what specific steps did you take to ensure that driver support was present/enabled in OpenSusE?

The reason I ask is because the readme file (http://www.ftdichip.com/Drivers/VCP/Linux/README.dat) seems to indicate that there may be other steps that you must take to get it to work.
Reply With Quote
  #3 (permalink)  
Old 26-Oct-2009, 11:14
Puzzled Penguin
 
Join Date: Oct 2009
Posts: 4
luca72 hasn't been rated much yet
Default Re: usb serial

Hello and thanks for your help

First the module is loaded, but when i try to install the new driver i get a lot of error the firsts are:

cc -Wall -D__KERNEL__ -DMODULE -I/lib/modules/2.6.27.29-0.1-pae/build/include -D__SMP__ -DSMP -DMODVERSIONS -include /lib/modules/2.6.27.29-0.1-pae/build/include/linux/modversions.h -I/usr/src/linux-2.6.27.29-0.1-pae/drivers/usb/serial/ -O -c -o ftdi_sio.o ftdi_sio.c
cc1: error: /lib/modules/2.6.27.29-0.1-pae/build/include/linux/modversions.h: No such file or directory
ftdi_sio.c:253:24: error: linux/init.h: No such file or directory
ftdi_sio.c:254:24: error: linux/slab.h: No such file or directory
ftdi_sio.c:256:30: error: linux/tty_driver.h: No such file or directory
ftdi_sio.c:257:28: error: linux/tty_flip.h: No such file or directory
ftdi_sio.c:258:26: error: linux/module.h: No such file or directory
ftdi_sio.c:259:28: error: linux/spinlock.h: No such file or directory
ftdi_sio.c:260:25: error: asm/uaccess.h: No such file or directory
ftdi_sio.c:261:23: error: linux/usb.h: No such file or directory
ftdi_sio.c:263:30: error: linux/usb/serial.h: No such file or directory

The kernek source is installed.
Can you help me to solve the problem.

Luca
Reply With Quote
  #4 (permalink)  
Old 26-Oct-2009, 21:40
smpoole7's Avatar
Parent Penguin
 
Join Date: Oct 2008
Location: Birmingham. AL
Posts: 580
smpoole7 is on a distinguished reputation roadsmpoole7 is on a distinguished reputation road
Default Re: usb serial

At a prompt, enter "uname-a" and post the results here. You need to make sure that the installed kernel sources match the running kernel. This is usually automatic, but I've seen cases where Yast might miss that you're using the PAE kernel and install the wrong source. The installed source needs to match the installed kernel to the letter.

However, the error that you're getting makes me wonder if all the source got installed properly. Go into Yast -> Software Management -> Add/Remove Software and do a search on "Kernel." Make sure the package that matches your running kernel is installed. You may also need to tell the driver package where the source is at (typically by giving the package something like "--kernel-source=/usr/src/blah-blah" or by setting something like "export KERN_SRC=/usr/src/blah-blah" just before executing the "make" command on the package).
Reply With Quote
  #5 (permalink)  
Old 27-Oct-2009, 02:32
Puzzled Penguin
 
Join Date: Oct 2009
Posts: 4
luca72 hasn't been rated much yet
Default Re: usb serial

Hello

This is the replay
linux-gu5x:/home/luca111 # uname -a
Linux linux-gu5x 2.6.27.29-0.1-pae #1 SMP 2009-08-15 17:53:59 +0200 i686 athlon i386 GNU/Linux
Reply With Quote
  #6 (permalink)  
Old 27-Oct-2009, 02:55
Puzzled Penguin
 
Join Date: Oct 2009
Posts: 4
luca72 hasn't been rated much yet
Default Re: usb serial

hello again this is the makefile:

# This Makefile has been simplified as much as possible, by putting all
# generic material, independent of this specific directory, into
# ../Rules.make. Read that file for details

# The usb serial headers
INCLUDEUSBSER := $(shell echo "/usr/src/linux-`uname -r`/drivers/usb/serial/")

TOPDIR := $(shell pwd)
#TOPDIR = .
include $(TOPDIR)/Rules.make

CFLAGS += -I$(INCLUDEUSBSER) -O

OBJS = ftdi.o

all: $(OBJS)

ftdi.o: ftdi_sio.o
$(LD) -r $^ -o $@

install:
install -d $(INSTALLDIR)
install -c $(OBJS) $(INSTALLDIR)

clean:
rm -f *.o *~ core


and this is the Rules.make

# -*-makefile-*-
#
# This file is part of the sample code for the book "Linux Device Drivers",
# second edition. It is meant to be generic and is designed to be recycled
# by other drivers. The comments should be clear enough.
# It partly comes from Linux Makefile, and needs GNU make. <rubini@linux.it>

# TOPDIR is declared by the Makefile including this file.
ifndef TOPDIR
TOPDIR = .
endif

# KERNELDIR can be speficied on the command line or environment
ifndef KERNELDIR
KERNELDIR := $(shell echo "/lib/modules/`uname -r`/build")
endif
# The headers are taken from the kernel
INCLUDEDIR = $(KERNELDIR)/include

# We need the configuration file, for CONFIG_SMP and possibly other stuff
# (especiall for RISC platforms, where CFLAGS depends on the exact
# processor being used).
ifeq ($(KERNELDIR)/.config,$(wildcard $(KERNELDIR))/.config)
include $(KERNELDIR)/.config
else
MESSAGE := $(shell echo "WARNING: no .config file in $(KERNELDIR)")
endif

# ARCH can be speficed on the comdline or env. too, and defaults to this arch
# Unfortunately, we can't easily extract if from kernel configuration
# (well, we could look athe asm- symlink... don't know if worth the effort)
ifndef ARCH
ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
-e s/arm.*/arm/ -e s/sa110/arm/)
endif

# This is useful if cross-compiling. Taken from kernel Makefile (CC changed)
AS =$(CROSS_COMPILE)as
LD =$(CROSS_COMPILE)ld
CC =$(CROSS_COMPILE)gcc
CPP =$(CC) -E
AR =$(CROSS_COMPILE)ar
NM =$(CROSS_COMPILE)nm
STRIP =$(CROSS_COMPILE)strip
OBJCOPY =$(CROSS_COMPILE)objcopy
OBJDUMP =$(CROSS_COMPILE)objdump

# The platform-specific Makefiles include portability nightmares.
# Some platforms, though, don't have one, so check for existence first
ARCHMAKEFILE = $(TOPDIR)/Makefile.$(ARCH)
ifeq ($(ARCHMAKEFILE),$(wildcard $(ARCHMAKEFILE)))
include $(ARCHMAKEFILE)
endif

USBDI=/linux

# CFLAGS: all assignments to CFLAGS are inclremental, so you can specify
# the initial flags on the command line or environment, if needed.

CFLAGS += -Wall -D__KERNEL__ -DMODULE -I$(INCLUDEDIR)

ifdef CONFIG_SMP
CFLAGS += -D__SMP__ -DSMP
endif

# Prepend modversions.h if we're running with versioning.
ifdef CONFIG_MODVERSIONS
CFLAGS += -DMODVERSIONS -include $(KERNELDIR)/include/linux/modversions.h
endif

#Install dir
VERSIONFILE = $(INCLUDEDIR)/linux/version.h
VERSION = $(shell awk -F\" '/REL/ {print $$2}' $(VERSIONFILE))
INSTALLDIR = /lib/modules/$(VERSION)/misc


I have to change somethings inside this two file?

Regards

Luca
Reply With Quote
Reply

Bookmarks


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2