After lots of fiddling to get NCID v1.11 working on my rapsberry pi I gave up and decided to install an older version and easily installed v 1.9 and got it up and running with no difficulties.
I am using Prowl on my iPhone and also NCID Android on some tablets for notifications in the house. These are working and the number is displayed properly as soon as a call comes in. However the Name in my Alias file isn't displayed, instead I get No Name.
I'm sure it is something simple I've missed but it would be great to get the name pulled from the alias file for the notifications.
Thanks for any assistance you can give.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The ncid-notify client module uses Prowl. The name or alias is
sent by ncidd so check if ncid displays the alias. The ncid-notify
script gets the name or alias from ncid. If ncid does not display
the alias, edit /etc/ncid/ncidd.alias to make sure the alias is there
and is correct. It should be: alias NAME * = "<alias>" if "<number>"
I am interested in the problems you had with v1.11 on the Raspberry Pi.
The release was tested on a Raspberry Pi. Version 1.12 will be released
shortly and I need to make sure there are no problems.
Edit: fixed alias string to remove what Sourceforge added.
On Tue, May 18, 2021 at 02:43:07PM -0000, Sandy Matheson wrote:
After lots of fiddling to get NCID v1.11 working on my rapsberry pi I gave up and decided to install an older version and easily installed v 1.9 and got it up and running with no difficulties.
I am using Prowl on my iPhone and also NCID Android on some tablets for notifications in the house. These are working and the number is displayed properly as soon as a call comes in. However the Name in my Alias file isn't displayed, instead I get No Name.
I'm sure it is something simple I've missed but it would be great to get the name pulled from the alias file for the notifications.
In regard to the notifications I think I have resolved this my alias file was in the format:
alias NAME * = "Sandy Mobile" if "xxxxxxxxxxx"
And that didn't work
However changing it to:
alias NAME * = "Sandy Mobile" if "xxxxx-xxxxxx"
Now works - I'm un the UK if that makes a difference.
In regard to the latest version 1.11 Ncid-Notify doesn't load correctly. Here's the full process for a brand new install:
I am using Pi Zero W
I installed the latest version of raspbian using the Raspberry Pi Image on Mac.
Once installed on my pi I then ran update and upgrade.
I also ran: sudo apt install libpcap0.8-dev libpcre3-dev
I then installed them using
sudo apt install ./ncid_1.11-1_armhf.deb ./ncid-client_1.11-1_all.deb
I edited the ncid.conf and ncidd.conf files for my install
I then ran:
sudo systemctl start ncidd
sudo systemctl start ncid-notify
Running: sudo systemctl status ncidd gave:
● ncidd.service - Network Caller ID server
Loaded: loaded (/lib/systemd/system/ncidd.service; disabled; vendor preset: enabled)
Active: active (running) since Wed 2021-05-19 12:29:49 BST; 12s ago
Docs: man:ncidd(8)
Process: 8146 ExecStart=/usr/sbin/ncidd --pidfile /run/ncidd.pid (code=exited, status=0/SUCCESS)
Main PID: 8147 (ncidd)
Tasks: 1 (limit: 877)
CGroup: /system.slice/ncidd.service
└─8147 /usr/sbin/ncidd --pidfile /run/ncidd.pid
May 19 12:29:48 raspberrypi systemd[1]: Starting Network Caller ID server...
May 19 12:29:49 raspberrypi systemd[1]: ncidd.service: Can't open PID file /run/ncidd.pid (yet?) after start: No such file or directory
May 19 12:29:49 raspberrypi systemd[1]: Started Network Caller ID server.
BUT running sudo systemctl status ncid-notify gives:
● ncid-notify.service - NCID using the NMA Output Module
Loaded: loaded (/lib/systemd/system/ncid-notify.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2021-05-19 12:29:55 BST; 12s ago
Docs: man:ncid-notify(1)
Process: 8151 ExecStart=/usr/bin/ncid --no-gui --pidfile /run/ncid-notify.pid -m ncid-notify (code=exited, status=255/EXCEPTION)
Main PID: 8151 (code=exited, status=255/EXCEPTION)
May 19 12:29:55 raspberrypi systemd[1]: Started NCID using the NMA Output Module.
May 19 12:29:55 raspberrypi ncid[8151]: /usr/bin/ncid: line 36: type: tclsh: not found
May 19 12:29:55 raspberrypi ncid[8151]: /usr/bin/ncid: line 38: type: wish: not found
May 19 12:29:55 raspberrypi ncid[8151]: wish or tclsh not found in your $PATH
May 19 12:29:55 raspberrypi systemd[1]: ncid-notify.service: Main process exited, code=exited, status=255/EXCEPTION
May 19 12:29:55 raspberrypi systemd[1]: ncid-notify.service: Failed with result 'exit-code'.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
However I still get the following when checking if ncid-notify is running properly
● ncid-notify.service - NCID using the NMA Output Module
Loaded: loaded (/lib/systemd/system/ncid-notify.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2021-05-19 14:33:56 BST; 14s ago
Docs: man:ncid-notify(1)
Process: 1811 ExecStart=/usr/bin/ncid --no-gui --pidfile /run/ncid-notify.pid -m ncid-notify (code=exited, status=1/FAILURE)
Main PID: 1811 (code=exited, status=1/FAILURE)
May 19 14:33:56 raspberrypi systemd[1]: Started NCID using the NMA Output Module.
May 19 14:33:56 raspberrypi ncid[1811]: no such variable
May 19 14:33:56 raspberrypi ncid[1811]: (read trace on "::env(HOME)")
May 19 14:33:56 raspberrypi ncid[1811]: invoked from within
May 19 14:33:56 raspberrypi ncid[1811]: "set UnixLogDir $::env(HOME)/NCID/client"
May 19 14:33:56 raspberrypi ncid[1811]: (file "/usr/bin/ncid" line 97)
May 19 14:33:56 raspberrypi systemd[1]: ncid-notify.service: Main process exited, code=exited, status=1/FAILURE
May 19 14:33:56 raspberrypi systemd[1]: ncid-notify.service: Failed with result 'exit-code'.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Alias, blacklist or whitelist require the telephone number as it appears in /var/log/cidcall.log.
The ncid client, up to release 1.11 removes all characters that are not numbers from the telephone number. It assumes ncidd receives digit only numbers, which is not true in your case and most like others. The ncid client in will have that fixed when 1.12 is released. As a workaround until the release, either edit the alias file and create an alias entry or let ncid create the alias and then add the missing '-'.
Your systemd status indicates tclsh and wish were not installed when systemctl started ncid. On my Raspberry Pi model B, wish and tclsh are installed in /usr/bin.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Whoa, I wasn't expecting it to be 1.11 for the server. I thought the reason you went to 1.9 was because 1.11 wouldn't work, for reasons we still need to troubleshoot further (not right at this moment though).
For now, this appears to be similar to a bug reported by a different user last year, but has remained unresolved because we haven't had any further updates from the user.
Could you do the following and let us know the results:
Do a control-C to stop ncid-notify from running in your terminal session.
sudo systemctl start ncidd
sudo systemctl status ncidd
If and only if the status shows "Active: active (running)" then relaunch ncid client from the terminal again, this time using verbose level 5: ncid --no-gui -m ncid-notify -v 5
Capture the output and attach it as a file to your next post (it'll be very verbose and difficult to read if you copy-and-paste it into a post).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have an SD card with v1.9 up and running with everything working. That was a straightforward install and setup once I worked out the format for numbers in the alias file.
But I also have another SD card with 1.11 installed which I am happy to play with to help diagnose any problems. It is this 1.11 install that fails to run ncid-notify.
I ensured that both ncid and ncid-notify weren't running (neither are at present set to start on bootup). Then followed steps 2, 3 and 4 and I've attached the output.
I also did an incoming phone call and the command line responded with:
using a module
Sent /usr/share/ncid/modules/ncid-notify 20/05/2021 19:19 XXXXX-XXXXXX {NO NAME} POTS CID {} {}
Just to check I exited and than ran sudo systemctl start ncid-notify and sudo systemctl status ncid-notify and, as before, ncid-notify failed to load.
The attached .tar file has a patched ncid that should load correctly as a service. It also has a copy of the original released version using the naming convention ncid-1.11R just in case.
We'll tackle the "NO NAME" issue after getting the service working.
To install it, download ncid-client-1.11-sandy.tar from this post to the /home/pi directory on your 1.11 SD card, then type:
cd
sudo tar xf ncid-client-1.11-sandy.tar -C /
ncid -V
The version report should be ncid (NCID) 1.11-sandya indicating it is the patched version. (The "a" is my convention for a version of a patch; there might be sandyb, sandyc, etc.)
If it shows the correct version, continue with:
sudo systemctl restart ncid-notify
sudo systemctl status ncid-notify
If it loads OK, proceed with a test call and make sure you get the Prowl notification. Let us know how it goes.
I've followed the instructions and I have ncid-client-1.11-sandy.tar in my /home/pi directory.
Running:
sudo tar xf ncid-client-1.11-sandy.tar -C /
Unpacks a copy of ncid and ncid-1.11R into the root directory of my pi
But running ncid -V still gives me: ncid (NCID) 1.11
Is there a step to actually instal the new version rather than unpacking it? Or shoudl it unpack into my /usr/bin directory to overwrite the presently installed version?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Doh! I built the .tar file wrong. Terribly embarrassed! Yes unpacking into the /usr/bin/ directory and overwrite will work, but you might as well cleanup from my mistake:
sudo mv /ncid /ncid-1.11R /usr/bin/
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Applied and now ncid -V results in
ncid (NCID) 1.11-sandya
ncid-notify now loads correctly BUT ncidd fails to load, sudo systemctl start ncidd results in:
Job for ncidd.service failed because the control process exited with error code.
See "systemctl status ncidd.service" and "journalctl -xe" for details.
sudo systemctl status ncidd results in
● ncidd.service - Network Caller ID server
Loaded: loaded (/lib/systemd/system/ncidd.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2021-05-22 20:33:15 BST; 3min 47s ago
Docs: man:ncidd(8)
Process: 869 ExecStart=/usr/sbin/ncidd --pidfile /run/ncidd.pid (code=exited, status=11)
May 22 20:33:15 raspberrypi systemd[1]: Starting Network Caller ID server...
May 22 20:33:15 raspberrypi systemd[1]: ncidd.service: Control process exited, code=exited,
May 22 20:33:15 raspberrypi systemd[1]: ncidd.service: Failed with result 'exit-code'.
May 22 20:33:15 raspberrypi systemd[1]: Failed to start Network Caller ID server.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Start ncidd from the terminal in debug mode. The verbose output should indicate where the problem is. If you want the verbose output to also be sent to /var/log/ncidd.log, start the command with sudo.
ncidd -D
Ed is probably correct that /etc/ncid/ncidd.whitelist is the problem.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The problem was in the whitelist file. I've deleted the second line and now both ncidd and ncid-notify both load correctly and I get notifications with prowl, NCIDpop and NCID for Android.
All is now working correctly with the amended ncid (NCID) 1.11-sandya
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The problem was in the whitelist file. I've deleted the second line and now both ncidd and ncid-notify both load correctly and I get notifications with prowl, NCIDpop and NCID for Android.
All is now working correctly with the amended ncid (NCID) 1.11-sandya
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a similar problem running ncid as a service (e.g. /etc/init.d/ncid-<client>) on ubuntu-20.04. Ncid works fine (e.g. make call, modem answers and proper info is displayed) from an interactive shell. It also works fine if I put ncid in the background from an interactive shell.
env: ncid - ncid-client_1.11-1_all.deb
ncidd - ncid_1.11-1_amd64.deb
I read above you made a fix for sandya to get ncid running as a service so I downloaded ncid-1.12.-1_all.deb. I didn't know if the fix was specific to sandra's platform. Again, ncid -1.12 works fine when run manually, but fails as a service. This used to work on a very old version (4+ years old). I am doing an upgrade and noticed the problem. If you want, I can start installing previous versions to determine when ncid stopped working as a service.</client>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
seems to be related $::env(HOME) in /usr/bin/ncid.
set UnixLogDir $::env(HOME)/NCID/client
set UnixRCfile "$::env(HOME)/.ncid"
set UnixASfile "$::env(HOME)/.config/autostart/net.sourceforge.ncid.desktop"
I hard coded the paths and it seems to address the issue starting as a service.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm a little confused here about what you're trying to start and how you're doing it. I think you want to run one of the ncid client modules like ncid-page.
You mentioned startup files in /etc/init.d/ and I suspect that this may be the source of my confusion. These files are leftovers from an earlier version of NCID, and from before Ubuntu switched from using init to using systemd for startup.
The configuration file for ncid-page (for example) is:
/etc/ncid/conf.d/ncid-page.conf
The script that starts it is in:
/usr/lib/systemd/system/ncid-page.service
The commands for enabling it to run at startup, and for start and stop without rebooting are:
sudo systemctl enable ncid-page
sudo systemctl start ncid-page
sudo systemctl stop ncid-page
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
As I said in my initial post, my init script was from 4+ years ago since I was upgrading a box. I converted it to systemctl (putting my custom module file in /usr/lib/systemd/system) and still had the issue. Ignoring my custom KODI module, I tried the included client ncid-notify.service and ncid-page.service (both found in /usr/lib/systemd/system) and they too failed to start as a service. This made me consider it wasn't an issue with the files in /usr/lib/systemd/system.
While troubleshooting ncid-notify.service, I realized /usr/bin/ncid was just a script. I decided to download ncid-client-1.11-sandy.tar which Todd Andrews posted on 2021-05-21 in this thread. A diff on the file showed that he had hard coded the direct path in ncid instead of using $::env(HOME) . Doing the same in /usr/bin/ncid addressed the issue and I was able to start both ncid-notify.service and ncid-kodi.service (my custom module). I suspect that $::env(HOME) does not resolve in the context of systemctl services causing the script to exit.
Let me know if you still need me to produce a log file. I can try over the weekend.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It looks like a fix for this didn't make it into the release. Your workaround is good.
The problem is that the systemd startup does not set $HOME, and probably a few other environment variables.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
After lots of fiddling to get NCID v1.11 working on my rapsberry pi I gave up and decided to install an older version and easily installed v 1.9 and got it up and running with no difficulties.
I am using Prowl on my iPhone and also NCID Android on some tablets for notifications in the house. These are working and the number is displayed properly as soon as a call comes in. However the Name in my Alias file isn't displayed, instead I get No Name.
I'm sure it is something simple I've missed but it would be great to get the name pulled from the alias file for the notifications.
Thanks for any assistance you can give.
The ncid-notify client module uses Prowl. The name or alias is
sent by ncidd so check if ncid displays the alias. The ncid-notify
script gets the name or alias from ncid. If ncid does not display
the alias, edit /etc/ncid/ncidd.alias to make sure the alias is there
and is correct. It should be: alias NAME * = "<alias>" if "<number>"
I am interested in the problems you had with v1.11 on the Raspberry Pi.
The release was tested on a Raspberry Pi. Version 1.12 will be released
shortly and I need to make sure there are no problems.
Edit: fixed alias string to remove what Sourceforge added.
On Tue, May 18, 2021 at 02:43:07PM -0000, Sandy Matheson wrote:
--
John
Last edit: John L. Chmielewski 2021-05-19
Hi John, Thanks for the reply.
In regard to the notifications I think I have resolved this my alias file was in the format:
alias NAME * = "Sandy Mobile" if "xxxxxxxxxxx"
And that didn't work
However changing it to:
alias NAME * = "Sandy Mobile" if "xxxxx-xxxxxx"
Now works - I'm un the UK if that makes a difference.
In regard to the latest version 1.11 Ncid-Notify doesn't load correctly. Here's the full process for a brand new install:
I am using Pi Zero W
I installed the latest version of raspbian using the Raspberry Pi Image on Mac.
Once installed on my pi I then ran update and upgrade.
I also ran: sudo apt install libpcap0.8-dev libpcre3-dev
I downloaded:
https://sourceforge.net/projects/ncid/files/ncid/1.11/ncid_1.11-1_armhf.deb
And
https://sourceforge.net/projects/ncid/files/ncid/1.11/ncid-client_1.11-1_all.deb
I then installed them using
sudo apt install ./ncid_1.11-1_armhf.deb ./ncid-client_1.11-1_all.deb
I edited the ncid.conf and ncidd.conf files for my install
I then ran:
sudo systemctl start ncidd
sudo systemctl start ncid-notify
Running: sudo systemctl status ncidd gave:
● ncidd.service - Network Caller ID server
Loaded: loaded (/lib/systemd/system/ncidd.service; disabled; vendor preset: enabled)
Active: active (running) since Wed 2021-05-19 12:29:49 BST; 12s ago
Docs: man:ncidd(8)
Process: 8146 ExecStart=/usr/sbin/ncidd --pidfile /run/ncidd.pid (code=exited, status=0/SUCCESS)
Main PID: 8147 (ncidd)
Tasks: 1 (limit: 877)
CGroup: /system.slice/ncidd.service
└─8147 /usr/sbin/ncidd --pidfile /run/ncidd.pid
May 19 12:29:48 raspberrypi systemd[1]: Starting Network Caller ID server...
May 19 12:29:49 raspberrypi systemd[1]: ncidd.service: Can't open PID file /run/ncidd.pid (yet?) after start: No such file or directory
May 19 12:29:49 raspberrypi systemd[1]: Started Network Caller ID server.
BUT running sudo systemctl status ncid-notify gives:
● ncid-notify.service - NCID using the NMA Output Module
Loaded: loaded (/lib/systemd/system/ncid-notify.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2021-05-19 12:29:55 BST; 12s ago
Docs: man:ncid-notify(1)
Process: 8151 ExecStart=/usr/bin/ncid --no-gui --pidfile /run/ncid-notify.pid -m ncid-notify (code=exited, status=255/EXCEPTION)
Main PID: 8151 (code=exited, status=255/EXCEPTION)
May 19 12:29:55 raspberrypi systemd[1]: Started NCID using the NMA Output Module.
May 19 12:29:55 raspberrypi ncid[8151]: /usr/bin/ncid: line 36: type: tclsh: not found
May 19 12:29:55 raspberrypi ncid[8151]: /usr/bin/ncid: line 38: type: wish: not found
May 19 12:29:55 raspberrypi ncid[8151]: wish or tclsh not found in your $PATH
May 19 12:29:55 raspberrypi systemd[1]: ncid-notify.service: Main process exited, code=exited, status=255/EXCEPTION
May 19 12:29:55 raspberrypi systemd[1]: ncid-notify.service: Failed with result 'exit-code'.
Some of the raspbian versions are smaller than others.
You can install the missing tclsh and wish pieces with
sudo apt-get install tk
I've run: sudo apt-get install tk
However I still get the following when checking if ncid-notify is running properly
● ncid-notify.service - NCID using the NMA Output Module
Loaded: loaded (/lib/systemd/system/ncid-notify.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2021-05-19 14:33:56 BST; 14s ago
Docs: man:ncid-notify(1)
Process: 1811 ExecStart=/usr/bin/ncid --no-gui --pidfile /run/ncid-notify.pid -m ncid-notify (code=exited, status=1/FAILURE)
Main PID: 1811 (code=exited, status=1/FAILURE)
May 19 14:33:56 raspberrypi systemd[1]: Started NCID using the NMA Output Module.
May 19 14:33:56 raspberrypi ncid[1811]: no such variable
May 19 14:33:56 raspberrypi ncid[1811]: (read trace on "::env(HOME)")
May 19 14:33:56 raspberrypi ncid[1811]: invoked from within
May 19 14:33:56 raspberrypi ncid[1811]: "set UnixLogDir $::env(HOME)/NCID/client"
May 19 14:33:56 raspberrypi ncid[1811]: (file "/usr/bin/ncid" line 97)
May 19 14:33:56 raspberrypi systemd[1]: ncid-notify.service: Main process exited, code=exited, status=1/FAILURE
May 19 14:33:56 raspberrypi systemd[1]: ncid-notify.service: Failed with result 'exit-code'.
Alias, blacklist or whitelist require the telephone number as it appears in /var/log/cidcall.log.
The ncid client, up to release 1.11 removes all characters that are not numbers from the telephone number. It assumes ncidd receives digit only numbers, which is not true in your case and most like others. The ncid client in will have that fixed when 1.12 is released. As a workaround until the release, either edit the alias file and create an alias entry or let ncid create the alias and then add the missing '-'.
Your systemd status indicates tclsh and wish were not installed when systemctl started ncid. On my Raspberry Pi model B, wish and tclsh are installed in /usr/bin.
Tk is needed for the GUI. You need to also install tcl:
Hi Sandy,
To summarize my understanding so far:
fgrep PRETTY /etc/os-release
ncidd -V
ncid -V
echo 'puts [info patchlevel]' | tclsh
Could you try stopping
ncid-notify
as a service and instead launch it from the command line:Try a test call and let us know how it goes.
Hi Todd,
fgrep PRETTY /etc/os-release -> PRETTY_NAME="Raspbian GNU/Linux 10 (buster)”
ncidd -V -> ncidd [raspberrypi:3333] (NCID) 1.11 API: 1.10 Feature Set 1 2 3 4 5
ncid -V -> ncid (NCID) 1.11
echo 'puts [info patchlevel]' | tclsh -> 8.6.9
ncid --no-gui -m ncid-notify -v 4 - results in:
Command line: /usr/bin/ncid
--no-gui
-m ncid-notify
-v 4
Client: ncid-notify [raspberrypi] NCID 1.11
Command line mode
Verbose Level: 4
Interpreter: /usr/bin/tclsh
Default Host: 127.0.0.1
Default Port: 3333
Operating System Encoding: utf-8
Log File: disabled
Platform: unix
OS: Linux
TCL library: /usr/share/tcltk/tcl8.6
TCL version: 8.6.9
Processed config file: /etc/ncid/ncid.conf
Processed command line arguments
HostnameFlag: 0
LineName: ncid
LoginName: pi
Delay between reconnect tries to the server: 15 (seconds)
Country Code: UK
Date Format: DD/MM/YYYY
Using output Module: /usr/share/ncid/modules/ncid-notify
No optional "ncid_notify" variable in ncid.conf
Will execute /usr/share/ncid/modules/ncid-notify when CID arrives
Not using a PID file
==================================
= Server address: 127.0.0.1:3333 =
==================================
Attempting to connect
127.0.0.1:3333 - couldn't open socket: connection refused
Whoa, I wasn't expecting it to be 1.11 for the server. I thought the reason you went to 1.9 was because 1.11 wouldn't work, for reasons we still need to troubleshoot further (not right at this moment though).
For now, this appears to be similar to a bug reported by a different user last year, but has remained unresolved because we haven't had any further updates from the user.
Could you do the following and let us know the results:
sudo systemctl start ncidd
sudo systemctl status ncidd
ncid --no-gui -m ncid-notify -v 5
Hi Todd,
I have an SD card with v1.9 up and running with everything working. That was a straightforward install and setup once I worked out the format for numbers in the alias file.
But I also have another SD card with 1.11 installed which I am happy to play with to help diagnose any problems. It is this 1.11 install that fails to run ncid-notify.
I ensured that both ncid and ncid-notify weren't running (neither are at present set to start on bootup). Then followed steps 2, 3 and 4 and I've attached the output.
I also did an incoming phone call and the command line responded with:
using a module
Sent /usr/share/ncid/modules/ncid-notify 20/05/2021 19:19 XXXXX-XXXXXX {NO NAME} POTS CID {} {}
Just to check I exited and than ran sudo systemctl start ncid-notify and sudo systemctl status ncid-notify and, as before, ncid-notify failed to load.
Hi Sandy,
The attached .tar file has a patched
ncid
that should load correctly as a service. It also has a copy of the original released version using the naming conventionncid-1.11R
just in case.We'll tackle the "NO NAME" issue after getting the service working.
To install it, download
ncid-client-1.11-sandy.tar
from this post to the /home/pi directory on your 1.11 SD card, then type:The version report should be
ncid (NCID) 1.11-sandya
indicating it is the patched version. (The "a" is my convention for a version of a patch; there might be sandyb, sandyc, etc.)If it shows the correct version, continue with:
If it loads OK, proceed with a test call and make sure you get the Prowl notification. Let us know how it goes.
I've followed the instructions and I have ncid-client-1.11-sandy.tar in my /home/pi directory.
Running:
sudo tar xf ncid-client-1.11-sandy.tar -C /
Unpacks a copy of ncid and ncid-1.11R into the root directory of my pi
But running ncid -V still gives me: ncid (NCID) 1.11
Is there a step to actually instal the new version rather than unpacking it? Or shoudl it unpack into my /usr/bin directory to overwrite the presently installed version?
Doh! I built the .tar file wrong. Terribly embarrassed! Yes unpacking into the /usr/bin/ directory and overwrite will work, but you might as well cleanup from my mistake:
Applied and now ncid -V results in
ncid (NCID) 1.11-sandya
ncid-notify now loads correctly BUT ncidd fails to load, sudo systemctl start ncidd results in:
Job for ncidd.service failed because the control process exited with error code.
See "systemctl status ncidd.service" and "journalctl -xe" for details.
sudo systemctl status ncidd results in
● ncidd.service - Network Caller ID server
Loaded: loaded (/lib/systemd/system/ncidd.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2021-05-22 20:33:15 BST; 3min 47s ago
Docs: man:ncidd(8)
Process: 869 ExecStart=/usr/sbin/ncidd --pidfile /run/ncidd.pid (code=exited, status=11)
May 22 20:33:15 raspberrypi systemd[1]: Starting Network Caller ID server...
May 22 20:33:15 raspberrypi systemd[1]: ncidd.service: Control process exited, code=exited,
May 22 20:33:15 raspberrypi systemd[1]: ncidd.service: Failed with result 'exit-code'.
May 22 20:33:15 raspberrypi systemd[1]: Failed to start Network Caller ID server.
This ncidd crash may be from the whitelist reading bug, where a blank line with a tab character kills it https://sourceforge.net/p/ncid/discussion/275236/thread/b3484d900a/#a50e
Start ncidd from the terminal in debug mode. The verbose output should indicate where the problem is. If you want the verbose output to also be sent to /var/log/ncidd.log, start the command with sudo.
Ed is probably correct that /etc/ncid/ncidd.whitelist is the problem.
The problem was in the whitelist file. I've deleted the second line and now both ncidd and ncid-notify both load correctly and I get notifications with prowl, NCIDpop and NCID for Android.
All is now working correctly with the amended ncid (NCID) 1.11-sandya
The problem was in the whitelist file. I've deleted the second line and now both ncidd and ncid-notify both load correctly and I get notifications with prowl, NCIDpop and NCID for Android.
All is now working correctly with the amended ncid (NCID) 1.11-sandya
I have a similar problem running ncid as a service (e.g. /etc/init.d/ncid-<client>) on ubuntu-20.04. Ncid works fine (e.g. make call, modem answers and proper info is displayed) from an interactive shell. It also works fine if I put ncid in the background from an interactive shell.
env: ncid - ncid-client_1.11-1_all.deb
ncidd - ncid_1.11-1_amd64.deb
I read above you made a fix for sandya to get ncid running as a service so I downloaded ncid-1.12.-1_all.deb. I didn't know if the fix was specific to sandra's platform. Again, ncid -1.12 works fine when run manually, but fails as a service. This used to work on a very old version (4+ years old). I am doing an upgrade and noticed the problem. If you want, I can start installing previous versions to determine when ncid stopped working as a service.</client>
seems to be related $::env(HOME) in /usr/bin/ncid.
set UnixLogDir $::env(HOME)/NCID/client
set UnixRCfile "$::env(HOME)/.ncid"
set UnixASfile "$::env(HOME)/.config/autostart/net.sourceforge.ncid.desktop"
I hard coded the paths and it seems to address the issue starting as a service.
Can you post your logs for the $HOME errors for starting from systemctl? i suspect this didn't get fixed.
I'm a little confused here about what you're trying to start and how you're doing it. I think you want to run one of the ncid client modules like ncid-page.
You mentioned startup files in /etc/init.d/ and I suspect that this may be the source of my confusion. These files are leftovers from an earlier version of NCID, and from before Ubuntu switched from using init to using systemd for startup.
The configuration file for ncid-page (for example) is:
/etc/ncid/conf.d/ncid-page.conf
The script that starts it is in:
/usr/lib/systemd/system/ncid-page.service
The commands for enabling it to run at startup, and for start and stop without rebooting are:
sudo systemctl enable ncid-page
sudo systemctl start ncid-page
sudo systemctl stop ncid-page
As I said in my initial post, my init script was from 4+ years ago since I was upgrading a box. I converted it to systemctl (putting my custom module file in /usr/lib/systemd/system) and still had the issue. Ignoring my custom KODI module, I tried the included client ncid-notify.service and ncid-page.service (both found in /usr/lib/systemd/system) and they too failed to start as a service. This made me consider it wasn't an issue with the files in /usr/lib/systemd/system.
While troubleshooting ncid-notify.service, I realized /usr/bin/ncid was just a script. I decided to download ncid-client-1.11-sandy.tar which Todd Andrews posted on 2021-05-21 in this thread. A diff on the file showed that he had hard coded the direct path in ncid instead of using $::env(HOME) . Doing the same in /usr/bin/ncid addressed the issue and I was able to start both ncid-notify.service and ncid-kodi.service (my custom module). I suspect that $::env(HOME) does not resolve in the context of systemctl services causing the script to exit.
Let me know if you still need me to produce a log file. I can try over the weekend.
It looks like a fix for this didn't make it into the release. Your workaround is good.
The problem is that the systemd startup does not set $HOME, and probably a few other environment variables.