SmartSDR v3.8.19 and the SmartSDR v3.8.19 Release Notes | SmartSDR v2.12.1 and the SmartSDR v2.12.1 Release Notes
SmartSDR v1.12.1 and the SmartSDR v1.12.1 Release Notes
Power Genius XL Utility v3.8.8 and the Power Genius XL Release Notes v3.8.8
Tuner Genius XL Utility v1.2.11 and the Tuner Genius XL Release Notes v1.2.11
Antenna Genius Utility v4.1.8
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.
Need help on Flex control with an Arduino or Teensy.
I have all types of micro hardware lying around and want to put them to use.
I would like to have access to things like the items below to start.
Read and set modes.
SWR reading.
Mic gain.
AGC level.
Set power levels.
Read S-meter.
Read Freq. per Slice.
Set Freq and step control with the ability to increment or decrement to new freqs.
Answers
-
Hi Kev, I did build just such a project. You can follow along on the Flex Community, TeensyMaestro thread:
The project itself is on GitHub where you will find a User Manual, Bill Of Materials, schematic and other supporting material:
Additional pictures and project history can be found on my QRZ page.
The source code and Flex API library are available on GitHub so that you can make it the way you want. I set things up so that you only need to include the controls that you are interested in without re-compiling. I also provide the .hex file and loader so that you can load the firmware without even opening any of the source or having the Arduino IDE.
A critical component (at least for me...) was the Arduino library of Flex API commands that Enzo, IW7DMH built. I upgraded it very slightly to work with V 3 of SmartSDR and to add a few features of my own. If you elect to roll your own, I recommend starting with this library and the program called FlexSignatureTeensy.ino. This forms the basis for all the functionality that I used in my project. FlexSignature.ino is also included in case you want to build an Arduino version.
I based my design on the Teensy 4.1 board from PJRC. Other Teensy boards have more than enough power, but the 4.1 has built-in ethernet and over 40 GPIO pins (I used them all...).
0 -
Thank you for your links. I was looking through your program on Github seems pretty involved. In your examples you have several files. Which one was your final project? Do you have any examples of simple calls to the Flex to get started. Something as simple as reading an S-meter and freq in the controller. Your design is nice. I think I need to try to break it apart in small pieces so I can build my understanding of the communication and programming structure. Is there any small examples?0
-
Hi Kev, The final project is in the release section of GitHub:
The FlexSignatureTeensy.ino program looks complicated but makes using the API much easier. Here is a quick test program I did that uses the IW7DMH library (FlexRigTeensy.h) but not FlexSignature.ino.
Here is a link to the Flex API Wiki. It has a few errors and omissions but is largely good. This shows you the format of the API commands and gives you a good idea of what is available. The Flex API is very complete; it is what Flex used to create SmartSDR. If SmartSDR can do something, then your program can too.
Home · flexradio/smartsdr-api-docs Wiki (github.com)
Using the FlexRigTeensy.h library makes everything much, much easier. It looks daunting at first, but once you see the magic in what Enzo did, it becomes your friend very quickly. Same goes for the FlexSignatureTeensy program (I guess you would call it a wrapper...). Once you see how the events work, it makes things an order of magnitude easier than just the library. If you start with FlexSignatureTeensy and a few Serial.print statements to look at freq, volume, AGC-T and that kind of thing, you will start to understand how it all fits together.
One complication that you need to deal with is the concept of binding a non GUI-Client (like the TeensyMaestro) to a GUI-Client (like SmartSDR). Certain things just won't work right without this. Once you get past understanding the command structure and the text-based communications (e.g. read or change freq on a slice), then you can tackle binding to the GUI-Client.
You mentioned Teensy in the thread title; do you by any chance have a Teensy 4.1 with the ethernet cable and jack? If so, you can load the .hex file, then use putty or something to look at the serial output from the Teensy. You will be able to see the debugging commands that I have in there. If you compile it, you can use the serial monitor in the Arduino IDE. You will have to have the Teensyduino add-in, which I am guessing that you already do.
The approach that Phil, VK4KW is taking is to build the TeensyMaestro as-is, then change the items that he wants to change. So far, he has a working unit, and his next step is to move things around on the display and add some functionality that suits his operation. I am currently cleaning up the code to make this easier. Should be released this weekend or sometime next week.
0 -
Len,
Yes I have a Teensy 4.1. I just ordered an RJ45 ethernet breakout for it for a couple bucks. I really appreciate all the information. I guess once I get started I will probably have several questions. My goal is to have the teensy connect to the flex and get some band information and readings. I also want to incorporate my tuner and electronic coax switch into the mix so I can eventually control everything remotely with minimal cost. Should be a fun project.
Thanks Kevin0 -
Hi Kevin, here is a quick program that I put together for the Tampa Amateur Radio Club. It has some of the features that you mention and may be a good starting point. Hopefully this will give you some insight as to how this all works.
/* FlexAntDisconnector Len Koppl, KDØRC 08/29/220 Teensy 4.1 (with built-in Ethernet) Built for Lu Romero, W4LT to be used with his club station. This connects to a Flex and checks for the presence of a logged-in GUI-client. A NPN switch can be jumpered to pin 33 and used to drive an antenna disconnect relay. */
Since I wrote the top of program comments, I added code to change bandpass filters based on band. I made them configurable active high or active low (see Config.ini file, below). I also stole the capability to put spots on the SmartSDR screen from the TeensyMaestro project.
This does not use the FlexSignatureTeensy.ino program, but I did import some key routines from there (they start with G06_ through G12_) to make this easier to implement.
Here is the config.ini file. Rename it Config.ini. I had to give it a txt extension to get it to post here.
Hopefully this will help.
0 -
Hi Len,
Thank you so much for all the information and pointing me in the right direction. I will start checking out all the information you have provided this weekend. I think this will keep me busy for a bit.
Kevin0
Leave a Comment
Categories
- All Categories
- 289 Community Topics
- 2.1K New Ideas
- 536 The Flea Market
- 7.5K Software
- 6K SmartSDR for Windows
- 146 SmartSDR for Maestro and M models
- 360 SmartSDR for Mac
- 250 SmartSDR for iOS
- 231 SmartSDR CAT
- 172 DAX
- 353 SmartSDR API
- 8.8K Radios and Accessories
- 7K FLEX-6000 Signature Series
- 29 FLEX-8000 Signature Series
- 851 Maestro
- 44 FlexControl
- 847 FLEX Series (Legacy) Radios
- 799 Genius Products
- 417 Power Genius XL Amplifier
- 279 Tuner Genius XL
- 103 Antenna Genius
- 243 Shack Infrastructure
- 166 Networking
- 404 Remote Operation (SmartLink)
- 130 Contesting
- 631 Peripherals & Station Integration
- 125 Amateur Radio Interests
- 870 Third-Party Software