NCID Raspbian

Help
cerebro
2013-12-28
2015-03-22
1 2 > >> (Page 1 of 2)
  • cerebro

    cerebro - 2013-12-28

    Hi,

    I have been using NCID server and client on a Model B 512MB model Raspberry Pi and it seems that over a 24 hour period that NCID stops identifying numbers when the phone rings, it recognises there is a call but "no Caller ID" is displayed even if it is a known (on alias list) number.

    My solution has been to reboot the Pi twice a day via crontab, but I wondered if this is a bug, or is NCID not meant to run 24/7 on a Pi?

    If you need me to post any logs on here or pastebin, please let me know the commands to get the logs and I will post them.

    Thanks in advance

     
  • John L. Chmielewski

    This problem shows up once in a while and it is usually the modem falling out of Caller ID mode.

    You did not say how you get your Caller ID, so I will assume a modem. If it is tell me which one you are using. If not then tell me what you are using in place of a modem.

    There are two solutions to this if it is a modem problem.

    Copy the attached initmodem script to the /usr/bin directory. You may need to make it executable:

    chmod +x initmodem

    Run initmodem and check the log file to make sure the modem was reinitialized:

    cat /var/log/ncidd.log

    Wait until you stop Getting Caller ID, run initmodem, then call yourself and see if it was fixed.

    You can also run the ncid-initmodem module. It will detect when there is no Caller ID on a call and will reinitialize the modem so the following calls will have Caller ID:

    ncid --no-gui --program ncid-initmodem &

    If either of the above solutions fixes the problem you might want to consider getting a new modem.

     
  • cerebro

    cerebro - 2013-12-29

    Hi John,

    Sorry, yes as you correctly guessed I am using a modem, the one I am using is TRIXES USB 56K, exact model is on amazon.co.uk if you use teh search term TRIXES USB 56K External Dial Up Voice Fax Data Modem Windows 7 .

    I will try your fixes as I have just rebooted the Pi and will let you know if it has worked.

    Thanks for the quick reply.

     
    • Richard_on_SF

      Richard_on_SF - 2013-12-30

      Hi Cerebro,

      I'm running my ncid server on a Raspberry as well and it never felt like yours for the past 1 year. As John already proposed, it might be related to a faulty modem, but before replacing it since it's free to try, I will get a chance by resetting the usb port on where it's connect. Rebooting the PI don't do the job.

      First you need to get the port where your modem is connect with lsusb. Then create a file name usbreset, including that script:

      #include <stdlib.h>
      #include <stdio.h>
      #include <fcntl.h>
      #include <errno.h>
      #include <sys/types.h>
      #include <sys/stat.h>
      #include <sys/ioctl.h>
      #include <linux/usbdevice_fs.h>
      
      void main(int argc, char **argv)
      {
          const char *filename;
          int fd;
      
          if (argc < 2) {
              printf("Give USB device name as parameter\n");
              exit(1);
          }
          filename = argv[1];
          fd = open(filename, O_WRONLY);
          if (fd == -1) {
              perror("USB device open failed");
              exit(2);
          }
          if (ioctl(fd, USBDEVFS_RESET, 0) == -1) {
              perror("USBDEVFS_RESET device ioctl failed");
              exit(3);
          }
          close(fd);
      }
      

      Now here is the example:

      lsusb returning:
      Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
      Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
      Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
      Bus 001 Device 004: ID 067b:2305 Prolific Technology, Inc. PL2305 Parallel Port
      Bus 001 Device 005: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
      Bus 001 Device 006: ID 04d9:1503 Holtek Semiconductor, Inc. Shortboard Lefty
      Bus 001 Device 007: ID 046d:c05a Logitech, Inc. Optical Mouse M90
      Bus 001 Device 008: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
      Bus 001 Device 009: ID 0586:3410 ZyXEL Communications Corp. ZyAIR G-202 802.11bg

      Reseting the mouse usb port can be achieve with: usbreset /dev/bus/usb/001/007

       
  • cerebro

    cerebro - 2013-12-31

    Hi both,

    I have tried The fix that John recommended but with the bad weather in the UK have only had a day of consistent power so hopefully I can see if it works. Another thought I had was to try the modem in a usb powered hub, not sure if it will improve anything but worth a try? Can you let me know what modems you are using on the Pi as I am prepared to get a new one and try but there and not many USB modems in the UK to pick from?

    Thanks

     
    • Richard_on_SF

      Richard_on_SF - 2014-01-01

      Hi cerebro,

      I'm using a cheap one bought on ebay from this seller. http://www.ebay.ca/itm/Black-External-56K-V9-0-V9-2-USB-Dial-Up-Voice-Fax-Data-Modem-/281175670163?pt=PCC_Modems&hash=item4177603d93. At the time I purchased it, it was the only one who said it support Linux. Basically I add nothing to program. The Pi detect it first time. And it still working since. I couldn't have better for that price. Have you try to reset the usb port? I worked on another project which integer a Pi into a camera battery grip. I lost so much time because there was a known bug with the pi usb port. After googling my trouble, I found the solution mentionned before and since then I'm able to send photos to Android while shooting pictures in my studio.

      Richard

       
  • BTodCox

    BTodCox - 2014-01-01

    cerebro,
    Sounds like a frustrating problem that you are experiencing. I run NCID on an RPi; up until recently I used an external Zoom 3095 USB modem for CID (now I SIP sniff) without ever experiencing the issue you are having. Unfortunately, the Zoom modem may not work in the UK as reported by one user on the RPi forum (this may be a config issue where the modem is not set for the UK standards; there's an AT command to change the supported country standards for the Conexant 93010 chipset, so I wouldn't take this claim as definitive). Here's the post of the same UK user successfully using a USRobotics 5637: http://www.raspberrypi.org/forum/viewtopic.php?p=385670#p385670 . Note the USRobotics 5637 also uses the Conexant 93010 chipset.

    Here is a blog post ( http://nonodes.spunow.co.uk/2012/11/usb-modem-from-mono-on-raspberry-pi.html ) that mentions the use of what appears to be the same modem as you are using with no mention of any NCID issues other than getting the modem set to UK standards. Note that this modem is using the C93010 chipset as well.

    In addition to the potential problem sources already mentioned--
    (1) bad modem
    (2) usb issue on RPi
    (3) not enough power from USB port
    I would throw another one into the mix:
    (4) Bad power supply for RPi.
    I have seen a bad power supply for an RPi cause a USB wifi dongle intermittently drop its connection.

    Tod

     
    Last edit: BTodCox 2014-01-01
  • cerebro

    cerebro - 2014-01-02

    Hi All,

    It is now looking like there is a problem with the Pi itself, I have tried both the latest version of Raspbian and Noobs and neither has booted on the Pi, its an original 256mb model B. I am planning at the weekend to try various SD cards and power supplies and see if I can get a result and also see if I can update the Pi Firmware. Ironically the SD card with NCID on it still works but I have lost the network via USB wifi.

    Thankss for all the suggestions on how to fix, I will update after the weekend with any results. My other plan is to use a Model A pi, is anyone runing NCID on a model A Pi and has anyone had any issues with it?

    Cheers

     
  • BTodCox

    BTodCox - 2014-01-03

    NCID will run on a model A RPi. One of the RPi's I used when getting LCDncid running on the RPi was a model A. With that said, I have not done any long term testing on the model A; a model B has been sitting in a closet running NCID for months unattended except for occasional apt-get updates.

    If you need to update the base firmware of an RPi without reinstalling the OS (if I recall, a fresh install of the newer Raspbian/NOOBS distributions is supposed to update the firmware), you can just:

    sudo rpi-update
    sudo reboot
    

    Come to think of it, a firmware update got rid of strange errors I had trying to mount a windows share. Not sure that it would help your modem issues, but it certainly shouldn't hurt. Good luck on your debug efforts.

     
  • cerebro

    cerebro - 2014-01-06

    After lots of testing this weekend I have finally sorted the issue.
    Long story short, looks like the whole thing was caused by the USB Wifi dongle, though it is listed as compatible it in combination with the modem seemed to be too much for the Pi.
    I have now used a wifi repeater with LAN connections and have wired the Pi to my network. I have tested and for 36 hours no "no caller ID" messages and much faster caller ID responsesm, with Wifi it was one or two rings then numbers would show, on LAN its almost instant.
    So I am taking the leap and saying this is now fixed.

    Many thanks for all of you who have helped in this and have to say now it is working I am more than happy.

    Cheers

     
  • cerebro

    cerebro - 2014-02-01

    Hi,

    Seems problems have started again, I have run a test command ncidd -dv3 and output is below

    pi@NCID:~$ sudo ncidd -Dv3
    Started: 02/01/2014 23:19:22
    Server: ncidd (NCID) 0.87
    Command line: ncidd
    -Dv3
    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.
    Processed alias file: /etc/ncid/ncidd.alias
    Alias Entries: 13/500
    Leading 1 from a call required in an alias definition
    CID logfile: /var/log/cidcall.log
    CID logfile maximum size: 110000 bytes
    Data logfile not present: /var/log/ciddata.log
    Telephone Line Identifier: -
    TTY port opened: /dev/ttyACM0
    TTY port speed: 19200
    TTY lock file: /var/lock/LCK..ttyACM0
    TTY port control signals enabled
    CallerID from AT Modem and optional gateways
    Handles modem calls without Caller ID
    Sent Modem 20 of 20 characters:
    AT Z S0=0 E1 V1 Q0
    Modem response: 26 characters in 1 read:
    AT Z S0=0 E1 V1 Q0
    OK

    Try 1 to init modem: return = 0.
    Modem initialized.
    Sent Modem 11 of 11 characters:
    AT+VCID=1
    No Modem Response
    Sent Modem 10 of 10 characters:
    AT#CID=1
    No Modem Response
    Unable to set modem CallerID: /dev/ttyACM0
    Terminated: 02/01/2014 23:19:28

    I assume the no modem response is the issue as now getting no caller id every call, could someone let me know how to fix this please?

    Thanks in advance

     
  • John L. Chmielewski

    In order to run sudo ncidd -Dv3 you need to terminate the running ncidd. You output indicates shows that ncidd terminated itself and I believe it is because another ncidd is running.

    If restarting ncidd does not fix your problem, send the debug output again, but make sure ncidd is not running with pgrep -fl ncid.

     
    Last edit: John L. Chmielewski 2014-02-02
  • cerebro

    cerebro - 2014-02-12

    Hi John,

    I have now purchased a different modem and have upgraded to version 0.88 and it has been running for 48 hours so far and all is working, so looks like the issue may have been a tempremental modem. I will keep and eye on this an if anything fails I will post an update. Many thanks again for providing the software and support.

     
  • cerebro

    cerebro - 2014-02-15

    Hi John,

    Seems the caller ID has failed again, the calls are registering but no caller ID is displayed, but I can see the ID on my home phone handset.
    I have used the terminal instructions and have attached the output, please can you take a look and let me know if you need anymore info?

    Thanks

     
  • John L. Chmielewski

    The debug output indicates a device at /dev/ttyACM0, but the initialization string for the modem fails. Could be the modem went bad or maybe the modem is hung, in which case you need to power cycle it. I would power cycle the RPi first with the modem attached and see if this fixes it. If it does, good, but you do not know it it was the modem in trouble or the USB port for the modem.

    You should download and use minicom to manually talk to your modem. It will show you all modem responses and you can type in all modem commands. You will need to configure it to use /dev/ttyACM0. It is an interactive program and has been very useful when dealing with modem problems.

     
  • Todd Andrews

    Todd Andrews - 2014-02-16

    Hi Cerebro,

    What is the manufacturer and model of the new modem you're using?

    If you do download minicom as John suggests, could you post the results of each of the following AT commands:

    ATI3
    ATI4
    ATI7
    

    This will help identify the chipset in your modem.

     
  • BTodCox

    BTodCox - 2014-02-17

    Cerebro,

    I clicked the link you posted above where you indicated you purchased your modem. Interestingly, there is a statement that

    This listing was ended by the seller because the item was lost or broken.
    

    Not saying this is THE issue, but the reason for ending the ebay listing seems to be another possible source of problems.

    Would really like to see the output from the commands from Todd as well as the output from minicom when a call comes in without ncidd running.

     
  • cerebro

    cerebro - 2014-02-20

    Hi all,

    Sorry I have been working away from home I will be home at the weekend and testing out minicom.

    Todd I have three modems currently as I bought another one on the recommendation of a friend.
    I have a Trixes USB modem, a Trendnet USB modem model number TFM 561u and a us robotics usr 5637. The us robotics one is the one I was recommended and has been on since I went away so we shall see if it is the modem that is causing the issue.
    I have seen lots of posts online that suggest a lot of conexant modems work in the uk but "fall alseep" after a fee days due to our unique caller id set up. I will test minicom at the weekend on an additional pi and post the output soon.

    Thanks

     
  • cerebro

    cerebro - 2014-02-23

    Hi,

    Finally have set up all three pis to see what happens.

    The US Robotics one is still going from when I left and so far still working. So I think that maybe it is a hardware issue with the UK caller ID system and the other two modems.

    I have the other two set up and running and it will be about two days before they lose the caller ID numbers, so I will keep an eye on these and update when I have more information.

    I ran the minicom on both the two troublesome modems whilst they are working and they are on the attachement. I will post another log when they lose the caller IDs and I run the minicom commands again.

    Thanks

     
  • John L. Chmielewski

    I believe my first post above gives 2 workarounds for this problem. Initmodem should be able to prevent the modem from sleeping or falling out of Caller ID.

    Copy initmodem (attachment to my first post) to /usr/bin. If you use windows to get the script be very careful not to change the Linux line termination to Windows line termination. When you execute initmodem, it will cause ncidd to reinitialize the modem. Verify that it works by manually running it, then look at /var/log/ncidd.log and make sure you see the following two lines followed by the modem initialization lines:

    TTY in use: releasing modem
    TTY free: using modem again

    Once you verified it working, use cron to run it once every 24 hours. Hopefully this should eliminate your modem problem. Let me know if it does and I will make the script, with minor modifications, part of the Raspberry distribution

     
    Last edit: John L. Chmielewski 2014-02-24
  • cerebro

    cerebro - 2014-02-24

    Hi John,

    I have copied over the initmodem file and set up everything and the two lines you mentioned were shown on both installations I am testing. Both modems are now back working and I have set up a cron job to run initmodem at 4 am every day so I will keep and eye on this and see if I get more drop outs. I have done all this in linux just to make sure nothing happens in the file transfer.

    The US Robotics modem set up is still going and no drop outs thus far, its been on now for nearly 6 days so I am hopeful this modem may prove the answer, I literally plugged it in and it has worked from the outset.

    Todd, I when the caller id failed I ran minicom and the out put for ATI3 and ATI7 were the same, but ATI4 reported this on both modems:
    ATI4
    56000

    ERROR

    Hopefully this information may be of use,if the caller id fails again I wil run minicom and post teh output. For now I have not set the ncid --no-gui --program ncid-initmodem & command as I wanted to test the cron job first and then look at the results.

    Thanks

     
  • cerebro

    cerebro - 2014-02-25

    Hi,

    Day 1's findings on the two modems shows that they lose caller ID in less than 24 hours, but with the initmodem script run manually they both work. So now my thoughts are to run initmodem every 6 hours and see if that makes a difference.
    I am going to set one of the Pi's running with ncid --no-gui --program ncid-initmodem & and see which works the best for keeping caller ID alive.

    US robotics modem pi is still working fine so happily using than one as the main NCID installion whilst these two other are in test.

    Any other suggestions please let me know.

    thanks

     
  • John L. Chmielewski

    Running initmodem every 6 hours is good, Even every 4 hours if needed. If necessary you can probably run it as often as needed. I think it is better to run it as little as possible to fix the problem.

    If you run ncid-initmodem, it will always fix the problem at the cost of missing the Caller ID on one call, unless calls come in so infrequently that Caller ID drops out before the next call. It detects that Caller ID died and will fix it for the next call to come in, but it cannot fix the call with the missing Caller ID. It depends on the gencid configuration being set. It is set by default, unless you set it to 0 in ncidd.conf.

    You can run initmodem to fix the problem and ncid-initmodem as extra insurance so that you would only miss the Caller ID on one call if ncid-initmodem had to fix the problem instead of initmodem.

     
    • jwlittle

      jwlittle - 2015-02-15

      Hi - can I butt in
      I am sure you have covered these things but couldn't see it above so will suggest anyway
      I have had this Conexant modem a few days now and found it has some features that affect CLID in the UK. The main thing is its default Country is the USA. USA has technical differences in Caller ID. So it needs setting to the correct country
      For me that means B4 (UK). do an AT+GCI=B4 for the UK re[lace the B4 code for yours if you live somewhere else. next Caller ID is controlled using AT-SCID=1 AT+VCID=1 AT-STE=1 for a formatted easy to read list. for just a plain string make the numbers 2.
      The full command manual is called "AT Commands for CX930xx-2x and CX93040-1x Modem Reference Manual"
      You will find the country codes and a nice table of the caller ID commands and its free with a google.
      AT+VRID=0 or 1 will show the last caller ID received (formatted 0 string 1)
      Good luck



      Edited by Todd Andrews to add link to the manual's PDF.

       
      Last edit: Todd Andrews 2015-05-09
  • John L. Chmielewski

    Thank you for your input.

    You can find the incomplete country codes listed at http://ncid.sourceforge.net/doc/NCID_Documentation.html#modems_top but it is not the comments in the ncidd.conf file.

    Will add some comments on the country codes to ncidd.conf and additional country codes to the NCID_Documentation.

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks