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.

TCP/IP API commands to manipulate RIT and XIT?

n8wrl
n8wrl Member ✭✭
I would like to turn on/off and set RIT/XIT offsets via the tcp/ip API. I would have expected to find them in with the slice stuff, but no joy. How do I do this?

Thank you!

Best Answers

  • KD0RC
    KD0RC Member, Super Elmer Moderator
    Answer ✓

    Hi, they are indeed in the slice API:

    CD22 | slice s 0 rit_on=1
    CD23 | slice s 0 rit_freq=40
    

    The s is for "set" the 0 is slice 0. On is 1 off is 0. The frequency is in Hz. xit works the same way.

    The TCP/IP API Wiki really needs some work...

    Out of curiosity, what platform are you using (Node Red, Arduino, C#...)?

  • KD0RC
    KD0RC Member, Super Elmer Moderator
    Answer ✓

    Hi Tom, there is an error in the documentation. Note that the example says "C21|sub dax_channel all", but the actual command is "C21|sub dax all". Try that and you should get a good (0) response code back.

    SUB DAX
    Subscribe to changes to a specific DAX audio channel or all DAX channels.
    C[D]<seq_number>|sub dax <dax_channel|all>
    
    <dax_channel|all>  = the DAX audio channel to subscribe to or the word "all" to subscribe to all
    Example:
    C21|sub dax_channel all
    

    The SUB DAX_IQ command has the same error in the example. I did try "CD26|sub dax_iq all" and get

    R26|50001000||Command result unknown

    OK, I figured it out...

    CD26 | sub daxiq all

    The documentation calls for dax_iq, but the actual command is daxiq.

  • Alan
    Alan Member ✭✭✭✭
    Answer ✓

    Tom

    Len described how to subscribe to the status messages for a slice to get the RX DAX status from the GUI Client. Is this what you want? Len is correct, but you will need to parse the status message for the DAX elements you desire.

    Also, TX DAX is a "radio" status message, so for the TX DAX status, you need to subscribe to the radio status messages.

    On the other hand, are you asking for the commands to change the DAX settings? If so, here are the controls?

    Receive DAX; command, "slice set x dax=Y", where x (0,1,2,3) is the desired slice number, and y is the desired DAX channel, 0,1,2,3,4, where channel "0" is "off"

    Transmit DAX; command, "transmit set dax=x", where "x" is "0" for off and "1" for on.

    Alan. WA9WUD

Answers

  • n8wrl
    n8wrl Member ✭✭
    edited May 2022
    Perfect thank you!

    I am using DXLab's Commander to "reset" the radio when I click on a spot.

    I appreciate the tip - couldn't find it in the API docs...

    73!

    -Brian n8wrl
  • K1FR
    K1FR Member ✭✭

    Great info!

    Also playing around with the TCP/IP interface and wondering -- how can I subscribe to a DAX IQ channel via the interface?

    I have tried a couple of things found in the community and something Annaleise published. Think I am missing something. Thanks!

    73, Tom K1FR

  • KD0RC
    KD0RC Member, Super Elmer Moderator

    Hi Brian, I am glad that helped!

    Hi Tom, there is a sub dax and a sub dax_iq command. I have not done anything with this, so I am not a good resource for this feature.

    Here is a link to the relevant part of the Wiki:

    TCPIP sub · flexradio/smartsdr-api-docs Wiki (github.com)

  • K1FR
    K1FR Member ✭✭

    Many thanks, Len.

    I gave the DAX related sub commands a go but those also gave me the "unknown response" error code. I am thinking that the DAX commands may not actually be implemented. The other C21|sub commands, such as GPS, work fine.

    73, Tom K1FR

  • KD0RC
    KD0RC Member, Super Elmer Moderator

    Hi Tom, experiment a bit with them. There are a few commands that have either changed over time, or are just in error in the Wiki. Look at similar commands and if they have a parameter that would make sense for the command that you are trying to use, see if putting it in causes it to work.

    I will give them a try to see if I can figure out what they need.

  • K1FR
    K1FR Member ✭✭

    Len and Alan:

    Many thanks for the inputs and the time you spent sorting it out! Worked fine.

    I need to do some more exploring for sure. My goal is to be able to subscribe not only to the status messages on DAX IQ but also to subscribe to the IQ data stream. I have been recording IQ data for a HAMSci WWV experiment and was doing so by tapping it via Python's sounddevice methods via Windows sound system.

    This probably falls into the "better is the enemy of good enough" category, but would like get the data via network. I have found some good posts from Steve and Eric at Flex about doing this, so.. back to work! 😃

    Thanks again, gents.

    73, Tom K1FR

  • KD0RC
    KD0RC Member, Super Elmer Moderator

    Glad you got it working!

  • n8wrl
    n8wrl Member ✭✭
    Where do I find docs for other slice commands like rit, bandwidth, etc? These seem like options for the slice command I can't find in the wiki. Thank you!
  • KD0RC
    KD0RC Member, Super Elmer Moderator

    RIT and XIT are in slice but the Wiki is out of date. Filter parameters are in filt. You kind of have to chase through the Wiki to find what you want. I would have expected filter parms in slice as well because it is the subscription to slice that gives you access to the filter parameters.

    To find the data, I wrote a quick-n-dirty C++ program that subscribes to everything. Then I adjust the control from SmartSDR. The data that comes back will tell you how to code the command. You can see all the experimentation that I have done...

    In this case, I subscribed to slice all, then turned on the RIT and adjusted it two steps positive:


    Now I know that rit_on=1 turns on the RIT and rit_freq=nn sets the RIT frequency. Next, I use my quickie program to test it before spending time integrating it into my real program.

    I surmised from the returned data that I could also use multiple named parameters in the same command separated by spaces.

    This is not perfectly consistent, so for example, you can see that subscribing to slice gives you current filter settings, but there is no reciprocity, and you have to know to use the filt command to change filter settings.

    So, the Wiki is in real need of an update, but you can do some experimenting and get pretty accurate and useful information using this technique. What you can't really get this way is commands that are not documented at all in the Wiki and have no corresponding SmartSDR control. Learning how to command the rig into a CW key-down state from the ethernet was a real challenge!!

  • n8wrl
    n8wrl Member ✭✭
    Thanks Len, that's good stuff. As I said earlier I'm using DXLab's Commander so I can also watch how it interacts with the radio. Also looks like the .NET DLL docs are more up to date and the properties and methods listed there give me hints as to what to try. I may also hook up a putty client to the radio and manipulate as you describe. Clever, thank you!

    73

    -Brian n8wrl
  • Alan
    Alan Member ✭✭✭✭


  • KD0RC
    KD0RC Member, Super Elmer Moderator

    Hi Brian, Yes, I have also played around a bit with C# and FlexLib. Works really well in a .NET environment. I use the API directly using C++ in my Teensy board (Arduino work-alike) project. If I were to write a utility or something for use in Windows, I would certainly use C# and FLexLib.

  • Alan
    Alan Member ✭✭✭✭

    RIT: slice set x xit_freq = yyy, where x = slice number, y = frequency in KHZ

    XIT: slice set x rit_freq = yyy, where x = slice number, y = frequency in KHZ

    Panadapter Bandwidth: display pan set 0x40000001 bandwidth=0.050000 autocenter=1, where you specify the pan adapter number, bandwidth in KHZ and I also center up the display in your SDR window.

    when you open a slice, the slice message will include the pan adapter number. You need to keep track of that. They always go in sequence.

    I use Wireshark to find the commands.

    Alan. WA9WUD

  • n8wrl
    n8wrl Member ✭✭
    Good stuff, Alan. Unfortunately, using DXLab, I don't have access to the pan adapter number. Fortunately, I was able to do what I needed filter-wize with...

    filt 0 100 2500

    which selects the 2.4kHz filter, which is what I like for phone.

    filt 0 100 500

    gives me 400Hz for CW.
  • KD0RC
    KD0RC Member, Super Elmer Moderator

    Hi Alan. Slight correction... yyy = frequency in Hz, not KHz.

    I am not good at WireShark. I have gotten some info from it. but I clearly need more experience with it... I did manage to get Putty to work and can command the radio that way.

  • KD0RC
    KD0RC Member, Super Elmer Moderator

    Hi Brian, you might want to try filt 0 -200 200 to center the passband on your carrier frequency. Zoom way in on your slice in SmartSDR, then set filt 0 100 500 and compare the results to filt 0 -200 200. They are both 400 Hz wide, but the 100 500 is offset on the high side.

    When you are doing LSB filters, you need to use negative numbers to get what you are after.

  • n8wrl
    n8wrl Member ✭✭
    Thanks Len. That is interesting, and makes perfect sense. What I was after was a "match" with one of the filter buttons in SmartSDR. Didn't even think about centering the CW passband around the carrier. Thank you!

    Thanks for the tip on the negative filter numbers for LSB, hadn't accounted for that. It would be nice to be able to pick a canned filter bandwidth with the appropriate passband numbers regardless of mode. Oh well.

    Thanks again! 73

    -Brian n8wrl
  • KD0RC
    KD0RC Member, Super Elmer Moderator

    It's funny - I put a menu function in my TeensyMaestro to allow selecting any of the standard filters. Once I started using it, I find that I never choose filters that way.

    Further, I find that I rarely use the SmartSDR filter chooser either. Since I put high cut / low cut (shift / width for CW) knobs on the front panel, that is how I drive the filtering - almost exclusively.

  • n8wrl
    n8wrl Member ✭✭

    That makes sense. I'm just getting started with Flex having come from Yaesu and I'm adapting my CAT scripts from Yaesu and picking standard filter-widths is easy via Yasesu CAT, so what's what I was doing.

    Right now I'm fighting with DXLab because it doesn't like the negative filter frequencies. It likely has other filter-manipulation mechanisms I can use.

    Onward!

    73


    -Brian n8wrl

  • Alan
    Alan Member ✭✭✭✭

    Len

    I am not sure, but I thought the filter type selected in the settings menu defined the "shape or sharpness" of the low cut and high cut points???

    Alan

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.