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.

Is there an API for controlling a USB Bit cable as stand alone Digital Outputs?

jlag
jlag Member ✭✭

I would like to use a bit cable as DOs to control various equipment in the shack. There doesn't seem to be a way in SmartSDR to do this as the cables appear rigidly mapped to a selection of triggers.

I little window in SmartSDR to simply control the levels of a cable would allow a lot of functionality within the realm of SmartSDR, but I do understand that resources are limited in the radio.

Is there an API to control the levels of the individual pins on a USB Bit cable via FlexLib?

Best Answer

  • KD0RC
    KD0RC Member, Super Elmer Moderator
    Answer ✓

    I don't know of such a command in the API. If you are writing code anyway, your own bit cable from the controlling PC may be the way to go.

    Another approach is to use an Arduino, Raspberry Pi or Teensy board to control the external equipment. It is fairly straightforward to use any of these devices to communicate with the Flex 6000 series radios using the API.

    What equipment are you trying to control? Are you making control decisions based on frequency, mode or something else?

Answers

  • Alan
    Alan Member ✭✭✭✭

    Jiag

    The Flex API communicate to/from the Flex Radio via TCP, ethernet.

    Using Flex API commands, via TCP, you can configure and turn off/on the USB cables.

    If you need a specific Flex Radio variable, via a serial USB connection, you could code a application to bridge from TCP to Serial.

    Alan. WA9WUD

  • jlag
    jlag Member ✭✭

    Thank you Alan and Len.

    Alan, I did see the API to allow on/off and configure but not an API to control the individual pins which is what i am looking for.

    Len, nothing I am controlling is related to radio settings (frequency, mode, etc.) and the controlling PC is not present at the radio location. Some examples for control are a remote trans-match and an antenna switch. If the FlexLib cannot do this I could surely do it with an ESP32 or Arduino but it would be very nice to have SmartSDR via the radio itself be able to toggle lines on the bit cable. It would enable a tremendous amount of station control without using additional apps and HW.

    Cheers to all,

    John L.

  • KD0RC
    KD0RC Member, Super Elmer Moderator

    Hi John, another choice is one of the WiFi remote switches. I found a cheap ($20 USD) 4-channel WiFi switch on Amazon and use one channel to power my Flex 6400 up or down using the Remote On jack. The other three channels choose among 3 antennas.

    It has buttons so that when I am home, I just use the buttons. When I am operating remotely, I use the supplied app (eweLink) on my phone.

    It was very easy to set up and didn't require any programming on my part.

    I'm not at my computer right now, so I don't have the Amazon link, but I can send it later today if you are interested.

  • jlag
    jlag Member ✭✭

    Thanks Len,

    I would be interested in the link for the WiFi relay when you have a chance. I do have a 16 channel USB board here that I was thinking of connecting to an ESP32 running in USB host mode and building a WiFi UI for it on the controller.

    The board you are suggesting does sound a bit more economical though.

    John L.

  • jlag
    jlag Member ✭✭

    Thank you Len,

    I saw some of these (without the enclosure, the enclosure is certainly a bonus) but I was skeptical regarding the timed MC 'inching' feature. However, the timed MC actually looks very useful after I took the time to actually read the description. Going to give it a try.

    Regards,

    John L.

  • KD0RC
    KD0RC Member, Super Elmer Moderator

    Sounds good John. I have had mine for a couple of years, and it has been trouble free. The Android eWeLink software works great. I set up 5 scenes:

    Flex 6400 ON

    Flex 6400 OFF

    80 M sloper

    Zepp

    Beam

    The three antennas are set up so that if I select one, the other two are un-selected. If I press the buttons on the box, I have to manually unselect any other antennas that are selected.

  • jlag
    jlag Member ✭✭

    Sounds like you probably use the smart phone app even when the box is next to you :)

    Now I just need some digital inputs so I can read the status of the PA.

    Thanks for all your help Len.

    Regards,

    John L.

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.