3

[ubuntu] Mgetty with ESS modem

view full story
linux-howto

http://ubuntuforums.org – I am trying to use MGETTY as a caller ID and eventually build in the function to use a mysql db and block calls on a list. I am having a problem when I reboot the machine and someone calls it locks up my machine and the only way to get it back is to reboot. I have narrowed it down but I am still nopt sure what is causing it. It works correctly when I do the following 1. restart machine 2. stop mgetty 3. comment out port config from mgetty.config this includes the init chat and cmd line 4 start mgetty 5 stop mgety 6. uncomment port config from mgetty.config this includes the init chat and cmd line 7. start mgetty At this point if someone calls my caller id does work If I dont do it as shown above like I said before on the second ring it hangs up everything... Anyway here is my config... /etc/mgetty/mgetty.config Code: debug 8 # Log everything to /var/log/mgetty/mg_ttyS_ESS0.log speed 115200 # Buad rate to run modem at rings 2 # Answer phone after 2 rings - Need 2 because caller id info is sent between 1st and 2nd ring # The following tells mgetty that for ttyS_ESS0 turn caller id on and run callerid.sh issue-file /etc/issue.mgetty port ttyS_ESS0   init-chat "" AT#CID=1 OK   cnd-program /home/ubuntuuser/scripts/callerid/callerid.sh callerid.sh Code: #!/bin/sh NUMBER="$2" NAME="$3" echo "Incoming call from $NAME. $NUMBER" | festival --tts exit 1 # So mgetty will NOT answer the phone! /etc/init/mgetty.conf Code: start on startup start on runlevel 2 start on runlevel 3 start on runlevel 4 start on runlevel 5 respawn exec /sbin/mgetty /dev/ttyS_ESS0 Code: ubuntuuser@ubuntu:/etc/mgetty$ sudo wvdialconf  wvtest Editing `wvtest'. Scanning your serial ports for a modem. Modem Port Scan<*1>: Scanning ttyS_ESS0 first, /dev/modem is a link to it. ttyS_ESS0<*1>: ATQ0 V1 E1 -- OK ttyS_ESS0<*1>: ATQ0 V1 E1 Z -- OK ttyS_ESS0<*1>: ATQ0 V1 E1 S0=0 -- OK ttyS_ESS0<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK ttyS_ESS0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK ttyS_ESS0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK ttyS_ESS0<*1>: Modem Identifier: ATI -- 56000/33600 ttyS_ESS0<*1>: Speed 4800: AT -- OK ttyS_ESS0<*1>: Speed 9600: AT -- OK ttyS_ESS0<*1>: Speed 19200: AT -- OK ttyS_ESS0<*1>: Speed 38400: AT -- OK ttyS_ESS0<*1>: Speed 57600: AT -- OK ttyS_ESS0<*1>: Speed 115200: AT -- OK ttyS_ESS0<*1>: Max speed is 115200; that should be safe. ttyS_ESS0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK ttyS0<*1>: ATQ0 V1 E1 -- �[01]A?Z�h��=Q�[07]V��[7f][0f]F�?'��j[17]��~�[0f][16]�/[17]o[01][��b�7f]�[03][�Eo[0f][16]={+��r�)"8[0e]�[[0f][17][07][0b]�[1f]�[1f]_i�NNNNNtNNNNNNvNNNND"[16]-�[0f][15]��&�j� ttyS0<*1>: failed with 2400 baud, next try: 9600 baud ttyS0<*1>: ATQ0 V1 E1 -- Password: ttyS0<*1>: failed with 9600 baud, next try: 115200 baud ttyS0<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up. Modem Port Scan<*1>: S1  S2  S3  Found a modem on /dev/ttyS_ESS0, using link /dev/modem in config. wvtest<Warn>: Can't open 'wvtest' for reading: No such file or directory wvtest<Warn>: ...starting with blank configuration. Modem configuration written to wvtest. ttyS_ESS0<Info>: Speed 115200; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0" ubuntuuser@ubuntu:/etc/mgetty$ I appreciate any help... (Hardware)