#upgrade #draws #configuration #draws #upgrade #configuration


Erwin OE1EKG
 

Hello on the forum,

after few month I found time to play again with the DRAWS and want to finish my started installation. First of all I want to do an update -but this failed cause of PAT and WSJTX installation? So what can I do to overcome this?

73 de Erwin, OE1EKG

Here the code what I did:
pi@draws:~ $ apt-mark showhold
libraspberrypi-bin
libraspberrypi-dev
libraspberrypi-doc
libraspberrypi0
raspberrypi-bootloader
raspberrypi-kernel
raspberrypi-kernel-headers
pi@draws:~ $ ## Update NWDR scripts
pi@draws:~ $ cd
pi@draws:~ $ cd n7nix
pi@draws:~/n7nix $ git pull
Updating b46e987..36e4185
error: Your local changes to the following files would be overwritten by merge:
email/pat/pat_install.sh
hfprogs/wsj_ctrl.sh
Please commit your changes or stash them before you merge.
 
 
 


Basil Gunn
 

Erwin,

First remove the kernel hold:

sudo su
apt-mark unhold $(apt-mark showhold)

# verify
apt-mark showhold

# Should be no output

# Then do a system update/upgrade

apt-get update
apt-get upgrade

# reboot
shutdown -r now

# This should get you a current kernel
# Verify your kernel version

uname -r
5.10.52-v7l+

# test that DRAWS sound card is enumerated

aplay -l

# should see something similar to:

**** List of PLAYBACK Hardware Devices ****
card 0: b1 [bcm2835 HDMI 1], device 0: bcm2835 HDMI 1 [bcm2835 HDMI 1]
Subdevices: 4/4
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
card 1: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
Subdevices: 4/4
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
card 2: udrc [udrc], device 0: bcm2835-i2s-tlv320aic32x4-hifi tlv320aic32x4-hifi-0 [bcm2835-i2s-tlv320aic32x4-hifi tlv320aic32x4-hifi-0]
Subdevices: 0/1
Subdevice #0: subdevice #0

# as user pi or whatever just not root

Remove offending scripts that will not update.

cd
cd n7nix/email/pat
rm pat_install.sh
cd
cd n7nix/hfprogs
rm wsj_ctrl.sh

# Now do the repository refresh

cd ..
git pull

Also fldigi build process is currently broken with respect to flxmlrpc

Fldigi 4.1.20 is avail but it seems it requires new flxmlrpc (>= 1.0.1)
except the author hasn't released it yet

# From fldigi build
checking for flxmlrpc >= 1.0.1... no
configure: error: Package requirements (flxmlrpc >= 1.0.1) were not met:

Requested 'flxmlrpc >= 1.0.1' but version of flxmlrpc is 0.1.4

I think I have fixed this in the current hf_install.sh script by not
specifying flxmlrpc on the ./configure line.


Erwin OE1EKG <erwin.grabler@artcom.cc> writes:

Hello on the forum,

after few month I found time to play again with the DRAWS and want to finish my started installation. First of all I want to do an update -but this failed cause of PAT and WSJTX installation? So what can I do to overcome this?

73 de Erwin, OE1EKG

Here the code what I did:
pi@draws:~ $ apt-mark showhold
libraspberrypi-bin
libraspberrypi-dev
libraspberrypi-doc
libraspberrypi0
raspberrypi-bootloader
raspberrypi-kernel
raspberrypi-kernel-headers
pi@draws:~ $ ## Update NWDR scripts
pi@draws:~ $ cd
pi@draws:~ $ cd n7nix
pi@draws:~/n7nix $ git pull
Updating b46e987..36e4185
error: Your local changes to the following files would be overwritten by merge:
email/pat/pat_install.sh
hfprogs/wsj_ctrl.sh
Please commit your changes or stash them before you merge.



Erwin OE1EKG
 

Hello Basil,

thanks for the fast response - alle run flawless. Is ti necessary to put the kernel hold again on the image? One thing I faces was the PAT - I had the problem in the past #5725   nresolved. Did an update from 0.10 to 0.11 
Below is the terminal output and waterfall shows graphic, but cannot open http://localhost:8080/

73 de Erwin, OE1EKG

pi@draws:~/n7nix/ardop $ ./ardop_ctrl.sh -a kx2 start
Service: draws-manager is already stopped
Service: direwolf is already stopped
Setting radio name to: radio_kx2, rig name: K3/KX3
Starting service: rigctld
Starting service: ardop
Starting service: pat
 
pi@draws:~/bin $ ./piardopc 8515 plughw:2,0 plughw:2,0 -p GPIO=12
ARDOPC Version 1.0.4.1j-BPQ
GPIO interface for PTT available
Using GPIO pin 12 for PTT
ARDOPC listening on port 8515
Capture Devices
 
Card 0, ID `b1', name `bcm2835 HDMI 1'
 
Card 1, ID `Headphones', name `bcm2835 Headphones'
 
Card 2, ID `udrc', name `udrc'
  Device hw:2,0 ID `bcm2835-i2s-tlv320aic32x4-hifi tlv320aic32x4-hifi-0', name `bcm2835-i2s-tlv320aic32x4-hifi tlv320aic32x4-hifi-0', 1 subdevices (1 available)
    2 channels,  sampling rate 8000..192000 Hz
 
Playback Devices
 
Card 0, ID `b1', name `bcm2835 HDMI 1'
  Device hw:0,0 ID `bcm2835 HDMI 1', name `bcm2835 HDMI 1', 4 subdevices (4 available)
    1..8 channels, sampling rate 8000..192000 Hz
 
Card 1, ID `Headphones', name `bcm2835 Headphones'
  Device hw:1,0 ID `bcm2835 Headphones', name `bcm2835 Headphones', 4 subdevices (4 available)
    1..8 channels, sampling rate 8000..192000 Hz
 
Card 2, ID `udrc', name `udrc'
  Device hw:2,0 ID `bcm2835-i2s-tlv320aic32x4-hifi tlv320aic32x4-hifi-0', name `bcm2835-i2s-tlv320aic32x4-hifi tlv320aic32x4-hifi-0', 1 subdevices (1 available)
    2 channels,  sampling rate 8000..192000 Hz
 
Opening Playback Device plughw:2,0 Rate 12000
Opening Capture Device plughw:2,0 Rate 12000
ARDOPC listening on port 8515
bind(sock) failed port 8515 Error 98
bind(sock) failed port 8516 Error 98
Input peaks = -666, 451
Input peaks = -679, 461
Input peaks = -627, 562
Input peaks = -658, 598
Input peaks = -660, 410
Input peaks = -622, 443
Input peaks = -673, 470
Input peaks = -586, 496
Input peaks = -576, 386
Input peaks = -626, 525
Input peaks = -599, 429
Input peaks = -604, 434
Input peaks = -739, 478
Input peaks = -745, 488
Input peaks = -690, 474
 


Basil Gunn
 

Hi Erwin,

but cannot open http://localhost:8080/
This is probably because DRAWS manager is running.
Please run: mgr-ctrl.sh status

If you see 'enabled' & 'active (running') then you will want to stop DRAWS-manager

$ mgr-ctrl.sh status
● draws-manager.service - DRAWS™ Manager - A web application to manage the DRAW™ HAT configuration.
Loaded: loaded (/etc/systemd/system/draws-manager.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2021-08-28 11:59:52 PDT; 5min ago
Docs: https://github.com/nwdigitalradio/draws-manager
Main PID: 5402 (npm)
Tasks: 23 (limit: 4915)
CGroup: /system.slice/draws-manager.service
├─5402 npm
├─5414 sh -c node ./bin/www
└─5415 node ./bin/www

To stop DRAWS-manager run:

mgr-ctrl.sh stop

and then verify with:

mgr-ctrl.sh status

which should look like the following:

$ mgr-ctrl.sh stop
DISABLING draws-manager
Removed
/etc/systemd/system/multi-user.target.wants/draws-manager.service.

$ mgr-ctrl.sh status
● draws-manager.service - DRAWS™ Manager - A web application to manage the DRAW™ HAT configuration.
Loaded: loaded (/etc/systemd/system/draws-manager.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: https://github.com/nwdigitalradio/draws-manager


This will free up port 8080 for use by PAT.

Is it necessary to put the kernel hold again on the image?
This is a good question considering kernel developers have broken the
Ti320aic driver twice in the last 2 years. For the time being I would
say, no, you don't have to put a hold on upgrading the kernel.


Erwin OE1EKG <erwin.grabler@artcom.cc> writes:

Hello Basil,

thanks for the fast response - alle run flawless. Is ti necessary to
put the kernel hold again on the image? One thing I faces was the PAT
- I had the problem in the past #5725 (
https://nw-digital-radio.groups.io/g/udrc/message/5725 )
resolved. Did an update from 0.10 to 0.11 Below is the terminal
output and waterfall shows graphic, but cannot open
http://localhost:8080/


Erwin OE1EKG
 
Edited

On Sat, Aug 28, 2021 at 09:16 PM, Basil Gunn wrote:
mgr-ctrl.sh status
Hello Basil,

thanks for your fast response. Tried your proposal:

pi@draws:~ $  mgr-ctrl.sh status
* draws-manager.service - DRAWSâ
                                ¢ Manager - A web application to manage the DRAWâ
 ¢ HAT configuration.
   Loaded: loaded (/etc/systemd/system/draws-manager.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: https://github.com/nwdigitalradio/draws-manager
-- Logs begin at Sun 2021-08-29 08:50:08 CEST, end at Wed 2021-09-01 18:49:51 CEST. --
-- No entries --
 
 Status for draws-manager: NOT RUNNING and NOT ENABLED

Then startet pat service
pi@draws:~ $ cd 
pi@draws:~ $ cd n7nix/ardop
pi@draws:~/n7nix/ardop $ ./ardop_ctrl.sh -f -a kx2 start
Service: draws-manager is already stopped
Service: direwolf is already stopped
Force update mode on
Setting radio name to: radio_kx2, rig name: K3/KX3
DEBUG: Updating systemd unitfiles
 == unit file update
DEBUG: creating rigctld unit file for radio: K3/KX3
DEBUG: creating ardop unit file for radio: K3/KX3
Starting service: rigctld
Starting service: ardop
Starting service: pat

but when I started localhost:8080 in the browser I get this error again:

This site can’t be reachedlocalhost refused to connect.
Try:
 
Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED

Then:
pi@draws:~/n7nix/ardop $ ./ardop_ctrl.sh -a kx2 stop
Service: draws-manager is already stopped
Service: direwolf is already stopped
Setting radio name to: radio_kx2, rig name: K3/KX3
Kill all ardopc, rigctld & pat processes
 
DEBUG: kill_ardop: kill_flag true
 
proc piardopc: 0, pid: 614, args:  8515 pcm.ARDOP pcm.ARDOP -p GPIO=12
DISABLING ardop
Removed /etc/systemd/system/multi-user.target.wants/ardop.service.
Service: ardop now stopped.
 
 Configured radio K3/KX3 DOES NOT MATCH requested radio radio_kx2
 
 == Status for configured rig: K3/KX3
  == audio device udrc check: closed
File: /home/pi/.asoundrc does not exist, creating
Service: rigctld, status: 3
Service: ardop, status: 3
Service: pat, status: 3
All systemd service files found
 == Ardop process check
proc rigctld: 1, NOT running
proc piardopc: 1, NOT running
proc piARDOP_GUI: 1, NOT running
proc pat: 1, NOT running
Finished ardop stop

73 de Erwin, OE1EKG


Basil Gunn
 

Erwin,

1. Please update your local n7nix repo. That should fix the naming
problem.

cd
cd n7nix
git pull

2. Force an update of the ardop systemd service files.

cd n7nix/ardop
./ardop_ctrl.sh -f -a kx2 status

3. Reboot the RPi. This will stop & restart all the systemd processes
including all PAT http processes

Once restarted confirm that you have a 'LISTENer' on port 8080

$ lsof -i:8080

Also check the system log for PAT systemd service file

journalctl -u pat

4. Finally test with your browser & URL localhost:8080

Let me know how you make out.

/Basil

Erwin OE1EKG <erwin.grabler@artcom.cc> writes:

[Edited Message Follows]

On Sat, Aug 28, 2021 at 09:16 PM, Basil Gunn wrote:


mgr-ctrl.sh status
Hello Basil,

thanks for your fast response. Tried your proposal:

pi@draws:~ $ mgr-ctrl.sh status
* draws-manager.service - DRAWSâ
¢ Manager - A web application to manage the DRAWâ
¢ HAT configuration.
Loaded: loaded (/etc/systemd/system/draws-manager.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: https://github.com/nwdigitalradio/draws-manager
-- Logs begin at Sun 2021-08-29 08:50:08 CEST, end at Wed 2021-09-01 18:49:51 CEST. --
-- No entries --

Status for draws-manager: NOT RUNNING and NOT ENABLED

Then startet pat service
pi@draws:~ $ cd
pi@draws:~ $ cd n7nix/ardop
pi@draws:~/n7nix/ardop $ ./ardop_ctrl.sh -f -a kx2 start
Service: draws-manager is already stopped
Service: direwolf is already stopped
Force update mode on
Setting radio name to: radio_kx2, rig name: K3/KX3
DEBUG: Updating systemd unitfiles
== unit file update
DEBUG: creating rigctld unit file for radio: K3/KX3
DEBUG: creating ardop unit file for radio: K3/KX3
Starting service: rigctld
Starting service: ardop
Starting service: pat

but when I started localhost:8080 in the browser I get this error again:

This site can’t be reachedlocalhost refused to connect.
Try:

Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED

Then:
pi@draws:~/n7nix/ardop $ ./ardop_ctrl.sh -a kx2 stop
Service: draws-manager is already stopped
Service: direwolf is already stopped
Setting radio name to: radio_kx2, rig name: K3/KX3
Kill all ardopc, rigctld & pat processes

DEBUG: kill_ardop: kill_flag true

proc piardopc: 0, pid: 614, args: 8515 pcm.ARDOP pcm.ARDOP -p GPIO=12
DISABLING ardop
Removed /etc/systemd/system/multi-user.target.wants/ardop.service.
Service: ardop now stopped.

Configured radio K3/KX3 DOES NOT MATCH requested radio radio_kx2

== Status for configured rig: K3/KX3
== audio device udrc check: closed
File: /home/pi/.asoundrc does not exist, creating
Service: rigctld, status: 3
Service: ardop, status: 3
Service: pat, status: 3
All systemd service files found
== Ardop process check
proc rigctld: 1, NOT running
proc piardopc: 1, NOT running
proc piARDOP_GUI: 1, NOT running
proc pat: 1, NOT running
Finished ardop stop

73 de Erwin, OE1EKG



Erwin OE1EKG
 

Hello Basil

did this:
pi@draws:~ $ cd
pi@draws:~ $ cd n7nix
pi@draws:~/n7nix $ git pull
remote: Enumerating objects: 22, done.
remote: Counting objects: 100% (22/22), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 14 (delta 11), reused 14 (delta 11), pack-reused 0
Unpacking objects: 100% (14/14), done.
From https://github.com/nwdigitalradio/n7nix
   49d8220..1c273c7  master     -> origin/master
Updating 49d8220..1c273c7
Fast-forward
 ardop/AUTO_STARTUP.md | 11 ++++++++---
 ardop/ardop_ctrl.sh   | 28 +++++++++++++++++-----------
 direwolf/config.sh    |  9 ++++++---
 hfprogs/wsj_ctrl.sh   |  8 ++++----
 4 files changed, 35 insertions(+), 21 deletions(-)
 
pi@draws:~/n7nix $ cd ardop
pi@draws:~/n7nix/ardop $ ./ardop_ctrl.sh -f -a kx2 status
Service: draws-manager is already stopped
Service: direwolf is already stopped
Force update mode on
Setting radio name to: radio_kx2, rig name: KX2
 *** ARDOP NOT CONFIGURED.
 
 == Status for configured rig: 
== Pulse Audio is running with pid: 891
File: /home/pi/.asoundrc does not exist, creating
File: /etc/asound.conf does not exist
 == Ardop Verify required programs
Found program: piARDOP_GUI
Found program: piardop2, ARDOPC Version 2.0.3.8-BPQ
Found program: piardopc, ARDOPC Version 1.0.4.1j-BPQ
Found program: arim, version: ARIM 2.10
Found program: pat, version: Pat v0.11.0 (eb00df2) linux/arm - go1.16.5
 == Ardop systemctl unit file check
Service: rigctld, status: 3
Service: ardop, status: 3
Service: pat, status: 3
Creating systemd service files.
 == unit file update
DEBUG: creating rigctld unit file for radio: KX2
DEBUG: creating ardop unit file for radio: KX2
 systemctl daemon-reload
 == Ardop process check
proc rigctld: 1, NOT running
proc piardopc: 1, NOT running
proc piARDOP_GUI: 1, NOT running
proc pat: 1, NOT running
  == audio device udrc check: closed
Finished ardop status

Reboot:
pi@draws:~ $ lsof -i:8080
pi@draws:~ $ journalctl -u pat
-- Logs begin at Thu 2019-02-14 11:11:59 CET, end at Wed 2021-09-01 21:19:01 CES
Sep 01 21:17:18 draws systemd[1]: Started pat.
Sep 01 21:17:19 draws pat[494]: 2021/09/01 21:17:19 Unable to load/write config:
Sep 01 21:17:19 draws systemd[1]: pat.service: Main process exited, code=exited,
Sep 01 21:17:19 draws systemd[1]: pat.service: Failed with result 'exit-code'.

Ende up in an error - looks like something was going wrong with the config?

73 de Erwin, OE1EKG


Basil Gunn
 

Erwin,
Everything that you did looks fine.

But until the config file problem is fixed you will not have a port 8080
LISTENER.

Sep 01 21:17:19 draws pat[494]: 2021/09/01 21:17:19 Unable to load/write config:
Sep 01 21:17:19 draws systemd[1]: pat.service: Main process exited, code=exited,
Sep 01 21:17:19 draws systemd[1]: pat.service: Failed with result 'exit-code'.
Ende up in an error - looks like something was going wrong with the
config?
I agree, something seems amiss with PAT config file.

I have some severely brief notes on PAT install here:
https://github.com/nwdigitalradio/n7nix/tree/master/email/pat

Did you install pat with my pat_install.sh script?

Check permissions on your pat config files
cd
ls -salt .wl2k

Look for matching double quotes & terminating comma on all the
.wl2k/config.json lines. If you don't see anything wrong then post your
.wl2k/config.json file BUT remove your "secure_login_password" entry.

/Basil

Erwin OE1EKG <erwin.grabler@artcom.cc> writes:

Hello Basil

*did this:*
pi@draws:~ $ cd
pi@draws:~ $ cd n7nix
pi@draws:~/n7nix $ git pull
remote: Enumerating objects: 22, done.
remote: Counting objects: 100% (22/22), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 14 (delta 11), reused 14 (delta 11), pack-reused 0
Unpacking objects: 100% (14/14), done.
From https://github.com/nwdigitalradio/n7nix
49d8220..1c273c7 master -> origin/master
Updating 49d8220..1c273c7
Fast-forward
ardop/AUTO_STARTUP.md | 11 ++++++++---
ardop/ardop_ctrl.sh | 28 +++++++++++++++++-----------
direwolf/config.sh | 9 ++++++---
hfprogs/wsj_ctrl.sh | 8 ++++----
4 files changed, 35 insertions(+), 21 deletions(-)

pi@draws:~/n7nix $ cd ardop
pi@draws:~/n7nix/ardop $ ./ardop_ctrl.sh -f -a kx2 status
Service: draws-manager is already stopped
Service: direwolf is already stopped
Force update mode on
Setting radio name to: radio_kx2, rig name: KX2
*** ARDOP NOT CONFIGURED.

== Status for configured rig:
== Pulse Audio is running with pid: 891
File: /home/pi/.asoundrc does not exist, creating
File: /etc/asound.conf does not exist
== Ardop Verify required programs
Found program: piARDOP_GUI
Found program: piardop2, ARDOPC Version 2.0.3.8-BPQ
Found program: piardopc, ARDOPC Version 1.0.4.1j-BPQ
Found program: arim, version: ARIM 2.10
Found program: pat, version: Pat v0.11.0 (eb00df2) linux/arm - go1.16.5
== Ardop systemctl unit file check
Service: rigctld, status: 3
Service: ardop, status: 3
Service: pat, status: 3
Creating systemd service files.
== unit file update
DEBUG: creating rigctld unit file for radio: KX2
DEBUG: creating ardop unit file for radio: KX2
systemctl daemon-reload
== Ardop process check
proc rigctld: 1, NOT running
proc piardopc: 1, NOT running
proc piARDOP_GUI: 1, NOT running
proc pat: 1, NOT running
== audio device udrc check: closed
Finished ardop status

*Reboot* :
pi@draws:~ $ lsof -i:8080
pi@draws:~ $ journalctl -u pat
-- Logs begin at Thu 2019-02-14 11:11:59 CET, end at Wed 2021-09-01 21:19:01 CES
Sep 01 21:17:18 draws systemd[1]: Started pat.
Sep 01 21:17:19 draws pat[494]: 2021/09/01 21:17:19 Unable to load/write config:
Sep 01 21:17:19 draws systemd[1]: pat.service: Main process exited, code=exited,
Sep 01 21:17:19 draws systemd[1]: pat.service: Failed with result 'exit-code'.

Ende up in an error - looks like something was going wrong with the config?

73 de Erwin, OE1EKG



Basil Gunn
 

Erwin,
Please disregard the last link I sent you. The following link is the one to use
for automatic startup for ardop/rigctld/pat using systemd service files.

https://github.com/nwdigitalradio/n7nix/blob/master/ardop/AUTO_STARTUP.md

Basil Gunn <basil@pacabunga.com> writes:

Erwin,
Everything that you did looks fine.

But until the config file problem is fixed you will not have a port 8080
LISTENER.

Sep 01 21:17:19 draws pat[494]: 2021/09/01 21:17:19 Unable to load/write config:
Sep 01 21:17:19 draws systemd[1]: pat.service: Main process exited, code=exited,
Sep 01 21:17:19 draws systemd[1]: pat.service: Failed with result 'exit-code'.
Ende up in an error - looks like something was going wrong with the
config?
I agree, something seems amiss with PAT config file.

I have some severely brief notes on PAT install here:
https://github.com/nwdigitalradio/n7nix/tree/master/email/pat

Did you install pat with my pat_install.sh script?

Check permissions on your pat config files
cd
ls -salt .wl2k

Look for matching double quotes & terminating comma on all the
.wl2k/config.json lines. If you don't see anything wrong then post your
.wl2k/config.json file BUT remove your "secure_login_password" entry.

/Basil

Erwin OE1EKG <erwin.grabler@artcom.cc> writes:

Hello Basil

*did this:*
pi@draws:~ $ cd
pi@draws:~ $ cd n7nix
pi@draws:~/n7nix $ git pull
remote: Enumerating objects: 22, done.
remote: Counting objects: 100% (22/22), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 14 (delta 11), reused 14 (delta 11), pack-reused 0
Unpacking objects: 100% (14/14), done.
From https://github.com/nwdigitalradio/n7nix
49d8220..1c273c7 master -> origin/master
Updating 49d8220..1c273c7
Fast-forward
ardop/AUTO_STARTUP.md | 11 ++++++++---
ardop/ardop_ctrl.sh | 28 +++++++++++++++++-----------
direwolf/config.sh | 9 ++++++---
hfprogs/wsj_ctrl.sh | 8 ++++----
4 files changed, 35 insertions(+), 21 deletions(-)

pi@draws:~/n7nix $ cd ardop
pi@draws:~/n7nix/ardop $ ./ardop_ctrl.sh -f -a kx2 status
Service: draws-manager is already stopped
Service: direwolf is already stopped
Force update mode on
Setting radio name to: radio_kx2, rig name: KX2
*** ARDOP NOT CONFIGURED.

== Status for configured rig:
== Pulse Audio is running with pid: 891
File: /home/pi/.asoundrc does not exist, creating
File: /etc/asound.conf does not exist
== Ardop Verify required programs
Found program: piARDOP_GUI
Found program: piardop2, ARDOPC Version 2.0.3.8-BPQ
Found program: piardopc, ARDOPC Version 1.0.4.1j-BPQ
Found program: arim, version: ARIM 2.10
Found program: pat, version: Pat v0.11.0 (eb00df2) linux/arm - go1.16.5
== Ardop systemctl unit file check
Service: rigctld, status: 3
Service: ardop, status: 3
Service: pat, status: 3
Creating systemd service files.
== unit file update
DEBUG: creating rigctld unit file for radio: KX2
DEBUG: creating ardop unit file for radio: KX2
systemctl daemon-reload
== Ardop process check
proc rigctld: 1, NOT running
proc piardopc: 1, NOT running
proc piARDOP_GUI: 1, NOT running
proc pat: 1, NOT running
== audio device udrc check: closed
Finished ardop status

*Reboot* :
pi@draws:~ $ lsof -i:8080
pi@draws:~ $ journalctl -u pat
-- Logs begin at Thu 2019-02-14 11:11:59 CET, end at Wed 2021-09-01 21:19:01 CES
Sep 01 21:17:18 draws systemd[1]: Started pat.
Sep 01 21:17:19 draws pat[494]: 2021/09/01 21:17:19 Unable to load/write config:
Sep 01 21:17:19 draws systemd[1]: pat.service: Main process exited, code=exited,
Sep 01 21:17:19 draws systemd[1]: pat.service: Failed with result 'exit-code'.

Ende up in an error - looks like something was going wrong with the config?

73 de Erwin, OE1EKG



Erwin OE1EKG
 

Hello Basil,Hello Basil,
 
Thanks for your help and patience. I tried to find out what happens. First I did:pi@draws:~ $ cd
pi@draws:~ $ ls -salt .wl2k
total 12
4 drwxr-xr-x 35 pi pi 4096 Sep  1 21:33 ..
4 -rw-------  1 pi pi 1339 Aug 29 08:49 config.json
4 drwxr-xr-x  2 pi pi 4096 Aug 28 12:09 .
0 -rw-r--r--  1 pi pi    0 May 13 22:13 pat.log
0 -rw-r--r--  1 pi pi    0 May 13 20:53 eventlog.json

then:
pi@draws:~/n7nix/ardop $ ./ardop_ctrl.sh -f
Service: draws-manager is already stopped
Service: direwolf is already stopped
Force update mode on
 
 Configured radio KX2 DOES NOT MATCH requested radio radio_ic706
 
 
 == Status for configured rig: KX2
  == audio device udrc check: closed
File: /home/pi/.asoundrc does not exist, creating
Service: rigctld, status: 3
Service: ardop, status: 3
Service: pat, status: 3
Creating systemd service files.
 == unit file update
DEBUG: creating rigctld unit file for radio: IC-706
DEBUG: creating ardop unit file for radio: IC-706
 systemctl daemon-reload
 == Ardop process check
proc rigctld: 1, NOT running
proc piardopc: 1, NOT running
proc piARDOP_GUI: 1, NOT running
proc pat: 1, NOT running
Finished ardop -f

So it seems there is a radio defined other the in the pi@draws:~ $ cat ~/.asoundrc

this seems OK
pcm.ARDOP {
        type rate
        slave {
        pcm "hw:2,0"
        rate 48000
        }

Then I want to stop the wrong transceiver definition and start the correct one:
pi@draws:~ $ cd
pi@draws:~ $ cd n7nix/ardop
pi@draws:~/n7nix/ardop $ ./ardop_ctrl.sh -a ic706 stop
Service: draws-manager is already stopped
Service: direwolf is already stopped
Setting radio name to: radio_ic706, rig name: IC-706
Kill all ardopc, rigctld & pat processes
 
DEBUG: kill_ardop: kill_flag true
 
 
 == Status for configured rig: IC-706
  == audio device udrc check: closed
asoundrc_file_check: Found ARDOP entry in /home/pi/.asoundrc
asoundrc_file_check: asound cfg device match: sound card number: 2
asoundrc_file_check: sample rate: 48000
Service: rigctld, status: 3
Service: ardop, status: 3
Service: pat, status: 3
All systemd service files found
 == Ardop process check
proc rigctld: 1, NOT running
proc piardopc: 1, NOT running
proc piARDOP_GUI: 1, NOT running
proc pat: 1, NOT running
Finished ardop stop
pi@draws:~/n7nix/ardop $ ./ardop_ctrl.sh -f -a kx2 start
Service: draws-manager is already stopped
Service: direwolf is already stopped
Force update mode on
Setting radio name to: radio_kx2, rig name: KX2
DEBUG: Updating systemd unitfiles
 == unit file update
DEBUG: creating rigctld unit file for radio: KX2
DEBUG: creating ardop unit file for radio: KX2
Starting service: rigctld
Starting service: ardop
ENABLING ardop
Created symlink /etc/systemd/system/multi-user.target.wants/ardop.service -> /etc/systemd/system/ardop.service.
Starting service: pat

The I want to force the settings a second time but still the IC-706 remains:
pi@draws:~/n7nix/ardop $ ./ardop_ctrl.sh -f
Service: draws-manager is already stopped
Service: direwolf is already stopped
Force update mode on
 
 == Status for configured rig: IC-706
  == audio device udrc check: state: RUNNING
File: /home/pi/.asoundrc does not exist, creating
Service: rigctld, status: 3
Service: ardop, status: 0
Service: pat, status: 3
Creating systemd service files.
 == unit file update
DEBUG: creating rigctld unit file for radio: IC-706
DEBUG: creating ardop unit file for radio: IC-706
 systemctl daemon-reload
 == Ardop process check
proc rigctld: 1, NOT running
proc piardopc: 0, pid: 3133, args:  8515 pcm.ARDOP pcm.ARDOP -p GPIO=12
proc piARDOP_GUI: 1, NOT running
proc pat: 1, NOT running
Finished ardop -f

So it looks like that the ARDOP configuration is faulty - cause I faced the problems there. Cause it is some month ago when I configured the PI I'm not sure about the installation, I think I went through all your scripts, WSJTx and JS8call are running so Flirt and Fldigi.

No idea where I can go the next step - our should I start from scratch? Other possibility ist to delete the Ardop and PAT and make a new installation of this - but I'm not so deep in Linux that I can do this without damage I think.

73 de Erwin, OE1EKG


Basil Gunn
 

Erwin,

You only need to setup the ardop systemd service files ONCE and once
only. After that the correct systemd files will run from boot and not
need touching unless you change radios.

First you need to stop any running configuration.

If you do NOT specify a radio with '-a <some_radio_name> then
ardop_ctrl.sh will default to an ic706 which in your case is no good.

ie. if you run ./ardop_ctrl.sh -f
you are setting the systemd files for an ic706.

-f will force an install of all the systemd files required, configured to
the radio you specify with -a. Please try to get back to your previous error
with pat config file by doing this

cd
cd n7nix/ardop
./ardop_ctrl.sh -a kx2 stop
./ardop_ctrl.sh -a kx2 -f start

# Verify by running:

./ardop_ctrl.sh -a kx2 status

You ALWAYS need to specify the radio you are using with the -a option
when running ardop_ctrl.sh unless you are using an ic706.

From your previous posts you had CORRECTLY configured the systemd files
but PAT was not running because of a configuration error either in
.wl2k/config.json OR in the way PAT was starting. Once your systemd
files are correct for the radio you have (kx2) then you can run:

./ardop_ctrl.sh -a kx2 stop
./ardop_ctrl.sh -a kx2 start
./ardop_ctrl.sh -a kx2 status

but DO NOT use the -f option which will force a re-write of the systemd
files.

Going back to your previous post I have never before seen the following
problem as is described from your log file and that is what we should be
focusing on.

Sep 01 21:17:19 draws pat[494]: 2021/09/01 21:17:19 Unable to load/write config:
Sep 01 21:17:19 draws systemd[1]: pat.service: Main process exited, code=exited,
Sep 01 21:17:19 draws systemd[1]: pat.service: Failed with result 'exit-code'.
You may have to reboot once your systemd files are back to being
correct.

Going back to my previous post:
Did you install pat using my pat_install.sh script?

Look for matching double quotes & terminating comma on all the
.wl2k/config.json lines. If you don't see anything wrong then post your
.wl2k/config.json file BUT remove your "secure_login_password" entry first.

Run the following:

lsof -i:8080

if nothing is returned PAT is NOT running.
Check further with

journalctl -u pat


Erwin OE1EKG <erwin.grabler@artcom.cc> writes:

Hello Basil, Hello Basil,

Thanks for your help and patience. I tried to find out what happens. First I did:pi@draws:~ $ cd

pi@draws:~ $ ls -salt .wl2k
total 12
4 drwxr-xr-x 35 pi pi 4096 Sep 1 21:33 ..
4 -rw------- 1 pi pi 1339 Aug 29 08:49 config.json
4 drwxr-xr-x 2 pi pi 4096 Aug 28 12:09 .
0 -rw-r--r-- 1 pi pi 0 May 13 22:13 pat.log
0 -rw-r--r-- 1 pi pi 0 May 13 20:53 eventlog.json

then:
pi@draws:~/n7nix/ardop $ ./ardop_ctrl.sh -f
Service: draws-manager is already stopped
Service: direwolf is already stopped
Force update mode on

Configured radio KX2 DOES NOT MATCH requested radio radio_ic706

== Status for configured rig: KX2
== audio device udrc check: closed
File: /home/pi/.asoundrc does not exist, creating
Service: rigctld, status: 3
Service: ardop, status: 3
Service: pat, status: 3
Creating systemd service files.
== unit file update
DEBUG: creating rigctld unit file for radio: IC-706
DEBUG: creating ardop unit file for radio: IC-706
systemctl daemon-reload
== Ardop process check
proc rigctld: 1, NOT running
proc piardopc: 1, NOT running
proc piARDOP_GUI: 1, NOT running
proc pat: 1, NOT running
Finished ardop -f

So it seems there is a radio defined other the in the pi@draws:~ $ cat ~/.asoundrc

this seems OK
pcm.ARDOP {
type rate
slave {
pcm "hw:2,0"
rate 48000
}

Then I want to stop the wrong transceiver definition and start the correct one:
pi@draws:~ $ cd
pi@draws:~ $ cd n7nix/ardop
pi@draws:~/n7nix/ardop $ ./ardop_ctrl.sh -a ic706 stop
Service: draws-manager is already stopped
Service: direwolf is already stopped
Setting radio name to: radio_ic706, rig name: IC-706
Kill all ardopc, rigctld & pat processes

DEBUG: kill_ardop: kill_flag true

== Status for configured rig: IC-706
== audio device udrc check: closed
asoundrc_file_check: Found ARDOP entry in /home/pi/.asoundrc
asoundrc_file_check: asound cfg device match: sound card number: 2
asoundrc_file_check: sample rate: 48000
Service: rigctld, status: 3
Service: ardop, status: 3
Service: pat, status: 3
All systemd service files found
== Ardop process check
proc rigctld: 1, NOT running
proc piardopc: 1, NOT running
proc piARDOP_GUI: 1, NOT running
proc pat: 1, NOT running
Finished ardop stop
pi@draws:~/n7nix/ardop $ ./ardop_ctrl.sh -f -a kx2 start
Service: draws-manager is already stopped
Service: direwolf is already stopped
Force update mode on
Setting radio name to: radio_kx2, rig name: KX2
DEBUG: Updating systemd unitfiles
== unit file update
DEBUG: creating rigctld unit file for radio: KX2
DEBUG: creating ardop unit file for radio: KX2
Starting service: rigctld
Starting service: ardop
ENABLING ardop
Created symlink /etc/systemd/system/multi-user.target.wants/ardop.service -> /etc/systemd/system/ardop.service.
Starting service: pat

The I want to force the settings a second time but still the IC-706 remains:
pi@draws:~/n7nix/ardop $ ./ardop_ctrl.sh -f
Service: draws-manager is already stopped
Service: direwolf is already stopped
Force update mode on

== Status for configured rig: IC-706
== audio device udrc check: state: RUNNING
File: /home/pi/.asoundrc does not exist, creating
Service: rigctld, status: 3
Service: ardop, status: 0
Service: pat, status: 3
Creating systemd service files.
== unit file update
DEBUG: creating rigctld unit file for radio: IC-706
DEBUG: creating ardop unit file for radio: IC-706
systemctl daemon-reload
== Ardop process check
proc rigctld: 1, NOT running
proc piardopc: 0, pid: 3133, args: 8515 pcm.ARDOP pcm.ARDOP -p GPIO=12
proc piARDOP_GUI: 1, NOT running
proc pat: 1, NOT running
Finished ardop -f

So it looks like that the ARDOP configuration is faulty - cause I faced the problems there. Cause it is some month ago when I configured the PI I'm not sure about the installation, I think I went through all your scripts, WSJTx and JS8call are running so Flirt and Fldigi.

No idea where I can go the next step - our should I start from scratch? Other possibility ist to delete the Ardop and PAT and make a new installation of this - but I'm not so deep in Linux that I can do this without damage I think.

73 de Erwin, OE1EKG



Erwin OE1EKG
 

On Fri, Sep 3, 2021 at 11:13 PM, Basil Gunn wrote:
./ardop_ctrl.sh -a kx2 status
Hello Basil,

thanks, concerning the rig this was a misunderstanding from my side. So I checked it with your proposal - see below. Thought I found missing arguments - compared to another setting on another PI:

  "listen": [],

  "hamlib_rigs": {

    "my-rig": {

      "address": "127.0.0.1:4532",

      "network": "tcp"

    }

  },


but no success with this.
Going back to my previous post:Did you install pat using my pat_install.sh script?
 I'm not sure - its month ago. should I install it over my actual installation? And how can I do it in a save way?
config.json was in my last post - so I couldn't find anything wrong. The only thing I did in the config was to change the settings for pactor section to connect the SCS modem via bluetooth.

pi@draws:~ $ pat --listen="ardop" interactive
2021/09/04 12:10:59 Unable to load/write config: invalid character 'K' looking for beginning of object key string
 
ARDOP GUI is running

73 de Erwin, OE1EKG

pi@draws:~ $ cd
pi@draws:~ $ cd n7nix/ardop
pi@draws:~/n7nix/ardop $ ./ardop_ctrl.sh -a kx2 stop
Service: draws-manager is already stopped
Service: direwolf is already stopped
Setting radio name to: radio_kx2, rig name: KX2
Kill all ardopc, rigctld & pat processes
 
DEBUG: kill_ardop: kill_flag true
 
 == Status for configured rig: KX2
  == audio device udrc check: closed
asoundrc_file_check: Found ARDOP entry in /home/pi/.asoundrc
asoundrc_file_check: asound cfg device match: sound card number: 2
asoundrc_file_check: sample rate: 48000
Service: rigctld, status: 3
Service: ardop, status: 3
Service: pat, status: 3
All systemd service files found
 == Ardop process check
proc rigctld: 1, NOT running
proc piardopc: 1, NOT running
proc piARDOP_GUI: 1, NOT running
proc pat: 1, NOT running
Finished ardop stop

pi@draws:~/n7nix/ardop $ ./ardop_ctrl.sh -a kx2 -f start
Service: draws-manager is already stopped
Service: direwolf is already stopped
Setting radio name to: radio_kx2, rig name: KX2
Force update mode on
DEBUG: Updating systemd unitfiles
 == unit file update
DEBUG: creating rigctld unit file for radio: KX2
DEBUG: creating ardop unit file for radio: KX2
Starting service: rigctld
Starting service: ardop
ENABLING ardop
Created symlink /etc/systemd/system/multi-user.target.wants/ardop.service -> /etc/systemd/system/ardop.service.
Starting service: pat



Corky
 

Erwin, in addition to what Basil has said, looking at your config.json file, I see some inconsistencies. I am not sure if they are causing the problems or not, but it is possible.

The first is that most of your posts refer to using a KX2, yet the config.json file is set up for a KX3.  Perhaps you have both, but hamlib now treats the two differently.

The rig setup looks very different than what I am using as it does not provide the radio information in the original rig definition.  Here is my rig setup section of the config.json file for the KX2 and KX3.

  "hamlib_rigs": {
      "KX2": {"address": "localhost:4532", "network": "tcp"},
      "KX3": {"address": "localhost:4532", "network": "tcp"}
},

Hope this helps.

Thanks and 73,
-Corky, AF4PM


On Fri, Sep 3, 2021, at 11:58 AM, Erwin OE1EKG wrote:
Hello Basil,Hello Basil,
 
Thanks for your help and patience. I tried to find out what happens. First I did:pi@draws:~ $ cd
pi@draws:~ $ ls -salt .wl2k
total 12
4 drwxr-xr-x 35 pi pi 4096 Sep  1 21:33 ..
4 -rw-------  1 pi pi 1339 Aug 29 08:49 config.json
4 drwxr-xr-x  2 pi pi 4096 Aug 28 12:09 .
0 -rw-r--r--  1 pi pi    0 May 13 22:13 pat.log
0 -rw-r--r--  1 pi pi    0 May 13 20:53 eventlog.json
then:
pi@draws:~/n7nix/ardop $ ./ardop_ctrl.sh -f
Service: draws-manager is already stopped
Service: direwolf is already stopped
Force update mode on
 
 Configured radio KX2 DOES NOT MATCH requested radio radio_ic706
 
 
 == Status for configured rig: KX2
  == audio device udrc check: closed
File: /home/pi/.asoundrc does not exist, creating
Service: rigctld, status: 3
Service: ardop, status: 3
Service: pat, status: 3
Creating systemd service files.
 == unit file update
DEBUG: creating rigctld unit file for radio: IC-706
DEBUG: creating ardop unit file for radio: IC-706
 systemctl daemon-reload
 == Ardop process check
proc rigctld: 1, NOT running
proc piardopc: 1, NOT running
proc piARDOP_GUI: 1, NOT running
proc pat: 1, NOT running
Finished ardop -f

So it seems there is a radio defined other the in the pi@draws:~ $ cat ~/.asoundrc

this seems OK
pcm.ARDOP {
        type rate
        slave {
        pcm "hw:2,0"
        rate 48000
        }

Then I want to stop the wrong transceiver definition and start the correct one:

pi@draws:~ $ cd
pi@draws:~ $ cd n7nix/ardop
pi@draws:~/n7nix/ardop $ ./ardop_ctrl.sh -a ic706 stop
Service: draws-manager is already stopped
Service: direwolf is already stopped
Setting radio name to: radio_ic706, rig name: IC-706
Kill all ardopc, rigctld & pat processes
 
DEBUG: kill_ardop: kill_flag true
 
 
 == Status for configured rig: IC-706
  == audio device udrc check: closed
asoundrc_file_check: Found ARDOP entry in /home/pi/.asoundrc
asoundrc_file_check: asound cfg device match: sound card number: 2
asoundrc_file_check: sample rate: 48000
Service: rigctld, status: 3
Service: ardop, status: 3
Service: pat, status: 3
All systemd service files found
 == Ardop process check
proc rigctld: 1, NOT running
proc piardopc: 1, NOT running
proc piARDOP_GUI: 1, NOT running
proc pat: 1, NOT running
Finished ardop stop
pi@draws:~/n7nix/ardop $ ./ardop_ctrl.sh -f -a kx2 start
Service: draws-manager is already stopped
Service: direwolf is already stopped
Force update mode on
Setting radio name to: radio_kx2, rig name: KX2
DEBUG: Updating systemd unitfiles
 == unit file update
DEBUG: creating rigctld unit file for radio: KX2
DEBUG: creating ardop unit file for radio: KX2
Starting service: rigctld
Starting service: ardop
ENABLING ardop
Created symlink /etc/systemd/system/multi-user.target.wants/ardop.service -> /etc/systemd/system/ardop.service.
Starting service: pat

The I want to force the settings a second time but still the IC-706 remains:

pi@draws:~/n7nix/ardop $ ./ardop_ctrl.sh -f
Service: draws-manager is already stopped
Service: direwolf is already stopped
Force update mode on
 
 == Status for configured rig: IC-706
  == audio device udrc check: state: RUNNING
File: /home/pi/.asoundrc does not exist, creating
Service: rigctld, status: 3
Service: ardop, status: 0
Service: pat, status: 3
Creating systemd service files.
 == unit file update
DEBUG: creating rigctld unit file for radio: IC-706
DEBUG: creating ardop unit file for radio: IC-706
 systemctl daemon-reload
 == Ardop process check
proc rigctld: 1, NOT running
proc piardopc: 0, pid: 3133, args:  8515 pcm.ARDOP pcm.ARDOP -p GPIO=12
proc piARDOP_GUI: 1, NOT running
proc pat: 1, NOT running
Finished ardop -f

So it looks like that the ARDOP configuration is faulty - cause I faced the problems there. Cause it is some month ago when I configured the PI I'm not sure about the installation, I think I went through all your scripts, WSJTx and JS8call are running so Flirt and Fldigi.

No idea where I can go the next step - our should I start from scratch? Other possibility ist to delete the Ardop and PAT and make a new installation of this - but I'm not so deep in Linux that I can do this without damage I think.

73 de Erwin, OE1EKG

Attachments:
  • config.json