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.
SmartSDR API question
Answers
-
Yes. You should look into the FlexLib API It can aslo be done via direct TCP comm but more difficult. The FlexLib makes it almost simple0
-
I wrote a quick-and-dirty C program a while ago that uses the TCP/IP API to discover the radio, connect to the radio, find all slices and dump the S-meter values as they are reported by the radio. I simply output all values to the terminal for all slices. It is not cleaned up, but you are welcome to the code I wrote. It was the prototype to allow comparing the signal levels from two simultaneously connected antennas. I intend to eventually output a csv file for Excel to manipulate and plot when I'm done. Written for Debian Linux , but should work on any system supporting C and sockets. Written and tested with the latest radio software.0
-
Tom,
Unfortunately, I'm not aware of any simple "how-to" guide that would tell you what to do. I've spent the last few years learning the API and writing code to use it (but from a Mac, not a Windows PC).
You can download the source code for the API (i.e. FlexLIb) from the Flex web site. With a little programming experience I think you can find what is needed. By calling functions in the API you can make a "non-GUI" connection to the Radio and then send it commands to subscribe to meter data. The API sends commands to the Radio and receives back responses over TCP. Stream data (meters are one type of stream) is sent over UDP in Vita-49 packets. The API provides functions to make all of this happen and creates objects (meters being one type of object) that your code can interact with.
Take a look at the API source code. If you have specific questions, I would be glad to try to help.
Good luck.
0 -
Tom,
The SmartSDR client uses the API to communicate with the radio. Therefore, any function or data, such as S-Meter readings, that is available to the client, is available to any 3rd party software. As Mark stated, you can communicate with the radio directly with low-level API commands, but using the FlexLib is much easier as long as you are developing using the .NET environment. All of my programs use FlexLib.
73, Ray, K9DUR0 -
Thank you all for your suggestions. I was hoping it would be simple but evidently I really need to immerse myself in the C# FlexLib...maybe we'll have a have a big snowstorm and I'll be stuck inside for a week...73 and Aloha0
-
Tom,
If you would like to try Python, I crafted up this little ditty a few years ago. It connects to a CAT exposed serial port and reads the S meter reading for 15 seconds, and writes a reading each second to an output file. You can easily modify it to run longer.
We used this on a 6700 to read the S meter values from a drone mounted CW transmitter. It was used to characterize the antenna pattern of a receive antenna. Save this code out as a python script -- such as rssiLogger.py I don't see a "code" tag in this messaging system, so you might have to clean it up a bit. In Python, indentation is important!
Warren, KD4Z
import serial
import time
import datetime
# sample filename 'rssi_120508_171442'
basename = "rssi"
suffix = datetime.datetime.now().strftime("%y%m%d_%H%M%S")
ext = ".csv"
filename = "_".join([basename, suffix]) + ext
print "Opening file " + filename
# typical windows com0com virtual port
# port = "\\.\CNCA0"
# USB port in linux
# port ='/dev/ttyUSB1'
# change the port to a valid port on your system.
# it will be either the physical port of the radio
# is connected to, or the Virtual port exposed by virtual
# com port sharing software or Flex CAT. Be sure
# configure the port baudrate here.
ser = serial.Serial(
port='COM1',
baudrate=9600,
parity=serial.PARITY_NONE,
bytesize=serial.EIGHTBITS,
stopbits=serial.STOPBITS_ONE,
timeout = 1)
outfil = open(filename,"w")
# ZZS1
starttime = time.time()
stim = "Start at " + time.asctime(time.localtime())
print stim
outfil.write(stim)
outfil.write("
")
while time.time() - starttime < 15.0:
print time.time() - starttime
#time.sleep(2)
ser.write('SMH;')
reading = ser.read(8)
ctime = time.strftime("%H:%M:%S")
ostring = ctime + ","+ reading +"
"
outfil.write(ostring)
print(ostring)
time.sleep(1)
outfil.close()
exit()
2 -
Thanks very much for sharing this. I'll give it a try.
73 and Aloha, NH6Y0 -
Why isn't cool stuff like this not document in a magazine like QEX or something. I've been thinking of using a drone for getting antennas high up into the trees. I just received the release mechanism for it. Never thought about using it for mapping radiation patterns.
Speaking of QEX, I think I let my subscription expire.
73,
Kev K4VD1 -
Tom Flexmeter version 1.2 or 1.3beta does exactly what you want and its free, google is your friend.
0 -
[{"insert":"I am also trying to read the RX signal level via the API but I do not see a method or property in the Slice object to read the value. Would anyone know the specific method to read the RX signal level of a Slice?\nRegards to all.\n"}]0
-
I wrote a proof-of-concept VITA parser in C for the TCP/IP interface and just subscribed to the slice meter I wanted, scaled it, and ended up with dBm readings in real time. I wanted it for antenna analysis. Never did write the plotting part of it - guess I could just plug the numbers into Excel and let it do the graphing.
0 -
[{"insert":"Gotcha, that could work. I am looking to poll it briefly after a frequency change on the slice currently.\n\n"}]0
-
Here's a description that I wrote in the heading of the Meter object in my xLib6000 framework (a Mac equivalent of FlexLib)
If you want to see code take a look at the project on GitHub here https://github.com/K3TZR/xLib6000
Look in the Meter.swift file. That might help you.
73's Doug
/// Meter Class implementation
///
/// creates a Meter instance to be used by a Client to support the
/// rendering of a Meter. Meter objects are added / removed by the
/// incoming TCP messages. Meters are periodically updated by a UDP
/// stream containing multiple Meters. They are collected in the
/// meters collection on the Radio object.
///
0 -
Thanks Doug,
Will check it out for sure. Would like to roll it on MacOS as well.
Was looking at the Meters class but still trying to figure out how it operates. I have only been playing with the lib for 3 hours so I can't complain much :) Some slick stuff in there.0 -
For those who program with C#, Doug's (K3TZR) programs are written in Swift for the Mac which is quite similar and easy to port to C#. I've ported several programs Swift --> C# and C# --> Swift and for simple functions it is just adding or removing some semicolons and parentheses. My point being, if you are a C# programmer you will easily be able to understand the code written in Swift.
0
Leave a Comment
Categories
- All Categories
- 289 Community Topics
- 2.1K New Ideas
- 534 The Flea Market
- 7.5K Software
- 6K SmartSDR for Windows
- 146 SmartSDR for Maestro and M models
- 360 SmartSDR for Mac
- 249 SmartSDR for iOS
- 230 SmartSDR CAT
- 172 DAX
- 352 SmartSDR API
- 8.8K Radios and Accessories
- 7K FLEX-6000 Signature Series
- 26 FLEX-8000 Signature Series
- 850 Maestro
- 44 FlexControl
- 847 FLEX Series (Legacy) Radios
- 796 Genius Products
- 416 Power Genius XL Amplifier
- 277 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