Re: #upgrade #draws #configuration #draws #upgrade #configuration


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


Join udrc@nw-digital-radio.groups.io to automatically receive all group messages.