Networking Forums

Networking Forums > Computer Networking > Linux Networking > Problem With Serial Port

Reply
Thread Tools Display Modes

Problem With Serial Port

 
 
John
Guest
Posts: n/a

 
      09-25-2003, 01:00 PM
hi,
I have an IBM thinkpad (A31) and I am trying to use a null-modem
serial cable to connect it to my Desktop. My desktop is running WinXP
and my Laptop dual boots WinXP and Linux (Red-Hat 9). When I boot the
laptop in WinXP and I connect the cable to the serial ports everything
works fine (in hyperterminal). I think boot in to Linux and try to use
minicom to communicate to the XP machine. Nothing going. I've tryed
playing with all the configuration options but to no avail! I can't
even find out which serial port (dev/ttyS?) is linux registering my
COM port. serialstat doesn't work (complains about some error)

I've tried all the ports in minicom but not even a single charcter is
transferred.

Can anyone help?

John
 
Reply With Quote
 
 
 
 
Paul Lutus
Guest
Posts: n/a

 
      09-25-2003, 04:35 PM
John wrote:

> hi,
> I have an IBM thinkpad (A31) and I am trying to use a null-modem
> serial cable to connect it to my Desktop. My desktop is running WinXP
> and my Laptop dual boots WinXP and Linux (Red-Hat 9). When I boot the
> laptop in WinXP and I connect the cable to the serial ports everything
> works fine (in hyperterminal). I think boot in to Linux and try to use
> minicom to communicate to the XP machine. Nothing going. I've tryed
> playing with all the configuration options but to no avail! I can't
> even find out which serial port (dev/ttyS?) is linux registering my
> COM port.


If you have one serial port, it's most likely /dev/ttyS0.

> serialstat doesn't work (complains about some error)


Oh, yeah, the "some error" error. Care to tell us which "some error" yours
was? We're making a collection.

> I've tried all the ports in minicom but not even a single charcter is
> transferred.


This can be very difficult, because more than one problem can exist at a
time. Baud rate, number of stop bits, parity, aand so forth, can each stop
the transfer, making it difficult to debug. And the above applies to both
ends of the circuit. Your serial crossover cable might not have enough
wires, a common problem on older PCs and Windows versions that require more
wires to be present and activated.

--
Paul Lutus
http://www.arachnoid.com

 
Reply With Quote
 
Floyd Davidson
Guest
Posts: n/a

 
      09-25-2003, 09:26 PM
(E-Mail Removed) (John) wrote:
>hi,
>I have an IBM thinkpad (A31) and I am trying to use a null-modem
>serial cable to connect it to my Desktop. My desktop is running WinXP
>and my Laptop dual boots WinXP and Linux (Red-Hat 9). When I boot the
>laptop in WinXP and I connect the cable to the serial ports everything
>works fine (in hyperterminal). I think boot in to Linux and try to use
>minicom to communicate to the XP machine. Nothing going. I've tryed
>playing with all the configuration options but to no avail! I can't
>even find out which serial port (dev/ttyS?) is linux registering my
>COM port. serialstat doesn't work (complains about some error)
>
>I've tried all the ports in minicom but not even a single charcter is
>transferred.
>
>Can anyone help?


The best approach is to solve each problem one step at a time.
Follow the below suggestions as closely as you can. If you get
stuck, post what you did, post the results. For example, don't
tell us that you ran proggie xyz and got "some error". Cut
and paste the actual error message into your article. Somebody
will recognize your problem, and give you exact instructions on
what to do next.

Anyway, here's what to do now:

Try using setserial if your system has it, to tell you how your
serial ports are configure. You should get something like this:

>/sbin/setserial -a /dev/ttyS0

/dev/ttyS0, Line 0, UART: 16550A, Port: 0x03f8, IRQ: 4
Baud_base: 115200, close_delay: 50, divisor: 0
closing_wait: 3000
Flags: spd_normal skip_test

Note that the UART, the Port, and the IRQ are all reasonable
values. For an unequipped port, something like this will
be shown:

>/sbin/setserial -a /dev/ttyS2

/dev/ttyS2, Line 2, UART: unknown, Port: 0x03e8, IRQ: 4
Baud_base: 115200, close_delay: 50, divisor: 0
closing_wait: 3000
Flags: spd_normal skip_test

The only hint is the UART listed as "unknown", which basically
means nothing responded in an expected manner (because there isn't
anything there to respond, in this case).

If that doesn't point it out immediately, find a modem and
serial cable that are known to work, and hook them to the serial
port on your laptop. That gives you something that *will*
respond when you access it.

If you have more than one device special file that indicates a
possibly valid serial port, there are a few tricks that might
tell you port talks to the modem. If the modem has lights that
in some why tell you when it is doing a reset (old SupraFAX
modems, for example, have a two digit lcd display, and if the
modem is sent ATZ ever pixel on the display lights up for about
1 second), you can try doing this:

>echo -e "ATZ\r\n" > /dev/ttyS0


to see if that causes the modem to indicate it has been reset.
If not, change that to /dev/ttyS1 and see what happens.

If the modem can't help you, use minicom to try talking to it.
However, be aware that minicom can trick you, and cause great
confusion. If you try changing the settings for minicom it will
appear to change them, but won't unless you do it exactly right.

1) su to root.
2) invoke "minicom -s".
3) set the serial port to ttyS1 or whatever.
4) save the settings to either default, or
to some named configuration, such as "port1".
5) exit minicom.
6) exit root.
7) invoke minicom, as "minicom" to get the default config,
or as "minicom port1" to get the port1 configuration.

Otherwise, it will say ttyS1, but you won't get a response
because the modem actually is on ttyS1 but minicom is lying
to you and is still talking to ttyS0.

--
Floyd L. Davidson <http://web.newsguy.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) (E-Mail Removed)
 
Reply With Quote
 
John
Guest
Posts: n/a

 
      09-29-2003, 07:02 AM
First of all I'm sorry about using the expression "some error". The
laptop does not have internet connection so I didn't copy paste.

I ran setserial on all 4 ports (ttyS0-ttyS3) but on all of them "UART:
Unkown".
A printout of ttyS0 for example is:


>/sbin/setserial -a /dev/ttyS0
> /dev/ttyS0, Line 0, UART: Unknown, Port: 0x03f8, IRQ: 4
> Baud_base: 115200, close_delay: 50, divisor: 0
> closing_wait: 3000
> Flags: spd_normal skip_test



What's important that on WinXP the port works fine (COM1) and I've
managed to connect a PC to the laptop using a null modem serial cable.
Thanks In Advance
 
Reply With Quote
 
ynotssor
Guest
Posts: n/a

 
      09-29-2003, 07:21 AM
"John" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om

> I ran setserial on all 4 ports (ttyS0-ttyS3) but on all of them "UART:
> Unkown".
> A printout of ttyS0 for example is:
>
>> /sbin/setserial -a /dev/ttyS0
>> /dev/ttyS0, Line 0, UART: Unknown, Port: 0x03f8, IRQ: 4
>> Baud_base: 115200, close_delay: 50, divisor: 0
>> closing_wait: 3000
>> Flags: spd_normal skip_test

>
> What's important that on WinXP the port works fine (COM1) and I've
> managed to connect a PC to the laptop using a null modem serial cable.


Have you tried forcing it?

setserial /dev/ttyS0 uart 16550A

--
use hotmail com for any email replies


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
 
Reply With Quote
 
Floyd Davidson
Guest
Posts: n/a

 
      09-29-2003, 09:15 AM
(E-Mail Removed) (John) wrote:
>First of all I'm sorry about using the expression "some error". The
>laptop does not have internet connection so I didn't copy paste.
>
>I ran setserial on all 4 ports (ttyS0-ttyS3) but on all of them "UART:
>Unkown".
>A printout of ttyS0 for example is:
>
>
>>/sbin/setserial -a /dev/ttyS0
>> /dev/ttyS0, Line 0, UART: Unknown, Port: 0x03f8, IRQ: 4
>> Baud_base: 115200, close_delay: 50, divisor: 0
>> closing_wait: 3000
>> Flags: spd_normal skip_test

>
>
>What's important that on WinXP the port works fine (COM1) and I've
>managed to connect a PC to the laptop using a null modem serial cable.
>Thanks In Advance


Hmmm... One thing is for sure, we know where your serial port is.
If WinXP sees it as COM1, then on Linux it is going to be /dev/ttyS0.

The UART unknown business may or may not be significant. Try it
to see if it works.

If not... make sure that the serial port driver is enabled in your
kernel. Right after booting you can use "dmesg |more" to look at
the boot messages, which should have something like this:

Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled
ttyS00 at 0x03f8 (irq = 4) is a 16550A
ttyS01 at 0x02f8 (irq = 3) is a 16550A

Except, obviously you won't have two and apparently it won't say
16550A. But whatever it says, post it.

The only other thing I can think of is to look at your BIOS
configuration and make sure that it is enabled there, and has
appropriate parameters set. I don't know about your particular
ThinkPad, but older ones could have the serial port turned off
to conserve power, and it is possible that your is disabled and
your WinXP is configured to enable it first. If that is the
case, you can either enable it in the BIOS (or, as with the
older ThinkPads you have to run a software program to do it, and
finding one for Linux was somewhat difficult, though that may
well have changed).

--
Floyd L. Davidson <http://web.newsguy.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) (E-Mail Removed)
 
Reply With Quote
 
 
 
Reply

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Serial Port Problem Fedora Core 6 bricherg@lanecc.edu Linux Networking 2 04-08-2007 07:23 PM
no serial port and no parrallel port how do i console to a router sloan949@gmail.com Linux Networking 4 02-13-2007 07:02 PM
Serial Port Multiplexing (2 apps to 1 port) Onslo Linux Networking 0 10-06-2004 08:53 AM
Problem using USB to Serial adapter(GUC232A) for a serial modem Shanthi Paladugu Linux Networking 1 05-21-2004 04:28 PM
problem with data reception through serial port Pilatus Linux Networking 1 11-26-2003 02:24 PM



1 2 3 4 5 6 7 8 9 10 11