LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 07-05-2007, 11:16 PM   #1
dsheller
Member
 
Registered: Jan 2003
Posts: 56

Rep: Reputation: 15
Trouble writing to usb-serial converter


Basically I can read from the device, using the pl2303.o module, but I am unable to write to it. I checked the permissions on /dev/ttyUSB0 and /dev/ttyUSB1 but those all were good, and I even went as far to make them rwx to all groups, still no dice. I am using a 2.4 kernel, and am not sure where to go from here.

Anyone have some ideas?
 
Old 07-07-2007, 02:10 PM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
What are you using with which to read and write? If your own code, please post the relevant parts here (in [C O D E] tags please). Otherwise, have you tried to use a standard serial cmmunications tool such as minicom or C-Kermit?
--- rod.
 
Old 07-08-2007, 12:55 AM   #3
dsheller
Member
 
Registered: Jan 2003
Posts: 56

Original Poster
Rep: Reputation: 15
I have tried writing to it with echo and minicom, neither want to work. Basically I am trying to SSH to a box running 2.4.20 kernel and use a serial connection to control another device. The reason I am using USB-Serial converters is to access a multitude of devices on different ports. But more to the point, yes I tried minicom and it failed at writing, but I can read everything the device says when booting.
 
Old 07-08-2007, 12:57 PM   #4
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
What does 'failed at writing' look like? Silently not sending? Reporting permission or other error? Are you sure your cabling is correct? Tried looping Tx back into Rx? Is the USB subsystem fully functional on the serial-USB host? If you are a programmer, try running some of the example code from the Serial Programming HOWTO. Add some code to verbosely report all system call return codes.
Are there options of any sort passed to the driver module? If yes, are you sure they are correct?

Upon reading your original post, I see that I made an assumption that you were able to read from it. Was I correct in that assumption?


--- rod.

Last edited by theNbomr; 07-08-2007 at 12:59 PM.
 
Old 07-08-2007, 02:23 PM   #5
dsheller
Member
 
Registered: Jan 2003
Posts: 56

Original Poster
Rep: Reputation: 15
Alright, well when you connect and reboot the device it will spit back all the BIOS information, and then when it gets to the console where it waits for commands I am unable to send anything. If I type it doesn't show up (obviously this can be fixed with local echo turned on) and won't send to the device. The cabling is correct, as I can read but not write. The permissions ttyUSB0 and ttyUSB1 are also correct for writing. As for the options passed to the module, I am not sure if there are any...
 
Old 07-08-2007, 09:29 PM   #6
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Okay, so your USB-serial interface is used to connect to some device which provides an interactive console type of interface, and when that device reboots (not the USB-serial device), you are able to see its serial output in your minicom session? Have I interpreted that correctly? That confirms only that the receive cabling is correct. Since the device driver is evidently satisfied that it is receiving data from your userspace program (it doesn't hang or produce errors), it must think that it is sending your data. Do you have a pinout for the serial side of the interface? If it is a standard D-sub connector, you can probably loopback the Tx pin (the device under test), to the Rx pin, the known good device. This is probably do-able with a paper clip or other piece of wire. You should do this as closely as possible to the USB-serial interface, to eliminate cabling problems. If you get an echo, you know the software and USB-serial interface are working. If not, then either the serial interface or the driver are not working. If the loopback test is successful, then trace out the cables, and see how that fails. I assume that you have successfully communicated with your external device by other, more conventional means, and it is known that this is not the problem. Another possible issue would be hardware handshaking. Perhaps the driver is not sending data because it has not seen some expected condition of modem control signals on the serial port. Do you know what state these are in? Perhaps you could try using the interface with an external modem, using a fully populated serial cable, and see how that behaves.

--- rod.
 
Old 02-29-2008, 09:20 AM   #7
geden
Member
 
Registered: Nov 2004
Distribution: Mandriva ONE/ Kubuntu 8.04
Posts: 61

Rep: Reputation: 15
It may be that when the bios finishes it changes the baud rate, I have some embedded OS devices that do this. Exit minicom and reconfigure with another baud rate, your boot up will be jibberish but hiting the "enter" key when all activity stops brings up the remote device command prompt. Worth a try anyway.
 
  


Reply



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
USB to serial converter asprakash Linux - Hardware 2 03-14-2007 11:47 PM
Usb to Serial converter RHEL4 not recognised simonwelch Linux - Hardware 2 01-13-2007 03:24 AM
pilot-link not working with USB Serial-USB Converter with m105 calmofthestorm Linux - Laptop and Netbook 0 09-03-2005 02:03 PM
USB to Serial Converter on Serial Modem bongski55 Linux - General 3 08-29-2005 10:04 AM
USB serial converter problem linuxBill Linux - Software 3 04-23-2003 08:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:33 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration