Networking Forums

Networking Forums > Computer Networking > Linux Networking > How to determine which port modem is on? etc

Reply
Thread Tools Display Modes

How to determine which port modem is on? etc

 
 
Alex Bell
Guest
Posts: n/a

 
      06-02-2005, 10:57 AM
Windows XP shows that the modem on my computer is on Com5. That
equates to ttyS4, does it not?

Is there a waywith Linux to detmine what 'port' the modem is on?

What does setserial do? What is it for?


 
Reply With Quote
 
 
 
 
Raqueeb Hassan
Guest
Posts: n/a

 
      06-02-2005, 01:34 PM
> Is there a waywith Linux to detmine what 'port' the modem is on?


I guess, your one is a PCI winmodem/linmodem. It won't work with that
specific linux driver. You might try looking at linmodem.org. For
windows these drivers are available, AFAIK.

For checking which port that modem is on, try searching through,
#dmesg. I assumed that you have /dev/modem linked to /dev/ttySx).

You might see issuing this command #stty -a </dev/tty(TTY_of_yours).
Should you prefer to run a shell script, here is a little clue.

for x in 0 1 2 3 4
do
echo $x
chat -v '' 'AT' 'OK' <>/dev/ttyS$x
done


--
Raqueeb Hassan
Bangladesh

 
Reply With Quote
 
Clifford Kite
Guest
Posts: n/a

 
      06-02-2005, 03:43 PM
Alex Bell <(E-Mail Removed)> wrote:
> Windows XP shows that the modem on my computer is on Com5. That
> equates to ttyS4, does it not?


Yes.

> Is there a waywith Linux to detmine what 'port' the modem is on?


If ttySx is the device file for the serial device then "setserial
/dev/ttySx" reports the basic device file settings. If the modem
can actually be used with ttySx then the port shown is the "'port'
the modem is on" (actually the port of the serial device).

> What does setserial do? What is it for?


Mostly it configures some device file attributes to agree with the
serial device settings. It also can set the base baud rate of the
serial device (described in the Serial-HOWTO). It also reports the
settings; all the settings are reported by "setserial -a /dev/ttySx" .

--
Clifford Kite Email: "echo xvgr_yvahk-(E-Mail Removed)|rot13"
PPP-Q&A links, downloads: http://ckite.no-ip.net/
 
Reply With Quote
 
Markku Kolkka
Guest
Posts: n/a

 
      06-02-2005, 08:13 PM
Alex Bell wrote:

> Windows XP shows that the modem on my computer is on Com5. That
> equates to ttyS4, does it not?


Only if the modem connects through standard serial port hardware. If
it's a PCI bus "Winmodem", it's not ttySanything on Linux, even if you
find Linux drivers for it.

> Is there a waywith Linux to detmine what 'port' the modem is on?


Yes, read the documents for the Linux driver.

> What does setserial do? What is it for?


It sets up standard serial ports (ttyS*)

--
Markku Kolkka
(E-Mail Removed)
 
Reply With Quote
 
=?iso-8859-1?B?/vOh/y3e9SH9IG1A8Q==?=
Guest
Posts: n/a

 
      06-02-2005, 11:57 PM
most drivers (for winmodems) will port your port to /dev/modem (at
least mine did, intel 537EP)

poly-p man

 
Reply With Quote
 
Moe Trin
Guest
Posts: n/a

 
      06-03-2005, 12:21 AM
In article <(E-Mail Removed)>, Alex Bell wrote:

>Windows XP shows that the modem on my computer is on Com5. That
>equates to ttyS4, does it not?


Well, yabbut only the first four serial ports have "standard"
definitions of I/O and IRQs. Windoze uses COM5 for non-standard
locations.

COM /dev/ttySn I/O Base IRQ
1 ttyS0 0x3F8 4
2 ttyS1 0x2F8 3
3 ttyS2 0x3E8 4
4 ttyS3 0x2E8 3

If you have the kernel source installed, there is a file
/usr/src/linux/Documentation/devices.txt which lists all 64 permitted
serial ports (/dev/ttyS0 through /dev/ttyS63), but again, only the first
four have defaults.

>Is there a waywith Linux to detmine what 'port' the modem is on?


Look at the boot messages in /var/log/messages:

Aug 21 16:23:27 Serial driver version 5.05c (2001-07-08) with MANY_PORTS
SHARE_IRQ SERIAL_PCI ISAPNP enabled
Aug 21 16:23:27 ttyS0 at 0x03f8 (irq = 4) is a 16550A
Aug 21 16:23:27 ttyS1 at 0x02f8 (irq = 3) is a 16550A
Aug 21 16:23:27 ttyS2 at 0x03e8 (irq = 4) is a 16550A

This driver will recognize PCI hardware which uses non-standard I/O. You
can also look for PCI devices in /proc/pci or by using 'lspci -vv'. On
the other hand, _software_ modems tend to use even more unusual addresses
and the way to find that is to look at the driver loading.

>What does setserial do? What is it for?


[compton ~]$ whatis setserial
setserial (8) - get/set Linux serial port information
[compton ~]$

You use this to change the parameters that the kernel is using for a
serial port. It has no effect on the hardware, but how the kernel
attempts to address the hardware. For example, my mouse is on COM1,
the UPS on COM2, so my modem is on COM3, but jumpered to use IRQ 7
rather than the default. Thus, I have a line in the rc.local that says

/bin/setserial /dev/ttyS2 irq 7

to tell the kernel that this serial port is using a different IRQ.

Didn't you report using a NetComm InModem IN5699_5? That was a Lucent
Mars2, and your post to alt.comp.linux on 24 May 2005 did show you
connecting to the terminal server OK. Or are you using something else
now?

Old guy

 
Reply With Quote
 
Alex Bell
Guest
Posts: n/a

 
      06-03-2005, 10:40 AM
On Thu, 02 Jun 2005 19:21:38 -0500, (E-Mail Removed)
(Moe Trin) wrote:

>In article <(E-Mail Removed)>, Alex Bell wrote:
>
>>Windows XP shows that the modem on my computer is on Com5. That
>>equates to ttyS4, does it not?

>
>Well, yabbut only the first four serial ports have "standard"
>definitions of I/O and IRQs. Windoze uses COM5 for non-standard
>locations.
>
>COM /dev/ttySn I/O Base IRQ
> 1 ttyS0 0x3F8 4
> 2 ttyS1 0x2F8 3
> 3 ttyS2 0x3E8 4
> 4 ttyS3 0x2E8 3
>
>If you have the kernel source installed, there is a file
>/usr/src/linux/Documentation/devices.txt which lists all 64 permitted
>serial ports (/dev/ttyS0 through /dev/ttyS63), but again, only the first
>four have defaults.
>
>>Is there a waywith Linux to detmine what 'port' the modem is on?

>
>Look at the boot messages in /var/log/messages:
>
>Aug 21 16:23:27 Serial driver version 5.05c (2001-07-08) with MANY_PORTS
>SHARE_IRQ SERIAL_PCI ISAPNP enabled
>Aug 21 16:23:27 ttyS0 at 0x03f8 (irq = 4) is a 16550A
>Aug 21 16:23:27 ttyS1 at 0x02f8 (irq = 3) is a 16550A
>Aug 21 16:23:27 ttyS2 at 0x03e8 (irq = 4) is a 16550A
>
>This driver will recognize PCI hardware which uses non-standard I/O. You
>can also look for PCI devices in /proc/pci or by using 'lspci -vv'. On
>the other hand, _software_ modems tend to use even more unusual addresses
>and the way to find that is to look at the driver loading.
>
>>What does setserial do? What is it for?

>
>[compton ~]$ whatis setserial
>setserial (8) - get/set Linux serial port information
>[compton ~]$
>
>You use this to change the parameters that the kernel is using for a
>serial port. It has no effect on the hardware, but how the kernel
>attempts to address the hardware. For example, my mouse is on COM1,
>the UPS on COM2, so my modem is on COM3, but jumpered to use IRQ 7
>rather than the default. Thus, I have a line in the rc.local that says
>
>/bin/setserial /dev/ttyS2 irq 7
>
>to tell the kernel that this serial port is using a different IRQ.
>
>Didn't you report using a NetComm InModem IN5699_5? That was a Lucent
>Mars2, and your post to alt.comp.linux on 24 May 2005 did show you
>connecting to the terminal server OK. Or are you using something else
>now?
>
> Old guy

Thanks for all the responses. Yes, I'm still using the same modem,
still make a partial connection, and still have it fail within a few
seconds. I'm thrashing around trying different things to try to
understand what is going on - or not going on as the case may be.

Regards, Alex
 
Reply With Quote
 
Moe Trin
Guest
Posts: n/a

 
      06-03-2005, 02:53 PM
In article <(E-Mail Removed)>, Alex Bell wrote:
>On Thu, 02 Jun 2005 19:21:38 -0500, (E-Mail Removed)
>(Moe Trin) wrote:


>> Didn't you report using a NetComm InModem IN5699_5? That was a Lucent
>> Mars2, and your post to alt.comp.linux on 24 May 2005 did show you
>> connecting to the terminal server OK. Or are you using something else
>>now?


>Thanks for all the responses. Yes, I'm still using the same modem,
>still make a partial connection, and still have it fail within a few
>seconds. I'm thrashing around trying different things to try to
>understand what is going on - or not going on as the case may be.


OK (I'm going from memory, and haven't had a cup of coffee yet), that
posting showed an Annex Terminal Server text login - which is not likely
to be what you wanted. You got there (most likely) due to a chat script
that triggered the server - sending any text, including as little as a
carriage return will do that.

As the Unruh paper shows, you want to use the chat script to just dial
the phone. An example would be

[compton ~]$ cat /etc/ppp/dialscript
ABORT BUSY ABORT 'NO CARRIER' "" AT&F0 OK ATDT2662902 CONNECT \d\c
[compton ~]$

A little explanation here. This script sets two abort conditions (the line
is busy, or something Other than a modem answers), then waits for nothing
( "" ) and sends an init string (check your modem manual). When the modem
responds with OK, it dials the phone number, and waits for the modem to
report establishing a connection. The script then waits one second ( \d )
and exits without sending the normal newline character ( \c ). This is the
standard PAP or CHAP setup that micro$oft has forced on the ISPs because
windoze can't script worth beans. Authentication is handled by pppd, by
having /etc/ppp/pap-secrets and/or /etc/ppp/chap-secrets (depending on which
scheme your ISP wants to use) contain something like:

abell1 * p42Sw0rD~

Now for additional help, we really need to see that log file. You are looking
for something like:

Jul 3 09:55:01 gtech chat[925]: send (ATDT2662902^M)
Jul 3 09:55:01 gtech chat[925]: expect (CONNECT)
Jul 3 09:55:01 gtech chat[925]: ^M
Jul 3 09:55:22 gtech chat[925]: ATDT2662902^M^M
Jul 3 09:55:22 gtech chat[925]: CONNECT
Jul 3 09:55:22 gtech chat[925]: -- got it
Jul 3 09:55:22 gtech chat[925]: send (\d)
Jul 3 09:55:23 gtech pppd[924]: Serial connection established.
Jul 3 09:55:23 gtech pppd[924]: Using interface ppp0

The chat stuff came from having -v as part of the modem script. See the
theory.physics.ubc.ca web page. But then we hit:

Jul 3 09:55:23 gtech pppd[924]: Connect: ppp0 <--> /dev/ttyS1
Jul 3 09:55:24 gtech pppd[924]: sent [LCP ConfReq id=0x1 <asyncmap
0x0> <magic 0x8bab12d4> <pcomp> <accomp>]
Jul 3 09:55:27 gtech pppd[924]: sent [LCP ConfReq id=0x1 <asyncmap
0x0> <magic 0x8bab12d4> <pcomp> <accomp>]
Jul 3 09:55:27 gtech pppd[924]: rcvd [LCP ConfReq id=0x1 < 00 04 00
00> <mru 1524> <asyncmap 0xa0000> <auth pap> <pcomp> <accomp> < 11 04
05 f4> < 13 09 03 00 c0 7b 90 17 04>]

Here, this box said hello, twice, before hearing from the peer. The peer
wants to have this system authenticate with PAP ( <auth pap> ), and is
offering two services this box never heard of. But this is the type of
information we need.

Old guy
 
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
Looking for an AP that has a port for modem (or built in modem) for FAXing Mctabish Network Routers 3 01-26-2007 05:30 PM
How to determine the local port? anketm@gmail.com Linux Networking 1 05-23-2005 11:39 PM
Can MN-500 use modem port wirelessly? BC Broadband Hardware 2 04-08-2004 04:34 PM
What is the difference between a multi-port ASDL modem/router and one with a 4 port hub? Tim Lyons Broadband 4 02-27-2004 06:07 AM
Is a single-port ADSL router the same as a single-port ethernet modem? Graeme Allen Broadband 8 01-26-2004 10:55 PM



1 2 3 4 5 6 7 8 9 10 11