WDM-KS Buffer Latency Setting bug Topic is solved

General Info for PowerSDR KE9NS v2.8 (for the SDR-1000, Flex-1500, Flex-3000, and Flex-5000 only).
Post Reply
w2jon
Posts: 53
Joined: Sat Apr 13, 2019 10:02 am

WDM-KS Buffer Latency Setting bug

Post by w2jon »

When utilizing Windows WDM-KS driver and adjusting the Buffer Latency (ms) any value below 50,
The entered value triggers an "Invalid VAC1 Buffer Latency Value" warning window and resets the latency value to default 120ms.
(in this example I clicked the down arrow in an attempt to change it to 49)

Image

My VAC stream buffer watermark control is not enabled.
I suspect this is just an oversight in the code to check that KS is the current driver.
Perhaps the courtesy value reset function is just trying to be overly helpful even though it isn't required in this situation.
User avatar
ke9ns
Site Admin
Posts: 524
Joined: Mon Nov 05, 2018 9:38 am
Location: Illinois, North West Suburbs
Contact:

Re: WDM-KS Buffer Latency Setting bug

Post by ke9ns »

When I added the A / B configurations for VAC1, I never saved the buffer latency. I will fix it.

I stopped using WDM-KS due to the fact that only 1 program (same as ASIO drivers) can be connected to the other end of the virtual cable.
(and the Flex already uses the ASIO internally for audio)

If you accidentally open a 2nd program before closing the first, PowerSDR may crash.
So I just went back to using DirectSound and keep my latency around 100


Darrin
Creator of PowerSDR KE9NS v2.8, based on the Flex Radio PowerSDR v2.7.2 software.
Flex-5000, LDMOS and Titan Amps, G5RV, and Mosley TA-33 Junior
w2jon
Posts: 53
Joined: Sat Apr 13, 2019 10:02 am

Re: WDM-KS Buffer Latency Setting bug

Post by w2jon »

Yeah, I normally run direct sound but for VARA transactions you need super short latency times.
Vara is no fan of waiting around. I found as much as 70ms can make or break a connection..

Kind of stinks actually.

One thing that’s interesting to note, my VAC inputs and outputs while using the KS driver have no issue sharing with multiple software applications.

In this screencap I have opened FLDIgi, 2 sessions of VARAHF, WSJTX, and a CW Decoder without any halts or errors.

Image

Could be the VAC manager. I’m using the original Virtual Audio Cable (VAC) by Eugene (Evgenii) Muzychenko

He says on the site that you can have an unlimited number of Kernel Streaming clients.

Maybe it just works because it doesn't have a silly food-related name. Hihi

Thanks for checking into that.
-jon
w2jon
Posts: 53
Joined: Sat Apr 13, 2019 10:02 am

Re: WDM-KS Buffer Latency Setting bug

Post by w2jon »

Interesting..
I can see that near line 5059 clearly it is supposed to allow the change if Windows WDM-KS is the driver selected.

Code: Select all

            if (((new_driver_name != "Windows WDM-KS") && (new_driver_name != "ASIO")) && udAudioLatency2.Value < 50)
            {
                MessageBox.Show(new Form { TopMost = true }, "The VAC1 Driver type selected does not support a Buffer Latency value less than 120ms.  " +
                    "Buffer Latency values less than 120ms are only valid when using the WDM-KS VAC audio driver.\n\n" +
                    "The VAC1 Buffer Latency has been reset to the default of 120ms.  " +
                    "Make sure to save your Transmit profile to make the change persistent.",
                    "Invalid VAC1 Buffer Latency Value",
                    MessageBoxButtons.OK,
                    MessageBoxIcon.Error);

                udAudioLatency2.Value = 120;
            }
Fun trick, Both Select A and Select B need to be compliant for it to take the < 50ms value.
I tested by changing both Select A & B to "Windows WDM-KS" and it didn't bark.

Code: Select all

if (comboAudioDriver2.SelectedIndex < 0) return;
Hmm... I was asking myself, " Is the cleared Select X radio button returning 0 or -1 ?"
I'm pretty sure a clear radio button should return -1 but could it be returning 0 ???

Then I saw this bit in chkAudioEnableVAC_CheckedChanged:

Code: Select all

            if (val)
            {
                
                   if ((comboAudioDriver2.SelectedIndex < 0) && (comboAudioDriver2.Items.Count > 0)) comboAudioDriver2.SelectedIndex = 0;
                   if ((comboAudioDriver2B.SelectedIndex < 0) && (comboAudioDriver2B.Items.Count > 0)) comboAudioDriver2B.SelectedIndex = 0;
		   ...
            }
Ahh, it kinda looks like comboAudioDriver2.SelectedIndex or comboAudioDriver2B.SelectedIndex is being changed here?
If that "0" is still set when it gets to comboAudioDriver2_SelectedIndexChanged or comboAudioDriver2B_SelectedIndexChanged
I don't think it'll pass over the inactive selection.

I'm not a developer by trade,I am an infrastructure engineer but I straddle the gap and closely support our application development team.
I also haven't looked through the whole setup.cs, So I could totally be missing something here.

Without loading the whole stack on my machine and building a release I can't even try.

But It would be neat to dial the KS driver all the way down.
Just thinking out loud...Thanks for listening. hihi
User avatar
ke9ns
Site Admin
Posts: 524
Joined: Mon Nov 05, 2018 9:38 am
Location: Illinois, North West Suburbs
Contact:

Re: WDM-KS Buffer Latency Setting bug

Post by ke9ns »

I almost forgot.
Download .243
You now have a separate Buffer values for A and B VAC1
So you should be able to go down to 15msec with WDM-KS (which was the original limit)


Darrin
ke9ns
Creator of PowerSDR KE9NS v2.8, based on the Flex Radio PowerSDR v2.7.2 software.
Flex-5000, LDMOS and Titan Amps, G5RV, and Mosley TA-33 Junior
w2jon
Posts: 53
Joined: Sat Apr 13, 2019 10:02 am

Re: WDM-KS Buffer Latency Setting bug

Post by w2jon »

Thank's bud. I'll go get it now.
You're the man.
w2jon
Posts: 53
Joined: Sat Apr 13, 2019 10:02 am

Re: WDM-KS Buffer Latency Setting bug

Post by w2jon »

Okay, so it's sort of wonky now.

Out of the gate, Select A will now accept the 15ms setting!

However, it does this regardless of which driver is selected. This is probably troublesome for anything other than the WDM-KS driver.

Select B still refuses to accept anything below 50ms even if the WDM-KS driver is chosen.
The only way to get Buffer B lower than 50ms is to put the WDM-KS driver in Select A, then it allows <50 in both buffers.
Small bug.



I also noticed that the splash screen was red (probably intentional update)...
2.8.243splash.jpg
2.8.243splash.jpg (62.83 KiB) Viewed 183081 times
...and some of the fonts are a bit funky up above on the ribbon and also sprinkled about the work area. (AGC-T, AGC, RX1-VFOA buttons title, RX2 AGC dropdown text..)
2.8.243NG.jpg
2.8.243NG.jpg (334.82 KiB) Viewed 183083 times

Some are bold, Some are condensed and some and cut off.
I'm guessing something has changed in the IDE or build process.
User avatar
ke9ns
Site Admin
Posts: 524
Joined: Mon Nov 05, 2018 9:38 am
Location: Illinois, North West Suburbs
Contact:

Re: WDM-KS Buffer Latency Setting bug

Post by ke9ns »

I fixed the WDM-KS Latency limit issue for B, and also fixed the 120msec limit for MME and Directsound. They can now go down to 70msec and reset back to 120msec if you try to go below 70, and the warning will state the correct value. and fixed the font issue.
You will need to download once, and install 2 times. Repair the 2nd time.

Darrin
Creator of PowerSDR KE9NS v2.8, based on the Flex Radio PowerSDR v2.7.2 software.
Flex-5000, LDMOS and Titan Amps, G5RV, and Mosley TA-33 Junior
w2jon
Posts: 53
Joined: Sat Apr 13, 2019 10:02 am

Re: WDM-KS Buffer Latency Setting bug

Post by w2jon »

Sounds like a plan bud. I will grab the update and report back
Excellent work BTW and thanks again for all of your hard work.
w2jon
Posts: 53
Joined: Sat Apr 13, 2019 10:02 am

Re: WDM-KS Buffer Latency Setting bug  Topic is solved

Post by w2jon »

Okay got it installed and repaired.
It's working really well now.
I will do some WDM-KS testing and see how much it has improved with the new settings.
w2jon
Posts: 53
Joined: Sat Apr 13, 2019 10:02 am

Re: WDM-KS Buffer Latency Setting bug

Post by w2jon »

So far it’s a marked improvement!
The only stations I have difficulty negotiating with now are stations that are running 6k series radios.
Nothing we can do about that, so I’m gonna say this is good!
Thanks again, this is a big help. Especially for using with emcomm operations.
User avatar
ke9ns
Site Admin
Posts: 524
Joined: Mon Nov 05, 2018 9:38 am
Location: Illinois, North West Suburbs
Contact:

Re: WDM-KS Buffer Latency Setting bug

Post by ke9ns »

I was always able to connect to stations when I was running Winlink Express and "winmor wl2k"
But they deprecated "winmor" (not sure why?) so I just updated to the new version using "ardop winlink" and even installed the "Vara HF"
Everything runs and appears to work, but I cannot connect to any stations using either adrop or vara.
I guess I need to check youtube to see what im doing wrong?

Darrin
ke9ns
Creator of PowerSDR KE9NS v2.8, based on the Flex Radio PowerSDR v2.7.2 software.
Flex-5000, LDMOS and Titan Amps, G5RV, and Mosley TA-33 Junior
DH2ID
Posts: 6
Joined: Thu May 02, 2019 4:41 pm

Re: WDM-KS Buffer Latency Setting bug

Post by DH2ID »

Hi Darrin,
your TRX should key and there should be a power output if you click the red
"Tune" button in VARA HF. Also look at the TCP ports.
My Flex-3000 works fine with VAC and VSPE. I seem to have no latency problems.
Vy 73, Alex - DH2ID
User avatar
ke9ns
Site Admin
Posts: 524
Joined: Mon Nov 05, 2018 9:38 am
Location: Illinois, North West Suburbs
Contact:

Re: WDM-KS Buffer Latency Setting bug

Post by ke9ns »

I can see it transmit (and I can monitor the audio that its transmitting) and it looks and sounds fine.
The latency is not an issue either. Its immediately switching back to RX, but I never hear or see any station respond back to me.
BUT... I did not purchase the Vara HF, and I believe it has a speed limit if you dont purchase it?
So I dont know if I am limited to the slower stations, until I purchase it?
Like I said before, I never had troubles using "Winmor", so I must have some setting wrong?
I assume the TCP is correct since VARA and Winlink appear to be working together just fine.

Darrin
ke9ns
Creator of PowerSDR KE9NS v2.8, based on the Flex Radio PowerSDR v2.7.2 software.
Flex-5000, LDMOS and Titan Amps, G5RV, and Mosley TA-33 Junior
DH2ID
Posts: 6
Joined: Thu May 02, 2019 4:41 pm

Re: WDM-KS Buffer Latency Setting bug

Post by DH2ID »

Yes, the issue may be the unlicenced version of VARA.
I recommend buying the program, which is - in relation to the SCS TNCs -
not expensive. EA5HVK did a great job writing VARA, which has, as a
software TNC, many characteristics of PACTOR. VARA adapts it's modes
automatically to propagation/QSB or QRM/QRN. I am operating 3
PACTOR modems for my - and my club's - EMCOMM stations, but I like
VARA so much, that I am more and more using it for tests and EMCOMM
exercises with the German Red Cross, of which I am a member.
My main radios for EMCOMM are ICOM IC-7100/200 and 300 and a FT-991A,
though. My Flex radios Flex-1500/3000 and Flex-6500 are working fine
with PACTOR and VARA, but for EMCOMM I need easy to operate and
absolutely reliable radios.
Vy 73, Alex - DH2ID
w2jon
Posts: 53
Joined: Sat Apr 13, 2019 10:02 am

Re: WDM-KS Buffer Latency Setting bug

Post by w2jon »

VARAHF is a tough cookie when it comes to timing, but if you don’t hear any stations replying it could be conditions or the VARAHF modem isn’t working properly.

Unlicensed VARAHF will limit your max bandwidth to 2300hz .. well, and nag you on every tx.
If you are using WinLink you would select a station that matches your selected bandwidth which is commonly 2300hz anyway.
Just move the nag window off screen and leave it there.
As to why you aren’t getting any replies to WInLink connection requests can be down to several reasons.

If you want to try, Run over to https://www.varac-hamradio.com/ and grab the VarAC chat client.
Then upgrade the VARAHF modem to the new release (4.5)
You can then try to connect to live chats or simply listen for beacons on one of the QRG freqs. There is usually someone on all the time. VarAC can run 2300 but only needs 500hz so that’s the default/recommended bandwidth. (Also makes for a more friendly neighbor)
This would help you ensure that the timing is down and you have all of your settings on point.
User avatar
ke9ns
Site Admin
Posts: 524
Joined: Mon Nov 05, 2018 9:38 am
Location: Illinois, North West Suburbs
Contact:

Re: WDM-KS Buffer Latency Setting bug

Post by ke9ns »

Finally got Winlink express and Vara HF to work.

It works with both DirectSound with 90msec latency, and WDM-KS with 30msec latency
I matched the sample rate to the "voiceMeeter vaio" VAC drivers =48k, and reduced the buffer size to 512
It then started to work.
My VoiceMeeter drivers may be the culprit, but its working now.

Darrin
Creator of PowerSDR KE9NS v2.8, based on the Flex Radio PowerSDR v2.7.2 software.
Flex-5000, LDMOS and Titan Amps, G5RV, and Mosley TA-33 Junior
DH2ID
Posts: 6
Joined: Thu May 02, 2019 4:41 pm

Re: WDM-KS Buffer Latency Setting bug

Post by DH2ID »

Congrats, Darrin!
Vy 73 and merry christmas, Alex DH2ID
k3ukAndy
Posts: 1
Joined: Wed Mar 02, 2022 9:43 am

Re: WDM-KS Buffer Latency Setting bug/VARA HF

Post by k3ukAndy »

Darrin,
It has been a while since I used Winlink with my Flex 3000 but I have connect issues when I tried this weekend. Unlike you, I am transmitting AND hear the server calling me back. That is as far as I can get, no successful handshake . :?: Would you mind sharing the settings you are using? When you mentioned buffers, is that the buffer setting under the "audio" tab in set up ? I tried each possible setting but no change in the results. I have a paid version of VARA HF, so no issue related to speed limits.

Andy K3UK
User avatar
ke9ns
Site Admin
Posts: 524
Joined: Mon Nov 05, 2018 9:38 am
Location: Illinois, North West Suburbs
Contact:

Re: WDM-KS Buffer Latency Setting bug

Post by ke9ns »

Andy,

Make sure the Sample rate your using in VAC1 matches the Sample Rate you see for the Virtual audio driver your using on your PC.

For me its the Voicemeeter banana drivers. Open your windows SOUND panel. I much prefer the original "Sound" panel, so I keep a quick link on my desktop. But you can find it by searching inside windows "Control panel".

So I make sure voicemeeter "Sound" drivers (both playback and Recording) are using 2 channel, 24bit, 44100hz
I also make sure the "Levels" for all my voicemeeter drivers are set to 100

Then make sure PowerSDR VAC1 sample rate is also 44100. If you make changes, you may need to close everything and reopen.
Then adjust the PowerSDR (assuming DIGU) VAC1 RX and TX levels.
I usually keep the COMBO meter so I can always see my MIC and ALC levels. So my ALC and MIC should be close to 0db on digital TX

Darrin
Creator of PowerSDR KE9NS v2.8, based on the Flex Radio PowerSDR v2.7.2 software.
Flex-5000, LDMOS and Titan Amps, G5RV, and Mosley TA-33 Junior
Post Reply