LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-07-2009, 07:30 PM   #1
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 921

Rep: Reputation: 46
Can't connect to modem


Ladies & Gentelmen

I am trying to set up a modem to answer incomming calls. I have 2 problems preventing me from success.

1. The modem answers the incomming call but a it seams that the username and password is not getting there.

In the mgetty log I have this for every atempt.
Code:
2/07 16:52:32 dem  mgetty: interim release 1.1.36-Jun15
12/07 16:52:32 dem  check for lockfiles
12/07 16:52:32 dem  locking the line
12/07 16:52:32 dem  lowering DTR to reset Modem
12/07 16:52:33 dem  send: \dATQ0V1H0[0d]
12/07 16:52:33 dem  waiting for ``OK'' ** found **
12/07 16:52:33 dem  send: AT[0d]
12/07 16:52:33 dem  waiting for ``OK'' ** found **
12/07 16:52:34 dem  waiting...
12/07 17:11:53 dem  wfr: waiting for ``RING''
12/07 17:11:53 dem  send: ATA[0d]
12/07 17:11:53 dem  waiting for ``CONNECT''
12/07 17:12:46 dem  found action string: ``NO CARRIER''
12/07 17:12:46 ##### failed A_FAIL dev=modem, pid=10948, caller='none', conn='', name=''
The modem hangs up abruptly. There is no chance for a connection to be established. I do know that the modem works because I am able to dial-out to a free service and establish a connection to them.

lspci -vn
Code:
00:0c.0 0780: 14f1:1036 (rev 08)
        Subsystem: 13e0:0260
        Flags: medium devsel, IRQ 10
        Memory at e2000000 (32-bit, non-prefetchable) [size=64K]
        I/O ports at c800 [size=8]
        Capabilities: [40] Power Management version 2
        Kernel driver in use: hcfpcihw
        Kernel modules: hcfpcihw
The system is Debian Lenny uname -r
2.6.26-2-686 fully updated.

I have been searching google but the howto's are somewhat dated. I also have not been able to find a good howto about how to access the modem and send commands to it. What info there is is scattered and limited.

If this matters, I am trying to dial-in from a laptop running Debian Squeeze amd64 fully updated. Using kppp and a cell phone.

2. The second issue I am having is that the modem answers after 1 ring. This may be part of the problem of the first issue in that it may not be allowing the caller-id info time to be populated so the incomming phone number is not there to be checked and so the call is rejected.

So far I have not been able to find any way of changing this behavior. I have seen some vauge references to a string in the modem that can control this and to a setting in mgetty that can control this, but no indication of how to set either one.

I suspose that a discription of what i am trying to do is in order.

I have cable internet service on my local network. I am trying to set up a dial-in server on that network so that I can call in and get network access and internet access. All relevent computers are running linux.

Can anyone point me to a better howto/tutorial on how to set this up? Or give post a request for additional info or commands to run. I will be happy to provide it.

Thanks
 
Old 12-08-2009, 12:16 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,691

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
The easiest method IMHO to send commands to the modem is via minicom. The auto answer can be set via an AT command (ATS0=x where x is the number of rings and 0 is a zero). Depending on the hardware you can either program the modem or have the computer send an initialization string.
 
Old 12-08-2009, 08:17 PM   #3
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 921

Original Poster
Rep: Reputation: 46
Thanks michaelk

I tried minicom but was not able to figure out how to send commands to the modem beyond what the menu system would do.

More info;

Code:
Dec  8 08:29:21 RBees mgetty[11326]: data dev=modem, pid=11326, caller='none', conn='115200', name='', cmd='/bin/login', user='+++ATH'
Dec  8 08:29:21 RBees login[11326]: pam_unix(login:auth): bad username [+++ATH]
I have tried changing the auth scheam in kppp on the lappy but that had no effect. I can see that the lappy is sending the wrong username or the server is not looking for it at the correct time.

I have also tried a stright command line config with the same results.

In reguards to the second issue from the howto
http://www.linux.org/docs/ldp/howto/...dem-hayes.html
Quote:
Configure answer mode

The modem will answer an incoming call on the second ring using the command ATS0=2.

Don't answer the phone on the first ring as this may invalidate the certification of the modem in some telephony jurisdictions.
I issued # echo ATS0=7 > /dev/modem but it didn't work and I tried ATS0=3, same results.
Reading the mgetty man, I found, not sure how I missed it a switch to control when it answers. I added it in the inittab file and did # init q

So that part of the problem is fixed for now.

Now that it doesn't answer so fast there is some other info in the log.
Code:
13:22:56 RBees mgetty[12077]: mdm_read_byte: read returned -1: Interrupted system call
Dec  8 13:22:56 RBees mgetty[12077]: phone stopped ringing (rings=3, dev=ttySHCF0, pid=12077, caller='none')
Dec  8 13:28:02 RBees mgetty[12077]: failed dev=ttySHCF0, pid=12077, login time out
Dec  8 13:28:02 RBees mgetty[12089]: no line given: Success
Dec  8 13:28:02 RBees mgetty[12089]: Usage: mgetty [-x debug] [-s speed] [-r] line: Success
Dec  8 13:28:02 RBees mgetty[12090]: no line given: Success
Dec  8 13:28:02 RBees mge......
.....3]: no line given: Success
Dec  8 20:56:54 RBees mgetty[13113]: Usage: mgetty [-x debug] [-s speed] [-r] line: Success
Dec  8 20:56:54 RBees mgetty[13114]: no line given: Success
Dec  8 20:56:54 RBees mgetty[13114]: Usage: mgetty [-x debug] [-s speed] [-r] line: Success
Dec  8 20:56:54 RBees mgetty[13115]: no line given: Success
Dec  8 20:56:54 RBees mgetty[13115]: Usage: mgetty [-x debug] [-s speed] [-r] line: Success
most of this seams to be fictious info. I went to try the connection again after a hour or so only to discover that the cell was reporting that it was connected at 14.4 I hung up form the cell, that was at 14:20 or so and now the logs at 20:56 are still showing the connection.

If I could just find some current easy to understand for an old man info I think I could get it working.
 
Old 02-12-2010, 10:19 AM   #4
SharpyWarpy
Member
 
Registered: Feb 2003
Location: Florida
Distribution: Fedora 18
Posts: 862

Rep: Reputation: 91
Did you ever get this working properly? I use dial-up. If you did not get this working post your /etc/ppp/chat-username file, minus any sensitive info of course.
 
Old 07-18-2010, 10:33 AM   #5
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 921

Original Poster
Rep: Reputation: 46
OK, I finally got back to this.

SharpyWarpy, no I have not gotten this to work yet, but trying again.

First: is that I have acquired a us robotics 5610b hardware modem that is fully supported by the linux kernel.

Second: I am now using different hardware, but same os version.

Third: I didn't mention before that the land-line connected to the dial-in server is a voip line and may be causing problems. It some point I want to hook it to a standard land line just to check and may have to do that just to get a connect to start with.

So to eliminate the cell phone issues on one end I have had a friend dial in from a standard land line and winXP and he is at least able to get a user id rejection notice.

the log on the server
Code:
07/18 10:04:00 yS2  wfr: waiting for``RING''                                                                                      
07/18 10:04:00 yS2   got: [0a][0d][0a]RING[0d]                                                                                     
07/18 10:04:06 yS2    CND: RING                                                                                                    
07/18 10:04:06 yS2   wfr: rc=0, drn=0                                                                                              
07/18 10:04:06 yS2    CND: check no: 'none'                                                                                        
07/18 10:04:06 yS2  send: ATA[0d]                                                                                                  
07/18 10:04:06 yS2  waiting for ``CONNECT''                                                                                        
07/18 10:04:06 yS2   got: ATA[0d]                                                                                                  
07/18 10:04:06 yS2    CND: OKATA[0d][0a]CONNECT ** found **                                                                        
07/18 10:04:30 yS2  send:                                                                                                          
07/18 10:04:30 yS2  waiting for ``_''                                                                                              
07/18 10:04:30 yS2   got:  14400/ARQ/V32/LAPM/V42BIS[0d]                                                                           
07/18 10:04:30 yS2    CND: CONNECT 14400/ARQ/V32/LAPM/V42BIS                                                                       
07/18 10:04:30 yS2    CND: found: 14400/ARQ/V32/LAPM/V42BIS[0a] ** found **                                                        
07/18 10:04:30 yS2   waiting for line to clear (VTIME=3), read:                                                                    
07/18 10:04:30 yS2    looking for utmp entry... (my PID: 32388)                                                                    
07/18 10:04:30 yS2   utmp + wtmp entry made                                                                                        
07/18 10:04:30 yS2   tio_set_flow_control( HARD )                                                                                  
07/18 10:04:30 yS2   print welcome banner (/etc/issue.mgetty)                                                                      
07/18 10:04:30 yS2   getlogname (FIDO AUTO_PPP), read:                                                                             
07/18 10:05:20 ##### failed dev=ttyS2, pid=32388, got signal 1, exiting
He got a lot farther than I ever did. When I try to connect via my cell and kppp I get a log like this

Code:
07/14 10:24:16 yS2  wfr: waiting for ``RING''                                                                                      
07/14 10:24:16 yS2   got: [0a][0d][0a]RING[0d]                                                                                     
07/14 10:24:22 yS2    CND: RING                                                                                                    
07/14 10:24:22 yS2   wfr: rc=0, drn=0                                                                                              
07/14 10:24:22 yS2    CND: check no: 'none'                                                                                        
07/14 10:24:22 yS2  send: ATA[0d]                                                                                                  
07/14 10:24:22 yS2  waiting for ``CONNECT''                                                                                        
07/14 10:24:22 yS2   got: ATA[0d]                                                                                                  
07/14 10:24:22 yS2    CND: OKATA[0d][0a]NO CARRIER                                                                                 
07/14 10:25:02 yS2  found action string: ``NO CARRIER''                                                                            
07/14 10:25:02 ##### failed A_FAIL dev=ttyS2, pid=28198, caller='none', conn='', name=''
Part of the problem is that there is very little info about how to set this up on recent distributions. This time trough I have tried this how-to http://derrick-caluag.blogspot.com/2...-on-linux.html

I did however just come across some other info to pursue. That may actually help http://ubuntuforums.org/showthread.php?t=150339

I would still happily take any advice you have to offer.

Thanks
 
Old 07-21-2010, 06:36 PM   #6
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 921

Original Poster
Rep: Reputation: 46
/me has joy

I did get to work. What I had to do was just forget the how-to and use the debian defaults for the most part. I did change the debug level and the number of rings in /etc/initab but for the most part the settings are at default

my initab
Code:
S1:2345:respawn:/sbin/mgetty -n 4 -x 6 -D  ttyS2
the other significant change from the default is in /etc/ppp/pap-secrets
Code:
# Every regular user can use PPP and has to use passwords from /etc/passwd                                                         
# *     hostname        ""      *                                                                                                  
                                                                                                                                   
# added per how-to instructions.  Above line commented out.                                                                        
* * "" *
I will be changing this to reflect the actual users when the time comes.

I am still having some issues with getting a change in the answer-rings to be reflected by when the modem answers, but hey it is working.

There may be a few other small changes that I don't remember at the moment.

Now if I can just get my cell to hook up correctly, but that should be OK now.

Hope this helps someone else.
 
Old 07-21-2010, 06:39 PM   #7
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 921

Original Poster
Rep: Reputation: 46
oh one more thing.

I did not have any success getting the firmware update to install to this modem. So it still has the original firmware.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
unable to connect my modem anupamcbr Linux - Newbie 1 08-02-2006 08:25 AM
How To Connect Using Modem humble Linux - Newbie 2 12-25-2004 08:05 PM
Modem won't connect PlantPerson Linux - Newbie 17 07-16-2004 11:04 AM
Can't connect to cable modem TruckStuff Linux - Networking 2 04-08-2003 03:41 PM
getting the modem to connect Scorcher2005 Linux - Newbie 2 06-11-2002 06:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration