LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-01-2009, 03:52 PM   #1
chursch
LQ Newbie
 
Registered: Sep 2009
Posts: 12

Rep: Reputation: 0
difficulty reading from serial port (Ubuntu/zmeter)


Am having troubles using sourceforge's zmeter program to read output from a RadioShack 22-812 voltmeter in RS232 mode on Ubuntu v8.10. This is over a serial port on a Pentium III desktop. Same meter reads perfectly on Windows 2000 SP4 with RadioShack's MeterView program through COM1.

zmeter says it opens the port. Either /dev/ttyS0 or ttyS1 gets this message. With stty, I observe the baudrate changing from the default 9600 to the correct 4800. Then no more output. With ps aux, I see S+ status for both zmeter parent and child processes (it does a fork). I thought zmeter was going to almost certainly be a slam-dunk on this basic setup. I wanted to try it out here before returning to my laptop scene, where I had unsuccessfully tried zmeter with a USB to RS-232 converter (no serial port on the laptop). I wanted to get zmeter to work before I purchased a serial port add-on card for the laptop.

Then I tried ttylog on the desktop. Also hangs against /dev/ttyS0 and 1 with the voltmeter running in its RS232 mode.

There is but one serial port on the back of the desktop CPU box.

I started researching on the internet. After what I've seen there, I suspect what's going on is that at the software level I'm seeing in the terminal on the Ubuntu desktop, all is well and good. But whether the software layers are hooked up correctly to the hardware below is an open question.

Is using the standard Applications->terminal a bad idea for this? I would think not. I am, after all, referring to THE file /dev/ttyS0. I think it's the terminal's own file descriptors that are pointing to /dev/pts/0, 1 and 2 (from memory - I'm on Windoze right now).

The desktop has a PCI bus, although there is an ISA slot (never used). I saw things on the internet that implied there may be difficulties with Ubuntu in such situations. However, I find it surprising that that could be what's stopping me here - Dell produced thousands if not millions of these machines with the same basic configuration.

It could be a big help to have a guiding hand, as I'm about to dive into it with setserial and the others I've read about. setserial appears to have its own load of gotchas. I may also consider simplifying/diagnosing the line input with a loopback connector and/or a RS-232 breakout box. But I doubt really I need to go out on the line to test, since Windows sees it.

Thanks in advance for any help,
Chuck
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Serial port reading jayadhanesh Linux - Newbie 3 05-19-2009 06:54 PM
Problem reading serial port linux_chris Linux - Software 2 02-04-2009 07:55 PM
reading from serial port IC009562 Linux - Software 2 11-08-2007 11:25 PM
Having trouble reading from serial port glo Linux - Newbie 0 02-09-2007 10:42 AM
help reading data from a serial port skydemon Linux - General 1 08-10-2006 08:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:26 PM.

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