¿ªÔÆÌåÓý

Re: DW 1.6 not able to autostart


 

¿ªÔÆÌåÓý

Hi Heber, David KI6ZHD ask what was in your log file. Maybe I missed it, but I didn't see that info. Knowing what it logged as an error, will help with helping you.

What David asked was:

When you run the script from the command line, does it give any errors?? What do you see in the /var/tmp/dw-start.log log?


Jim Bacher, WB8VSU
wb8vsu@...
On Apr 19, 2021, at 2:03 PM, Greg D <ko6th.greg@...> wrote:

Hi Heber,

"which" is actually a shell command, asking where the operand is located.? So, 'which screen' sets the $? variable as a test to see if "screen" is installed on the system.? This is so the script can issue a useful diagnostic message explaining the problem instead of just crashing.
greg@server:~> which screen
/usr/bin/screen
greg@server:~> echo $?
0
greg@server:~> which asldkjf
which: no asldkjf in (/home/greg/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games)
greg@server:~> echo $?
1
So, that function code appears to be correct.

Greg? KO6TH


Heber Soto wrote:

Greg

?

Understood I was not aware of the fact since I have always connected via ssh but good to know.

?

I have been doing multiple different tries but not sure where the problem reside I am inclining in the screen command.

?

If I run this from the command line it works:

?

screen -d -m -S direwolf bash -c 'rtl_fm -f 144.39M - | /usr/local/bin/direwolf -c /home/pi/sdr.conf -r 24000 -D 1 -'

?

This would be the result from ps -x:

?

? PID TTY????? STAT?? TIME COMMAND

? 520 pts/0??? S+???? 0:00 screen

? 521 ???????? Ss???? 0:00 SCREEN

? 522 pts/2??? Ss???? 0:00 /bin/bash

? 643 ???????? Ss???? 0:00 /lib/systemd/systemd --user

? 644 ???????? S????? 0:00 (sd-pam)

1575 pts/2??? R+???? 0:00 ps -x

32312 ???????? S????? 0:00 sshd: pi@pts/0

32313 pts/0??? Ss???? 0:00 -bash

32656 ???????? Ss???? 0:00 SCREEN -d -m -S direwolf bash -c rtl_fm -f 144.39M - | /usr/local/bin/direwolf -c /home/pi/sdr.conf -r 24000 -D 1 -

32657 pts/1??? Ss+??? 0:00 bash -c rtl_fm -f 144.39M - | /usr/local/bin/direwolf -c /home/pi/sdr.conf -r 24000 -D 1 -

32658 pts/1??? Sl+??? 4:49 rtl_fm -f 144.39M -

32659 pts/1??? Sl+??? 6:48 /usr/local/bin/direwolf -c /home/pi/sdr.conf -r 24000 -D 1 -

pi@np4jn-digi-2:~ $

?

But if I call dw-start.sh dosent work.

?

In the dw-start.sh I see this function, is there suppose to be other information inside the quotes (SCREEN=`which screen`) where it say ¡°which screen¡±?

?

function CLI {

?? SCREEN=`which screen`

?? if [ $? -ne 0 ]; then

????? echo -e "Error: screen is not installed but is required for CLI mode.? Aborting"

????? exit 1

?? fi

?

Gracias

?

Heber NP4JN 73

?

From: Heber Soto
Sent: Monday, April 19, 2021 10:38 AM
To: [email protected]
Subject: RE: [direwolf] DW 1.6 not able to autostart

?

Greg

?

I configure and I am running my Pi without a monitor, connecting via SSH. I would not know how to configure the Pi? for Headless beyond removing the monitor.

?

I did the changes recommended by David adding the full path of direwolf but still no success.

?

This is the response when I run the script:

?

Direwolf in CLI mode start up

There is a screen on:

??????? 30376.direwolf? (19/04/21 15:30:35)???? (Detached)

1 Socket in /run/screen/S-pi.

?

When I run ps -x there is no pid 30376 on the report.

?

Gracias

?

Heber NP4JN 73

?

From: Greg D
Sent: Sunday, April 18, 2021 12:17 PM
To: [email protected]
Subject: Re: [direwolf] DW 1.6 not able to autostart

?

In addition, a thought...? Did you change the Pi's configuration when you tried to start it at boot, for example, making the Pi "Headless".? Removing an HDMI display can change the order of sound cards, so Direwolf may be exiting for not having a sound card to talk to.

Greg? KO6TH

David Ranch wrote:


Hello Herber,

When I try to use the dw-start.sh script it will not start on the command line or in Cron.


When you run the dw-start.sh script from the command line, does it give any errors?? What do you see in the /var/tmp/dw-start.log log?


DIREWOLF="/usr/local/bin/direwolf"

RUNMODE=CLI

DWCMD="bash -c 'rtl_fm -f 144.39M - | direwolf -c /home/pi/sdr.conf -r 24000 -D 1 -'"


Only guessing here w/o seeing any specific errors but if this is a path issue, maybe try:

DWCMD="bash -c 'rtl_fm -f 144.39M - | /usr/local/bin/direwolf -c /home/pi/sdr.conf -r 24000 -D 1 -'"


--David
KI6ZHD

?

?

?


Join [email protected] to automatically receive all group messages.