Welcome to the new FlexRadio Community! Please review the new Community Rules and other important new Community information on the Message Board.
If you are having a problem, please refer to the product documentation or check the Help Center for known solutions.
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.

How can I retrieve or set DAX RX stream RXgain using FLEXLIB?

Howard  K7JNX
Howard K7JNX Member ✭✭
edited January 2022 in SmartSDR API

I have a program that interacts with my 6600 using the FLEXLIB interface, but I am not able to see changes in the RXGain property of a DAXRXAudioStream object and if I change RXGain, it has no effect. I must be missing something simple.

I have a handler active for the DAXRXAudioStream PropertyChanged event and I see it entered when I create or destroy slices on the radio, noting updates for the Slice and ClientHandle properties as well as frequent updates for the BytesPerSecFromRadio property. However the RXGain property remains always at 50. 

Even if I use the SmartSDR DAX program window to move the RXGain slider for a stream from 50 to something else, I do NOT see any corresponding PropertyChanged events in my handler. And if my program updates the RXGain property it is not reflected in the SmartSDR DAX program window.

I have used Wireshark to see what happens when I change the slider from the SmartSDR DAX window and see that the TCP command being sent to the radio is e.g.

 C1 1057|audio stream 0x4000009 slice 0 gain 57

The audio stream 0x4000009 when converted to decimal does indeed match the StreamID property of my DAXRXAudioStream object as does the Slice property.

It almost looks like the actual property being manipulated is one named gain instead of RXgain as is exposed by the FLEXLIB DAXRXAudioStream object. What am I missing?

Howard, K7JNX

Answers

  • Eric-KE5DTO
    Eric-KE5DTO Administrator, FlexRadio Employee admin

    Howard,

    Because the audio stream are considered a per client object with persistence being stored in the client itself, the changes to the audio stream object are not reflected to other clients (and we typically do not reflect changes back to the client that changed a value to prevent loops).

    As such, I think what you're observing is the expected behavior of the design. Can you tell us more about what you're trying to do? Perhaps we can suggest a way to do that with the existing API or consider a change going forward.

  • Howard  K7JNX
    Howard K7JNX Member ✭✭

    Thanks for responding, Eric.

    What I'm trying to do is to automatically boost the audio gain of the appropriate DAX RX Stream from 50 to 99 when I switch the mode to CW and to change it back to 50 when the mode switches back to any other mode. (I'm using MRP40 to listen to the DAX audio stream when in CW mode and it is much happier with more audio gain.)

    Howard, K7JNX

  • Eric-KE5DTO
    Eric-KE5DTO Administrator, FlexRadio Employee admin

    I get that the changes you're trying to make are not reflected on the GUI, but have you tried sending the commands to see whether they affect the gain (even though the DAX GUI doesn't change)? I would have to revisit our rules about whether we allow other clients to change the gain for a different client's streams, but I suspect that may work even though the GUI may not change.

  • Howard  K7JNX
    Howard K7JNX Member ✭✭
    edited January 2022

    Interesting question "have you tried sending the commands", Eric.

    I don't "send commands", instead I set and get the rxgain property of the DAXRXAudioStream object. Having said that, I just now tried the experiment of toggling rxgain between 0 and 99. To my surprise (and as you suspected) I found that when I set rxgain to 0 the audio to a client program is indeed completely cut off and when I set it to 99 the audio is restored and the client can see it again. (And of course the display in the GUI does not change.)

    I can sympathize with the idea that it probably makes sense not to raise some propertychanged events of the DAXAudio streams to clients. However I'd strongly argue that it DOES make sense to return the accurate current value of a public property like rxgain to a client when the client explicitly requests it via a property get. Otherwise the published specifications for the DAXRXAudioStream are a falsehood.

    Howard, K7JNX

  • Eric-KE5DTO
    Eric-KE5DTO Administrator, FlexRadio Employee admin
    edited January 2022

    Point well taken Howard. I'll take this to our software team and we will discuss. Thanks for trying this and for the feedback. This is #J8672 for reference.

  • Howard  K7JNX
    Howard K7JNX Member ✭✭

    Thanks, Eric.

  • Howard  K7JNX
    Howard K7JNX Member ✭✭

    Two years later, what's the status of #J8672?

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.