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.

FLEX API panadapter antenna select command not working

K6HN
K6HN Member ✭✭
edited January 13 in SmartSDR API

Can anyone tell me why this API command is rejected by the radio?

C12|display pan s 0x40000001 ant=ANT1

I get this returned:

0x5000002D Bad field

Tagged:

Best Answers

  • KD0RC
    KD0RC Broomfield, COMember, Super Elmer Moderator
    Accepted Answer

    Hi Gary, it took a bit of experimentation, but I figured out:

    CD24 | display pan s 0x40000000 rxant=ANT1

    This works on panadapter 0 on my 6400. I have not figured out how to set the TX ant. I assume I need a slice param for that.

    Hopefully this helps.

  • Clay
    Clay Member ✭✭
    Accepted Answer

    Hello Gary,

    As Len has pointed out, the SmartSDR API Wiki documentation does not always match the newer versions of software. I am running Version 2 and have found that to be true.

    The method I have used to resolve the differences is to transcribe the radios TCP status messages and compare the name/value pairs with the Wiki documentation. Here is a link to my  list with one scu, one panafall and one slice receiver:

    http://ab9a.net/flex_control/6600_messages.txt

    It shows: display -> pan -> 0x40000000 -> rxant=ANT1

    This agrees with the name/value pair Len discovered.

    This system isn’t fool proof. There are name/value pairs in the list that are not settable there and are report only. And some name/value pairs that are settable there that aren’t in the Wiki documentation ie. slice rit and xit. But, comparing the list, with a little insight into the radio’s architecture:

    Ant -> SCU -> Panafall -> Slice Receiver

    And some experimentation will usually get you there.

    73,

    Clay, AB9A

Answers

  • K6HN
    K6HN Member ✭✭

    Thanks for the information and it does work with the rxant= command. I thought maybe it was a command format issue as there had to be a way to change antennas. I should have tried various combinations, but also thought maybe someone had already done that and would share their findings as you both did.

    I'll keep that list handy and refer to it if I have problems in the future. Thanks for sharing it.

    Gary

    K6HN

  • KD0RC
    KD0RC Broomfield, COMember, Super Elmer Moderator

    Hi Gary,

    Here is how you can set antennas using slice set commands instead of panadapter commands:

    CD24 | slice s 0 rxant=ANT2

    CD24 | slice s 0 txant=ANT2

    Depending on what you are doing, one may be preferrable over the other. In any case, changing the TXANT looks like it needs to be done with the slice set command.

  • K6HN
    K6HN Member ✭✭

    Hi Len,

    Thanks for the info, I was aware of those commands. I created a GUI client with a panadapter and it seems to have a separate antenna selection for the pan vs a slice. Maybe it's the way I am doing it, but it's all working well now.

  • KD0RC
    KD0RC Broomfield, COMember, Super Elmer Moderator

    Great to hear! Are you writing code for a controller like an Arduino or Pi or is this a windows app?

  • K6HN
    K6HN Member ✭✭

    Using node-red and these nodes.

    Release of node-red-contrib-flexradio nodes v1.1! — FlexRadio Community

    Node-red offers simplified programming for us non-skilled programmers. All I really need to know is basic Javascript.

  • KD0RC
    KD0RC Broomfield, COMember, Super Elmer Moderator

    Very cool!

  • K6HN
    K6HN Member ✭✭

    I found another command that isn't working for me.

    'slice list'

    I am trying to get a list of active slices in the radio.

  • KD0RC
    KD0RC Broomfield, COMember, Super Elmer Moderator

    Hi Gary, that command works. Here is the command and results:

    "CD22 | slice list"

    R22|0|0 1 | In this case, I have two slices open, 0 and 1.

    R22|0|0 | In this case, I only have one slice open, slice 0.

    R22|0|| And for completeness sake... No slices are open.

  • K6HN
    K6HN Member ✭✭
    edited January 18

    Thanks Len. I must be doing something wrong. I'll look into it.

  • Clay
    Clay Member ✭✭

    Hello Gary,

    There is another way to get the use status of a slice receiver that’s not explicitly spelled out in the API:

    Each slice has an “in_use=0/1” name value pair that it reports over the slice TCP status message. 

    If you parse and capture the “in_use=“ state, you can query each slice receiver and maintain your own list.

    73,

    Clay, AB9A

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.