/dev/modem: Device or resource busy

/dev/modem: Device or resource busy

Post by Fred Ramsin » Wed, 09 Dec 1998 04:00:00



I installed RedHat 5.1 for the first time a month ago.  At first I
couldn't get minicom to work, but the problem went away un-explicably and
I was able to use it.  Un-explicably, the problem came back.  When I start
minicom as myself I get the following error:

minicom: cannot open /dev/modem: Device or resource is busy

When I start minicom as root, it runs, but I can't dial out and it won't
give me an AT command line.  I have /dev/modem linked to /dev/cua1 (COM2)
which is root/uucp writable while /usr/bin/minicom is executable by all
with group ownership and GID bit on.  I can't find any lock files
anywhere.  I can't find any processes that are using /dev/modem or
/dev/cua1 either.

I tried Seyon, too, but of course it wouldn't work.  It responded with:
        no modem device is specified
        modem device is locked
        failure to open modem device

I tried "echo ATDT > /dev/modem", but that didn't work either.

Would someone like to explicate a solution?  TIA,

Fred

 
 
 

/dev/modem: Device or resource busy

Post by Austaller Gerha » Thu, 10 Dec 1998 04:00:00


Hello

: I installed RedHat 5.1 for the first time a month ago.  At first I
: couldn't get minicom to work, but the problem went away un-explicably and
: I was able to use it.  Un-explicably, the problem came back.  When I start
: minicom as myself I get the following error:

: minicom: cannot open /dev/modem: Device or resource is busy

: When I start minicom as root, it runs, but I can't dial out and it won't
: give me an AT command line.  I have /dev/modem linked to /dev/cua1 (COM2)
: which is root/uucp writable while /usr/bin/minicom is executable by all
: with group ownership and GID bit on.  I can't find any lock files
: anywhere.  I can't find any processes that are using /dev/modem or
: /dev/cua1 either.

: I tried Seyon, too, but of course it wouldn't work.  It responded with:
:       no modem device is specified
:       modem device is locked
:       failure to open modem device

: I tried "echo ATDT > /dev/modem", but that didn't work either.

: Would someone like to explicate a solution?  TIA,

: Fred

Look before starting a terminal if a modem lock-file exists. Kill it. Check if "no-root" users have write permission to the directory where the lock file was.
Call seyon by typing: seyon -modems /dev/modem

Gerhard


 
 
 

/dev/modem: Device or resource busy

Post by Roger Atkinso » Thu, 10 Dec 1998 04:00:00



> Hello


> : I installed RedHat 5.1 for the first time a month ago.  At first I
> : couldn't get minicom to work, but the problem went away un-explicably and
> : I was able to use it.  Un-explicably, the problem came back.  When I start
> : minicom as myself I get the following error:

> : minicom: cannot open /dev/modem: Device or resource is busy

> : When I start minicom as root, it runs, but I can't dial out and it won't
> : give me an AT command line.  I have /dev/modem linked to /dev/cua1 (COM2)
> : which is root/uucp writable while /usr/bin/minicom is executable by all
> : with group ownership and GID bit on.  I can't find any lock files
> : anywhere.  I can't find any processes that are using /dev/modem or
> : /dev/cua1 either.

> : I tried Seyon, too, but of course it wouldn't work.  It responded with:
> :       no modem device is specified
> :       modem device is locked
> :       failure to open modem device

> : I tried "echo ATDT > /dev/modem", but that didn't work either.

> : Would someone like to explicate a solution?  TIA,

> Look before starting a terminal if a modem lock-file exists. Kill it. Check if "no-root" users have write permission to the directory where the lock file was.
> Call seyon by typing: seyon -modems /dev/modem

If your starting out cold like I was with little to no Linux experience perhaps this will help.
1) Make sure /dev/modem is linked to /dev/cuaX where /dev/cuaX = the Dos Com port
equivalent.  In my case, I was using Dos Com3 so I linked: ln -s /dev/cua3 /dev/modem.
2) Try to use Minicom by first setting it up: IE: minicom -s ((-c on) for color) see man
minicom.
3) After Minicom Setup if you still can't talk to your modem correctly you most likely are
not using the Dos default IRQ or IOport. See man setserial and the Serial Section of the NAG
(Network Administrator Guide). Use Set serial to get around using a different IRQ for your
modem.  In my case Linux defaulted IRQ4 but I was actually using IRQ10.
4) Now you should be able to talk to your modem and get the communications info you need
to get to PPP.  If you still can't talk to your modem at this point look for the Lock File above.

Hope this helps,

Roger A.  Unix Sys Admin

 
 
 

/dev/modem: Device or resource busy

Post by Leonar » Thu, 10 Dec 1998 04:00:00


look in /var/lock for a LCK..modem file . if it is there something is using
your modem. if it is not the modem is probably not installed correctly

Leo


> I installed RedHat 5.1 for the first time a month ago.  At first I
> couldn't get minicom to work, but the problem went away un-explicably and
> I was able to use it.  Un-explicably, the problem came back.  When I start
> minicom as myself I get the following error:

> minicom: cannot open /dev/modem: Device or resource is busy

> When I start minicom as root, it runs, but I can't dial out and it won't
> give me an AT command line.  I have /dev/modem linked to /dev/cua1 (COM2)
> which is root/uucp writable while /usr/bin/minicom is executable by all
> with group ownership and GID bit on.  I can't find any lock files
> anywhere.  I can't find any processes that are using /dev/modem or
> /dev/cua1 either.

> I tried Seyon, too, but of course it wouldn't work.  It responded with:
>         no modem device is specified
>         modem device is locked
>         failure to open modem device

> I tried "echo ATDT > /dev/modem", but that didn't work either.

> Would someone like to explicate a solution?  TIA,

> Fred

--
______________________________________________
   WINDO$Z is 32 bit patch to a 16 bit GUI
  to an 8 bit OS for a 4 bit CPU by a 2 bit
company which can't stand 1 bit of competition
----------------------------------------------
 
 
 

/dev/modem: Device or resource busy

Post by Bill Unr » Wed, 16 Dec 1998 04:00:00



Quote:>1) Make sure /dev/modem is linked to /dev/cuaX where /dev/cuaX = the Dos Com port
>equivalent.  In my case, I was using Dos Com3 so I linked: ln -s /dev/cua3 /dev/modem.

No COMn=cua{n-1} so COM3= cua2. Note that the cua ports should not be
used. Use ttySn instead (COM3=ttyS2)
 
 
 

/dev/modem: Device or resource busy

Post by Josh Rusk » Wed, 16 Dec 1998 04:00:00


out of curiosity, why should the cua ports not be used?


>  Note that the cua ports should not be
> used. Use ttySn instead (COM3=ttyS2)

 
 
 

/dev/modem: Device or resource busy

Post by Timothy Buckele » Wed, 23 Dec 1998 04:00:00


Fred Ramsing wrote:
> I installed RedHat 5.1 for the first time a month ago.  At first I
> couldn't get minicom to work, but the problem went away un-explicably and
> I was able to use it.  Un-explicably, the problem came back.  When I start
> minicom as myself I get the following error:

> minicom: cannot open /dev/modem: Device or resource is busy

> When I start minicom as root, it runs, but I can't dial out and it won't
> give me an AT command line.  I have /dev/modem linked to /dev/cua1 (COM2)
> which is root/uucp writable while /usr/bin/minicom is executable by all
> with group ownership and GID bit on.  I can't find any lock files
> anywhere.  I can't find any processes that are using /dev/modem or
> /dev/cua1 either.

> I tried Seyon, too, but of course it wouldn't work.  It responded with:
>         no modem device is specified
>         modem device is locked
>         failure to open modem device

> I tried "echo ATDT > /dev/modem", but that didn't work either.

> Would someone like to explicate a solution?  TIA,

> Fred

  Fred,
I,too,have Redhat 5.1.  Attached is just ONE combination of settings that
work.  Enjoy!
Timothy Buckelew

[ notes 7K ]
It took me a long time to get ppp to work.  In the end,
I was making one small error in sensing the strings being
sent out by my internet service provider.  The tipoff was
an "alarm" message from chat, the dialing program.

Included below are tips and one set of files with settings that work
with RedHat5.1.  Note this is just one way to go about it.
There may be setup programs that work better for you,
like netcfg and wvdial.  Advice often comes in the form,
"Just do this...", and beginners are stuck not knowing what happened
if it doesn't work.  The examples below may give some
depth of understanding.

You can modify files with an editor.  I like "joe", because it is
simple and self-explanatory; and you can move around with the
arrow keys.  Real programmers use vi.

==============================================================

First use a simple communications program to see how your
modem is responding and how your ISP performs:

minicom is helpful in ISP setup. I use this string to
start it, so that ALT commands will work: minicom -M

Initialize your modem with a simple command like AT&D2.
Your modem should respond with "OK".
Then call your ISP, with a command like, ATDT5551212

Using minicom I could see that this is what my modem says:

CONNECT 57600

After about 3 seconds my ISP outputs the following two lines:

** Ascend TNT Terminal Server **

login:

Then of course after I enter my name, it comes back with this:

Password:

Then I enter my password, exit Minicom with ALT-Z, Q, Yes
(just ALT-Q works, too.)

Next launch pppd with the script,

"pppd -d -detach /dev/modem 57600 &"

I have named it "pup" for "ppp up". In other works, put the
script in a file called "pup" in /usr/bin.  Give pup executable
permissions with the command, "chmod +x /usr/bin/pup")
==================================================================
/dev/modem should be a link to your proper ttySn.  It should look
like this in the directory, /dev:

lrwxrwxrwx   1 root     tty            10 Nov  7 23:29 modem -> /dev/ttyS1

You create it like this:
ln -s  /dev/ttyS1 modem

==================================================================
You can watch the results  of your attempts to connect,
on another xterm that is running

"tail -f /var/log//messages".
==================================================================
Then I launch netscape, telnet, ping, or whatever, and it works fine.
The connect speed, 57600, seems to be OK. I get consistent
40000+ (sometimes 50000) bps transfer rates with a ThunderLink
(a WHAT?) v.90 modem.   Nice.

=================================================================
This is the output from
tail -f /var/log/messages     upon SUCCESSFUL minicom login:

Nov 28 11:40:18 localhost pppd[744]: pppd 2.3.3 started by root, uid 0
Nov 28 11:40:18 localhost pppd[744]: Using interface ppp0
Nov 28 11:40:18 localhost pppd[744]: Connect: ppp0 <--> /dev/modem
Nov 28 11:40:21 localhost pppd[744]: local  IP address 209.6.64.43
Nov 28 11:40:21 localhost pppd[744]: remote IP address 10.220.10.116

==================================================
Now for the automatic way.
Here are the successful ppp files:
=====================================================

Here is my ppp-on. Put it in /usr/sbin  so that it can be executed
from any directory.  Give it permissions as follows:
chmod 755 /usr/sbin/ppp-on  

#!/bin/sh
#

TELEPHONE=555-1212      #fake
ACCOUNT=aqua            #Use your own
PASSWORD=xxxxxxxx       #fake; put your real password here
LOCAL_IP=0.0.0.0        #
REMOTE_IP=0.0.0.0       #
NETMASK=255.255.255.0   #
#
export TELEPHONE ACCOUNT PASSWORD
#
DIALER_SCRIPT=/etc/ppp/ppp-on-dialer
#
exec /usr/sbin/pppd debug lock modem crtscts /dev/ttyS1 57600 \
        asyncmap 20A0000 escape FF kdebug 0 $LOCAL_IP:$REMOTE_IP \
        noipdefault netmask $NETMASK defaultroute connect $DIALER_SCRIPT &

==========================================================

Here is MY ppp-on-dialer.  Leave it in /etc/ppp and give it the
same executable permissions  (i.e., chmod 755 /etc/ppp/ppp-on-dialer)
The ISP strings you will be sensing will be different from mine.

#!/bin/sh
exec chat -v                                            \
        TIMEOUT         3                               \
        ABORT           '\nBUSY\r'                      \
        ABORT           '\nNO ANSWER\r'                 \
        ABORT           '\nRINGING\r\n\r\nRINGING\r'    \
        ''              \rAT                            \
        'OK-+++\c-OK'   ATH0                            \
        TIMEOUT         30                              \
        OK              ATDT$TELEPHONE                  \
        "CONNECT 57600"   ''                            \
        "ver **"      ''                              \
        ogin:--ogin:    $ACCOUNT                        \
        assword:        $PASSWORD

=========================================================
Note that "ver **".  That is to sense the last few characters
of the line sent by the ISP, that reads
"** Ascend TNT Terminal Server **"   If your ISP is sending
lines other than "Login:" and "Password:", you may have
to deal with them similarly.
=========================================================
Here is the output from tail -f /var/log/messages for
the SUCCESSFUL ppp-on login:

Nov 28 13:02:19 localhost chat[1093]: expect (CONNECT 57600)
Nov 28 13:02:19 localhost chat[1093]: ^M
Nov 28 13:02:53 localhost chat[1093]: ATDT555-1212^M^M     [fake again]
Nov 28 13:02:53 localhost chat[1093]: CONNECT 57600
Nov 28 13:02:53 localhost chat[1093]:  -- got it
Nov 28 13:02:53 localhost chat[1093]: send (^M)
Nov 28 13:02:53 localhost chat[1093]: expect (ver **)
Nov 28 13:02:53 localhost chat[1093]: ^M
Nov 28 13:02:57 localhost chat[1093]: ^M
Nov 28 13:02:57 localhost chat[1093]:
Nov 28 13:02:57 localhost last message repeated 23 times
Nov 28 13:02:57 localhost chat[1093]: ** Ascend TNT Terminal Server **
Nov 28 13:02:57 localhost chat[1093]:  -- got it
Nov 28 13:02:57 localhost chat[1093]: send (^M)
Nov 28 13:02:57 localhost chat[1093]: expect (ogin:)
Nov 28 13:02:57 localhost chat[1093]: ^M
Nov 28 13:02:57 localhost last message repeated 2 times
Nov 28 13:02:57 localhost chat[1093]: login:
Nov 28 13:02:57 localhost chat[1093]:  -- got it
Nov 28 13:02:57 localhost chat[1093]: send (aqua^M)
Nov 28 13:02:57 localhost chat[1093]: expect (assword:)
Nov 28 13:02:57 localhost chat[1093]:  aqua^M
Nov 28 13:02:57 localhost chat[1093]: Password:
Nov 28 13:02:57 localhost chat[1093]:  -- got it
Nov 28 13:02:57 localhost chat[1093]: send (########^M)    [fake again]
Nov 28 13:02:57 localhost pppd[1092]: Serial connection established.
Nov 28 13:02:58 localhost pppd[1092]: Using interface ppp0
Nov 28 13:02:58 localhost pppd[1092]: Connect: ppp0 <--> /dev/ttyS1
Nov 28 13:03:02 localhost pppd[1092]: local  IP address 209.6.67.152
Nov 28 13:03:02 localhost pppd[1092]: remote IP address 10.220.10.119

==================================================
Here are the contents of my /etc/resolv.conf:

domain ultranet.com
nameserver 146.115.8.20
nameserver 146.115.8.19
==================================================
And here are the contents of my /etc/ppp/options:

0.0.0.0:
/dev/modem
lock
crtscts
defaultroute
asyncmap 0
mtu 576
mru 576

==================================================

To end the session, enter "ps ax" on an xterm, look for the
PID of the pppd, and kill it with "kill nnnn", where nnnn
is the PID.

(Alternatively, you can enter "killall pppd", or use the
furnished script, ppp-off.)

==================================================

Hope this helps somebody.  I know I have been helped many times
by newsgroup contributions.

Sincerely yours,

Timothy Buckelew

 
 
 

1. DIP tty open (/dev/modem, RW):Device or resource busy???

Greetings,

I get the mentioned error when I initiate DIP.  I have an external
modem which after resetting the power, the error goes away and I am
able to start my slip session.  Any ideas on how I can avoid this
error?  Should I be concentrating my efforts on the Linux end or the
modem end.  Any help would be greatly appreciated.

Cheers,
--
---------------------------------------------------------

 Bell-Northern Research  *  Phone: 613-763-3261
 Standard disclaimers... - Opinions...if any are my own.

2. ipchains temporary rule for authenticated client

3. /dev/modem: Device or Resource Busy

4. Dial-up connection

5. /dev/modem: device or resource busy

6. Streams allocation errors

7. /dev/ttyS2 (/dev/cua2) reports "device or resource busy" on kernel 2.1.95

8. Assorted comments

9. /dev/md0: Device or resource busy

10. Floppy: /dev/fd0: Device or resource busy

11. mouse -> /dev/mouse "device or resource busy"

12. Sblaster Pro /dev/audio Resource or Device Busy?

13. /dev/cua0: Device or Resource busy