[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ppp connection with Demon



Tom Bowles <tomb@wazzed.demon.co.uk> writes:

> Incidentally it's not just receiving and sending data that is
> slow. There is also a 20-30 second delay between sending the modem
> initialisation (and phone number for that matter) strings and
> getting any response. Could it be something to do with the serial
> interface itself. I am now about 100 miles from anything I know
> anything about, but it's a hell of a lot more interesting than
> windows.

I think you may be onto something here - since you're getting data,
but there are serious timing delays (that you're certain aren't caused 
by Demon being slow - that is, delays even in the init strings), you
may have the wrong IRQ set on your serial device, or there may be some 
conflict in IRQ settings.  Do a:
 setserial /dev/modem
(or /dev/ttyS1, or /dev/WhateverYourModemIs)
and note the results.  Since you are getting data, the port setting is 
correct and the UART listed is correct or close enough.  The IRQ,
however, may well be wrong.  If you have some other OS in which the
modem works well, you could look at the device information for the
modem there.  Once you have the correct IRQ for your modem, you'll
want to edit /etc/rc.boot/0setserial down around lines 25-30 and fix
the information there.  You can then as root run
/etc/rc.boot/0setserial and try your modem again.

Is the modem a plug-and-play internal modem?  If so, look at using the
isapnptools to set up the modem.  (You'll have to run one program to
dump out the configuration info. on your modem, edit that file to suit
your needs, and then run another program on the edited file to set the
configuration in your modem - once you get the config. the way you
want it, putting it into /etc/isapnp.conf will have it used at
boottime - but there's much more info. in the isapnp docs)  Note that
if you have an external modem that calls itself plug-and-play, this
doesn't actually mean anything.  (Well, not anything that you care
about with regards to setting up your modem for linux)

If the modem is an internal one with switches/jumpers, you'll need to
look at it and your modem manual to determine what IRQ it's set to.
(If you've lost the modem manual, you might want to check the
manufacturer's web site).  If it's an external modem, then the IRQ's
are probably 4 for /dev/ttyS0 (aka com1) and 3 for /dev/ttyS1 (aka
com2).  However, some machines (like mine) have BIOSes which can alter 
this, so that the built-in com ports use IRQ's 4 and 12.  Check your
BIOS's setup menu.

DANIEL MARTIN

p.s.  What are all these settings: IRQ, io port (sometimes called
just "port") and the UART number?
Well, UART is just a number that identifies the type of chip
controlling the serial device.  The kernel needs to know this so that
it can know how large a buffer the device has, what speeds it supports, 
how it reports line conditions (like hardware flow control), etc.
UART type can usually be detected automatically.  The most common
UARTs are the 16550, 16550A, and 16650.  This number is something
specific only to serial devices.
The io port and IRQ require a very brief explanation of how the processor
gets data from other devices in the system.  Essentially, all devices
in the system are connected to one set of wires called the data bus.
The processor, when it wishes to send or get data, will set some wires 
to identify the "address" it wishes to access, a wire to indicate
whether this is a read or a write, and will then either set the
relevant data wires for a write or assume that whatever device
responds to this address has set their state as soon as it requested
the read and will then read the data wires.  (this is oversimplified,
but you get the idea).  Anyway, the io port is the address the
processor uses to get and send data to the modem.  (actually, serial
devices generally need 8 consecutive address; you specify only the
first one - this is why this will sometimes be called the "base io
port address" or "io base"; these ports are used not only to send and
receive data but also to set/get status information)  You can see what 
devices use which io ports on your system by doing "cat
/proc/ioports".

Now, when a device needs to tell the processor something (like
"incoming data" or "my output buffer is empty, you could send more"),
the device can't force the processor to do a read.  Instead, what the
device does is raise a signal saying in essence "pay attention to
me".  It does this through an "Interrupt ReQuest", or IRQ.  There are, 
I believe, only 16 of these lines available and several are allocated
to system things (like the separate chip that controls the clock, or
the keyboard, or the internal line used to signal floating point math
errors).  With an IRQ set incorrectly, the processor would not realize 
that there was incoming data on the modem - this could cause the
unbelievably slow response time you seem to have.  You can find out
which devices use which irq lines by doing "cat /proc/interrupts".


Reply to: