Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


  Search this Thread
Old 12-12-2007, 04:21 AM   #1
LQ Newbie
Registered: Dec 2007
Posts: 1

Rep: Reputation: 0
Problem with Serial Gadget driver

We have an embedded device with an ARM9 processor running Linux 2.6.13 kernel. This device communicates with a PC via a USB connection. (PC is USB host, and ARM9 is USB device). We use the Serial Gadget driver (g_serial.ko) which makes it possible to communicate over usb via /dev/ttygserial.

I have a process that every second tries to open /dev/ttygserial. Until the device has been connected to a PC, open(/dev/ttygserial,…) returns with the error “device is not connected”. When the device is connected to a PC, and even if it is disconnected again, open(/dev/ttygserial,..) returns successfully.

I have another process continuously reading data over ttyS3.

My problem is that every time the first process fails to open /dev/ttygserial, data read over ttyS3 is damaged. So every second the data from ttyS3 is damaged, and there is CRC errors.

It seems like open(/dev/ttygserial,…) returns failure until some initialization has been done. Maybe the initialisation done by gs_setup(..) (located in drivers/usb/gadget/serial.c). gs_setup(..) is is not invoked until the USB cable is connected.

I hope somebody can help me out. I’ve worked on this problem for almost two weeks now.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
New SIIG 4 Port PCI serial card (16C954) driver problem gpedley Linux - Hardware 2 07-10-2008 10:35 PM
is there a wireless ethernet connection gadget? kalleanka Linux - Wireless Networking 3 10-11-2007 09:24 AM
serial driver Madhukar Linux - General 0 08-24-2004 07:05 AM
Scientific Gadget Junkies - Playstation II thomassounness General 4 11-22-2003 08:11 PM
Serial Port Driver- Interrupt Invoking Problem sinux Linux - Software 0 03-07-2003 03:47 PM > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 04:01 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration