Welcome to the new FlexRadio Community! Please review the new Community Rules and other important new Community information on the Message Board.
Need the latest SmartSDR, Power Genius, Tuner Genius and Antenna Genius Software?
SmartSDR v3.7.4 and the SmartSDR v3.7.4 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
SmartSDR v3.7.4 and the SmartSDR v3.7.4 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
If you are having a problem, please refer to the product documentation or check the Help Center for known solutions.
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.
UDP Stream API changes
![Eric-KE5DTO](https://us.v-cdn.net/6032377/uploads/userpics/ZSATNV40OU2A/n8R4FO7DEX8YE.jpg)
Eric-KE5DTO
Administrator, FlexRadio Employee admin
As discussed in another thread (https://community.flexradio.com/flexradio/topics/smart-sdr-packet-loss), we will be changing the UDP Stream API slightly in order to help enforce the idea that each client needs it's own individual UDP port.
The way we have things setup right now, multiple clients can register the same ip/port with the radio and get streaming data (meter, display, audio, etc) sent. This can cause confusion in the clients which use the packet counts from their own stream to perform network statistics on lost packets, for example.
In order to prevent this port collision, we are headed toward making the following changes:
1. We are going to set the ExclusiveAddressUse flag on the socket we open for streaming data in FlexLib. This will prevent other processes from being able to bind to the same UDP port (on the same machine).
This means that if you have a program that assumes a port is open and only tries that port once (especially if it is using 4991), it will probably begin getting a socket error if the application is started after SmartSDR for Windows (or DAX or CAT).
Note that in FlexLib, we use logic to try the next port up (4992, then 4993, etc) until we find a port we can use.
2. We are going to change the radio logic so that a UDP port must be specified before any streaming data will come out. Today, it just sends data out on the default port (4991) if one hasn't been specified.
Note that we will also be optimizing some of the streaming data (meters, I'm looking at you) so that clients that don't need this information won't use the bandwidth unnecessarily.
3. The radio is going to check to ensure that a specified IP/port doesn't match an existing client's ip/port settings. In other words, we will enforce using different ports on the same machine at the radio.
We look forward to hearing your feedback on this from those that are using the API.
The way we have things setup right now, multiple clients can register the same ip/port with the radio and get streaming data (meter, display, audio, etc) sent. This can cause confusion in the clients which use the packet counts from their own stream to perform network statistics on lost packets, for example.
In order to prevent this port collision, we are headed toward making the following changes:
1. We are going to set the ExclusiveAddressUse flag on the socket we open for streaming data in FlexLib. This will prevent other processes from being able to bind to the same UDP port (on the same machine).
This means that if you have a program that assumes a port is open and only tries that port once (especially if it is using 4991), it will probably begin getting a socket error if the application is started after SmartSDR for Windows (or DAX or CAT).
Note that in FlexLib, we use logic to try the next port up (4992, then 4993, etc) until we find a port we can use.
2. We are going to change the radio logic so that a UDP port must be specified before any streaming data will come out. Today, it just sends data out on the default port (4991) if one hasn't been specified.
Note that we will also be optimizing some of the streaming data (meters, I'm looking at you) so that clients that don't need this information won't use the bandwidth unnecessarily.
3. The radio is going to check to ensure that a specified IP/port doesn't match an existing client's ip/port settings. In other words, we will enforce using different ports on the same machine at the radio.
We look forward to hearing your feedback on this from those that are using the API.
1
Comments
-
Hi Eric,
Thanks for engaging with us on this. The changes you are proposing won't cause me any difficulties as far as I can tell and seem very reasonable. Presumably any attempt to subscribe to UDP data streams will get an error response if client udpport has not been sent?
As a thought, could the API server send the next free UDP port to the client somehow? For example in the discovery packet/on request/on initial TCP connection? That would save a bit of messing about testing UDP ports.
73, John
0 -
We were actually going to handle it separately from the subscription logic, but that is a good question. I'll talk with the team here about that.
Unfortunately, the radio can't really give a good suggestion for which port to use since that is client specific information. This depends on the applications running and the platform on which they are being run. So that really has to be handled by the client (finding an open UDP port and claiming it by binding to it).0 -
Hmmm good point. You're right of course, the server can't know what UDP ports the client platform is using. Silly me!
0
Leave a Comment
Categories
- All Categories
- 274 Community Topics
- 2.1K New Ideas
- 513 The Flea Market
- 7.4K Software
- 6K SmartSDR for Windows
- 143 SmartSDR for Maestro and M models
- 343 SmartSDR for Mac
- 246 SmartSDR for iOS
- 228 SmartSDR CAT
- 166 DAX
- 350 SmartSDR API
- 8.7K Radios and Accessories
- 7K FLEX-6000 Signature Series
- 828 Maestro
- 43 FlexControl
- 842 FLEX Series (Legacy) Radios
- 783 Genius Products
- 412 Power Genius XL Amplifier
- 273 Tuner Genius XL
- 98 Antenna Genius
- 236 Shack Infrastructure
- 161 Networking
- 394 Remote Operation (SmartLink)
- 121 Contesting
- 612 Peripherals & Station Integration
- 122 Amateur Radio Interests
- 845 Third-Party Software