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.

Possible to set Band?

First, it was not clear how to just search a single board on this forum so forgive me if this was answered. Searching for BAND generically was a fire hose.

Is it possible to send a command to the radio via the API to change the band? I have been investigating a few clients with WireShark but I did not see it. I do see frequency statements. My guess is the client programs are keeping track of their last frequency on each band and when a user selects Band, then set the frequency to the last one saved.

I hope I am missing something. I do see a report on a transmit message FROM the radio with a band number and a name but I did not see a way to do it in reverse so the client could just select a band.

Thanks - Tom NY4I

Best Answers

  • Alan
    Alan Member ✭✭✭✭
    Answer ✓

    Look at the Panadapter Commands in the WiKi

    Alan. WA9WUD


  • thomasmschaefer
    thomasmschaefer Member ✭✭
    Answer ✓

    Thanks Alan. I would have never guessed to look under the display message. Searching the api I may have seen display and ignored it since I’m not doing anything with the panadapter

    Guess I’m reading the whole thing regardless of my perceived relevance.

    Tom NY4I

  • Alan
    Alan Member ✭✭✭✭
    Answer ✓

    Frequency command goes to the slice number.

    Band command goes to the Panadapter handle number. When the band changes to the commanded band, the slice frequency will be set to the persisted value.

    Alan. WA9WUD

  • Alan
    Alan Member ✭✭✭✭
    Answer ✓

    Tom

    When you open a Panadapter, from the GUI Client, the Flex Radio will send a response, with the handle of the new Panadapter.

    Also, the sub slice status message, will show the Panadapter handle, the slice is on.

    Alan

  • Alan
    Alan Member ✭✭✭✭
    Answer ✓

    Tom

    There is a hierarchy as you bind your non-GUI Application, to a GUI client, open a Panadapter, open a slice, change a paramater on a slice.

    Adding a second dimension, when you have two GUI Clients. Each client uses up available panadapters and slices, in the order they are requested. So you end up with "out of order" panadapters and slices, on each GUI client, if not opened up in sequence.

    Back to the simple example of binding to a single client. The Flex UDP discovery broadcast will send out the names and ID number of available GUI clients. Use this to find the ID of the desired client you want to bind your non GUI client to, and send the bind command to the Flex Radio. This way, you are setting up the status messages to properly broadcast the allocation of the panadapters and slices, as a result of changes in the bound GUI Client to your non-GUI applicaiton.

    Otherwise, as Len found, the status messages can be somewhat random, as the Flex Radio does not know what GUI Client you are following.

    Alan. WA9WUD

Answers

  • thomasmschaefer
    thomasmschaefer Member ✭✭
    edited February 2022

    One more question to confirm I have this right...

    I am connecting with a socket from a contest logger. The presumption is SMartSDR or some other client is up and that is what the operator is using. So my client does not need to create its own panadapter. This is what I did: (all commands are preceded by the standard c<seq num>|)

    sub pan all

    I see in the display pan message the handle of the pan adapter. It seems to always be 0x40000000 but I am not assuming. I could do an unsub pan all I presume as I get the frequency from other subscribed messages.

    I then take that handle and change the band with the following command: display pan s 0x40000000 band=15 (for 15 meters).

    That make sense?

    I should add I did not see another command that was a query to tell me the handle of any pan adapters which is why I did the sub pan all.

    Thanks - Tom NY4I

  • There it is. I see it in the status message.

    I may start up after the guy so I needed a way to get it after the fact. the status message does the trick without the extra network overhead of the pan subscription.

    Thanks again - Tom

  • David Decoons, wo2x
    David Decoons, wo2x Member, Super Elmer Moderator

    But what happens when you have the panadapter set to 14 MHz wide? (Let’s say 6700) where you can see multiple bands?

    For logging, I take Active TX Frequency and then if between 3.5 and 4.0 MHz = 80 meters. If between 7.0 and 7.3 MHz = 40 meters, etc.

    just another way to do it.


    Dave wo2x

  • Hi Dave,

    This is more for the option in my program to do band up and band down.

    For logging, the frequency is used to calculate the band as you suggested.

    N1MM has a similar thing where a user can click on different bands and expect them to change.

    Tom NY4I

  • KD0RC
    KD0RC Member, Super Elmer Moderator

    Hi Tom, when you connect, do you do a client bind to the GUI client? If that question doesn't make sense, I will explain further. I was not doing that for the longest time on my project and got strange results.

    On another note, when you are sending the display pan commands, 0x40000000 is pan 0 and 0x40000001 is pan 1. From your comments, I wasn't sure that was known, so I thought I would mention it.

  • I was not binding to the GUI since I was just trying to follow along with the SmartSDR client running independently.

    In doing some reverse engineering, from a Wireshark trace when DXCommander starts, I see it send the following messages:

    C1|client udpport 4995
    C2|sub pan all
    C3|sub slice all
    C4|sub spot all
    C5|info
    C6|meter list
    C7|sub tx all
    C8|keepalive disable
    

    I do not care about the pan info (and do not need that for the pan handle) so of that list I was only going to subscribe to slice all, tx all and info.

    I did not think I needed to have the UDP data come back to me but is that to which you refer?

    Thanks - Tom NY4I

  • KD0RC
    KD0RC Member, Super Elmer Moderator

    Hi Tom, The SmartSDR client is the GUI client.

    This is what I get back form the radio when I connect my test program:

    S11F3BC8|client 0x263F3A7A connected local_ptt=1 client_id=E08F5BB7-F75E-4940-8352-624F0BC84106 program=SmartSDR-Win station=KD0RC⌂Big⌂Laptop

    By parsing for a string starting with "client", and (if needed) the handle, then parse that string for "client_id=", you can get the client id to bind to.

    So for my radio, this command binds the non-GUI client (my little test program) to the SmartSDR GUI client that I have running at the moment.

    CD10 | client bind client_id=E08F5BB7-F75E-4940-8352-624F0BC84106

    I do that in my TeensyMaestro so that I can have it follow whichever SmartSDR client that I want if I have two instances of SmartSDR connected simultaneously.

    I hope this makes sense...

  • KD0RC
    KD0RC Member, Super Elmer Moderator

    Sorry, forgot the UDP question...

    No, I was not talking about the UDP data. In my case, I use the UDP data to discover the radio so that I don't have to hard code anything. It just finds the first Flex 6000 on the LAN and hooks up. From that point forward, it is all TCP/IP data.

    I do not bring back audio, panadapter or waterfall info to my device, so I don't use UDP for that purpose.

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.