SmartSDR v3.8.20 and the SmartSDR v3.8.20 Release Notes
SmartSDR v2.12.1 and the SmartSDR v2.12.1 Release Notes
Power Genius XL Utility v3.8.9 and the Power Genius XL Release Notes v3.8.9
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.
Mute API Command: Where is "audio client id"?
I am trying to format an API command to mute a slice on a specific bound client.
Where do I find, and what is the "audio client id?
I tried the "Client id", which the Flex Server assigns to bound clients, but that did not seem to work??
Alan. WA9WUD
Comments
-
Hi Alan, I think that is the slice number. I am away from my computer, but will be able to look at my code soon. I have this working, so I should be able to give you a definitive answer shortly.
0 -
Len
Thanks for taking a look when you get home.
But.....the "audio client id cannot be the slice number, as both are used in the "mute" command.
C[D]<seq_number>|audio client <id> slice <index> mute <val>
Alan
0 -
I am wrong... It looks like I always use a Client ID of 0. Regardless of which client I am bound to, if I use Client ID = 0, it always mutes the correct slice (0 or 1 in my 6400). This works regardless of whether I am in MultiFlex mode or not.
If that does not work, let me know, and I will see if I can do some more looking into how exactly this works.
0 -
I had the same result using "0" as the audio id.
I run two clients in my shack using multiplex. So, I also need to "mute" the correct client's slice.
I am hoping the "audio id" will help me mute the desired client.
Alan
0 -
Hi Alan, I don't think the Client ID is important as long as you know which slice is which. One Slice will be 0, the other will be 1. I believe that it is based on the order in which they are opened.
You can capture the Client ID for each logged in station and perhaps use that, but I have not found it necessary because the slice IDs are unique (0 or 1). I don't know if I am just getting away with something here, or if that is how it is designed to work.
On the other hand, I capture
Client IDClient Handle and bind to that ID so that profiles, memories, etc are applied to the proper client when I select them in my menu system.So to recap:
"CD45 | audio client 0 slice 0 mute 1" always mutes slice 0, regardless of which client slice 0 is tied to.
So if I connect Station-1 first and open one slice, that will be slice 0. If I then connect Station-2 and open a slice, that will be slice 1.
If I open the stations and slices in the opposite order, then the slice numbers are likewise reversed.
EDIT: I meant Client Handle, not Client ID, above.
0 -
Alan,
I took a “mental health day today and did a nice drive. Always good to clear the mind. Going to get the remnants of the hurricane so good day to work on some programming.
I will call you tomorrow and we can figure this out. As per our conversation earlier, the slice A can be any slice available in the radio, depending on which client connects first and how many slices the client uses, and order the clients are created. Slice A in client is not always radio slice 0.
I have an idea. Wire shark and bring up two slices on the Maestro. Push the B slice volume knob to mute slice A. Look at corresponding command sent.
I can check the TCP API also to see what is listed. One of my upcoming projects has to do with subbing to audio streams.
By the way, loaded Stephen’s Node Red 0.38 nodes but need to reconfigure my flow to support the MQTT style topics now.
Fun stuff!
1 -
I could not find an "audio" id to allow me to direct the mute to the bound client. None of the other ids worked, as Len also found. So, using audio id "0" for now....because it works.
Making matters more complicated, depending on which client binds first, the appropriate slice index number to use, depends.
Wanting to use my "Mute" command with my multiplex station, I used the following logic via the Flex API "sub client all" command and response, to determine the correct client and correct Flex Index:
- determine if the slice is part of the bound client by testing if "gui_client" == "slice_handle"
- if a bound slice, assign a flex index number (0>>3), based on the Flex "index_letter".
- if not a bound slice, send an empty message.
Then use the result to build the Mute API command.
audio client <id> slice <index> mute <val>
For the curious, Javascript below for Slice A. It's "ugly", but it works.
Alan. WA9WUD
===================
var gui_handle = global.get("gui_handle")
var slice_handle = global.get("slice_data.a.client_handle")
var index_letter = global.get("slice_data.a.index_letter")
var in_use = global.get("slice_data.a.in_use")
//Slice A On
if(in_use == "1"){
// Bound Client
if(slice_handle == gui_handle){
// Slice Letter A
if(index_letter == "A"){
msg.payload = "0"
}
//Slice Letter B
if(index_letter == "B"){
msg.payload = "1"
}
//Slice Letter C
if(index_letter == "C"){
msg.payload = "2"
}
//Slice Letter D
if(index_letter == "D"){
msg.payload = "3"
}
}
else{
msg.payload = ""
}
//Not Bound Client
}
else{
msg.payload = ""
}
flow.set("mute.slice_a", msg.payload)
return msg
0 -
So does your Node Red app show both slices when in MultiFlex mode?
With my gizmo, I see both. I also use the index letter in my display. If I have both slices open in the same client, I see slices A and B. If I have a slice open in each client, then they are both Slice A. Since my physical buttons always map to slices 0 and 1, it is easy to see which side will mute.
I have a 6400, so I am delinquent in handling more than two slices. It looks like you are writing code that will work with all 8 potential slices - nice!
Maybe someone will give me a 6700 so that I can write better code...
0 -
I ended up wire sharing to find the actual "mute" command. The WiKi is not correct. The actual command is:
"slice set 0 audio_mute=1"
Where the set number is the order the slice was opened. It does not matter is using multiplex, or not. Just keep track of the slice open order, and you can direct your mute to that slice.
I used the pan adapter number and the slice index to determine the slice order number.
Alan. WA9WUD
1 -
Ahhh... Well, I think I am using an older version of the command in the IW7DMH library. I need to look again to see if there is a "set" command that I missed when I responded earlier.
Thanks for the update on this.
0
Leave a Comment
Categories
- All Categories
- 260 Community Topics
- 2.1K New Ideas
- 538 The Flea Market
- 7.6K Software
- 6K SmartSDR for Windows
- 139 SmartSDR for Maestro and M models
- 368 SmartSDR for Mac
- 242 SmartSDR for iOS
- 226 SmartSDR CAT
- 175 DAX
- 345 SmartSDR API
- 8.8K Radios and Accessories
- 6.9K FLEX-6000 Signature Series
- 44 FLEX-8000 Signature Series
- 859 Maestro
- 45 FlexControl
- 849 FLEX Series (Legacy) Radios
- 807 Genius Products
- 424 Power Genius XL Amplifier
- 280 Tuner Genius XL
- 87 Antenna Genius
- 227 Shack Infrastructure
- 153 Networking
- 409 Remote Operation (SmartLink)
- 130 Contesting
- 640 Peripherals & Station Integration
- 116 Amateur Radio Interests
- 878 Third-Party Software