linhpsdr cwx addition (plus other additons)

Sett 111 ganger
Hopp til første uleste melding

Matthew

ulest,
29. mars 2020, 16:42:5929.03.2020
til Hermes-Lite
Back in November last year I posted this https://groups.google.com/d/msg/hermes-lite/QEYSaA_GwVw/OE1c0Ss3AwAJ

Since then Steve has opened up cwx in gateware. I have been trying to add this to linhpsdr, after quite a bit of messing around and testing I think I have something that works:

https://github.com/m5evt/linhpsdr

What does this mean? By ticking the box "cwdaemon" in the main radio dialogue (only when an HL2 is detected for now) a port (6789) in linhpsdr opens and behaves like cwdaemon. This means logging software (e.g. tlf, cqrlog) can connect to linhpsdr and you can use macros or type on the keyboard from within the logging software. This opens up remote cw contesting/dxing with the HL2. I have done a lot of testing of this looking at transmitted waveforms on my scope. It seems to be working reliably up to 40 wpm. But this testing has been limited to my machine and audio settings. I strongly recommend you listen to the transmitted CW on a receiver before using it too much to check that CW notes are timed correctly (especially the first character of a CW transmission). Note, what you hear isn't the transmitted sidetone, it is a generated sidetone in libcw. Unfortunately for now, this is limited to pulseaudio for the CW sidetone. I will work on adding a key input via MIDI next.

Note, you will need to install unixcw from my fork to get this to work:
https://github.com/m5evt/unixcw

I have put cwdaemon functionality in an #ifdef so you can modify the makefile if you don't want to install unixcw and use cwdaemon.

There has been a lot of talk of jumpy/choppy transmit audio in linhpsdr. I found a fix for this here https://groups.google.com/d/msg/hermes-lite/SjzO6YE28EY/4AuGSbmoFAAJ. But I wasn't happy with this. Since Steve added tx buffer debugging, I was still seeing occasional tx buffer problems. The latest commit now has the transmit packets scheduled according to receive packets. This should make linhpsdr much more reliable for transmit audio. In particular for remote links. I have been doing some initial testing over remote links (more work to come on this). I am reasonably confident the gateware tx buffer sizes will work nicely over these remote links (in terms of jitter and latency I have been observing).

Other additions:

-LNA gain is now the HL2 extended gain, panadapter and s meter are adjusted for gain (AGC level adjustment remains on the todo list);
-Automatic waterfall now has blue (not black) as the minimum;
-Linhpsdr now correctly reads the discovery response and limits the number of possible receivers to what the HL2 tells it.

I welcome feedback from all linhpsdr users, even if you don't use CW. There are some reasonably big changes in this commit and I may have broken something you are using but I haven't tested. I would be particularly interested if anyone has a Hermes and how this works with this. I can add cwx for a Hermes if people request this.

I think someone recently said about linhpsdr not having a compressor. I have been thinking about this. Something could be added, but I don't think I could do anything remotely as good as something like this:

https://www.omgubuntu.co.uk/2017/06/install-pulse-effects-ubuntu-ppa

Do people use these sorts of external tools for SSB? To me this approach makes much more sense. I'm not sure I have a microphone anywhere to test such things!

As a small celebration for my work on this I was playing with JS8call recently. I used linhpsdr + my HL2 to send an SMS (via 40m) to a friends cellphone using JS8call. Quite novel!

73 Matthew M5EVT.

Graeme Jury

ulest,
29. mars 2020, 23:51:5329.03.2020
til Hermes-Lite
Hi Matthew,

I am having trouble building unixcw on my LinuxMint 19.3 system. I get the following error

gvj@GVJ-Lap /opt/M5EVT/unixcw $ make
CDPATH="${ZSH_VERSION+.}:" && cd . && aclocal-1.14
/bin/bash: aclocal-1.14: command not found
Makefile:372: recipe for target 'aclocal.m4' failed
make: *** [aclocal.m4] Error 127

I have tried using autoconf to rebuild the configure file  but same problem.

73, Graeme ZL2APV

Steve Haynal

ulest,
30. mars 2020, 01:34:0830.03.2020
til Hermes-Lite
Hi Matthew,

Thanks for all your work on linhpsdr. Your improvements sound really great. I shall attempt to reserve some time this week to try your latest. I have added your project to the software wiki page:

We now have 5 SDR software projects that I know of which have some dedicated or special support for the Hermes-Lite! Feel free to add or update the wiki pages with more info on linhpsdr.

73,

Steve
kf7o

Matthew

ulest,
30. mars 2020, 03:52:0930.03.2020
til Hermes-Lite
Graeme,

Did you run ./configure before the make? If so, could you post the last 30 or so lines output from this?

73 Matthew M5EVT.

Graeme Jury

ulest,
30. mars 2020, 04:01:5630.03.2020
til Hermes-Lite
Thanks for looking at this Matthew.

checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking for working strcoll... yes
checking for vprintf... yes
checking for _doprnt... no
checking for floor... no
checking for gettimeofday... yes
checking for memset... yes
checking for sqrt... no
checking for strchr... yes
checking for strdup... yes
checking for strrchr... yes
checking for strtoul... yes
checking for getopt_long... yes
checking for setlocale... yes
checking for memmove... yes
checking for select... yes
checking for strerror... yes
checking for strspn... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking types of arguments for select... int,fd_set *,struct timeval *
checking for -KPIC or -fPIC compiler options... -fPIC
checking whether cc builds .so files with -shared... yes
checking for ld... /usr/bin/ld -m elf_x86_64
checking whether ld builds .so files with -G... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating src/libcw/libcw.pc
config.status: creating Makefile.inc
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/libcw/Makefile
config.status: creating src/libcw/tests/Makefile
config.status: creating src/cwutils/Makefile
config.status: creating src/cw/Makefile
config.status: creating src/cwgen/Makefile
config.status: creating src/config.h
config.status: src/config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
configure: ----------------------------------------------
configure: ------ unixcw 3.5.1 build configuration ------
configure: operating system:  ......................  linux-gnu
configure: build libcw:  ...........................  yes
configure:     libcw soname version:  ..............  "6:6:1"
configure:     include console buzzer support:  ....  yes
configure:     include OSS support:  ...............  yes
configure:     include ALSA support:  ..............  yes
configure:     include PulseAudio support:  ........  yes
configure: build cw:  ..............................  yes
configure: build cwgen:  ...........................  yes
configure: build cwcp:  ............................  no
configure: build xcwcp:  ...........................  no
configure: ----------------------------------------------

gvj@GVJ-Lap /opt/M5EVT/unixcw $ make
CDPATH="${ZSH_VERSION+.}:" && cd . && aclocal-1.14
/bin/bash: aclocal-1.14: command not found
Makefile:372: recipe for target 'aclocal.m4' failed
make: *** [aclocal.m4] Error 127
gvj@GVJ-Lap /opt/M5EVT/unixcw $

73, Graeme ZL2APV

Matthew

ulest,
30. mars 2020, 04:40:4030.03.2020
til Hermes-Lite
Sorry, this appears to be something I have done. I will try and figure out the fix later today.

73 Matthew M5EVT.

Graeme Jury

ulest,
30. mars 2020, 04:56:0430.03.2020
til Hermes-Lite
No worries Matthew, thanks for everything so far.

Graeme

Sid Boyce

ulest,
30. mars 2020, 09:34:4230.03.2020
til herme...@googlegroups.com
Hi Matthew,
git pull to latest done, libcw.h missing.

gcc -Wno-deprecated-declarations  -D GIT_DATE='"2020-03-29"' -D
GIT_VERSION='"Beta"'  -D CWDAEMON   -O3 -g `pkg-config --cflags
gtk+-3.0`  -c -o cwdaemon.o cwdaemon.c
cwdaemon.c:32:10: fatal error: libcw.h: No such file or directory
   32 | #include <libcw.h>
      |          ^~~~~~~~~
compilation terminated.
make: *** [Makefile:231: cwdaemon.o] Error 1
make: *** Waiting for unfinished jobs....
slipstream:/c1/usr/src/XXX/M5EVT/linhpsdr #
73 ... Sid.
> --
> You received this message because you are subscribed to the Google
> Groups "Hermes-Lite" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to hermes-lite...@googlegroups.com
> <mailto:hermes-lite...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/hermes-lite/3480b39e-3a64-4a98-ac14-a2abcd4798e2%40googlegroups.com
> <https://groups.google.com/d/msgid/hermes-lite/3480b39e-3a64-4a98-ac14-a2abcd4798e2%40googlegroups.com?utm_medium=email&utm_source=footer>.


--
Sid Boyce ... Hamradio License G3VBV, Licensed Private Pilot
Emeritus IBM/Amdahl Mainframes and Sun/Fujitsu Servers Tech Support
Senior Staff Specialist, Cricket Coach
Microsoft Windows Free Zone - Linux used for all Computing Tasks

Matthew

ulest,
30. mars 2020, 10:11:4330.03.2020
til Hermes-Lite
Please ignore link to repo above. This is replaced by:


I updated the linhpsdr readme with the following to install:

  git clone https://github.com/m5evt/unixcw-3.5.1.git
  cd unixcw-3.5.1
  autoreconf -i
  ./configure
  make
  sudo make install

I have just tried this and it seems to work. For anyone who doesn't want to use CW, you can modify the Makefile to comment out the following (then you don't need to install unixcw per above):

#CWDAEMON_INCLUDE=CWDAEMON #ifeq ($(CWDAEMON_INCLUDE),CWDAEMON) #CWDAEMON_OPTIONS=-D CWDAEMON #CWDAEMON_LIBS=-lcw #CWDAEMON_SOURCES= \ #cwdaemon.c #CWDAEMON_HEADERS= \ #cwdaemon.h #CWDAEMON_OBJS= \ #cwdaemon.o #endif

This confirmed my feeling a few weeks ago that an external library wasn't the best way to do this and I should have written the code ground up within linhpsdr! I may still do this in future.

73 Matthew M5EVT.

Sid Boyce

ulest,
30. mars 2020, 20:30:4130.03.2020
til herme...@googlegroups.com
Hi Matthew,
Looks like you are on an old distro.
Ubuntu 18.04 LTS has automake version 1.15, libtool version 2.4.6.
Other distros like Ubuntu 19.10, openSUSE and Fedora have automake-1.16
73 ... Sid.

On 30/03/2020 09:40, Matthew wrote:

Graeme Jury

ulest,
30. mars 2020, 23:21:2930.03.2020
til Hermes-Lite
Hi Matthew,

Still problems :-(

gvj@GVJ-Lap /opt/M5EVT/unixcw-3.5.1 $ autoreconf -i
configure.ac:38: error: possibly undefined macro: AC_PROG_LIBTOOL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1
gvj@GVJ-Lap /opt/M5EVT/unixcw-3.5.1 $ git pull
Already up to date.
gvj@GVJ-Lap /opt/M5EVT/unixcw-3.5.1 $ autoreconf -i m4_pattern_allow
autoreconf: 'configure.ac' or 'configure.in' is required
gvj@GVJ-Lap /opt/M5EVT/unixcw-3.5.1 $

configure is in the unixcw-3.5.1 directory so don't know why it complained. I suspect that trying to satisfy a number of distros is going to cause you a lot of frustration. Don't worry about trying to sort it out for me as I can puddle around with it myself and you never know I may get lucky.

73, Graeme ZL2APV


On Tuesday, March 31, 2020 at 1:30:41 PM UTC+13, Sid Boyce wrote:
Hi Matthew,
Looks like you are on an old distro.
Ubuntu 18.04 LTS has automake version 1.15, libtool version 2.4.6.
Other distros like Ubuntu 19.10, openSUSE and Fedora have automake-1.16
73 ... Sid.

On 30/03/2020 09:40, Matthew wrote:
> Sorry, this appears to be something I have done. I will try and figure
> out the fix later today.
>
> 73 Matthew M5EVT.
> --
> You received this message because you are subscribed to the Google
> Groups "Hermes-Lite" group.
> To unsubscribe from this group and stop receiving emails from it, send

Lou Scalpati

ulest,
31. mars 2020, 00:08:3031.03.2020
til Matthew, Hermes-Lite
Matthew, I had a clean compile but when I run linhpsdr I get:

"linhpsdr: error while loading shared libraries: libcw.so.6: cannot open shared object file: No such file or directory"

The library is in fact in /usr/local/lib as a simlink to /usr/local/lib/libcw.so.6.6.1

I am on ubuntu 19.10


--
You received this message because you are subscribed to the Google Groups "Hermes-Lite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hermes-lite...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hermes-lite/e2febf9b-ce69-4271-a986-f360248fe642%40googlegroups.com.

Matthew

ulest,
31. mars 2020, 03:31:4731.03.2020
til Hermes-Lite
Thanks for feedback all. I'm going to make a fresh Ubuntu 19.10 virtual machine and debug this.

73 Matthew M5EVT.
To unsubscribe from this group and stop receiving emails from it, send an email to herme...@googlegroups.com.

Sid Boyce

ulest,
31. mars 2020, 07:20:2031.03.2020
til herme...@googlegroups.com
Hi Matthew,
Problem sorted, "autoreconf -i" before ./configure.
73 ... Sid.

On 31/03/2020 08:31, Matthew wrote:
> Thanks for feedback all. I'm going to make a fresh Ubuntu 19.10
> virtual machine and debug this.
>
> 73 Matthew M5EVT.
>
> On Tuesday, 31 March 2020 05:08:30 UTC+1, Lou KI5FTY wrote:
>
> Matthew, I had a clean compile but when I run linhpsdr I get:
>
> "linhpsdr: error while loading shared libraries: libcw.so.6:
> cannot open shared object file: No such file or directory"
>
> The library is in fact in /usr/local/lib as a simlink to
> it, send an email to herme...@googlegroups.com <javascript:>.
> <https://groups.google.com/d/msgid/hermes-lite/e2febf9b-ce69-4271-a986-f360248fe642%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Hermes-Lite" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to hermes-lite...@googlegroups.com
> <mailto:hermes-lite...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/hermes-lite/37ef93b4-1b16-442f-86b9-8420fb1a7480%40googlegroups.com
> <https://groups.google.com/d/msgid/hermes-lite/37ef93b4-1b16-442f-86b9-8420fb1a7480%40googlegroups.com?utm_medium=email&utm_source=footer>.

Matthew

ulest,
31. mars 2020, 10:48:3631.03.2020
til Hermes-Lite
Graeme,

I have just setup a freshly built VM for Ubuntu 19.10. I am hoping this issue is related to you not having libtool installed? Could you try sudo apt install libtool to check?

73 Matthew M5EVT.

Graeme Jury

ulest,
31. mars 2020, 12:43:4831.03.2020
til Hermes-Lite
 Hi Matthew,

Many thanks for pursuing this for me. Yes the libtool installation fixed all the compile problems but now I am into a run problem, probably caused by Ubuntu installing unixcw in an unexpected place. I saw a message earlier about a symlink which I will follow up. I have copied my error messages for your info and will get back on how I make out with the symlink

73, Graeme ZL2APV

gvj@GVJ-Lap /opt/M5EVT/unixcw-3.5.1 $ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/opt/M5EVT/unixcw-3.5.1/missing: Unknown `--is-lightweight' option
Try `/opt/M5EVT/unixcw-3.5.1/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes


gvj@GVJ-Lap /opt/M5EVT/linhpsdr $ ./linhpsdr
./linhpsdr: error while loading shared libraries: libcw.so.6: cannot open shared object file: No such file or directory
gvj@GVJ-Lap /opt/M5EVT/linhpsdr $ grep "libcw.so.6" *
Binary file linhpsdr matches
grep: pkg: Is a directory
gvj@GVJ-Lap /opt/M5EVT/linhpsdr $

Lou Scalpati

ulest,
31. mars 2020, 13:03:2031.03.2020
til Graeme Jury, Hermes-Lite
I had the same problem that fixed itself after a magical reboot.😎


--
You received this message because you are subscribed to the Google Groups "Hermes-Lite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hermes-lite...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hermes-lite/e99bcb54-2413-4696-938d-92f6c95714f4%40googlegroups.com.

Matthew

ulest,
31. mars 2020, 13:41:3731.03.2020
til Hermes-Lite
Glad to hear we have some progress, I'm surprised that a sudo ldconfig doesn't fix this. I would really like some feedback on quality of transmitted CW. The rather troublesome library you have all been trying to install is at the heart of the transmitted CW timing. I would like to know that on a broader range of systems beyond my own that the transmitted CW sounds ok. Just because the sidetone sounds ok, this doesn't mean the transmitted signal sounds ok.

I'm looking to add some alerts to the receiver screens for SWR, high temperature, ADC overload and TX buffer under/overflow. The TX buffer alert may provide some hint that the transmitted CW could be problematic (the terminal output tells you this in the build at the moment). I have considered removing the sidetone and simply using the transmitted signal feedback to produce the sidetone, but this won't work further down the line when I add MIDI cw key support as I want to produce sidetone in linhpsdr for this.

73 Matthew M5EVT.

Roger Critchlow

ulest,
31. mars 2020, 19:46:3631.03.2020
til Matthew, Hermes-Lite
Hi --

The install of libcw.so needs to be finished by a "sudo ldconfig" to refresh the cache of dynamically loaded libraries.  That happens automatically at every reboot.  There may be a systemd service that will do it for unprivileged users.

"autoreconf -i  && ./configure && make && sudo make install" worked for building unixcw-3.5.1, but I think I installed libtool somewhere along the way, too.

-- rec -- ad5dz --


-- rec -- ad5dz --


--
You received this message because you are subscribed to the Google Groups "Hermes-Lite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hermes-lite...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hermes-lite/70d7fa72-7a4f-4ab5-bcd1-84c393542e72%40googlegroups.com.

Graeme Jury

ulest,
31. mars 2020, 20:03:3631.03.2020
til Hermes-Lite
It's more than a ldconfig issue here as I did that routinely. I am away from the computer at present but did try to run cw which couldn't find the library either. When I get a chance I will try adding the library directory to the path and see if that is the problem. (Might study the readme's Roger :-)

Graeme

Karl Heinz Kremer

ulest,
31. mars 2020, 20:26:0331.03.2020
til Graeme Jury, Hermes-Lite
You need to set the LD_LIBRARY_PATH:

export LD_LIBRARY_PATH=/usr/local/lib

When you put that into one of the shell startup files, you should be able to run the application - either .profile or .bashrc 

Karl Heinz Kremer
PDF Acrobatics Without a Net 
PDF Software Development, Training and More... 

On Mar 31, 2020, at 8:03 PM, Graeme Jury <gvj...@gmail.com> wrote:

It's more than a ldconfig issue here as I did that routinely. I am away from the computer at present but did try to run cw which couldn't find the library either. When I get a chance I will try adding the library directory to the path and see if that is the problem. (Might study the readme's Roger :-)

Graeme

--
You received this message because you are subscribed to the Google Groups "Hermes-Lite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hermes-lite...@googlegroups.com.

Graeme Jury

ulest,
31. mars 2020, 21:03:4131.03.2020
til Hermes-Lite
Thanks Karl,

That was the fix. It ran on receive using alsa but crashed when I activated the mic checkbox. I will try pulse audio.

receiver_init_analyzer: channel=0 zoom=1 pixels=1015 pixel_samples=0x55a42c12c600
receiver_init_analyzer: g_new0: channel=0 pixel_samples=0x55a42c133000
SetAnalyzer id=0 buffer_size=1024 fft_size=8192 overlap=2048
input_device: plughw:0,0 HDA Intel PCH
output_device: plughw:0,0 HDA Intel PCH
output_device: plughw:0,3 HDA Intel PCH
output_device: plughw:0,7 HDA Intel PCH
output_device: plughw:0,8 HDA Intel PCH
name=dmix:CARD=PCH,DEV=0 descr=HDA Intel PCH, 92HD81B1X5 Analog
Direct sample mixing device io=(null)
output_device: dmix:CARD=PCH,DEV=0
name=dmix:CARD=PCH,DEV=3 descr=HDA Intel PCH, HDMI 0
Direct sample mixing device io=Output
output_device: dmix:CARD=PCH,DEV=3
name=dmix:CARD=PCH,DEV=7 descr=HDA Intel PCH, HDMI 1
Direct sample mixing device io=Output
output_device: dmix:CARD=PCH,DEV=7
name=dmix:CARD=PCH,DEV=8 descr=HDA Intel PCH, HDMI 2
Direct sample mixing device io=Output
output_device: dmix:CARD=PCH,DEV=8
n_input_devices=2
update_filters: new filter grid 0x55a42c0cd420
adding: plughw:0,0 HDA Intel PCH
adding: plughw:0,0 HDA Intel PCH
switch_page: 1 OC
switch_page: 2 XVTR
switch_page: 3 RX-0
switch_page: 3 RX-0 rx=0
switch_page: 4 TX
linhpsdr: pcm_params.c:2290: snd_pcm_hw_refine: Assertion `pcm && params' failed.
Aborted (core dumped)
gvj@GVJ-Lap /opt/M5EVT/linhpsdr $

On Wednesday, April 1, 2020 at 1:26:03 PM UTC+13, Karl Heinz Kremer wrote:
You need to set the LD_LIBRARY_PATH:

export LD_LIBRARY_PATH=/usr/local/lib

When you put that into one of the shell startup files, you should be able to run the application - either .profile or .bashrc 

Karl Heinz Kremer
PDF Acrobatics Without a Net 
PDF Software Development, Training and More... 

On Mar 31, 2020, at 8:03 PM, Graeme Jury <gvj...@gmail.com> wrote:

It's more than a ldconfig issue here as I did that routinely. I am away from the computer at present but did try to run cw which couldn't find the library either. When I get a chance I will try adding the library directory to the path and see if that is the problem. (Might study the readme's Roger :-)

Graeme

--
You received this message because you are subscribed to the Google Groups "Hermes-Lite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to herme...@googlegroups.com.

Graeme Jury

ulest,
31. mars 2020, 21:18:5031.03.2020
til Hermes-Lite
OK it runs fine on Pulse Audio with SSB Rx and Tx but can't raise anyone on air, will have to wait for tonight. I will use the intervening time to get to grips with using the cw daemon.

Many thanks to all the helpers,

73, Graeme ZL2APV

Roger Critchlow

ulest,
31. mars 2020, 21:54:1331.03.2020
til Hermes-Lite
I have certainly missed more than my share of readme files, but I don't know which one I missed here.

When linhpsdr failed to load libcw.so.6, I ran ldconfig, and linhpsdr then ran without a problem.  libcw.so.6 was installed into /usr/ocal/lib.  /etc/ld.so.conf.d/libc.conf lists /usr/local/lib, the libc-bin package on Ubuntu 19.10 installs /etc/ld.so.conf.d/libc.conf,  /sbin/ldconfig, and several other files concerned with dynamic linking.

Maybe your ldconfig has been configured differently?

-- rec -- ad5dz --

Lou Scalpati

ulest,
31. mars 2020, 22:53:0231.03.2020
til Matthew, Hermes-Lite
Hi Matthew,
Problems with the code crashing...  Let me start out by saying I'm not sure what cwdaemon enabled is supposed to behave like, but I see and hear no difference, BUT there are larger crash issues that I am going to detail.  I have also included the full debug session along with a couple of netstats that have been grep'd to only show linhpsdr matches.

Let me explain the crash,  I am able to enable cwdeamon and the check box stays on, if I close config and open it again the check box is NOT checked.  If I check the box again the program crashes.  It also will not keep it checked from session to session.  I took netstats while it was checked then used my key/keyer directly attached to the hl2 and I can see the debug showing dots/dash/ptt.  It only showed dots in the debug not dashes even tho it transmitted and registered with a debug statement.  I then opened the options again and it is not showing the check box for cwdaemon checked.  I then took a second netstat -nap and still shows the daemon port running.  I think the crash is caused by trying to bind to the port a second time and not checking if it actually is bound.  You will notice the very line of the debug (beginning of the shell prompt) is the word bind.   there must be a logic error on checking if the port is enabled thus showing it not checked and then blindly enabling the port causing the crash.  I have not dug into the code yet but that is my educated guess.  Follows the netstats and debug.

-----------------------------------------------------------------------------------------------------
cwdaemon checked 1st time - netstat -nap
-------------------------------------------------------------------------
tcp        0      0 0.0.0.0:50000           0.0.0.0:*               LISTEN      5738/linhpsdr      
tcp        0      0 0.0.0.0:19090           0.0.0.0:*               LISTEN      5738/linhpsdr      
udp        0      0 192.168.16.1:45501      0.0.0.0:*                           5738/linhpsdr      
udp   213760      0 255.255.255.255:4992    0.0.0.0:*                           5738/linhpsdr      
udp        0      0 0.0.0.0:6789            0.0.0.0:*                           5738/linhpsdr      
unix  3      [ ]         STREAM     CONNECTED     99529    5738/linhpsdr        
unix  3      [ ]         STREAM     CONNECTED     99499    5738/linhpsdr        
unix  3      [ ]         STREAM     CONNECTED     99513    5738/linhpsdr        
unix  3      [ ]         STREAM     CONNECTED     99525    5738/linhpsdr        
unix  3      [ ]         STREAM     CONNECTED     96885    5738/linhpsdr        
unix  3      [ ]         STREAM     CONNECTED     96918    5738/linhpsdr        
unix  3      [ ]         STREAM     CONNECTED     96903    5738/linhpsdr        
unix  3      [ ]         STREAM     CONNECTED     96884    5738/linhpsdr        
unix  3      [ ]         STREAM     CONNECTED     98691    5738/linhpsdr        

------------------------------------------------------------------------------------------------------

After closing config and reopen config - the option does not show checked - here is the status of netstat -nap at this point
---------------------------------------------------------------------------------------------------------
tcp        0      0 0.0.0.0:50000           0.0.0.0:*               LISTEN      5738/linhpsdr      
tcp        0      0 0.0.0.0:19090           0.0.0.0:*               LISTEN      5738/linhpsdr      
udp        0      0 192.168.16.1:45501      0.0.0.0:*                           5738/linhpsdr      
udp   213760      0 255.255.255.255:4992    0.0.0.0:*                           5738/linhpsdr      
udp        0      0 0.0.0.0:6789            0.0.0.0:*                           5738/linhpsdr      
unix  3      [ ]         STREAM     CONNECTED     99529    5738/linhpsdr        
unix  3      [ ]         STREAM     CONNECTED     99499    5738/linhpsdr        
unix  3      [ ]         STREAM     CONNECTED     99513    5738/linhpsdr        
unix  3      [ ]         STREAM     CONNECTED     99525    5738/linhpsdr        
unix  3      [ ]         STREAM     CONNECTED     96885    5738/linhpsdr        
unix  3      [ ]         STREAM     CONNECTED     96918    5738/linhpsdr        
unix  3      [ ]         STREAM     CONNECTED     96903    5738/linhpsdr        
unix  3      [ ]         STREAM     CONNECTED     96884    5738/linhpsdr        
unix  3      [ ]         STREAM     CONNECTED     98691    5738/linhpsdr        
unix  3      [ ]         STREAM     CONNECTED     102801   5738/linhpsdr   
  
------------------------------------------------------------------------------------------------------  

here is the entire debug from shell
-------------------------------------------------------------------------------------------------------
lou@Ham-Mini-Linux:~$ linhpsdr
Build: 2020-03-30 Beta
GTK+ version 3.24.12
sysname: Linux
nodename: Ham-Mini-Linux
release: 5.3.0-42-generic
version: #34-Ubuntu SMP Fri Feb 28 05:49:40 UTC 2020
machine: x86_64
opengl: 0
Creating wisdom file: /home/lou/.local/share/linhpsdr/
discovery
protocol1_discovery
discover: looking for HPSDR devices on lo
discover: bound to lo
discover_receive_thread
discovery: bytes read -1
discovery: recvfrom socket failed for discover_receive_thread: Resource temporarily unavailable
discovery: exiting discover_receive_thread
discover: exiting discover for lo
discover: looking for HPSDR devices on enp2s0f0
discover: bound to enp2s0f0
discover_receive_thread
discovered: received 60 bytes
discovery: found device=6 software_version=69 status=2 address=192.168.16.10 (00:1C:C0:A2:13:DD) on enp2s0f0
discovery: bytes read -1
discovery: recvfrom socket failed for discover_receive_thread: Resource temporarily unavailable
discovery: exiting discover_receive_thread
discover: exiting discover for enp2s0f0
discover: looking for HPSDR devices on wlp3s0
discover: bound to wlp3s0
discover_receive_thread
discovery: bytes read -1
discovery: recvfrom socket failed for discover_receive_thread: Resource temporarily unavailable
discovery: exiting discover_receive_thread
discover: exiting discover for wlp3s0
discovery found 1 devices
discovery: found device=6 software_version=69 status=2 address=192.168.16.10 (00:1C:C0:A2:13:DD) on enp2s0f0
protocol2_discover: looking for HPSDR devices on enp2s0f0
protocol2_discover: bound to enp2s0f0 192.168.16.1 255.255.255.0
protocol2_disovery: thread_id=0x56361ff04800
protocol2_discover: bytes read -1
protocol2_discover: recvfrom socket failed for discover_receive_thread: Resource temporarily unavailable
protocol2_discover: exiting protocol2_discover_receive_thread
protocol2_discover: exiting discover for enp2s0f0
protocol2_discover: looking for HPSDR devices on wlp3s0
protocol2_discover: bound to wlp3s0 192.168.86.35 255.255.255.0
protocol2_disovery: thread_id=0x56361ff04850
protocol2_discover: bytes read -1
protocol2_discover: recvfrom socket failed for discover_receive_thread: Resource temporarily unavailable
protocol2_discover: exiting protocol2_discover_receive_thread
protocol2_discover: exiting discover for wlp3s0
protocol2_discovery found 1 devices
discovery: found protocol=0 device=6 software_version=69 status=2 address=192.168.16.10 (00:1C:C0:A2:13:DD) on enp2s0f0
main: discovery found 1 devices
discovered: 0 device=6
adding Hermes Lite
tree_selection_changed_cb
tree_selection_changed_cb: selected=Hermes Lite,1,6.9,192.168.16.10,00:1C:C0:A2:13:DD
tree_selection_changed_cb: first=Hermes Lite,1,6.9,192.168.16.10,00:1C:C0:A2:13:DD
found 0
starting Linux HPSDR (Beta): Hermes Lite P1 v6.9 192.168.16.10 (00:1C:C0:A2:13:DD) on enp2s0f0
create_radio for Hermes Lite 6
loadProperties: /home/lou/.local/share/linhpsdr/00-1C-C0-A2-13-DD.props
audio: create_audio: USE_PULSEAUDIO
n_input_devices=0
create_receiver: channel=0 sample_rate=192000
create_receiver: channel=0 frequency_min=0 frequency_max=30720000
create_receiver: buffer_size=1024
create_receiver: fft_size=2048
create_receiver: OpenChannel: channel=0 buffer_size=1024 sample_rate=192000 fft_size=2048 output_samples=256
receiver_init_analyzer: channel=0 zoom=1 pixels=0 pixel_samples=(nil)
receiver_update_title: Linux HPSDR: Rx-0 ADC-0 192000
create_vfo: rx=0
rx_panadapter_configure_event_cb
receiver_configure_event: gtk_paned_set_position: rx=0 position=52 height=115 percent=0.455367
audio_open_output: alsa_output.pci-0000_00_1b.0.analog-stereo
audio_open_output: allocated local_audio_buffer 0x56362240f520 size 8192 bytes
launch_rigctl for receiver: 0
create_transmitter: channel=8
rigctl_server: starting server on port 19090
transmitter_init_analyzer: width=0 pixels=0
update_timer: fps=10
protocol1_init
Server listening on port 50000
x=523 y=218
moving main_window to x=523 y=218
audio: state_cb: PA_CONTEXT_AUTHORIZING
audio: state_cb: PA_CONTEXT_SETTING_NAME
audio: state_cb: PA_CONTEXT_READY
Output: 1: linHPSDR (linHPSDR RX0 Audio)
Output: 2: linHPSDR.2 (linHPSDR TX0 Audio)
Output: 3: alsa_output.pci-0000_00_1b.0.analog-stereo (Built-in Audio Analog Stereo)
Input: 1: linHPSDR.monitor (Monitor of linHPSDR RX0 Audio)
Input: 2: linHPSDR.2.monitor (Monitor of linHPSDR TX0 Audio)
Input: 3: alsa_output.pci-0000_00_1b.0.analog-stereo.monitor (Monitor of Built-in Audio Analog Stereo)
Input: 4: alsa_input.pci-0000_00_1b.0.iec958-stereo (Built-in Audio Digital Stereo (IEC958))
radio_start
protocol1_run
protocol1 starting receive thread: buffer_size=2048 output_buffer_size=0
receive_thread: id=0x56361ff20a80
metis_restart
protocol1: receive_thread
rx_panadapter: resize_timeout
receiver_init_analyzer: channel=0 zoom=1 pixels=1015 pixel_samples=(nil)
receiver_init_analyzer: g_new0: channel=0 pixel_samples=0x563624839800

SetAnalyzer id=0 buffer_size=1024 fft_size=8192 overlap=2048
Buffer recovery 0 1
FPGA firmware version: 6.9
tx_panadapter_configure_event: width=300 height=170
transmitter_init_analyzer: width=300 pixels=900
SetAnalyzer id=8 buffer_size=1024 overlap=3392
rx_panadapter_configure_event_cb
rx_panadapter: resize_timeout
receiver_init_analyzer: channel=0 zoom=1 pixels=1920 pixel_samples=0x563624839800
receiver_init_analyzer: g_new0: channel=0 pixel_samples=0x563624859230

SetAnalyzer id=0 buffer_size=1024 fft_size=8192 overlap=2048
rx_panadapter_configure_event_cb
rx_panadapter: resize_timeout
receiver_init_analyzer: channel=0 zoom=1 pixels=1717 pixel_samples=0x563624859230
receiver_init_analyzer: g_new0: channel=0 pixel_samples=0x56362488ec10

SetAnalyzer id=0 buffer_size=1024 fft_size=8192 overlap=2048
audio: create_audio: USE_PULSEAUDIO
n_input_devices=4
update_filters: new filter grid 0x56361fec3420
adding: Monitor of linHPSDR RX0 Audio
adding: Monitor of linHPSDR TX0 Audio
adding: Monitor of Built-in Audio Analog Stereo
adding: Built-in Audio Digital Stereo (IEC958)
audio: state_cb: PA_CONTEXT_AUTHORIZING
audio: state_cb: PA_CONTEXT_SETTING_NAME
audio: state_cb: PA_CONTEXT_READY
Output: 1: linHPSDR (linHPSDR RX0 Audio)
Output: 2: linHPSDR.2 (linHPSDR TX0 Audio)
Output: 3: alsa_output.pci-0000_00_1b.0.analog-stereo (Built-in Audio Analog Stereo)
Input: 1: linHPSDR.monitor (Monitor of linHPSDR RX0 Audio)
Input: 2: linHPSDR.2.monitor (Monitor of linHPSDR TX0 Audio)
Input: 3: alsa_output.pci-0000_00_1b.0.analog-stereo.monitor (Monitor of Built-in Audio Analog Stereo)
Input: 4: alsa_input.pci-0000_00_1b.0.iec958-stereo (Built-in Audio Digital Stereo (IEC958))
CWdaemon 1
Starting CWdaemon
cwdaemon_thread: id=0x563624e948a0
Starting cwdaemon
setting sound system "PulseAudio"starting generator with sound system "PulseAudio": success
Speed 20
Tone 650
Vol 100
process_control_bytes: ppt=1 dot=1 dash=0
ext_ptt_changed
ptt_changed
Buffer recovery 0 1
Buffer recovery 0 1
Buffer recovery 0 1
Buffer recovery 0 1
Buffer recovery 0 1
Buffer recovery 0 1
process_control_bytes: ppt=0 dot=0 dash=0
ext_ptt_changed
ptt_changed
Buffer recovery 0 1
process_control_bytes: ppt=1 dot=1 dash=0
ext_ptt_changed
ptt_changed
Buffer recovery 0 1
Buffer recovery 0 1
Buffer recovery 0 1
Buffer recovery 0 1
Buffer recovery 0 1
Buffer recovery 0 1
Buffer recovery 0 1
Buffer recovery 0 1
Buffer recovery 0 1
Buffer recovery 0 1
process_control_bytes: ppt=0 dot=0 dash=0
ext_ptt_changed
ptt_changed
Buffer recovery 0 1
process_control_bytes: ppt=1 dot=1 dash=0
ext_ptt_changed
ptt_changed
Buffer recovery 0 1
Buffer recovery 0 1
Buffer recovery 0 1
Buffer recovery 0 1
Buffer recovery 0 1
Buffer recovery 0 1
Buffer recovery 0 1
Buffer recovery 0 1
Buffer recovery 0 1
Buffer recovery 0 1
Buffer recovery 0 1
Buffer recovery 0 1
process_control_bytes: ppt=0 dot=0 dash=0
ext_ptt_changed
ptt_changed
Buffer recovery 0 1
process_control_bytes: ppt=1 dot=1 dash=0
ext_ptt_changed
ptt_changed
Buffer recovery 0 1
Buffer recovery 0 1
process_control_bytes: ppt=0 dot=0 dash=0
ext_ptt_changed
ptt_changed
Buffer recovery 0 1
audio: create_audio: USE_PULSEAUDIO
n_input_devices=4
update_filters: new filter grid 0x563624c10420
adding: Monitor of linHPSDR RX0 Audio
adding: Monitor of linHPSDR TX0 Audio
adding: Monitor of Built-in Audio Analog Stereo
adding: Built-in Audio Digital Stereo (IEC958)
audio: state_cb: PA_CONTEXT_AUTHORIZING
audio: state_cb: PA_CONTEXT_SETTING_NAME
audio: state_cb: PA_CONTEXT_READY
Output: 1: linHPSDR (linHPSDR RX0 Audio)
Output: 2: linHPSDR.2 (linHPSDR TX0 Audio)
Output: 3: alsa_output.pci-0000_00_1b.0.analog-stereo (Built-in Audio Analog Stereo)
Input: 1: linHPSDR.monitor (Monitor of linHPSDR RX0 Audio)
Input: 2: linHPSDR.2.monitor (Monitor of linHPSDR TX0 Audio)
Input: 3: alsa_output.pci-0000_00_1b.0.analog-stereo.monitor (Monitor of Built-in Audio Analog Stereo)
Input: 4: alsa_input.pci-0000_00_1b.0.iec958-stereo (Built-in Audio Digital Stereo (IEC958))
process_control_bytes: ppt=1 dot=1 dash=0
ext_ptt_changed
ptt_changed
Buffer recovery 0 1
Buffer recovery 0 1
Buffer recovery 0 1
Buffer recovery 0 1
Buffer recovery 0 1
Buffer recovery 0 1
Buffer recovery 0 1
process_control_bytes: ppt=0 dot=0 dash=0
ext_ptt_changed
ptt_changed
Buffer recovery 0 1
process_control_bytes: ppt=1 dot=1 dash=0
ext_ptt_changed
ptt_changed
Buffer recovery 0 1
process_control_bytes: ppt=0 dot=0 dash=0
ext_ptt_changed
ptt_changed
Buffer recovery 0 1
process_control_bytes: ppt=1 dot=1 dash=0
ext_ptt_changed
ptt_changed
Buffer recovery 0 1
Buffer recovery 0 1
Buffer recovery 0 1
Buffer recovery 0 1
Buffer recovery 0 1
Buffer recovery 0 1
Buffer recovery 0 1
Buffer recovery 0 1
process_control_bytes: ppt=0 dot=0 dash=0
ext_ptt_changed
ptt_changed
Buffer recovery 0 1
process_control_bytes: ppt=1 dot=1 dash=0
Buffer recovery 0 1
ext_ptt_changed
ptt_changed
process_control_bytes: ppt=0 dot=0 dash=0
ext_ptt_changed
ptt_changed
Buffer recovery 0 1
process_control_bytes: ppt=1 dot=1 dash=0
ext_ptt_changed
ptt_changed
Buffer recovery 0 1
process_control_bytes: ppt=0 dot=0 dash=0
ext_ptt_changed
ptt_changed
Buffer recovery 0 1
CWdaemon 1
Starting CWdaemon
cwdaemon_thread: id=0x563624c84140
Starting cwdaemon
Bindlou@Ham-Mini-Linux:~$ 

Lou Scalpati

ulest,
31. mars 2020, 23:09:1731.03.2020
til Matthew, Hermes-Lite
So I figured out that is for pc keying only... Duh!  So when I enable it in cqrlog it sends cw commands to linhpsdr and shows in the shell debug fine.  I hear sidetone - very nice but it does not key the transmitter.  I must be doing something wrong....  BUT if I go through the previous scenario it still crashes the app
Svar alle
Svar til forfatter
Videresend
0 nye meldinger