Attenuation not working on KIWISDR2?

edited February 24 in Problems and Issues

Whatever I do, I cannot get the attenuator to attenuate on the Kiwisdr2. I tried restarting, rebooting the works. What am I missing here?

I was expecting setting this from the admin panel and it would apply to all users. I since found out that you can set it on the public interface font end. This is really confusing.

-J

Comments

  • jksjks
    edited February 24

    On the admin config tab just set the policy for users adjusting the RF attenuator. Look for the menu midway down right that says Allow RF attenuator switching by Ignore the RF attn slider at the top right of the page.

    I think I'm going to remove the admin config tab Initial values for: RF attn slider. It causes too much confusion.

  • Hi John,

    My personal view is that I think the attenuation slider setting should be an admin only adjustment, especially as it has a 30dB range. I also think it can be confusing when users can't adjust it (as per the initial post), and it currently takes up a whole tab in the main control panel

    If users could make an adjustment, it would be very easy for one user to set it to maximum attenuation, and then leave it set when they leave. Any new users would then maybe not realise what was happening and why they can only hear a very few signals.

    Perhaps having the option of an auto agc function, could be the ultimate goal, allowing most admins to not have to worry about day / night signal level variation, whilst still being able to manually set it, if that is preferred.

    Incidentally, studentkra has a working prototype auto attenuation script that may be of interest to you.

    Regards,

    Martin

  • jksjks
    edited February 24

    There is a policy for (defacto) admin only adjustment: "local connections only". And users can adjust it if the policy is set to "everyone".

    In the next release the antenna switch extension moves to the lower part of the RF tab. Kari has graciously consented to this. I have it working now. Just needs some cleaning up.

  • Sorry, my wording was unclear.

    I meant that the attenuator setting would be only accessible via the admin interface. If it is not made available to a user, it could be confusing if the control is still present, even if greyed out.

    But I now better understand, especially your decision to incorporate the antenna switch into the RF tab. That makes sense, and avoids having two browser sessions open if you wish to switch antennas whilst using another extension.

    Regards,

    Martin

  • edited February 26

    Incidentally, studentkra has a working prototype auto attenuation script that may be of interest to you.

    I will post this script here. This is just a demonstration. I will also attach a link to a short video. This python script controls an external attenuator via USB.


    https://youtu.be/2u_ReU4E4Wg

  • edited March 3

    The automatic attenuation function was constantly flashing on the KiwiSDR I was using today in IQ mode. There were glitches happening that sounded like a badly adjusted Noise Blanker but further investigation suggests that's exactly what it was... Though at this time I'm not sure why that happened - It was happening on two different demodulators that used to work fine with their NB settings. Maybe the Attn changes are causing amplitude bounce?

  • It looks like the auto Attn is indeed causing amplitude and/or phase glitches on the IQ waveform - and my NB code was trying to blank it as noise. Even with the NB disabled the glitches are still audible.

    A step change in gain ahead of the ADC is a bad idea for signal integrity. It effectively generates impulse noise sidebands across the entire ADC bandwidth on all signals present at the moment of step change (because the step change is an Amplitude Modulation).

  • jksjks
    edited March 3

    Hi Daz.

    There should be no periodic changes to the attenuator settings. There is no code that implements any sort of automatic level adjustment (although such schemes have been discussed).

    When the attn level is non-zero it is simply displayed on the right side of the S-meter (alternating with the S-meter numeric value) as a reminder that it is active.

    I think you've questioned in the past whether the current AGC code has issues or not. That code was lifted directly from Moe Wheatley's CuteSDR. It would be interesting if you repeated your experiments using a manual AGC setting (set on the main control panel, AGC tab).

  • Hi John,

    The IQ glitches appeared to be strongly correlated to when "Attn" displayed. Looking at the IQ file, there are rows of zero-valued samples occurring when the glitches happen.

    Is it perhaps from some other update to the firmware?

    In IQ mode I always run the Kiwis with the AGC threshold set high enough to avoid AGC action. Sometimes, though, signals increase over time requiring re-adjustment.

    Here is a zoomed-in view of some of these glitches in the IQ file. What do you think is causing this? NB was turned off. It happened during a portion of the signal that wasn't particularly strong.


  • jksjks
    edited March 3

    Well, I have no idea.

    Ideally, if we had binary distros (I'm still working on that), you could just try arbitrary older versions and see if the problem disappeared at some point.

    But currently the only way to diagnose this is to do extremely painful code bisection by building old versions of the code. That process takes many days depending on how many versions you have to search through.

    Did it ever not have this problem?

  • edited March 3

    I was quite distracted today, so now I'm wondering if I did something stupid - like noticing the Kiwi NB was on, then turning it off - then later thinking it was never on. So far, turning the Kiwi NB on is the only way I've found to duplicate the result - but I don't normally use it.

    I was going to compare my IQ file to Roseanna's recording from the same Kiwi, but her recordings didn't save for some reason (Vivaldi browser), and currently she can't get any Kiwi recordings to save to disk. We will check that out later.

  • To be honest the UI probably needs a better set of indicators so you can tell at a glance there is a non-normative condition (rf attn on, noise blanker/filter on, agc adjusted, squelch non-zero, etc)

  • That would be good... Otherwise you have to dig through the menus and check things, which is a bit tedious. It's easy to do a quick test on something and forget to change settings back.

    Zeroing the samples on an IQ signal probably isn't the best way to perform NB on an AM signal.. Ideally it should fill in the samples somehow for minimal discontinuity. Zeroing the data puts a big negative modulation glitch onto an AM signal.

    It may be possible to remove those glitches from the IQ file to some degree by detecting a run of zero-valued samples and replacing them with a linear interpolation between the good data points.. Maybe I'll look at that later.

  • I was going to ask you about those zeroed samples.

    A very quick look at the other blanker algorithm ("Wild" from Michael Wild, DL2FW) shows that it does some sort of reconstruction of the impulse-distorted samples: Beagle_SDR_GPS/rx/Teensy/NB_Wild.cpp. Compared to the standard blanker which just zeros them out.

  • The issue I mentioned above with the Vivaldi browser not saving KiwiSDR recordings has been identified.

    It is mentioned here:

    https://forum.vivaldi.net/topic/95927/kiwisdr-recording-functions-don-t-work-on-vivaldi/4

Sign In or Register to comment.