Can't initialize modem

I had a modem on ttyS1 (COM2) and it worked fine in both Windows & Linux but when I reinstalled Linux it mysteriously changed to COM3 (I don't know why) and it didn't want to dial so I used Red Hat's Internet configurator (or something like that) tool and chose the Debug option and returned a message like "Input/Output Error".

Then i tried doing tihs at the command line:
cd /dev
SETSERIAL="/bin/setserial -b"
PORTS=`echo cua?`
echo -n
${SETSERIAL} /dev/cua1 uart 16550A port 0x3E8 (my modem's I/O port) irq 05
wongchenAsked:
Who is Participating?
 
jlevieConnect With a Mentor Commented:
COM2 uses IRQ 3 port 0x2f8. So that's what you'd want to set the jumpers on the modem for. I've seen some that only allow the IRQ to be set, which should be sufficient to get it to work.
0
 
wongchenAuthor Commented:
Adjusted points from 50 to 100
0
 
aramoCommented:
Is this an internal modem or external. Internal modems can use any port but the external ones tend to be fixed by the physical port you plug into.

Quick check of
ls -l /dev/modem
what does this link to? If its a #link# to ttyS2 you could delete it and add a new link to ttyS1.

I find minicom useful in this situation - start it up if you see AT chat going on modem is OK otherwise change settings in minicom (Ctrl-A Z possibly)
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
wongchenAuthor Commented:
It is an internal modem and I already used minicom, but it didn't help much.
0
 
aramoCommented:
You said the modem worked in windows and linux - does it still work in windows and if so can you not just make the Linux settings agree with the windows ones?

Others may have better advice but it sounds like your modem is using a port/irq thats unusual - from what you've said I take it the modem does not use jumpers but is PnP.

Whats on ttyS0 btw and what is /dev/modem
0
 
jlevieCommented:
It sounds like an internal modem and it really ought to show up as /dev/ttyS2 if both on-board COM ports are enabled in the bios (they should be ttyS0 & ttyS1). If you look at the dmesg output you ought to be able to see where the system assigned the modem and what IRQ/IOport it's using. My suspicion is that you've got an IRQ conflict. You might need to pull the modem, boot Linux and look at /proc/pci & /proc/interrupts and see what IRQ's are used. Then re-insert the mode and look again. If the modem shows up on the same IRQ as something else, you'll need to make some adjustments to get it onto a free IRQ (like disabling one of the COM ports or forcing the modem to a free IRQ).
0
 
wongchenAuthor Commented:
The modem still works perfectly in Windows
0
 
jlevieCommented:
That could well be, even if there is an IRQ conflict. I've seen several cases where two devices had the same IRQ and as long as only one was used at a time everthing worked. Linux on the other hand loads drivers for every device it finds. If there's an IRQ conflict the driver for the modem won't see the interrupts for received data as that interrupt gets serviced by some other driver (which isn't expecting it and discards the data).

Also if the device is PnP, Linux may not be properly configuring it unless you use isapnp to set the device.
0
 
wongchenAuthor Commented:
OK, I figured out why the modem changed from cua1 to cua2.  It was because there was a setting in the BIOS (Award 1999) which I changed while trying to get the modem to work, I changed the setting in the PCI/ISA PnP section for IRQ 5 (my modem's) from PCI/ISA PnP to Legacy ISA (since my modem is ISA {internal})
0
 
jlevieCommented:
That does explain the change, and why Linux was being confused. Does the modem work now?
0
 
wongchenAuthor Commented:
Nope, it still doesn't work, and its IRQ and I/O port changed to 3 and 0x2F8, respectively, so I went back to my BIOS config and changed my settings for IRQ 3, but didn't work.

I also tried using statserial in Linux, first in cua1 but the values for CTS and DSR were 0 and 0, for cua0 the values were 1 and 0 and for cua2 it gave a message like:

statserial: TIOCMGET failed: I/O error
0
 
wongchenAuthor Commented:
I'm not sure if it is PnP, although I think it is
0
 
aramoCommented:
A few messages back you said modem still works in win9x, have you tried to feed the port/irq that windows uses to setserial?

If force feeding setserial fails - post port/irq windows uses here.

Should work unless you've got a winmodem - scratch that, modem used work in Linux :)
0
 
jlevieCommented:
Okay, Linux wanted the modem at IRQ 3, 0x2f8, which would be COM2 in windows terms. Does the bios have COM2 enabled? If it does then you've got an IRQ conflict between the modem and the serial port at COM2. If not, then what Linux is trying to use is not what the card winds up at, which is a common problem with PnP devices. Is the bios set to disable PnP?
0
 
wongchenAuthor Commented:
Adjusted points from 100 to 120
0
 
wongchenAuthor Commented:
got to look that up
0
 
wongchenAuthor Commented:
it's not a winmodem, and I mentioned it in my original post (I said that it worked in Linux before).

also, my BIOS doesn't have an option to disable PnP, though it has one saying "PnP OS installed", I have it said to yes.

I also increased my question's value to 120 points.
0
 
aramoCommented:
wongchen - did you check win9x settings and try them in linux via setserial?
0
 
jlevieCommented:
Change "PnP OS Installed" to "no". that disables the wierd PnP things that the bios can do. Windows is typically quite happy with that setting and Linux is decidedly happier. Did you check the COM port status when you were looking at the bios?
0
 
wongchenAuthor Commented:
I already used setserial and I said it in my question

how do I check the com port status in the BIOS

my BIOS has a setting to set the irq my modem's I want for the modem, which do I set it at?
0
 
jlevieCommented:
Well, you could set it to any IRQ & IO port that's not already used by something else.If there is no sound card in the system, then IRQ 5 is usually available. However, it the OS itself that you need to look at to determine what IRQs are used and for what. If the modem is removable, boot the OS without the modem card and look at /proc/pci & /proc/interrupts. From those make a list of all of the IRQs & I/O ports that are used and re-insert the card set it for a combination that wasn't in that list.
0
 
wongchenAuthor Commented:
I do have a sound card, and when the medem is in COM3 IRQ 5, the sound card uses IRQ 9, but when the modem is in COM2 IRQ 3, it uses IRQ5
0
 
jlevieCommented:
Okay, then set the modem to use IRQ 5 and let the sound card to move to 9. Then boot Linux and look at /proc/interrupts and see if you see IRQ 5 assigned. Also you should look at the output of "dmesg" where you should see the modem being detectcted and assigned to ttyS2 with the IRQ that you've set it to be. The info should also be in /var/log/messages and the line of interest should be something like:

May 14 07:54:42 localhost kernel: Lucent Modem driver version 4.27.5.66 with MAN
Y_PORTS MULTIPORT SHARE_IRQ enabled
May 14 07:54:42 localhost kernel: ttyS14 at 0x7400 (irq = 9) is a Lucent

Which is Red Hat detecting my Lucent modem and assigning it to ttyS14. Your exact line will be different, but it has to be there if the modem is being configured.
0
 
wongchenAuthor Commented:
Adjusted points from 120 to 135
0
 
wongchenAuthor Commented:
point valu increased
0
 
wongchenAuthor Commented:
Adjusted points from 135 to 150
0
 
wongchenAuthor Commented:
ok my modem was uasing irq 5, which was occupied bu my snd card, so I set the jumpers on the modem for irq 7, then irq 3, then 9, (which were free) then I set the modem to those IRQs in the BIOS setup, but it still showed up on IRQ 5 in windows and the bootup process
0
 
wongchenAuthor Commented:
Oh, I forgot, it still doesn't work, but at least it showed up in statserial
0
 
jlevieCommented:
Hmmm, IRQ 7 is assigned to the parallel port and IRQ 3 is assigned to a serial port (assuming those devices are enabled in the bios) So thay aren't in fact free and would cause a conflict. IRQ 9 is possibly free and is probably the best choice. Does Linux see it at that IRQ when it boots, i.e. you see that IRQ assigned to a ttyS? dev in the dmesg output?
0
 
wongchenAuthor Commented:
dmesg gives me output about my drives only, it has just worked well once...
0
 
jlevieCommented:
Okay, then look in /var/log/messages. The boot process should list the assignment if it recognizes the device as a modem.
0
 
wongchenAuthor Commented:
K, sorry for not replying but ive been really busy with school, we had some bimonthly tests in my school, but i have the rest of the week free, so ill have more time
0
 
wongchenAuthor Commented:
Adjusted points from 150 to 200
0
 
wongchenAuthor Commented:
I cant get the modem to IRQ 9, my modem's jumpers only go up to irq 7 and I cant get it on irq 9 on the BIOS.
0
 
jlevieCommented:
Well, do you use COM2 for anything? If not, disable it in the bios and set the modem for COM2's IRQ & IO port (irq 3, port 0x2f8).
0
 
wongchenAuthor Commented:
I found the setting in the BIOS to disable COM1 and 2, and then booted linux and looked at /var/log/messages, it only showed ttyS1 in the bootup, and statserial said the modem was in ttyS1, and windows too, but the modem didn't initialize either.

also, how do I assign the modem to COM2's IRQ and I/O port?

0
 
wongchenAuthor Commented:
I set the modem's jumpers to COM2 IRQ 3,and it worked!!! then I set it to COM3 irq 4 and enabled both onboard ports, and I'm proud to say I'm writing this post with Linux!!!
0
 
wongchenAuthor Commented:
Comment accepted as answer
0
 
jlevieCommented:
Alright.!!!
0
All Courses

From novice to tech pro — start learning today.