LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 01-10-2009, 09:57 PM   #1
slackiz
LQ Newbie
 
Registered: Mar 2007
Posts: 6

Rep: Reputation: 0
Serial input device using usb-serial connector


Hi,

I am having a problem using a serial writing/drawing device (i.e. an old penpower jr. model) on ubuntu intrepid. The device is connected to my computer using prolific usb-serial converter. Even though ubuntu recognizes the converter (i.e. has the driver for it), it does not seem to have the driver for the actual device (i.e. penpower).

So I tried to manually read and intepret the output from /dev/ttyUSB0. But the problem is that sometimes my computer hangs when reading from /dev/ttyUSB0 (either using xxd, cat, or a simple C program).

I've googled a bit on this but I'm still not sure about the following:
1. Do I need to setup the device first? I saw in another thread that someone suggested running 'setserial /dev/... port 0x0200 irq 5 autoconfig'
2. If I need to run the above command, could anyone explain to me what are the appropriate values for the 'port' and 'irq'?
3. What's the alternative of 'setserial' command? 'setserial' does not work for me because of the usb-serial converter.

Please let me know if more information is required, such as the linux kernel I am using, etc.

Thanks very much,

Hendrik
 
Old 01-11-2009, 04:25 PM   #2
bapigoo9
Member
 
Registered: Aug 2008
Posts: 107

Rep: Reputation: 16
The usb-serial driver for Linux is supposed to make that device appear just as a serial port. This means that you are supposed to be able to use the device as if it were a serial port. Read about setserial to see if that helps. Post the output of this on your device:

> sudo setserial -g /dev/yourdevice
 
Old 01-11-2009, 04:59 PM   #3
slackiz
LQ Newbie
 
Registered: Mar 2007
Posts: 6

Original Poster
Rep: Reputation: 0
Hi,

Thanks for the reply.

My device is /dev/ttyUSB0 and 'setserial -g /dev/ttyUSB0' gave me 'Cannot get serial info: Invalid argument'. I read somewhere that this is because the current implementation of setserial does not work for some (or all?) usb-serial connectors.

I think I can configure most values (such as baud/speed rate, parity bit, etc.) using 'stty' command with the exception of 'port' and 'irq', for which I have to use 'setserial'.

How important is it to configure the 'port' and 'irq' values?
Does it sound that the symptoms that I got (i.e. the input device causes my OS to freeze temporarily until I unplug the device or until I write/draw something on the device) were caused by misconfiguration of the 'port' and 'irq' values? Or could it be caused by something else?

Any ideas/suggestions will be greatly appreciated.

Thanks,

Hendrik
 
Old 01-11-2009, 05:41 PM   #4
bapigoo9
Member
 
Registered: Aug 2008
Posts: 107

Rep: Reputation: 16
Check dmesg for any information. Also check logs.
 
Old 01-12-2009, 05:04 AM   #5
slackiz
LQ Newbie
 
Registered: Mar 2007
Posts: 6

Original Poster
Rep: Reputation: 0
Hi,

Here are the snippets from /var/log/messages that look relevant:

Code:
Jan 12 19:30:12 third kernel: [   22.855178] usbcore: registered new interface driver usbserial
Jan 12 19:30:12 third kernel: [   22.855238] usbserial: USB Serial support registered for generic
Jan 12 19:30:12 third kernel: [   22.855313] usbcore: registered new interface driver usbserial_generic
Jan 12 19:30:12 third kernel: [   22.855354] usbserial: USB Serial Driver core
Jan 12 19:30:12 third kernel: [   22.912208] usbserial: USB Serial support registered for pl2303
Jan 12 19:30:12 third kernel: [   22.912277] pl2303 1-2:1.0: pl2303 converter detected
Jan 12 19:30:12 third kernel: [   22.932394] usb 1-2: pl2303 converter now attached to ttyUSB0
Jan 12 19:30:12 third kernel: [   22.932460] usbcore: registered new interface driver pl2303
Jan 12 19:30:12 third kernel: [   22.932502] pl2303: Prolific PL2303 USB to serial adaptor driver
Jan 12 19:30:12 third kernel: [   23.594717] HDA Intel 0000:00:1b.0: PCI INT A -> GSI 22 (level, low) -> IRQ 22
Jan 12 19:30:12 third kernel: [   25.129345] lp0: using parport0 (interrupt-driven).
Jan 12 19:30:12 third kernel: [   25.211950] Adding 2096440k swap on /dev/sda11.  Priority:-1 extents:1 across:2096440k
I think the bit above that mentions "IRQ 22" refers to a different device, right? If so, I can't tell what IRQ the input device uses, therefore we still can't eliminate the possibility of having an IRQ conflict?


Code:
Jan 12 19:32:13 third kernel: [  164.078916] type=1503 audit(1231749133.058:6): operation="inode_permission" requested_mask="w::" denied_mask="w::" fsuid=0 name="/dev/ttyUSB0" pid=6995 profile="/usr/sbin/cupsd"
I have not idea what the snippet above refers to, but just to make sure that cups wasn't interfering, I disabled cupsd, but the problem still exists nonetheless.

Thanks,

Hendrik
 
  


Reply


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
Using USB<->Serial and serial gender changer to transmit data between computers JoeyAdams Linux - Hardware 4 04-17-2008 05:15 AM
Possible to enable a usb mouse after disabling PS/2 and serial input devices? David Paroulek Linux - Hardware 0 03-11-2007 07:00 PM
Buffer serial input -- create new device? prell Programming 4 04-30-2005 03:52 PM
USB->Serial Device hugoveiga Linux - Hardware 0 01-06-2005 07:04 AM
zoom external serial with usb to serial adapter foustware Linux - Hardware 1 12-07-2003 02:02 AM


All times are GMT -5. The time now is 06:25 AM.

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