LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-16-2010, 07:23 AM   #1
netDie
LQ Newbie
 
Registered: Feb 2010
Posts: 2

Rep: Reputation: 0
Question Dialin-Server using mgetty via Nokia 3109c modem


Hi,

this is my first post - hopefully placed in the correct category

I'm trying to build a dial-in server using the modem in my nokia 3109c. The phone is connected using bluetooth and has a german sim-card inserted. In the logs it's shown that an incoming call is arrived and mgetty has sent an "ATA" to pick up the line. Well that does actually work, but it's the mobile phone who picks up the call and not the pc. I can hear the other (remote) modem through the phone's speaker.
My guess is that i'm missing some fancy init-chatscript to tell the phone "act as modem" or something equal.

Another problem i'm dealing with is that if i start mgetty from the inittab (using startup) it continiously trys to reach /dev/comm0 - which does not exist while the phone is not connected via bluetooth. Is there a way to manually start mgetty and prevent the "cannot set controlling tty (ioctl): Operation not permitted" message?

Hope you can give me some hints..

Best Regards,
Florian




02/16 12:02:50 mm0 check for lockfiles
02/16 12:02:50 mm0 checklock: stat failed, no file
02/16 12:02:50 mm0 locking the line
02/16 12:02:50 mm0 makelock(rfcomm0) called
02/16 12:02:50 mm0 do_makelock: lock='/var/lock/LCK..rfcomm0'
02/16 12:02:50 mm0 lock made
02/16 12:02:50 mm0 tio_get_rs232_lines: status: RTS CTS DSR DTR
02/16 12:02:50 mm0 tss: set speed to 57600 (10001)
02/16 12:02:50 mm0 tio_set_flow_control( HARD )
02/16 12:02:50 mm0 waiting for line to clear (VTIME=1), read:
02/16 12:02:51 mm0 send: AT&F&C1&D2[0d]
02/16 12:02:51 mm0 waiting for ``OK''
02/16 12:02:51 mm0 got: AT&F&C1&D2[0d]
02/16 12:02:51 mm0 CND: AT&F&C1&D2[0d][0a]OK ** found **
02/16 12:02:51 mm0 send: at+cbst=12,0,1;+chsn=1,1,0,4[0d]
02/16 12:02:51 mm0 waiting for line to clear (VTIME=3), read: [0d][0a]at+cbst=12,0,1;+chsn=1,1,0,4[0d][0d][0a]OK[0d][0a]
02/16 12:02:51 mm0 removing lock file
02/16 12:02:51 mm0 waiting...
02/16 12:03:34 mm0 select returned 1
02/16 12:03:34 mm0 checking lockfiles, locking the line
02/16 12:03:34 mm0 makelock(rfcomm0) called
02/16 12:03:34 mm0 do_makelock: lock='/var/lock/LCK..rfcomm0'
02/16 12:03:34 mm0 lock made
02/16 12:03:34 mm0 wfr: waiting for ``RING''
02/16 12:03:34 mm0 got: [0d][0a]RING[0d]
02/16 12:03:34 mm0 CND: RING
02/16 12:03:34 mm0 wfr: rc=0, drn=0
02/16 12:03:34 mm0 CND: check no: 'none'
02/16 12:03:34 mm0 cannot set controlling tty (ioctl): Operation not permitted
02/16 12:03:34 mm0 >>> this might be caused because you have run mgetty/vgetty
02/16 12:03:34 mm0 >>> from the command line. Don't do that, use /etc/inittab!
02/16 12:03:34 mm0 send: ATA[0d]
02/16 12:03:34 mm0 waiting for ``CONNECT''
02/16 12:03:34 mm0 got: ATA[0d]
02/16 12:03:34 mm0 CND: OKATA[0d][0a]OK[0d]
02/16 12:03:34 mm0 CND: OK[0a][0d][0a]NO CARRIER ((( <<<= Manual hangup
02/16 12:03:39 mm0 found action string: ``NO CARRIER''
02/16 12:03:39 ##### failed A_FAIL dev=rfcomm0, pid=2861, caller='none', conn='', name=''
 
Old 02-17-2010, 07:19 PM   #2
druidmatrix
LQ Newbie
 
Registered: Feb 2009
Posts: 13

Rep: Reputation: 0
Update

I am having similar issues as you with a simpler setup - my modem is a PCI card. I get the similar "cannot set controlling tty (ioctl): Operation not permitted" message when I run mgetty from CLI, but I read somewhere it is benign and can be ignored. I am inclined to agree, because the operation does not fail there, but proceeds, as in your logs
Quote:
02/16 12:03:34 mm0 send: ATA[0d]
02/16 12:03:34 mm0 waiting for ``CONNECT''
02/16 12:03:34 mm0 got: ATA[0d]
02/16 12:03:34 mm0 CND: OKATA[0d][0a]OK[0d]
02/16 12:03:34 mm0 CND: OK[0a][0d][0a]NO CARRIER
I am getting the exact same thing, and what I suspect is that the right AT command is not being sent upon connect, but my lab is in worse shape than yours (see my post above!). This site might be useful for some debugging/troubleshooting: http://mgetty.greenie.net/doc/mgetty_27.html

To get rid of the pesky ioctl problem, run mgetty like this:
Quote:
perl -e 'system("mgetty -x 7 /dev/mm0");'
To stop it
Quote:
pkill mgetty

Last edited by druidmatrix; 02-17-2010 at 07:47 PM. Reason: Update
 
Old 02-18-2010, 02:52 AM   #3
netDie
LQ Newbie
 
Registered: Feb 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Dear druidmatrix,

thanks for your reply. I will try your code.
The page you mentioned also has another clever suggestion to be able to start mgetty by inittab, but being able to manually start the service:

http://mgetty.greenie.net/doc/mgetty_29.html#SEC29

The wrapper is easy:

#!/bin/sh
#
while test -f /etc/nologin.ttyS1
do
sleep 60
done
exec /usr/local/sbin/mgetty ttyS1

This should also fix the ioctl problem - i guess.

But my nokia problem remains
 
Old 02-18-2010, 03:05 PM   #4
druidmatrix
LQ Newbie
 
Registered: Feb 2009
Posts: 13

Rep: Reputation: 0
Unfortunately, I still don't have a lab to work on this; didn't get any useful suggestions yet. I have some ideas that I'll try out, but need some additional hardware which I am hoping I'll get today.

If you have some ideas about AT commands to use in the meantime, or any references, can you please post them on this thread? I'll do the same once I get a lab to work with...
 
  


Reply

Tags
mgetty, modem, nokia, ppp



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Remote dialin using a ssh and a GPRS modem ? mjrich Linux - Networking 1 07-13-2005 04:06 PM
mgetty -> modem doesn't respond JZL240I-U Linux - Software 1 02-28-2005 11:11 AM
linux dialin server without modem ?? pudhiyavan Linux - Networking 1 02-17-2004 03:29 PM
VPN Server [mgetty (Dialin) + PPTP] <-> [Client WindowsXP] ingram Linux - Newbie 4 09-21-2003 12:52 PM
Modem/Dialin' halobungie Linux - Newbie 1 08-13-2003 01:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:01 PM.

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