Help with LINhpsdr Settings

725 views
Skip to first unread message

Paul Jay

unread,
Jan 7, 2022, 6:30:59 AM1/7/22
to Hermes-Lite
Hi All

I have been running Thetis with my HL2 and it works fine, but decided I wanted to try a Linux based program and installed LINhpsdr (Matthew M5EVT's forked version). Its not working too well the main issue seems to be network related with the "QOS" indicator on the dashboard lighting red frequently.  According to the manual this relates to latency on the network of computer however I dont think neither should be a problem, spec below:

HP Elitebook 840 G8 (Intel Core I7-1165G7)
16GB RAM
Linux Mint 20.2 Cinnamon
HL2 connected directly to laptop Ethernet by1M CAT6 cable
Fixed IP, port speed also set to 1GB/ps

On the same laptop Ihave Quisk, and have compiled PIhpsdr both work flawlessly which is odd as LINhpsdr is derived from PIhpsdr.  I wonder if I am missing something in the settings or if anyone has any other configuration advice I could try?

Appreciate any thoughts or guidance from the group

73, Paul 2E0PJY

Matthew

unread,
Jan 7, 2022, 7:18:42 AM1/7/22
to Hermes-Lite
Hi Paul,

A wired connection certainly sounds like it shouldn't be a network based issue. I will need to review my code and remind myself of the exact circumstances that can trigger the QoS flag in the software.

I experienced odd issues with Pulseaudio doing a blocking write for a (in computing terms) long period (I concluded this was a Pulseaudio feature/bug, never versions of Pulseaudio didn't fix it). To mitigate this, I set a timer and measure how long it takes between the Pulseaudio output buffer writes are taking too long, I reset the Pulseaudio connection and it fixes it. I raise the QoS flag when I do this. So it could be audio related.

To help with suggestions/debugging:

- With 1 RX @ 48000 do you experience the QoS flag lighting red frequently? I have never got linHPSDR to work reliably above 192kbps with multiple receivers. I generally stick with 48k or 96k sample rates.
- How frequent is it? Every 10 sec, 30 sec?
- What audio configuration do you have in linHPSDR per page 20 in my guide? For Linux, I recommend Pulseaudio (no soundio) and backend left blank.

73 Matthew M5EVT.

Paul Jay

unread,
Jan 7, 2022, 8:02:14 AM1/7/22
to Hermes-Lite
With 1 RX @ 48000 do you experience the QoS flag lighting red frequently? I have never got linHPSDR to work reliably above 192kbps with multiple receivers. I generally stick with 48k or 96k sample rates.Hi Matthew

Thanks for responding, I really appreciate you taking the time!

Regards your question my answers are below:

With 1 RX @ 48000 do you experience the QoS flag lighting red frequently? I have never got linHPSDR to work reliably above 192kbps with multiple receivers. I generally stick with 48k or 96k sample rates. Fairly frequently I would say on average every 30 seconds or so, but it seems intermittent

How frequent is it? Every 10 sec, 30 sec? Two or three times a minute

What audio configuration do you have in linHPSDR per page 20 in my guide? For Linux, I recommend Pulseaudio (no soundio) and backend left blank. Yes, Pulseaudio with back end blank. I am using an M-AUDIO USB microphone interface which is set up using the PCM2900C Codec

Hope that info helps!

73, Paul 2E0PJY

Matthew

unread,
Jan 7, 2022, 1:21:06 PM1/7/22
to Hermes-Lite
Thanks for the reply and the information regarding the external audio interface. If you could confirm one more thing, I will look at a work around.

With 1 RX @48000, in the RX0 tab, can you un-tick "Local Audio". If the problem goes away, this strongly suggests that Pulseaudio is frequently taking > 20 ms to write audio data (and unfortunately the Pulseaudio API only provides a blocking write function).

73 Matthew M5EVT.

Paul Jay

unread,
Jan 8, 2022, 6:55:08 AM1/8/22
to Hermes-Lite
Hi Matthew

I ran LHPSDR for about an hour last night with the changed setting you suggested and its definitely much improved.  The QOS goes red every time though when the program is first started regardless of the settings but it goes off immediately. So it does indeed look like there is an issue with the sound setup as you suspected.

73, Paul

Matthew

unread,
Jan 8, 2022, 11:26:00 AM1/8/22
to Hermes-Lite
Hi Paul,

I have modified the code in my fork. It will now only reset the audio/raise a QoS flag when using cwdaemon. Note, for the first few seconds of starting the program there may be a QoS flag raised while buffers are filling up etc.

Everything you have stated points to Pulseaudio (beyond the code of linHPSDR) frequently taking a long time (> 20 ms) to write the audio data. As I previously stated, I have seen this on more than 1 machine and on different flavours of linux. The issue is probably compounded further by using an external audio interface. I will see how my external USB interface behaves with linHPSDR.

piHPSDR and linHPSDR are very similar in the core of their code. I suspect with both of these what you have "behind the scenes" when using Pulseaudio and your external card is the SDR app getting stuck for 20 ms, then the SDR app will catch up and act upon a burst of packets received by the HL2. 1 RX @48000 this is 1 packet every 2.7 ms (if you are proficient with Wireshark you can filter packets on the HL2 port and look at time differences between packets to see these bursts). Faster sample rates and more RXs means lots more packets to catch up with. This could lead to RX packets from the HL2 getting dropped. However, probably more of note is that you will have a burst of packets being sent from the SDR app to the HL2. If the TX buffer/latency is not large enough this will result in problems with the quality of your transmitted signal. I have just checked the piHPSDR code in the DL1YCF fork, the HL2 TX latency is set @ 40 ms.

In my linHPSDR fork I have just added the option for the user to set the TX latency size. It had previously been set to 21 ms "behind the scenes". You probably want to increase it for your setup if you start to hear relay clicking/chatter during TX.

73 Matthew M5EVT.

Paul Jay

unread,
Jan 8, 2022, 12:41:19 PM1/8/22
to Hermes-Lite
Matthew

Thank you so much I’ll try your new version as soon as I get a chance to get into my shack. May I also ask another question, I have been playing around with Puresignal today and it’s working on piHPSDR however I can’t get LHPSDR to work with PS at all it doesn’t see anything and doesn’t do any corrections. Are there any guides on how to set it up with LinHPSDr?

73

Regards Paul Jay 

On 8 Jan 2022, at 16:26, Matthew <bal...@gmail.com> wrote:


--
You received this message because you are subscribed to a topic in the Google Groups "Hermes-Lite" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/hermes-lite/oY8MPG7Tweo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hermes-lite...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hermes-lite/1a89d8f4-840e-4b43-9a51-176afdd45313n%40googlegroups.com.

Paul Jay

unread,
Jan 10, 2022, 6:45:55 AM1/10/22
to Hermes-Lite
I can confirm that the changes have fixed the QOS triggering issue, I have been running LHPSDR for several hours and not see the flag once. However I am now unable to select the tickbox to enable local microphone for TX, I have selected the right device in the drop down however the software will not let me select the check box.

Any ideas?

Matthew

unread,
Jan 10, 2022, 12:10:49 PM1/10/22
to Hermes-Lite
Hi Paul,

That does sound a little odd. Can you open the configure dialogue, switch to the TX tab, try to select "local microphone" and copy and paste the command line output after the line "switch_page: 4 TX"?

Regarding Puresignal, I am afraid I haven't ever tried to use it. I did once have an email from John G0ORX which suggested perhaps the Puresignal code wasn't finished. In 2021, I branched out from 100% CW operating into some data modes. Perhaps in 2022 I will (buy a microphone and) explore SSB and Puresignal with the HL2.

73 Matthew M5EVT.

Paul Jay

unread,
Jan 10, 2022, 2:36:37 PM1/10/22
to Hermes-Lite
This is what I see from a terminal when I select my microphone and try to check the "local mic" box

Input device changed: 0: alsa_output.usb-JinAudio_USB_Audio_Device_20190801_M0_V001-00.analog-stereo.monitor (USB Audio Device Analogue Stereo)
audio_open_input

Sid Boyce

unread,
Jan 10, 2022, 3:41:31 PM1/10/22
to herme...@googlegroups.com
That doesn't look right.
I did have a problem with pihpsdr on my PiHPSDRv2 where local microphone
was analog-stereo.monitor and on TX no audio showed up. Monitor is for
RX audio.
I had to select USB Audio Device Analog Mono.

Card 1 is the USB dongle and I am using pulseaudio no problem on 3
Pi4's, an ODROID-N2, Jetson Nano SDK and a nanoPi-M4v2 as well as 7
x86_64 boxes.
root@Pi48:~# fuser -v /dev/snd/*
                    USER        PID ACCESS COMMAND
/dev/snd/controlC1:  root        453 f.... alsactl
                    pi          978 F.... pulseaudio
/dev/snd/pcmC1D0c:   pi          978 F...m pulseaudio
/dev/snd/pcmC1D0p:   pi          978 F...m pulseaudio
/dev/snd/timer:      pi          978 f.... pulseaudio
Notice the "m" for both.
73 ... Sid.
>> with 48k or 96k sample rates. *Fairly
>> frequently I would say on average every 30
>> seconds or so, but it seems intermittent*
>>
>> How frequent is it? Every 10 sec, 30 sec?
>> *Two or three times a minute*
>>
>> What audio configuration do you have in
>> linHPSDR per page 20 in my guide? For Linux,
>> I recommend Pulseaudio (no soundio) and
>> backend left blank. Y*es, Pulseaudio with
>> back end blank. I am using an M-AUDIO USB
>> microphone interface which is set up using
>> the PCM2900C Codec*
>> <https://groups.google.com/d/msgid/hermes-lite/1a89d8f4-840e-4b43-9a51-176afdd45313n%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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/hermes-lite/e4881997-5ce9-4394-9ce1-06c93b6ea1b9n%40googlegroups.com
> <https://groups.google.com/d/msgid/hermes-lite/e4881997-5ce9-4394-9ce1-06c93b6ea1b9n%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

Mike Lewis

unread,
Jan 10, 2022, 3:48:27 PM1/10/22
to herme...@googlegroups.com
It is also useful to run pulseaudio control utility and ensure the configuration looks correct, enabled, sources are set to the right places, etc. Can also adjust levels while there.

Mike Lewis

unread,
Jan 10, 2022, 4:08:36 PM1/10/22
to herme...@googlegroups.com

To add more, the volume manager is called pavucontrol on the command line, listed as PulseAudio Volume Manager in RPi menu.

 

This example is a C-Media USB sound card dongle.  The mono device is the card input jack connected to my standard radio hand microphone.

 

Note the config for this card is “Analog Stereo out + Mono input” to expose the card mic input source.

 

 

Now mono source shows up under Input Devices.

 

 

Under Recording I see a list of devices

 

And I chose Mono

 

 

In piHPSDR this gives me the same list of devices

 

Where I again choose the Mono input

 

 

 

Maybe you have something similar.

 

  • Mike - K7MDL

--

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.

Paul Jay

unread,
Jan 11, 2022, 4:00:33 AM1/11/22
to Hermes-Lite
Thanks for the comments everyone, I appreciate the advice.

I am not convinced that the issue lies with the OS Audio config as I have piHPSDR and SparkSDR on the same computer and both of them work fine, I am able to select my USB Microphone no problem with those applications.  I spent some time last night reinstalling linHPSDR from scratch by following the excellent guide written by Matthew and still the problem remains. 

Last ditch attempt might be to install a fresh copy of LinuxMint and start totally from square one but frankly that's a bit of a pain!

Matthew

unread,
Jan 11, 2022, 5:48:38 AM1/11/22
to Hermes-Lite
I agree that the fact piHPSDR functions ok it suggests there is something peculiar to linHPSDR. Even more odd is that you suggest it worked in my linHPSDR fork and then after I made changes to the code over the weekend, it stopped working. None of my changes touched any of the code I would expect to be causing these problems. There are some lines missing from your command line output that I would have expected. I would expect to see something along the lines of:

switch_page: 4 TX
update_transmitter_dialog: tx=8
adding: Monitor of Built-in Audio Analogue Stereo
adding: Built-in Audio Analogue Stereo
adding: Monitor of RX0 Audio
adding: Monitor of TX Audio
Input device changed: 0: alsa_output.pci-0000_00_1b.0.analog-stereo.monitor (Built-in Audio Analogue Stereo)
audio_open_input
audio_open_input: PULSEAUDIO mic_read_thread
mic_read_thread: ENTRY

No "adding:" devices in your command line output is strange.

Re-installing the OS should not be necessary. I am guessing you have deleted the props file when you did a fresh compile of the code?

Leave it with me, I'll will review the code and setup some tests to see if I have anymore suggestions.

73 Matthew M5EVT.

Matthew

unread,
Jan 11, 2022, 7:15:32 AM1/11/22
to Hermes-Lite
I suspect I have fixed the problem you were experiencing. Please check commit #da30a12.

73 Matthew M5EVT.

Paul Jay

unread,
Jan 11, 2022, 8:21:47 AM1/11/22
to Hermes-Lite
Brilliant thank you!

Just for my technical interest what was the issue, and do I simply install it using the normal process defined in your guide to get the updated code?

73, looking forward to getting it working again.

Paul

Paul Jay

unread,
Jan 11, 2022, 10:27:27 AM1/11/22
to Hermes-Lite
Matt

Thank you its working now, I can confirm the mic was selected and works 100%!  The QOS message also hasnt reappeared and the software seems to be performing as it should.  The only thing I will report is a slight click in the audio when listening to a long QSO I wonder if its our old friend Pulseaudio doing some buffering under the hood?

Anyway its great to get this app working again, certainly my favourite app for operating my HL2 due to its simplcity and lack of clutter.

73

Paul

Matthew

unread,
Jan 11, 2022, 5:14:37 PM1/11/22
to Hermes-Lite
The bug was a result of clumsy fingers and poor quality control on my part! Typing "sudo make install" in the directory you have compiled the program in will be sufficient to "re-install" it.

I got hold of a microphone and started an initial look at what is needed for PS tonight. A byproduct of this is that I added a compressor to the code. This can be accessed in the transmit dialog.

73 Matthew M5EVT.

Paul Jay

unread,
Jan 12, 2022, 8:03:07 AM1/12/22
to Hermes-Lite
No problem Matthew we all make mistakes I can confirm its working FB now, using it as we speak and just a couple of nice QSO's.  Regarding PS I would be very interested in how you progress with your investigations, I have been playing with it for ages and never really got it work reliably in any of the applications that support it.  I have had some success with PS on piHPSDR and had it working ok on 20M but for some reason that was the only band where I got it work, on others I got a bunch of MOXDELAY and MOXCHECK errors I cant find anywhere that states what those messages mean!  I'll be happy to help with any testing, I have modified my HL2 to have a RF TAP/Att input on RF3 as per directions on the web and have a commercial -50DB RF TAP/Attenuator which I tried to use both with my little 50W Linear.

Be great to get PS to work, that would make me remove all of the other SDR applications!

73, Paul 2E0PJY

Paul Jay

unread,
Jan 26, 2022, 12:01:03 PM1/26/22
to Hermes-Lite
Hi Matthew

Hope all is well with you, I was just wondering if you've made any progress getting PureSignal working in LinHPSDR?

On Tuesday, 11 January 2022 at 22:14:37 UTC Matthew wrote:

Matthew

unread,
Jan 26, 2022, 1:35:58 PM1/26/22
to Hermes-Lite
Hi Paul,

Yes. I created a branch and got some code working to prove I had the DSP all working correctly behind the scenes:


I can see a visible reduction of spurs with a two-tone signal with PS on/off. At the moment the adjustment of the HL2 LNA gain (feedback) during TX is not automatic and I need to work a bit more on the UI side of things - it isn't intuitive/user friendly at the moment.

Maybe in a week or two it will be in a state that I would appreciate some user testing/feedback.

73 Matthew M5EVT.

Paul Jay

unread,
Jan 27, 2022, 4:56:33 AM1/27/22
to Hermes-Lite
That sounds great Matt.

I would be more than happy to test it for you and provide some feedback.  It will be interesting to compare it to PS on piHPSDR which I have been running for a while now.

Thanks and 73
Paul 2E0PJY

Matthew

unread,
Feb 11, 2022, 2:37:55 PM2/11/22
to Hermes-Lite
Basic support for PureSignal in linHPSDR with the HL2:


It has had one other beta tester and I'm confident enough to share it with a wider audience to break it. Any issues, please raise here:


For now, it if #ifdef'ed it, so you need to un-comment the following in the Makefile:


73 Matthew M5EVT.

Paul Jay

unread,
Feb 13, 2022, 9:47:07 AM2/13/22
to Hermes-Lite
I have been running this beta version for the pas few hours and can confirm that PS is indeed working well. I have had a couple of QSO's and confirmation received that my TX audio is "very clear" which is good although I am using my studio mic setup which is good to start with.  I have not run any extensive testing really just using the software as I would for a normal session on the radio but there have been no real issues to report, the only slight thing is that I am seeing the "QOS" indicator come on much more frequently than in the previous version (I have reported this to Matt before). Nothing has changed in my setup so could be that the new version is more dependent on the network but I'll let Matt comment on that.

All in all this is very promising and I am grateful for the work that Matt M5EVT has put into this version!

73, Paul
Reply all
Reply to author
Forward
0 new messages