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 check the Help Center for known solutions.
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.

Odd behavior with 'rfpower' and 'tunepower' tags in TX subscription message

Hello all,

I'm finally back to implementing the Flex API on my CTR2 multi-radio controller (see https://community.flexradio.com/discussion/8008383/cat-control-on-usb-cable-no-frequency-control). I'm linking to the radio via WiFi and so far I've been impressed with what I can do with the TCP/IP API.

For reference, I'm running SmartDSR Develop 2.6.2. This is a special update from Eric and the team that fixes the bug I reported in bug report J8057 and described in the link above. However, the same behavior I will describe exists in the plain-vanilla v2.6.2. I don't run v3 so I have no clue if it's in there (but I would assume it is).

I've found that the 'rfpower=' and 'tunepower=' levels in the TX subscription message don't change when the RF Power or Tune Pwr sliders are adjusted in SmartSDR, or when I change them using the 'transmit rfpower=xx' or 'transmit tunepower=xx' commands in the API. The sliders in SmartSDR follow the API commands but the levels reported in the TX subscription message do not.

The TX subscription message values DO CHANGE when I key the radio or start the ATU. I assume then that the subscription values are the 'last measured power levels' for these points.

I run into a problem when I change one or both of these values on my controller. If I don't transmit immediately after setting a new level and then adjust one of these levels on SmartSDR or do something else that causes a TX subscription message (like bypass the ATU), my controller reverts back to it's original settings - but SmartSDR still shows the new values. The TX subscription values (and my controller) will update to the new levels shown on the SmartSDR sliders once a transmission is complete.

You can see that this canbe confusing to anyone using a 3rd party controller.

Am I missing something in the API? Is there a command that will cause the TX subscription message to update to match the slider settings, or is there a way to read the slider settings directly instead of relying on the TX subscription message?

Lynn, KU7Q

Best Answer

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

    Lynn,

    What kind of client are you using to do this? If it is a non-GUI client, is it bound to GUI client? Without the binding, the radio doesn't know which set of Tune Power/RF Power to show in the status updates until the radio is put into transmit. This is because with multiFLEX, multiple clients can be connected and either could be keyed at any point. So without being bound to a particular client, it is a JIT status message that tells you the setting for the client that keyed the radio.

    Note that even though v2.x doesn't support multiFLEX, it shares the API and behaves in the same way.

Answers

  • KD0RC
    KD0RC Broomfield, COMember ✭✭✭

    Hi Lynn, I have the same problem with my "TeensyMaestro" (see my QRZ.com page). It also uses the Flex TCP/IP API and does not get updated Tune or RF power without actually going into transmit first. Everything else comes back as expected.

    Turn RF down to 25 from 26 via SSDR slider:

    SB895F69C|transmit rfpower=26 tunepower=10 am_carrier_level=100

    Click the PTT:

    SB895F69C|transmit freq=7.169700 rfpower=25 tunepower=10 tx_slice_mode=LSB hwalc_enabled=0 inhibit=0 dax=0 sb_monitor=0 mon_gain_sb=29 mon_pan_sb=50 met_in_rx=1 am_carrier_level=100 mic_selection=MIC mic_level=30 mic_boost=1 mic_bias=1 mic_acc=0 compander=1 compander_level=70 vox_enable=0 vox_level=25 vox_delay=12 speech_processor_enable=1 speech_processor_level=1 lo=200 hi=2800 tx_filter_changes_allowed=1 tx_antenna=ANT1 pitch=600 speed=30 iambic=1 iambic_mode=1 swap_paddles=0 break_in=1 break_in_delay=5 cwl_enabled=0 sidetone=1 mon_gain_cw=26 mon_pan_cw=50 synccwx=1

    73,

    Len, KD0RC

  • KD0RC
    KD0RC Broomfield, COMember ✭✭✭

    Another issue happens when you connect without SmartSDR running. All of the API commands that I use work properly except for "slice t freq". If I try to change frequency, the radio software crashes with a double-red blink pattern. Flex could not recreate the problem with the program that I sent them, so I suspect they did not set up the same conditions (i.e. no other clients connected). To get around the problem, I issue a "client gui" followed by a "client start_persistence 1". This registers me as a GUI client (which I am not, really...) allowing everything to work properly. To connect as a GUI client, I have it coded to read a button press at boot time. Means having to know that nothing else is connected when starting the TeensyMaestro. A bit of a pain, but at least I can do it now.

    Except for the RF Power only updating after I transmit, my project is done and working as I hoped. How is your CT2 project coming along?

    I forgot to mention, I am running 3.1.12.51 on a Flex 6400.

    73,

    Len

  • Lynn Hansen
    Lynn Hansen Member ✭✭

    Len,

    Sounds like you've made good progress on your project. You're a lot like me, never give up, never surrender!

    The slice tuning problem you describe sounds like the same one I had back in June. Eric created bug report J8057 and the sent me a v2.6.2 developer version to try. It cured the problem and I can now connect to the 6400 and turn around without SmartSDR running. He said the problem was also in v3.xx so maybe he can send you a copy of v3 to test with. The fix is supposed to make it into the next maintenance release.

    CTR2 is coming along great. When I respun the board I threw in the Teensy 4.1 with audio adapter instead of the 4.0. That gave me access to all 8 serial ports, a proper USB host port, and an Ethernet PHY. So much power! I submitted an article on it to ARRL and they accepted it for publication in QEX. They haven't said which issue it's scheduled for yet, but where QEX is only published bi-monthly I wouldn't expect to see it till the later part of 2021.

    I just started working on the Flex interface. It has a separate property page since it does things other radio's don't. It's no where done yet, I'm still playing with it. Here's a photo of the current page. To be compatible with other radios I'm using the analog audio from the DE-15 connector on the back of the radio and do my own Tx/Rx DSP audio processing on the Teensy so I don't need access to those features here. This way it 'looks and feels' like every other radio in my fleet. The code will create Slice A if one doesn't exist (SmartSDR isn't running), or it will just use the existing slice if it is. You have the option of leaving the slice open when you disconnect CTR2 so youi can still use SmartSDR, or closing it if you're running headless.

    Another feature of CTR2 is that it controls up to 16 radios. Here's a screen shot of the Select Radio page with the radios I currently use. Every radio has it's own database for settings and they all can access a common shared database. Again, the idea is to give you a common interface to all of your radios. I've also design an automatic switch that will connect the selected radio to CTR2 (instead of using manual RJ45 switches). You just have to select it from this page... and I have parts to build an antenna switcher that will follow the radio switch. I have a new QCX-mini on order that will join the QRP stable soon. So many possibilities!


    73's,

    Lynn, KU7Q

  • KD0RC
    KD0RC Broomfield, COMember ✭✭✭

    Wow, very impressive!! The audio board is great and the GUI tool that Paul created to hook the functionality together is fantastic. Guys are building SDR radios from that library. Next thing for me to figure out is how to connect to my radio remotely. I am leaning towards trying a VPN solution, but would prefer to use SmartLink. I got some SmartLink info, but don't understand it... In the meantime, I am really enjoying the TeensyMaestro.

    I will reach out to Eric. It would be nice if I could get rid of my goofy work-around.

    73 & good luck with your proect,

    Len

  • Lynn Hansen
    Lynn Hansen Member ✭✭

    Len,

    I downgraded SmartSDR back to the standard v2.6.2 distro and the lockup problem I described earlier returned. As soon as I sent the slice tune command when trying to connect without SmartSDR running, it locked up. I upgraded back to the v2.6.2 developer version and can successfully create a slice and tune with SmartSDR offline.

    One interesting thing, which relates to the power problem I wrote about above, when I first connect without SmartSDR running, both the RF power and the Tune power are set to 0. I have to manually enter the power levels to use AND hit the ATU to store them. Once that's done, it works like a charm. I'm thinking I probably need to play with the persistence options.

    Fun times,

    Lynn, KU7Q

  • Lynn Hansen
    Lynn Hansen Member ✭✭

    Eric,

    That makes perfect sense. I honestly don't know the difference between a GUI and non-GUI interface. My program connects to IP port 4992 and interrogates the radio using the TCP/IP API. It's a lot like KD0RC's TeensyMaestro app.

    I'm not binding to a GUI client. I read the Client Bind topic in the API and it didn't make a lot of sense to me (I have a thick skull). It refers to a <User ID> and gives an example command. I couldn't find anything that tells me where I find the User ID this command needs. I tried the using handle provided by the API for my connection but it didn't like it.

    Any direction in finding the User ID would be helpful.

    Lynn, KU7Q

  • Alan
    Alan Member ✭✭✭

    Lynn

    If you hover over the radio on the SDR sign in screen, you will see the user ID of that client.

    Here is a link to the API Wiki, Client section:

    Not sure if it helps as you must have a GUI client attached to the Flex Server for a non-GUI client to work, but, here is a command I used to first bind to my Maestro and then send a "Tune" command:

    C173|client bind client_id=CC9EB661-B18E-4CE8-A9A1-DAD17776F3CB\r\n C173|transmit tune 1\r\n

    Alan. WA9WUD

  • KD0RC
    KD0RC Broomfield, COMember ✭✭✭

    Hi Alan, my project (TeensyMaestro) does not do a GUI bind (normally). I just connect to the radio (6400) and can control both the A and B slices concurrently with SmartSDR. If the slice A freq moves via a mouse move in SSDR, my box reflects it. If I turn my VFO A knob, the SSDR slice A moves accordingly. Since I am not bringing back panadapter/waterfall info or audio, I am not a GUI client.

    Lynn and I are using non-GUI clients which gives us some advantages in terms of operating as a "parallel" interface to the radio. Whatever happens in the GUI client happens in our non-GUI clients.

    At the moment, there is a defect in the API, so the TeensyMaestro cannot be connected to the Flex without a GUI client (like SSDR) being connected. As a work-around, if I want to connect standalone (which is unusual), I do a client bind. If I do a client bind, then open SSDR, I am in "MultiFlex" mode. While I can see both slices, I am no longer operating the TeensyMaestro in parallel with SSDR. It is as if I have a Maestro and a laptop hooked up at the same time, each seeing its own slice.

    Sorry if that does not make sense. I can see this very clearly, but I have a hard time explaining it... 🙂

    73,

    Len, KD0RC

  • Alan
    Alan Member ✭✭✭

    Len

    Thanks for the explanation.

    We have different "use cases". In my use case, I am supplementing with additional functions, not replacing the GUI client.

    I understand your case is to duplicate the functionality and not rely on bound client.

    Both worthy projects, but different in objectives.

    Alan WA9WUD

  • Lynn Hansen
    Lynn Hansen Member ✭✭

    Alan,

    When I hover over the radio in the SmartSDR I see the radio's SN, Radio ID (looks like it's MAC address), it's IP address, # of connected users, and the firmware version (I'm running 2.6.2.267, the developer version Eric provided that fixes the crash bug when I connect without the GUI running). I can now connect to, and control the radio without binding to the GUI. Other that the two API power level issues, it works great. Like Len, I don't use the UDP streaming data on my HMI.

    I did find what looks like a SmartSDR-Win ID (in the same format as the one you show) when I hover over the Station in the DAX Control Panel so I can try binding to that client. I'm not sure what that gives me, since I, like Len, want to run the Flex and my HMI in parallel. The way it's working now, I can connect to the radio without SSDR and control it. I'll try it out and report back.

    Thanks for your help,

    Lynn, KU7Q

  • Lynn Hansen
    Lynn Hansen Member ✭✭

    Alan,

    Yes, different use cases. In both you and Len's case (and I imagine about everyone else out there) the idea is to have a separate controller specific to Flex that supplements SmartSDR with additional hardware controls of software options.

    In my case, my controller (CTR2) is designed to work with just about any radio out there, from an old boat anchor to the Flex, so it's somewhat limited to the most common tasks like frequency and mode control (if the radio has a CAT port), CW and RTTY keyers/decoders, and audio processing. It uses analog audio from the speaker/mic or line-in/line-out, depending on the radio, and adds DSP and FFT features to these radios. It also provides USB audio and serial control towards the PC, so all of my radios are compatible with digital apps and they all look like a Kenwood TS2000 to the apps. Another nice feature is that since my Flex is in the basement, I have direct key and PTT inputs to it through my remote interface which means I can key the radio directly either from CTR2's keyer, the keyer in the radio (using Bypass mode in CTR2), or from a straight key (i.e. CWX is not required). Admittedly, trying to shoehorn a Flex into such a restricted environment is a challenge, which oddly, is exactly why I'm doing it :) Besides, every once in a while, I just want to operate a radio, not a computer.

    Lynn, KU7Q

  • KD0RC
    KD0RC Broomfield, COMember ✭✭✭

    Well Alan, you got me thinking... I just opened SSDR on one computer, Then opened SSDR on a second computer (MultiFlex). My TeensyMaestro shows both slices, one from each computer. My slice A controls operate the first computer and slice B controls operate the other. I did not even think of this scenario when I built this thing! I don't imagine that I will ever use it this way, but it is fun to see it work.

    I built this thing to control slice A and B only, but a pair of them could conceivably control all four slices of a 6600. I guess as soon as someone donates a 6600, I will make the code changes...

    73,

    Len

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.