LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   problems getting modem to answer (https://www.linuxquestions.org/questions/linux-server-73/problems-getting-modem-to-answer-823528/)

rbees 08-02-2010 05:41 AM

problems getting modem to answer
 
Hello,

I am having issues getting the modem it the dial-in server I have set up to answer on the correct ring. I have the /etc/inittab set:

Code:

S1:2345:respawn:/sbin/mgetty -n 7 -x 6 -D  ttyS2
yet I have to play with 'init q' and minicom to get it to answer on ring 7. Then a reboot destroys the setting and I have to go through the whole hassle again and it goes back to answering on the first ring.

This is not acceptable. This dial-in server is only a very back door into my network. It is only turned on when needed. Most of the time it is not powered up. When it is turned on it is by a non-tech person with out the ability to jump through the hoops to get it to answer on the correct ring.

Ideally I want this modem to just listen to the line after it stops ringing to check for a data signal and if it does not find it just hang up. If it finds a data signal then establish a connection and all that. That way it does not interfere with answering machine on the line.

Google has yielded very little info about setting up dial-in servers. :doh:Modems are not used very much any more.

michaelk 08-02-2010 04:54 PM

Have you looked at the logs?
Are you using the modem for dial out too?
Are you sending the correct init string or is the MODEM programmed correctly? If the MODEM is not powered up when the init string is sent it may not work as expected.

A MODEM can not monitor the telephone line and just listen for a data signal. However, look at the -R option in the mgetty man page. Basically you call and let the phone ring once, hang up and then call back after 30 seconds. The MODEM will then answer before the answering machine.

rbees 08-02-2010 07:01 PM

Thanks michaelk,

I have looked at the logs but at this point they have not helped much as it is not a connection issue. My guess is that the modem is being set to a factory default setup instead of what is in initab.

The main network is cable-modem -> linux-external-firewall/dhcp/dns/ -> various switches -> various computers, one of them is the dial-in server/desktop out in the shop.

The dial-in server is an old desktop machine that sets out in the shop for looking up parts and what not. Most of the time it is not turned on.

I am not sending an init string to the modem other than what is in inittab, I don't think pppd does that. I believe that would require some kind of script be called on modem reset, but I have no idea how to do that. Not very good at writing scripts and there is very little info out there on google about how to set up dial-in servers. What is there is mostly quite dated.

The modem is an internal pci US Robotics 5610B. I got it brand new still in the shrink wrapped box. It is natively supported by kernels 2.3 and higher. The machine it is in is running debian lenny.

As far as monitoring the line for a data signal goes that is a very minor issue. My experiencing with using the cell phone, weather as a regular modem or not is that calling back with in a small enough amount of time to be effective will not work very well. So that is a very back issue for me.

On the other hand having the machine setup so the secretary can go out to the shop and turn on that old desktop and have it just work for a dial-in session is very high priority.

There is a firmware update for the modem but I was not able to get the linux version to run, and there is no windows on the box.

michaelk 08-02-2010 08:02 PM

Explains dial in MODEM settings.
http://tldp.org/HOWTO/Modem-HOWTO-12.html

Should provide some insight on what needs to be setup. If desired the settings can be stored in the MODEM.

rbees 08-17-2010 06:41 PM

Thanks michaelk

I think I have in now so that it will answer when it is suppose to. But I am still having issues.

A friend of mine is able to dial in and establish a connection from winxp. But when I try with kppp through my cell I am not able to get a connection. :(

The log on the server shows

Code:

08/17 08:30:15 yS2  waiting...
08/17 09:30:15 yS2    select returned 0
08/17 09:30:15 yS2  checking if modem is still alive
08/17 09:30:15 yS2  makelock(ttyS2) called
08/17 09:30:15 yS2  do_makelock: lock='/var/lock/LCK..ttyS2'
08/17 09:30:15 yS2  lock made
08/17 09:30:15 yS2  mdm_send: 'AT'
08/17 09:30:15 yS2    got:[0a]AT[0d]
08/17 09:30:15 yS2  mdm_command: string 'AT'
08/17 09:30:15 yS2    got:[0d][0a]OK[0d]
08/17 09:30:15 yS2  mdm_command: string 'OK' -> OK
08/17 09:30:15 yS2  waiting for line to clear (VTIME=3), read:
08/17 09:30:15 yS2  removing lock file
08/17 09:30:15 yS2  waiting...
08/17 09:42:43 yS2    select returned 1
08/17 09:42:43 yS2  checking lockfiles, locking the line
08/17 09:42:43 yS2  makelock(ttyS2) called
08/17 09:42:43 yS2  do_makelock: lock='/var/lock/LCK..ttyS2'
08/17 09:42:43 yS2  lock made
08/17 09:42:43 yS2  wfr: waiting for ``RING''
08/17 09:42:43 yS2  got: [0a][0d][0a]RING[0d]
08/17 09:42:43 yS2    CND: RING
08/17 09:42:43 yS2  wfr: rc=0, drn=0
08/17 09:42:43 yS2  wfr: waiting for ``RING''
08/17 09:42:43 yS2  got: [0a][0d][0a]RING[0d]
08/17 09:42:49 yS2    CND: RING
08/17 09:42:49 yS2  wfr: rc=0, drn=0
08/17 09:42:49 yS2  wfr: waiting for ``RING''
08/17 09:42:49 yS2  got: [0a][0d][0a]RING[0d]
08/17 09:42:55 yS2    CND: RING
08/17 09:42:55 yS2  wfr: rc=0, drn=0
08/17 09:42:55 yS2  wfr: waiting for ``RING''
08/17 09:42:55 yS2  got: [0a][0d][0a]RING[0d]
08/17 09:43:01 yS2    CND: RING
08/17 09:43:01 yS2  wfr: rc=0, drn=0
08/17 09:43:01 yS2  wfr: waiting for ``RING''
08/17 09:43:01 yS2  got: [0a][0d][0a]RING[0d]
08/17 09:43:07 yS2    CND: RING
08/17 09:43:07 yS2  wfr: rc=0, drn=0
08/17 09:43:07 yS2  wfr: waiting for ``RING''
08/17 09:43:13 yS2  wfr: waiting for ``RING''
08/17 09:43:13 yS2  got: [0a][0d][0a]RING[0d]
08/17 09:43:19 yS2    CND: RING
08/17 09:43:19 yS2  wfr: rc=0, drn=0
08/17 09:43:19 yS2    CND: check no: 'none'
08/17 09:43:19 yS2  send: ATA[0d]
08/17 09:43:19 yS2  waiting for ``CONNECT''
08/17 09:43:19 yS2  got: ATA[0d]
08/17 09:43:19 yS2    CND: OKATA[0d][0a]NO CARRIER
08/17 09:44:13 yS2  found action string: ``NO CARRIER''
08/17 09:44:13 ##### failed A_FAIL dev=ttyS2, pid=3731, caller='none', conn='', name=''

08/17 09:44:13 yS2  removing lock file
--
08/17 09:44:13 yS2  mgetty: interim release 1.1.36-Jun15
08/17 09:44:13 yS2  mgetty.c compiled at Oct 27 2008, 05:29:17
08/17 09:44:13 yS2  user id: 0, pid: 6996, parent pid: 1
08/17 09:44:13 yS2  reading configuration data for port 'ttyS2'
08/17 09:44:13 yS2  reading /etc/mgetty/mgetty.config...
08/17 09:44:13 yS2  conf lib: read: 'debug 6'
08/17 09:44:13 yS2  conf lib: read: 'fax-id '
08/17 09:44:13 yS2  conf lib: read: 'speed 38400'
08/17 09:44:13 yS2  conf lib: read: 'issue-file /etc/issue.mgetty'
08/17 09:44:13 yS2  conf lib: read: 'debug 8'
08/17 09:44:13 yS2  conf lib: read: 'init-chat "" AT&F1 OK ATS0=0 OK'
08/17 09:44:13 yS2  conf lib: read: 'data-only y'
08/17 09:44:13 yS2  key: 'speed', type=0, flags=3, data=38400
08/17 09:44:13 yS2  key: 'switchbd', type=0, flags=1, data=0
08/17 09:44:13 yS2  key: 'direct', type=3, flags=1, data=FALSE
08/17 09:44:13 yS2  key: 'blocking', type=3, flags=1, data=FALSE
08/17 09:44:13 yS2  key: 'port-owner', type=1, flags=1, data=root
08/17 09:44:13 yS2  key: 'port-group', type=1, flags=1, data=dialout
08/17 09:44:13 yS2  key: 'port-mode', type=0, flags=1, data=432
08/17 09:44:13 yS2  key: 'toggle-dtr', type=3, flags=1, data=TRUE
08/17 09:44:13 yS2  key: 'toggle-dtr-waittime', type=0, flags=1, data=500
08/17 09:44:13 yS2  key: 'need-dsr', type=3, flags=1, data=FALSE
08/17 09:44:13 yS2  key: 'data-only', type=3, flags=2, data=TRUE
08/17 09:44:13 yS2  key: 'fax-only', type=3, flags=1, data=FALSE
08/17 09:44:13 yS2  key: 'modem-type', type=1, flags=1, data=auto
08/17 09:44:13 yS2  key: 'modem-quirks', type=0, flags=0, data=(empty)
08/17 09:44:13 yS2  key: 'init-chat', type=2, flags=3, data= AT&F1 OK ATS0=0 OK
08/17 09:44:13 yS2  key: 'force-init-chat', type=2, flags=1, data= \d..\d\d\d+++\d\d\d
\dATQ0V1H0 OK
08/17 09:44:13 yS2  key: 'post-init-chat', type=2, flags=0, data=(empty)
08/17 09:44:13 yS2  key: 'data-flow', type=4, flags=1, data=1
08/17 09:44:13 yS2  key: 'fax-send-flow', type=4, flags=1, data=7
08/17 09:44:13 yS2  key: 'fax-rec-flow', type=4, flags=1, data=7
08/17 09:44:13 yS2  key: 'modem-check-time', type=0, flags=1, data=3600
08/17 09:44:13 yS2  key: 'rings', type=0, flags=2, data=7
08/17 09:44:13 yS2  key: 'msn-list', type=2, flags=0, data=(empty)
08/17 09:44:13 yS2  key: 'get-cnd-chat', type=2, flags=0, data=(empty)
08/17 09:44:13 yS2  key: 'cnd-program', type=1, flags=0, data=(empty)
08/17 09:44:13 yS2  key: 'answer-chat', type=2, flags=1, data= ATA CONNECT \c

08/17 09:44:13 yS2  key: 'answer-chat-timeout', type=0, flags=1, data=80
08/17 09:44:13 yS2  key: 'autobauding', type=3, flags=1, data=FALSE
08/17 09:44:13 yS2  key: 'ringback', type=3, flags=1, data=FALSE
08/17 09:44:13 yS2  key: 'ringback-time', type=0, flags=1, data=30
08/17 09:44:13 yS2  key: 'ignore-carrier', type=3, flags=1, data=FALSE
08/17 09:44:13 yS2  key: 'issue-file', type=1, flags=3, data=/etc/issue.mgetty
08/17 09:44:13 yS2  key: 'prompt-waittime', type=0, flags=1, data=500
08/17 09:44:13 yS2  key: 'login-prompt', type=1, flags=1, data=@ login:
08/17 09:44:13 yS2  key: 'login-time', type=0, flags=1, data=240
08/17 09:44:13 yS2  key: 'fido-send-emsi', type=3, flags=1, data=TRUE
08/17 09:44:13 yS2  key: 'login-env-ttyprompt-hack', type=3, flags=1, data=FALSE
08/17 09:44:13 yS2  key: 'login-conf-file', type=1, flags=1, data=login.config
08/17 09:44:13 yS2  key: 'fax-id', type=1, flags=3, data=
08/17 09:44:13 yS2  key: 'fax-min-speed', type=0, flags=1, data=0
08/17 09:44:13 yS2  key: 'fax-max-speed', type=0, flags=1, data=14400
08/17 09:44:13 yS2  key: 'fax-server-file', type=1, flags=0, data=(empty)
08/17 09:44:13 yS2  key: 'diskspace', type=0, flags=1, data=1024
08/17 09:44:13 yS2  key: 'notify', type=1, flags=1, data=root
08/17 09:44:13 yS2  key: 'fax-owner', type=1, flags=1, data=root
08/17 09:44:13 yS2  key: 'fax-group', type=1, flags=1, data=fax
08/17 09:44:13 yS2  key: 'fax-mode', type=0, flags=1, data=432
08/17 09:44:13 yS2  key: 'fax-spool-in', type=1, flags=1, data=/var/spool/fax/incoming:/tmp
08/17 09:44:13 yS2  key: 'debug', type=0, flags=2, data=6
08/17 09:44:13 yS2  key: 'statistics-chat', type=2, flags=0, data=(empty)
08/17 09:44:13 yS2  key: 'statistics-file', type=1, flags=0, data=(empty)
08/17 09:44:13 yS2  key: 'gettydefs', type=1, flags=1, data=n
08/17 09:44:13 yS2  key: 'term', type=1, flags=0, data=(empty)
08/17 09:44:13 yS2  check for lockfiles
08/17 09:44:13 yS2  checklock: stat failed, no file
08/17 09:44:13 yS2  locking the line
08/17 09:44:13 yS2  makelock(ttyS2) called
08/17 09:44:13 yS2  do_makelock: lock='/var/lock/LCK..ttyS2'
08/17 09:44:13 yS2  lock made
08/17 09:44:13 yS2  tio_get_rs232_lines: status: RTS CTS DSR DTR
08/17 09:44:13 yS2  lowering DTR to reset Modem
08/17 09:44:14 yS2  tss: set speed to 38400 (017)
08/17 09:44:14 yS2  tio_set_flow_control( HARD )
08/17 09:44:14 yS2  waiting for line to clear (VTIME=1), read:
08/17 09:44:14 yS2  send: AT&F1[0d]
08/17 09:44:14 yS2  waiting for ``OK''
08/17 09:44:14 yS2  got: AT&F1[0d]
08/17 09:44:14 yS2    CND: AT&F1[0d][0a]OK ** found **
08/17 09:44:14 yS2  send: ATS0=0[0d]
08/17 09:44:14 yS2  waiting for ``OK''
08/17 09:44:14 yS2  got: [0d]
08/17 09:44:14 yS2    CND: OK[0a]ATS0=0[0d]
08/17 09:44:14 yS2    CND: ATS0=0[0d][0a]OK ** found **
08/17 09:44:14 yS2  waiting for line to clear (VTIME=3), read: [0d][0a]
08/17 09:44:14 yS2  removing lock file
08/17 09:44:14 yS2  waiting...

So far I have not found any thing in the logs on the laptop, the calling machine.

I can see that there seems to be the same issue that I was having the last time I tried to get this working. Namely that somehow the user name and password is not getting to the server from the laptop.


All times are GMT -5. The time now is 02:52 AM.