SmartSDR v3.4.23 and the SmartSDR v3.4.23 Release Notes | SmartSDR v2.9.1 and the SmartSDR v2.9.1 Release Notes
SmartSDR v1.12.1 and the SmartSDR v1.12.1 Release Notes
Power Genius XL Utility v3.7.32 and the Power Genius XL Release Notes v3.7.32
Tuner Genius XL Utility v1.1.16 and the Tuner Genius XL Release Notes v1.1.16
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.
Do I need to send keep alive to use the API
Maybe this is a **** question I have read cover to cover several times the fine book API Primer by G3WGV. I am having a connection issue and want to make sure I am not missing something. In the Radio.cs there is a routine that can be called by Send Command("keep alive enable") is this something that I need to send to the radio on a regular basis so that it does not ignore my connection once I am connected?
Excuse my ignorance but I am dealing with some in consistencies after I connect regarding sending commands to the radio. It is either due to a firewall issue or the radio no longer wishing to talk to me. I am leaning to a firewall issue since as long as I run the application within the IDE there is no issue but if I try to run it stand alone not within the IDE it works sometimes and sometimes it does not work.
I have no issue getting the discovery packets and decoding them, parsing the info then connecting to the radio using that information within the IDE however outside the IDE I can obtain the discovery packets, get the information from those then about every other time I can establish a connection with the radio successfully while within the IDE it connects everytime.
I am using Win 7 and turning the firewall off has not seemed to have any effect.
I remembered seeing keep alive and was thinking that maybe I need to generate this at a specific interval to maintain the connection.
Thanks in advance.
John G3WGV Member ✭✭No, you don't need to send any sort of keep-alive to keep the TCP connection going.
There is a ping command (no parameters), which you can use to check latency and, if you are on an unreliable link (perhaps a WAN) then you might use the ping to detect that the radio has gone away (as opposed to simply disconnected, which will create a TCP/IP event). Any other command would have the same effect though, so I am not sure what benefit ping brings to the API.
I coded the option to ping the radio into my API library after 20s of inactivity. I find that I do not use it in practice.
73, John, G3WGV
Thanks I have other issues then.0
Doug - K3TZR MemberWayne,
If you send the Radio a "keepalive enable" command (note that "keepalive" is one word) then you must send a "ping" command periodically (every second or so) otherwise the Radio will timeout the connection.
If you don't send the "keepalive enable" then you do not need to send the "ping" commands.
I see that you referenced the API Primer by G3WGV. If I recall correctly, G3WGV coded a "tester" for the Flex API that runs in Windows. You might want to reach out to him to obtain a copy. The "tester" that I built (unfortunately for you, only runs on the Mac) has been very helpful to me in learning more about the API.0
John G3WGV Member ✭✭Ah yes, Doug, I had it in the back of my mind that there was some sort of keepalive option but I don't think Wayne has set that. Thanks for the reminder. Wayne: see here for information.
As is the way of these things the tester to which you refer has fallen out of use/maintenance since I got my API library working but I do still have the code and it would not be a big job to update it. The source code might be useful too, although it's written in Delphi, which is perhaps not as mainstream as it deserves to be.
John WA7UAR Member ✭✭✭Hi Doug, is it possible to get a copy of your Mac API “tester” for the Flex? My email is available on QRZ. Thanks!0
No keep alive being used. Found my issue was misplacement of a subroutine interferring with the packet processing I was doing0
Leave a Comment
- 20.1K All Categories
- 186 Community Topics
- 2K New Ideas
- 387 The Flea Market
- 6.7K Software
- 5.6K SmartSDR for Windows
- 109 SmartSDR for Maestro and M models
- 275 SmartSDR for Mac
- 210 SmartSDR for iOS
- 208 SmartSDR CAT
- 141 DAX
- 332 SmartSDR API
- 8.2K Radios and Accessories
- 6.7K FLEX-6000 Signature Series
- 678 Maestro
- 37 FlexControl
- 806 FLEX Series (Legacy) Radios
- 573 Genius Products
- 322 Power Genius XL Amplifier
- 208 Tuner Genius XL
- 43 Antenna Genius
- 168 Shack Infrastructure
- 108 Networking
- 284 Remote Operation (SmartLink)
- 109 Contesting
- 449 Peripherals & Station Integration
- 105 Amateur Radio Interests
- 719 Third-Party Software