SmartSDR v4.0.1 and the SmartSDR v4.0.1 Release Notes
SmartSDR v3.10.15 and the SmartSDR v3.10.15 Release Notes
The latest 4O3A Genius Product Software and Firmware
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.
Mute Status When Using The API
I now have the "Mute" API command working, including multiplex.
Next, I want to use the "audio_mute" Flex Message, from the slice subscription, to show the current "Mute" status.
Here is the question.
When I change the mute status, on a slice, from a "GUI client", I received the "audio_mute" status on the "Non GUI Client's, slice subscription......good
When I command a mute status change, on a slice, from a "Non GUI Client, using the API command, I do not receive the "audio_mute" message, on that same "Non GUI Client's slice subscription......not good.
Interesting, when I command a mute status change, on a slice, from a different "Non GUI Client, and look for the "audio_mute" message on a different "Non GUI Client's slice message, I do get the response......good.
To eliminate any errors in the Non-GUI clients, I reversed the device issuing the command and the device listening for the slice subscription response, and got the same response / "non-response" pattern.
Has anyone seen this before? Are there other ways to get "mute" status? Is this a bug?
Alan. WA9WUD
Best Answers
-
Alan,
Subscriptions allow you to receive a notification when attributes on objects, like a slice, are changed by other clients so you can track the state. Since you own the client making the change, it is assumed you will update your local state to reflect the change(s) you made, provided, of course, you receive a SUCCESS result from your command.
If your code is asynchronous (I suspect it is), you will need to track what you send and match the response. The good news is that the decimal number immediately after the command prefix's C (or CD) is returned in the response (R) prefix.
73,
Dan
0 -
Thanks, Dan
I was looking for a response to confirm the mute status change. Understand I should look at the command, "success", response rather than the slice subscription attribute change, and build my own local state.
Good explanation.
Alan
0
Answers
-
Alan, can you please supply the set of API commands you use to create the Non-Gui client? Please include any subscription commands as well.
73,
Dan
0 -
Hi Dan. Thanks for taking a look. Sure.
For subscribing to the slice messages I use, "sub slice all"
I command the mute with , "slice set <number> audio_mute=<1or 0>"
To bind the non-GUI client to the GUI Client, I use, "client bind client_id=<big number>"
Alan. WA9WUD
0 -
Hi Alan,
This is one shortcoming of Stephen’s new nodes. He filters out the success/failure response and you do not know the sequential number to look for.
Dave wo2x
0 -
Dave,
Just saw this. The success or failure codes are there on the flexradio-request node along with any response message. It just gets complicated when you send multiple commands into the same request node. You will need to determine which one goes with which.
…perhaps some form of tagging mechanism, e.g. pass along a topic or other message attribute from input (request) to output (response). Right now I do pass along the formatted request to the output, but I can see where an extra tag might be helpful.
Stephen
0 -
I solved this problem.
Stephen includes the "sent" command, in the Flex response (msg.request), along with the associated "success/failure" code (msg.status_code) response from the Flex Radio Server.
My solution was to match up the command I sent, with Flex Request Node's Response JSON object, with the same "msg.request". If the same JSON object has a "msg.status_code" == 0 (success), I update that variables value in the Non-GUI variable's context, with whatever the Non-GUI client commanded the GUI-Client.
Really, same as matching the "C" with the "R", if they were both available.
Alan. WA9WUD
0
Leave a Comment
Categories
- All Categories
- 363 Community Topics
- 2.1K New Ideas
- 624 The Flea Market
- 8.1K Software
- 69 SmartSDR+
- 6.4K SmartSDR for Windows
- 182 SmartSDR for Maestro and M models
- 420 SmartSDR for Mac
- 270 SmartSDR for iOS
- 253 SmartSDR CAT
- 188 DAX
- 379 SmartSDR API
- 9.3K Radios and Accessories
- 30 Aurora
- 233 FLEX-8000 Signature Series
- 7.2K FLEX-6000 Signature Series
- 932 Maestro
- 53 FlexControl
- 863 FLEX Series (Legacy) Radios
- 909 Genius Products
- 460 Power Genius XL Amplifier
- 329 Tuner Genius XL
- 120 Antenna Genius
- 291 Shack Infrastructure
- 204 Networking
- 447 Remote Operation (SmartLink)
- 142 Contesting
- 771 Peripherals & Station Integration
- 139 Amateur Radio Interests
- 989 Third-Party Software


