Solved

Can't initialize modem

Posted on 2000-05-12
39
308 Views
Last Modified: 2012-05-04
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
0
Comment
Question by:wongchen
  • 23
  • 12
  • 4
39 Comments
 

Author Comment

by:wongchen
ID: 2805745
Adjusted points from 50 to 100
0
 

Expert Comment

by:aramo
ID: 2805895
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
 

Author Comment

by:wongchen
ID: 2806826
It is an internal modem and I already used minicom, but it didn't help much.
0
 

Expert Comment

by:aramo
ID: 2806906
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
 
LVL 40

Expert Comment

by:jlevie
ID: 2807197
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
 

Author Comment

by:wongchen
ID: 2808295
The modem still works perfectly in Windows
0
 
LVL 40

Expert Comment

by:jlevie
ID: 2808402
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
 

Author Comment

by:wongchen
ID: 2808423
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
 
LVL 40

Expert Comment

by:jlevie
ID: 2808478
That does explain the change, and why Linux was being confused. Does the modem work now?
0
 

Author Comment

by:wongchen
ID: 2808841
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
 

Author Comment

by:wongchen
ID: 2808845
I'm not sure if it is PnP, although I think it is
0
 

Expert Comment

by:aramo
ID: 2809000
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
 
LVL 40

Expert Comment

by:jlevie
ID: 2809016
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
 

Author Comment

by:wongchen
ID: 2812542
Adjusted points from 100 to 120
0
 

Author Comment

by:wongchen
ID: 2812543
got to look that up
0
 

Author Comment

by:wongchen
ID: 2812571
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
 

Expert Comment

by:aramo
ID: 2812738
wongchen - did you check win9x settings and try them in linux via setserial?
0
 
LVL 40

Expert Comment

by:jlevie
ID: 2814422
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
 

Author Comment

by:wongchen
ID: 2814937
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 40

Expert Comment

by:jlevie
ID: 2815450
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
 

Author Comment

by:wongchen
ID: 2818972
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
 
LVL 40

Expert Comment

by:jlevie
ID: 2819908
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
 

Author Comment

by:wongchen
ID: 2821199
Adjusted points from 120 to 135
0
 

Author Comment

by:wongchen
ID: 2821200
point valu increased
0
 

Author Comment

by:wongchen
ID: 2829051
Adjusted points from 135 to 150
0
 

Author Comment

by:wongchen
ID: 2829052
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
 

Author Comment

by:wongchen
ID: 2829058
Oh, I forgot, it still doesn't work, but at least it showed up in statserial
0
 
LVL 40

Expert Comment

by:jlevie
ID: 2830909
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
 

Author Comment

by:wongchen
ID: 2831296
dmesg gives me output about my drives only, it has just worked well once...
0
 
LVL 40

Expert Comment

by:jlevie
ID: 2831324
Okay, then look in /var/log/messages. The boot process should list the assignment if it recognizes the device as a modem.
0
 

Author Comment

by:wongchen
ID: 2846064
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
 

Author Comment

by:wongchen
ID: 2852444
Adjusted points from 150 to 200
0
 

Author Comment

by:wongchen
ID: 2852445
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
 
LVL 40

Expert Comment

by:jlevie
ID: 2852741
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
 

Author Comment

by:wongchen
ID: 2855460
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
 
LVL 40

Accepted Solution

by:
jlevie earned 200 total points
ID: 2855768
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
 

Author Comment

by:wongchen
ID: 2856834
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
 

Author Comment

by:wongchen
ID: 2856837
Comment accepted as answer
0
 
LVL 40

Expert Comment

by:jlevie
ID: 2856865
Alright.!!!
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now