lbussy / WsprryPi

A QRP LF/MF/HF/VHF WSPR transmitter leveraging a Raspberry Pi
http://wsprdocs.aa0nt.net
GNU General Public License v3.0
6 stars 4 forks source link

Beacon Timing List Not Honored #57

Open AA7US opened 4 months ago

AA7US commented 4 months ago

Please consider adding the ability to control how often WSPR beacons are transmitted using the web GUI as can be done from the command line.

For example, to transmit one WSPR beacon on the 30M band every 8 minutes (repeating indefinitely), a sample command is:

wspr -r -s N9NNN EM10 20 1014020 0 0 0

It sure would be convenient to accomplish the same thing using the web GUI. :)

73,

AA7US

lbussy commented 4 months ago

Like this:

image

AA7US commented 4 months ago

Perfect! I didn't realize this could be entered into the web GUI. Thank you!

lbussy commented 4 months ago

Yer welcome ... I'm glad to be abe to close one :)

AA7US commented 4 months ago

Well I hate to ruin a celebration, but unfortunately the zeros I just tried in the frequency field aren't being honored. I tried both "30m 0 0 0" and "10140200 0 0 0" and in both cases my Pi continued to transmit during every 2 minute window. :(

lbussy commented 4 months ago

When I tested, it treated all frequencies in the list as 0 (skip):

pi@wspr:~/WsprryPi/src $ sudo ./wspr --repeat --terminate 7 AA0NT EM18 33 20m 0 0 0 0
Wsprry Pi v1.2.0-3-g1fb27ee (freq_list).
Running on: Raspberry Pi 2B or 3B (BCM2837).
WSPR packet payload:
- Callsign: AA0NT
- Locator:  EM18
- Power:    33 dBm
Requested TX frequencies:
- 14.097100 MHz
- 0.000000 MHz
- 0.000000 MHz
- 0.000000 MHz
- 0.000000 MHz

Extra options:
- Using NTP to calibrate transmission frequency.
- TX will stop after 7 transmissions.

Ready to transmit (setup complete).
Center frequency for WSPR trans: 14.097100 MHz.
Waiting for next WSPR transmission window.
Obtained new ppm value: 2.409317
Skipping transmission.
Center frequency for WSPR trans: 0.000000 MHz.
Waiting for next WSPR transmission window.
Obtained new ppm value: -0.571365
Skipping transmission.
Center frequency for WSPR trans: 0.000000 MHz.
Waiting for next WSPR transmission window.
Exiting, caught signal: 2

... which is still an issue but not exactly what you had.

AA7US commented 4 months ago

Ah the nasty ol' interrupt signal.

By chance did you navigate away from the terminal window (say changed focus to another window on your PC) then come back to it?

I often experience this interrupt signal when using the original WsprryPi program when going back to a terminal session. I avoid this problem by running it (WsprryPi) in a tmux session which I then “detach” away from leaving WsprryPi running.

Even then, whenever I go back to the tmux session (i.e.: “reattach” to it), doing that usually kills WsprryPi with an interrupt signal.

In short, it’s annoying but not new. It's been complained about over the years in WsprryPi issues.

lbussy commented 4 months ago

Nah that was me hitting ctrl-c to exit. The issue there was when it got a non-zero frequency, it skipped transmission.

The first try there should have been 20m but it was skipped - that's the bug as I see it.

lbussy commented 4 months ago

This is still on my list - work actually expects me to work so I am slower than I want to be.

lbussy commented 4 months ago

Still scratching my head, interspersed with bricking a few SD cards while testing.

lbussy commented 4 months ago

Well, it freaking works now.

$ sudo ./wspr --terminate 2 AA0NT EM18 33 20m 0 0
Wsprry Pi v1.2.1-Alpha.1-1-g64cf608 (freq_list).
Running on: Raspberry Pi 4 (BCM2711).
WSPR packet payload:
- Callsign: AA0NT
- Locator:  EM18
- Power:    33 dBm
Requested TX frequencies:
- 14.097100 MHz
- 0.000000 MHz
- 0.000000 MHz

Extra options:
- Using NTP to calibrate transmission frequency.
- TX will stop after 2 transmissions.

Ready to transmit (setup complete).
Center frequency for WSPR trans: 14.097100 MHz.
Waiting for next WSPR transmission window.
Obtained new ppm value: -19.485550
Transmission started.
Transmission completed, (110.606530 sec.)
Center frequency for WSPR trans: 0.000000 MHz.
Waiting for next WSPR transmission window.
Skipping transmission.
Center frequency for WSPR trans: 0.000000 MHz.
Waiting for next WSPR transmission window.
Skipping transmission.

This is a newly compiled version so I am not sure if a library difference is at play here.

There is a remaining issue where --repeat and --terminate conflict, possibly including a frequency list. I need to figure that out - is this an issue or is this desired? More to come.

I need to test the same from the web UI, then maybe I'll release an Alpha version later today. The question about -r and -t will be after that.

lbussy commented 4 months ago

@AA7US please try this:

curl -L https://raw.githubusercontent.com/lbussy/WsprryPi/freq_list/scripts/install.sh | sudo bash (all one line)

As always, this is idempotent, and you can run it over and over. This is an Alpha branch and will go away (just in case someone sees this later on.)

Theoretically, this works with a frequency list at the command line (not web GUI yet), with the above caveats.

AA7US commented 4 months ago

Hi Lee,

Thanks for all your hard work on this. I just ran the alpha install script, rebooted, but unfortunately the wspr daemon is failing to load again. Presumably this is the same problem we covered in Issue #56.

John L.

pi@WSPRPi:~ $ sudo systemctl status wspr
● wspr.service - wspr daemon for: wspr
     Loaded: loaded (/etc/systemd/system/wspr.service; enabled; vendor preset: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Wed 2024-03-06 13:09:10 MST; 2s ago
       Docs: https://github.com/lbussy/WsprryPi/discussions
    Process: 744 ExecStart=/usr/local/bin/wspr -D -i /usr/local/etc/wspr.ini (code=exited, status=1/FAILURE)
   Main PID: 744 (code=exited, status=1/FAILURE)
        CPU: 7ms 
lbussy commented 4 months ago

Have you rebooted? I added another "known issue" for that.

AA7US commented 4 months ago

Have you rebooted? I added another "known issue" for that.

Yes.

lbussy commented 4 months ago

Can you give me the last few lines of /var/log/wspr/wspr.error.log please?

Was this a new install or a clean flash?

AA7US commented 4 months ago

Can you give me the last few lines of /var/log/wspr/wspr.error.log please?

All of the entries in wspr.error.log are:

/usr/local/bin/wspr: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.32' not found (required by /usr/local/bin/wspr)
/usr/local/bin/wspr: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.34' not found (required by /usr/local/bin/wspr)
/usr/local/bin/wspr: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.33' not found (required by /usr/local/bin/wspr)
/usr/local/bin/wspr: /lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/local/bin/wspr)

Was this a new install or a clean flash?

I installed the alpha over existing wsprrypi release v1.1.0, which was working fine except for the tx timing problem.

Full history in case it matters:

Back in February I started with a clean install of Bullseye (Legacy) Lite downloaded from the Raspberry Pi Foundation. I configured a few things for my network and installed chrony in place of the standard ntp client. I run OS updates. I then installed wsprrypi. Since then, I've only run and rerun your wsprrypi install script.

If you want me to try a new Bullseye install followed by an alpha wsprrypi install, I can certainly do that.

John L.

lbussy commented 4 months ago

Interesting - let me look at that a bit. If you hit it, others will.

lbussy commented 4 months ago

Can you give me the results of ldd --version please? It should be like:

ldd (Debian GLIBC 2.36-9+rpt2+deb12u3) 2.36
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper

Also strings $(/sbin/ldconfig -p | grep stdc++|awk -F'=>' '{print $2}')|grep LIBCXX. It should look like:

GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
GLIBCXX_3.4.23
GLIBCXX_3.4.24
GLIBCXX_3.4.25
GLIBCXX_3.4.26
GLIBCXX_3.4.27
GLIBCXX_3.4.28
GLIBCXX_3.4.29
GLIBCXX_3.4.30
GLIBCXX_DEBUG_MESSAGE_LENGTH
AA7US commented 4 months ago
pi@WSPRPi:~ $ ldd --version
ldd (Debian GLIBC 2.31-13+rpt2+rpi1+deb11u7) 2.31
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
pi@WSPRPi:~ $ strings $(/sbin/ldconfig -p | grep stdc++|awk -F'=>' '{print $2}')|grep LIBCXX
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
GLIBCXX_3.4.23
GLIBCXX_3.4.24
GLIBCXX_3.4.25
GLIBCXX_3.4.26
GLIBCXX_3.4.27
GLIBCXX_3.4.28
GLIBCXX_DEBUG_MESSAGE_LENGTH

Compared to you, it looks like I'm missing some versions?

lbussy commented 4 months ago

Okay please see if this addresses it. If so I can add these to the install script:

sudo apt-get install libstdc++6 libc6

AA7US commented 4 months ago

Unfortunately, no joy. 🙁

pi@WSPRPi:~ $ sudo apt-get install libstdc++6 libc6
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libstdc++6 is already the newest version (10.2.1-6+rpi1).
libc6 is already the newest version (2.31-13+rpt2+rpi1+deb11u7).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
AA7US commented 4 months ago

If it helps any...

pi@WSPRPi:~ $ sudo cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

Downloaded from Raspberry Pi Foundation on 12/5/23.

lbussy commented 4 months ago

That's just ... weird. It says it has them and doesn't show the latest.

sudo apt update then try the install again?

AA7US commented 4 months ago
pi@WSPRPi:~ $ sudo apt update
Hit:1 http://archive.raspberrypi.org/debian bullseye InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian bullseye InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.

pi@WSPRPi:~ $ sudo apt-get install libstdc++6 libc6
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libstdc++6 is already the newest version (10.2.1-6+rpi1).
libc6 is already the newest version (2.31-13+rpt2+rpi1+deb11u7).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
AA7US commented 4 months ago

That's just ... weird. It says it has them and doesn't show the latest.

Strange indeed. 🤔

AA7US commented 4 months ago

I'll try a fresh OS download and install later tonight, then I'll run the alpha script again. It can't hurt to try.

John L.

lbussy commented 4 months ago

I think I can go back to the image you have and try as well.

lbussy commented 4 months ago

One last thing to try:

sudo apt update
sudo apt-get install libc-bin libc6 locales
sudo apt-get install libstdc++6 libc6 libc-bin libc6 locales
AA7US commented 4 months ago
pi@WSPRPi:~ $ sudo apt-get install libc-bin libc6 locales
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libc-bin is already the newest version (2.31-13+rpt2+rpi1+deb11u7).
libc6 is already the newest version (2.31-13+rpt2+rpi1+deb11u7).
locales is already the newest version (2.31-13+rpt2+rpi1+deb11u7).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

pi@WSPRPi:~ $ sudo apt-get install libstdc++6 libc6 libc-bin libc6 locales
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libstdc++6 is already the newest version (10.2.1-6+rpi1).
libc-bin is already the newest version (2.31-13+rpt2+rpi1+deb11u7).
libc6 is already the newest version (2.31-13+rpt2+rpi1+deb11u7).
locales is already the newest version (2.31-13+rpt2+rpi1+deb11u7).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
lbussy commented 4 months ago

Grr!

Well, I know what's needed, not how to get it (yet).

lbussy commented 4 months ago

Okay, wanna give it another go? I statically linked the compiler libs. If this doesn't work, I need to try a different path.

AA7US commented 4 months ago

Good morning Lee,

I reran the alpha script. Unfortunately the problem is still there.

Below are the entries from install.log followed by a wspr daemon status (failure exit). There are GLIBC not found entries in the install log now that didn't appear during previous installs.

John L.

2024-03-07 06:25:59 ***Script install.sh starting.***
2024-03-07 06:25:59 Running on: Raspbian GNU/Linux 11 (bullseye)
2024-03-07 06:25:59 You will be presented with some choices during the install. Most frequently
2024-03-07 06:25:59 you will see a 'yes or no' choice, with the default choice capitalized like
2024-03-07 06:25:59 so: [y/N]. Default means if you hit <enter> without typing anything, you will
2024-03-07 06:25:59 make the capitalized choice, i.e. hitting <enter> when you see [Y/n] will
2024-03-07 06:26:00 default to 'yes.'
2024-03-07 06:26:00 Yes/no choices are not case sensitive. However; passwords, system names and
2024-03-07 06:26:00 install paths are. Be aware of this. There is generally no difference between
2024-03-07 06:26:00 'y', 'yes', 'YES', 'Yes'.
2024-03-07 06:26:01 Press any key when you are ready to proceed.
2024-03-07 06:26:01 The time is currently set to Thu 7 Mar 06:26:01 MST 2024.
2024-03-07 06:26:09 Is this correct? [Y/n]: /usr/local/bin/wspr: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.32' not found (required by /usr/local/bin/wspr)
2024-03-07 06:26:09 /usr/local/bin/wspr: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.34' not found (required by /usr/local/bin/wspr)
2024-03-07 06:26:09 /usr/local/bin/wspr: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.33' not found (required by /usr/local/bin/wspr)
2024-03-07 06:26:09 /usr/local/bin/wspr: /lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/local/bin/wspr)
2024-03-07 06:26:55 ( vs. 1.2.1-Alpha.1). Upgrade to newest? [Y/n]: (1.2.1-Alpha.1 vs. 1.2.1-Alpha.1). Overwrite anyway? [y/N]:
2024-03-07 06:26:55 Stopping wspr daemon.
2024-03-07 06:26:55 Disabling wspr daemon.
2024-03-07 06:26:55 Removed /etc/systemd/system/multi-user.target.wants/wspr.service.
2024-03-07 06:26:56 Removing unit file /etc/systemd/system/wspr.service
2024-03-07 06:26:56 Creating unit file for wspr (/etc/systemd/system/wspr.service).
2024-03-07 06:26:56 Reloading systemd config.
2024-03-07 06:26:57 Enabling wspr daemon.
2024-03-07 06:26:57 Created symlink /etc/systemd/system/multi-user.target.wants/wspr.service → /etc/systemd/system/wspr.service.
2024-03-07 06:26:58 Starting wspr daemon.
2024-03-07 06:27:01 Configuration file exists, overwrite? [y/N]:
2024-03-07 06:27:15 Support system shutdown button (TAPR)? [y/N]: (1.2.1-Alpha.1 vs. 1.2.1-Alpha.1). Overwrite anyway? [y/N]: (1.2.1-Alpha.1 vs. 1.2.1-Alpha.1). Overwrite anyway? [y/N]:
2024-03-07 06:27:15 Stopping shutdown-watch daemon.
2024-03-07 06:27:16 Disabling shutdown-watch daemon.
2024-03-07 06:27:16 Removed /etc/systemd/system/multi-user.target.wants/shutdown-watch.service.
2024-03-07 06:27:16 Removing unit file /etc/systemd/system/shutdown-watch.service
2024-03-07 06:27:17 Creating unit file for shutdown-watch (/etc/systemd/system/shutdown-watch.service).
2024-03-07 06:27:17 Reloading systemd config.
2024-03-07 06:27:17 Enabling shutdown-watch daemon.
2024-03-07 06:27:17 Created symlink /etc/systemd/system/multi-user.target.wants/shutdown-watch.service → /etc/systemd/system/shutdown-watch.service.
2024-03-07 06:27:18 Starting shutdown-watch daemon.
2024-03-07 06:27:24 (1.2.1-Alpha.1 vs. 1.2.1-Alpha.1). Overwrite anyway? [y/N]: Creating logrotate.d configuration.
2024-03-07 06:27:25 Updating any expired apt keys.
2024-03-07 06:27:25 Fixing any broken installations.
2024-03-07 06:27:25 Reading package lists...
2024-03-07 06:27:26 Building dependency tree...
2024-03-07 06:27:26 Reading state information...
2024-03-07 06:27:28 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2024-03-07 06:27:28 Checking and installing required dependencies via apt.
2024-03-07 06:27:31 Deleting any deprecated files.
2024-03-07 06:27:31 Checking and installing web pages.
2024-03-07 06:27:47 Fixing file permissions for /var/www/html/wspr.
2024-03-07 06:27:47 Fixing file permissions for data file.
2024-03-07 06:27:47 ***Script install.sh complete.***
2024-03-07 06:27:48 The WSPR daemon has started.
2024-03-07 06:27:48 - WSPR frontend URL : http://192.168.88.204/wspr
2024-03-07 06:27:48 -or- : http://WSPRPi.local/wspr
2024-03-07 06:27:48 - Release version : 1.2.1-Alpha.1
2024-03-07 06:27:48 Happy DXing!
pi@WSPRPi:~ $ sudo systemctl status wspr
● wspr.service - wspr daemon for: wspr
     Loaded: loaded (/etc/systemd/system/wspr.service; enabled; vendor preset: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Thu 2024-03-07 06:29:55 MST; 3s ago
       Docs: https://github.com/lbussy/WsprryPi/discussions
    Process: 683 ExecStart=/usr/local/bin/wspr -D -i /usr/local/etc/wspr.ini (code=exited, status=1/FAILURE)
   Main PID: 683 (code=exited, status=1/FAILURE)
        CPU: 4ms

Mar 07 06:30:00 WSPRPi systemd[1]: wspr.service: Scheduled restart job, restart counter is at 2.
Mar 07 06:30:00 WSPRPi systemd[1]: Stopped wspr daemon for: wspr.
Mar 07 06:30:00 WSPRPi systemd[1]: Started wspr daemon for: wspr.
Mar 07 06:30:04 WSPRPi systemd[1]: wspr.service: Main process exited, code=exited, status=1/FAILURE
Mar 07 06:30:04 WSPRPi systemd[1]: wspr.service: Failed with result 'exit-code'.
lbussy commented 4 months ago

Maybe I should take up skydiving.

The errors now are because it executes wspr if it is there to get the version. That failed as expected. The new one not running is a mystery for now. More digging.

AA7US commented 4 months ago

Maybe I should take up skydiving.

Or bungee jumping.

Either might be more enjoyable for you. 🙂

lbussy commented 4 months ago

I love bungee jumping! Skydiving too. Maybe this explains ...

AA7US commented 4 months ago

I finally have some good news Lee!

I downloaded a copy of 32 bit Raspberry Pi OS Bookworm this morning (recall that I've been using 32 bit Bullseye), installed it on an SD card, run OS updates, rebooted, then ran the WsprryPi alpha script. I rebooted and found the wspr daemon was running!

Now everything is almost functioning perfectly with WsprryPi except: Beacon timing IS being honored when run from the command line but not when setup using the web GUI. I think you already knew about this and are working on it.

FYI: Immediately after installing Bookworm, I ran ldd ldd --version and strings $(/sbin/ldconfig -p | grep stdc++|awk -F'=>' '{print $2}')|grep LIBCXX from the command line and now get the same results as you do... i.e.: the same versions are reported.

So I guess this means WsppryPi isn't supported running under Raspberry Pi OS Bullseye (Legacy) but is fine when running under Raspberry Pi OS Bookworm?

73,

John L.

lbussy commented 4 months ago

Well, it all depends on whether I can figure out why it's not working.

Right now, I'm pissed at it, but not given up yet. I'm VERY glad to hear you got it working, at least to where it's working here.

The app is small and I have always intended that it could be dropped onto any Pi, but maybe that's not practical with the low-level memory and GPIO control.

Also, 10M is dead today, so I have been fighting with this thing... :)

lbussy commented 4 months ago

So it "looks like" we will have to live with "Bookworm or better" for the glibc errors.

I'm gonna just tell myself that's fine; maybe I'll come back to it, maybe not.

I will now go back to the original issue: the web UI freq list is not being honored.