Menu

ncidd intermittently terminating

2016-11-07
2016-11-07
  • Jeff Elliott

    Jeff Elliott - 2016-11-07

    I have been trying to setup ncid on an old Lenovo S10-2 laptop that is running ubuntu 14.04.
    The modem is a US Robotics 5637
    Trying to run ncid version 1.5 that was compiled on the netbook.
    The documentation and support seem to be great, but I have run out of things to try.
    The comment # was removed for the initialize string line for that modem in the configuration file--thanks very much for including that in the file.
    ncidd apprears to hangup the call, but then ncid can no longer communicate with ncidd server and it looks like ncidd terminates. Here is the end of ncidd.log:

    DATE=1106
    TIME=1040
    NMBR=8774104635
    NAME=DIRECTV
    Checked Whitelist for match flag=0 ret=0 nmbrmatch=0
    Checked Blacklist for match flag=0 ret=1 nmbrmatch=2
    Blacklist Match #96803: 8774104635 number: 8774104635 name: DIRECTV
    Sent Modem 4 of 4 characters:
    AT
    Modem response: 9 characters in 1 read:
    AT

    OK
    Sent Modem 13 of 13 characters:
    AT+FCLASS=1
    Modem response: 18 characters in 1 read:
    AT+FCLASS=1

    OK
    Sent Modem 6 of 6 characters:
    ATH1
    Modem response: 11 characters in 2 reads:
    ATH1

    OK
    Sent Modem 5 of 5 characters:
    ATA
    Modem response: 4 characters in 5 reads:
    ATA
    off-hook for 10 seconds
    Sent Modem 6 of 6 characters:
    ATH0
    Modem response: 11 characters in 1 read:

    CONNECT
    Sent Modem 4 of 4 characters:
    AT
    Modem response: 9 characters in 4 reads:

    ERROR
    Sent Modem 6 of 6 characters:
    ATH0
    No Modem Response
    CID: DATE11062016TIME1040LINEPOTSNMBR8774104635MESGNONENAMEDIRECTV*
    Fatal: Serial device hung up
    Terminated: 11/06/2016 10:40:39
    Removed pidfile: /var/run/ncidd.pid

    Is there some configuration that I am missing? Any help would be greatly appreciated. Thanks, Jeff

     
  • Todd Andrews

    Todd Andrews - 2016-11-07

    Hi Jeff,

    It sounds like you might be experiencing the issue described here.

    If the steps there do not resolve the issue:

    1. Post the ncidd.log entries from "Started: ..." to "End of startup: ..." for your most recent failed attempt. Verbose level 3 (the default) should be sufficient.

    2. I believe you have hangup = 2 (FAX hangup) in ncidd.conf. Try changing to hangup = 1 (normal hangup) to see if the problem is related to the modem's FAX mode.

     
  • Jeff Elliott

    Jeff Elliott - 2016-11-07

    Hi Todd,
    Thanks very much for the reply. Modem Manager is not installed, nor running. I tried hangup =1, restarted ncidd and ncid. This time it did not automatic hangup at all. So tried hangup=2 again--same result, no hangup. Rebooted the netbook and tried both settings again--no automatic hangup even though nmbrmatch=2 for all of these attempts. Note it is a brand new modem just purchased from amazon. Here is the ncidd log file, from the last start of ncidd with hangup = 1. Thanks, Jeff

    Started: 11/07/2016 09:33:11
    Server: ncidd (NCID) 1.5
    API: 1.4 Feature Set 1 2 3 4 5
    Sysname: Linux
    Machine: i686
    Release: 3.13.0-100-generic
    Version: #147-Ubuntu SMP Tue Oct 18 16:49:53 UTC 2016
    Command line: /usr/sbin/ncidd
    --pidfile /var/run/ncidd.pid
    Logfile: /var/log/ncidd.log
    Processed config file: /etc/ncid/ncidd.conf
    Verbose level: 3
    Configured to send 'cidlog' to clients.
    Configured to send 'cidinfo' to clients.
    Helper tools:
    /usr/bin/cidupdate
    /usr/bin/ncidutil
    Using simple expressions for aliases
    Using simple expressions for blacklist/whitelist entries

    Begin: Loading alias, blacklist, and whitelist files [09:33:11]
    Processed alias file: /etc/ncid/ncidd.alias
    Alias Table:
    Number of Entries: 1
    Processed blacklist file: /etc/ncid/ncidd.blacklist
    Blacklist Table:
    Number of Entries: 98442
    Calls in the blacklist file will be terminated
    Processed whitelist file: /etc/ncid/ncidd.whitelist
    Whitelist Table:
    Number of Entries: 155
    Calls in the whitelist file will not be terminated
    Leading 1 ignored in call & alias/blacklist/whitelist
    End: Loaded alias, blacklist, and whitelist files [09:33:11]

    CID logfile: /var/log/cidcall.log
    CID logfile maximum size: 110000 bytes
    Data logfile: /var/log/ciddata.log
    Maximum number of clients/gateways: 50
    Telephone Line Identifier: -
    TTY port opened: /dev/ttyACM0
    TTY port speed: 115200
    TTY lock file: /var/lock/LCK..ttyACM0
    TTY port control signals enabled
    TTY port initialized in ICANON mode.
    Checking Modem Capabilities...
    TTY port changed to RAW mode.
    Sent Modem 35 of 35 characters:
    ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
    Modem response: 40 characters in 1 read:
    ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0

    OK
    Modem Initialized
    Sent Modem 6 of 6 characters:
    ATI3
    Modem response: 48 characters in 1 read:
    ATI3

    U.S. Robotics 56K FAX USB V1.2.23

    OK
    Modem Identifier: U.S. Robotics 56K FAX USB V1.2.23
    Sent Modem 9 of 9 characters:
    AT+GCI?
    Modem response: 25 characters in 1 read:
    AT+GCI?

    +GCI:B5

    OK
    Modem country code: B5 United States
    Sent Modem 6 of 6 characters:
    AT&V
    Modem response: 1111 characters in 1 read:
    AT&V

    ----Option----- --Setting-- Cmd ----Option----- --Setting-- --Cmd--
    Comm Standard CCITT B0 Answer Ring# 0 S0=000
    Command Echo Enabled E1 Escape Char 43 S2=043
    Speaker Volume Medium L2 CR Char 13 S3=013
    Speaker Control OnUntilCD M1 LF Char 10 S4=010
    Result Codes Enabled Q0 BS Char 8 S5=008
    Dialer Type Tone T/P Dial Pause 3 sec S6=003
    Result Form Text V1 NoAns Timeout 60 sec S7=060
    Extend Result Enabled X4 "," Pause 2 sec S8=002
    DialTone Detect Enabled X4 No CD Disc 2000 msec S10=020
    BusyTone Detect Enabled X4 DTMF Speed 95 msec S11=095
    DCD Action Std RS232 &C1 Esc GuardTime 1000 msec S12=050
    DTR Action Std RS232 &D2 Calling Tone Enabled S35=001
    V22b Guard Tone Disabled &G0 Line Rate 33600 S37=000
    Flow Control Hardware &H1
    Error Control V42,MNP,Bfr &M4
    Compression 44 42b MNP5 &K1

    OK
    Modem Active Profile settings:
    ----Option----- --Setting-- Cmd ----Option----- --Setting-- --Cmd--
    Comm Standard CCITT B0 Answer Ring# 0 S0=000
    Command Echo Enabled E1 Escape Char 43 S2=043
    Speaker Volume Medium L2 CR Char 13 S3=013
    Speaker Control OnUntilCD M1 LF Char 10 S4=010
    Result Codes Enabled Q0 BS Char 8 S5=008
    Dialer Type Tone T/P Dial Pause 3 sec S6=003
    Result Form Text V1 NoAns Timeout 60 sec S7=060
    Extend Result Enabled X4 "," Pause 2 sec S8=002
    DialTone Detect Enabled X4 No CD Disc 2000 msec S10=020
    BusyTone Detect Enabled X4 DTMF Speed 95 msec S11=095
    DCD Action Std RS232 &C1 Esc GuardTime 1000 msec S12=050
    DTR Action Std RS232 &D2 Calling Tone Enabled S35=001
    V22b Guard Tone Disabled &G0 Line Rate 33600 S37=000
    Flow Control Hardware &H1
    Error Control V42,MNP,Bfr &M4
    Compression 44 42b MNP5 &K1
    Sent Modem 13 of 13 characters:
    AT+FCLASS=?
    Modem response: 27 characters in 1 read:
    AT+FCLASS=?

    0,1,8

    OK
    Modem supports Data Mode
    Modem supports FAX Mode 1
    Modem supports VOICE Mode
    TTY port changed to ICANON mode.
    TTY port changed to RAW mode.
    Sent Modem 35 of 35 characters:
    ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
    Modem response: 40 characters in 1 read:
    ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0

    OK
    Modem initialized.
    Sent Modem 11 of 11 characters:
    AT+VCID=1
    Modem response: 16 characters in 1 read:
    AT+VCID=1

    OK
    Modem set for CallerID.
    TTY port changed to ICANON mode.
    CallerID from AT Modem and optional gateways
    Handles modem calls without Caller ID
    Modem used for CallerID and to terminate calls
    Internal Hangup Mode = 1: hangup on a blacklisted call
    Network Port: 3333
    Wrote pid 3335 in pidfile: /var/run/ncidd.pid
    Modem is fd 4
    NCID connection socket is sd 5 pos 1
    End of startup: 11/07/2016 09:33:12

    Client 6 pos 2 from 127.0.0.1 [localhost] connected 11/07/2016 09:33:20
    200 Server: ncidd (NCID) 1.5
    210 API: 1.4 Feature Set 1 2 3 4 5
    Sent call log: /var/log/cidcall.log
    250 End of call log
    Sent 'hangup-1' option to client
    Sent 'ignore1' option to client
    300 End of connection startup

    RING
    CIDINFO: LINEPOTSRING1TIME09:33:38*

    DATE=1107
    TIME=0933
    NMBR=4243526570
    NAME=WIRELESS CALLER
    Checked Whitelist for match flag=0 ret=1 nmbrmatch=2
    Whitelist Match #00: 4243526570 number: 4243526570 name: WIRELESS CALLER
    CID: DATE11072016TIME0933LINEPOTSNMBR4243526570MESGNONENAMEWIRELESS CALLER*

    RING
    CIDINFO: LINEPOTSRING2TIME09:33:44*

    RING
    CIDINFO: LINEPOTSRING3TIME09:33:50*

    RING
    CIDINFO: LINEPOTSRING4TIME09:33:56*

    RING
    CIDINFO: LINEPOTSRING5TIME09:34:02
    CIDINFO:
    LINEPOTSRING0TIME09:34:09
    Client 6 pos 2 from 127.0.0.1 [localhost] disconnected 11/07/2016 09:34:15
    Client 6 pos 2 removed from poll 11/07/2016 09:34:15

     
  • John L. Chmielewski

    Hi Jeff,

    Is this correct:

    At boot ncidd dies saying no modem
    ncidd runs OK when manually starting it on a running system
    

    As Todd indicated, it was the modem manager previously causing the problem.

    If it is not the modem manager causing your problem, maybe something else taking control of the modem at boot.

    The reason ncidd did not hangup on the call when you manually started it was because it is in your whitelist. From your logfile:

    Checked Whitelist for match flag=0 ret=1 nmbrmatch=2
    Whitelist Match #00: 4243526570 number: 4243526570 name: WIRELESS CALLER

     
  • Todd Andrews

    Todd Andrews - 2016-11-07

    Hi Jeff,

    Modem Manager is not installed, nor running.

    Just making sure -- Modem Manager is installed by default in Ubuntu 14. Did you manually uninstall it?

     
  • Jeff Elliott

    Jeff Elliott - 2016-11-07

    Hi John,
    Thanks for the reply. I apologize for my errors 1) not reading the log file correctly and 2) on the whitelist. I added my cell to the blacklist to test it out, but forgot to edit the whitelist. Sorry to bother you folks with my mistakes. That fixed, it does appear to work with hangup=1, but not with hangup=2. Hangup=2 does send a fax tone over the line, but then ncid shows the MSG: Serial device 4 pos 0 Hung Up, Terminated 11/07/2016 13:15:10. At that point ncid is no longer connected to ncidd server with the message at the bottom "couldn't open socket: connection refused." The log file information for hangup=2 is included below.

    In answer to your question, I don't yet have ncidd set to start at boot, I only manually start and stop it using "sudo invoke-rc.d ncidd stop" or "sudo invoke-rc.d ncidd start" in a terminal.

    It would appear to be a modem isue. I will use hangup=1 for now. I ordered this modem because it happened to be mentioned in the ncidd.conf file and was from a known vendor. Is there a better or recommended modem that might work in the hangup=2 mode?

    Thanks, Jeff

    ncidd.log excerpt:

    Started: 11/07/2016 13:14:27
    Server: ncidd (NCID) 1.5
    API: 1.4 Feature Set 1 2 3 4 5
    Sysname: Linux
    Machine: i686
    Release: 3.13.0-100-generic
    Version: #147-Ubuntu SMP Tue Oct 18 16:49:53 UTC 2016
    Command line: /usr/sbin/ncidd
    --pidfile /var/run/ncidd.pid
    Logfile: /var/log/ncidd.log
    Processed config file: /etc/ncid/ncidd.conf
    Verbose level: 3
    Configured to send 'cidlog' to clients.
    Configured to send 'cidinfo' to clients.
    Helper tools:
    /usr/bin/cidupdate
    /usr/bin/ncidutil
    Using simple expressions for aliases
    Using simple expressions for blacklist/whitelist entries

    Begin: Loading alias, blacklist, and whitelist files [13:14:27]
    Processed alias file: /etc/ncid/ncidd.alias
    Alias Table:
    Number of Entries: 1
    Processed blacklist file: /etc/ncid/ncidd.blacklist
    Blacklist Table:
    Number of Entries: 98442
    Calls in the blacklist file will be terminated
    Processed whitelist file: /etc/ncid/ncidd.whitelist
    Whitelist Table:
    Number of Entries: 154
    Calls in the whitelist file will not be terminated
    Leading 1 ignored in call & alias/blacklist/whitelist
    End: Loaded alias, blacklist, and whitelist files [13:14:27]

    CID logfile: /var/log/cidcall.log
    CID logfile maximum size: 110000 bytes
    Data logfile: /var/log/ciddata.log
    Maximum number of clients/gateways: 50
    Telephone Line Identifier: -
    TTY port opened: /dev/ttyACM0
    TTY port speed: 115200
    TTY lock file: /var/lock/LCK..ttyACM0
    TTY port control signals enabled
    TTY port initialized in ICANON mode.
    Checking Modem Capabilities...
    TTY port changed to RAW mode.
    Sent Modem 35 of 35 characters:
    ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
    Modem response: 40 characters in 1 read:
    ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0

    OK
    Modem Initialized
    Sent Modem 6 of 6 characters:
    ATI3
    Modem response: 48 characters in 1 read:
    ATI3

    U.S. Robotics 56K FAX USB V1.2.23

    OK
    Modem Identifier: U.S. Robotics 56K FAX USB V1.2.23
    Sent Modem 9 of 9 characters:
    AT+GCI?
    Modem response: 25 characters in 1 read:
    AT+GCI?

    +GCI:B5

    OK
    Modem country code: B5 United States
    Sent Modem 6 of 6 characters:
    AT&V
    Modem response: 1111 characters in 1 read:
    AT&V

    ----Option----- --Setting-- Cmd ----Option----- --Setting-- --Cmd--
    Comm Standard CCITT B0 Answer Ring# 0 S0=000
    Command Echo Enabled E1 Escape Char 43 S2=043
    Speaker Volume Medium L2 CR Char 13 S3=013
    Speaker Control OnUntilCD M1 LF Char 10 S4=010
    Result Codes Enabled Q0 BS Char 8 S5=008
    Dialer Type Tone T/P Dial Pause 3 sec S6=003
    Result Form Text V1 NoAns Timeout 60 sec S7=060
    Extend Result Enabled X4 "," Pause 2 sec S8=002
    DialTone Detect Enabled X4 No CD Disc 2000 msec S10=020
    BusyTone Detect Enabled X4 DTMF Speed 95 msec S11=095
    DCD Action Std RS232 &C1 Esc GuardTime 1000 msec S12=050
    DTR Action Std RS232 &D2 Calling Tone Enabled S35=001
    V22b Guard Tone Disabled &G0 Line Rate 33600 S37=000
    Flow Control Hardware &H1
    Error Control V42,MNP,Bfr &M4
    Compression 44 42b MNP5 &K1

    OK
    Modem Active Profile settings:
    ----Option----- --Setting-- Cmd ----Option----- --Setting-- --Cmd--
    Comm Standard CCITT B0 Answer Ring# 0 S0=000
    Command Echo Enabled E1 Escape Char 43 S2=043
    Speaker Volume Medium L2 CR Char 13 S3=013
    Speaker Control OnUntilCD M1 LF Char 10 S4=010
    Result Codes Enabled Q0 BS Char 8 S5=008
    Dialer Type Tone T/P Dial Pause 3 sec S6=003
    Result Form Text V1 NoAns Timeout 60 sec S7=060
    Extend Result Enabled X4 "," Pause 2 sec S8=002
    DialTone Detect Enabled X4 No CD Disc 2000 msec S10=020
    BusyTone Detect Enabled X4 DTMF Speed 95 msec S11=095
    DCD Action Std RS232 &C1 Esc GuardTime 1000 msec S12=050
    DTR Action Std RS232 &D2 Calling Tone Enabled S35=001
    V22b Guard Tone Disabled &G0 Line Rate 33600 S37=000
    Flow Control Hardware &H1
    Error Control V42,MNP,Bfr &M4
    Compression 44 42b MNP5 &K1
    Sent Modem 13 of 13 characters:
    AT+FCLASS=?
    Modem response: 27 characters in 1 read:
    AT+FCLASS=?

    0,1,8

    OK
    Modem supports Data Mode
    Modem supports FAX Mode 1
    Modem supports VOICE Mode
    TTY port changed to ICANON mode.
    TTY port changed to RAW mode.
    Sent Modem 35 of 35 characters:
    ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
    Modem response: 40 characters in 1 read:
    ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0

    OK
    Modem initialized.
    Sent Modem 11 of 11 characters:
    AT+VCID=1
    Modem response: 16 characters in 1 read:
    AT+VCID=1

    OK
    Modem set for CallerID.
    TTY port changed to ICANON mode.
    CallerID from AT Modem and optional gateways
    Handles modem calls without Caller ID
    Modem used for CallerID and to terminate calls
    Pickup enabled for FAX hangup
    Internal Hangup Mode = 2: generate FAX tones then hangup on a blacklisted call
    Network Port: 3333
    Wrote pid 3917 in pidfile: /var/run/ncidd.pid
    Modem is fd 4
    NCID connection socket is sd 5 pos 1
    End of startup: 11/07/2016 13:14:28

    Client 6 pos 2 from 127.0.0.1 [localhost] connected 11/07/2016 13:14:35
    200 Server: ncidd (NCID) 1.5
    210 API: 1.4 Feature Set 1 2 3 4 5
    Sent call log: /var/log/cidcall.log
    250 End of call log
    Sent 'hangup-2' option to client
    Sent 'ignore1' option to client
    300 End of connection startup

    RING
    CIDINFO: LINEPOTSRING1TIME13:14:57*

    DATE=1107
    TIME=1314
    NMBR=4243526570
    NAME=WIRELESS CALLER
    Checked Whitelist for match flag=0 ret=0 nmbrmatch=0
    Checked Blacklist for match flag=0 ret=1 nmbrmatch=2
    Blacklist Match #18: 4243526570 number: 4243526570 name: WIRELESS CALLER
    Sent Modem 4 of 4 characters:
    AT
    Modem response: 9 characters in 1 read:
    AT

    OK
    Sent Modem 13 of 13 characters:
    AT+FCLASS=1
    Modem response: 18 characters in 1 read:
    AT+FCLASS=1

    OK
    Sent Modem 6 of 6 characters:
    ATH1
    Modem response: 11 characters in 2 reads:
    ATH1

    OK
    Sent Modem 5 of 5 characters:
    ATA
    Modem response: 4 characters in 5 reads:
    ATA
    off-hook for 10 seconds
    Sent Modem 6 of 6 characters:
    ATH0
    Modem response: 11 characters in 1 read:

    CONNECT
    Sent Modem 4 of 4 characters:
    AT
    Modem response: 9 characters in 4 reads:

    ERROR
    Sent Modem 6 of 6 characters:
    ATH0
    No Modem Response
    CID: DATE11072016TIME1314LINEPOTSNMBR4243526570MESGNONENAMEWIRELESS CALLER*
    Fatal: Serial device hung up
    Terminated: 11/07/2016 13:15:10
    Removed pidfile: /var/run/ncidd.pid

     
  • John L. Chmielewski

    Hi Jeff,

    Do not worry about reading the server log file correctly. There are a lot of lines in the log and you did not know where in the log to look for the problem.

    Some modems do not like the pickup command being sent. Maybe your modem will work with pickup disabled. Try disabling it by uncommenting the line in ncidd.conf:

    # set pickup = 0
    
     
  • Jeff Elliott

    Jeff Elliott - 2016-11-07

    John,
    Thanks. Tried it with pickup=0 and hangup=2: same results, ncid shows the MSG: Serial device 4 pos 0 Hung Up, Terminated. Is it fair to say this is a peculiarity of this particular modem? Thanks, Jeff

     
    • Todd Andrews

      Todd Andrews - 2016-11-07

      Hi Jeff,

      Is it fair to say this is a peculiarity of this particular modem?

      My bad, I should have given you the link to the Wikipedia NCID chart. The 5637 is listed there as not working with FAX hangup, though I believe you are the first to confirm the issue under Ubuntu.

       
  • Jeff Elliott

    Jeff Elliott - 2016-11-07

    John,
    Thanks, great wiki page. I will just use hangup=1 for now and maybe buy a different modem later. Many thanks to you and Todd for your help, Jeff

     

Log in to post a comment.