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.

Programatically Change MIC input: ACCESSORY LINE IN/MIC

Options

Hi

I want to run a custom built voice keyer through the line in of the accessory socket. Is there a way I can change the DEFAULT Microphone INPUT from MIC to ACC to PC eg like a CAT command or a TCP command?

Something like:

Change to ACC as input

Enable PTT

Play message

Disable PTT

Change to MIC as input


Thank you for any advice.


73s

Marios

5B4WN

Best Answers

  • KD0RC
    KD0RC Member, Super Elmer Moderator
    Answer ✓
    Options

    Hi Marios, the CAT commands are too limited in their capabilities. If you look at the Wiki:

    It takes a little getting used to, but once you see how it works, you can find almost all the API commands. There are a few errors and omissions in the Wiki, but generally, everything that you need is there.

    What platform and language are you looking at using? If you are planning on using a Windows PC, the .net approach may be easier. I have a GitHub page with some sample code that might get you started.


  • Alan
    Alan Member ✭✭✭✭
    Answer ✓
    Options

    I use the command: "mic input <mic>", where "mic" can be "BAL", "MIC", "ACC", and so forth.

    Sent to the radio using TCP, port 4992.

    Alan. WA9WUD

Answers

  • KD0RC
    KD0RC Member, Super Elmer Moderator
    Options

    Hi Marios, Yes, that is possible using the Flex API. There is the native (text-based) API that can be used from just about any platform (PC, MAC, Raspberry Pi, Arduino, etc.).

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

    There is also FlexLib which is a .net wrapper that you can use from Windows. It uses the native API behind the scenes. I have absolutely no .net experience and was able to use this to write a simple utility.

    FlexLib: Class List (flexradio.com)

    You might also want to check out Node Red. Dave, WO2X and Alan, WA9WUD have put together an extensive library of Flex utilities for Node Red. The utilities use the native API.

    Don't hesitate to reach out here if you have questions, we would be happy to help.

  • Marios Nicolaou
    Options

    Hi Len

    Many thanks for your quick response. I am looking at the raw commands to do so using TCP on port 4992 after I bind to the gui client (or if there is a CAT command)

    Finding out in some threads here that there are undocumented CAT commands eg ZZDX0; for DAX off which are not in the official guide (https://edge.flexradio.com/www/uploads/20200818184953/SmartSDR-CAT-User-Guide-1.pdf) makes me hopeful that they may be something that can control the MIC input

    Unfortunately looking at those resources you have sent me (which I already looked prior to me sending my message here) I can't immediately see how to do it ie what the actual command is. Anybody knows the actual command. I could try the nodered group also but thought to try here first...

    Again thanks for your help

    73s

    Marios

  • Marios Nicolaou
    Options

    Hi Len

    PERFECT! Thank you!

    I will prototype using golang and then may try what I want in c !

    Appreciate your time to help me with finding this info!


    73s


    Marios

  • KD0RC
    KD0RC Member, Super Elmer Moderator
    Options

    Hi Marios, If you look in the code in this project, you will find a library and wrapper code in C++ for the Teensy (Arduino) environment. I think that it could be adapted for use on almost any platform. FlexRig-2.0.19 is the library written by Enzo, IW7DMH for the Arduino Due. FlexRigTeensy-2.0.19 is upgraded by me to accommodate V3.xx of the Flex software as well as supporting the Teensy board instead of the Arduino. In the Examples you will find FlexSignature and FlexSignatureTeensy. These are the wrapper code by Enzo that makes life a lot easier. There is a bit to learn about how he set things up, but once you try it, it is a really neat system.


  • Marios Nicolaou
    Options

    Thanks to both of you Len and Alan for your responses.


    I will have a play


    BW

    Marios

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.