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.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
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
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.
RadioAddedEventHandler not working ...
Gary L. Robinson
Member ✭✭
I have made four or five small form based client programs for my Flex 6400 SDR Radio with SmartSDR 2.4.9 on it. I use Microsoft Visual Studio 2017. I have always used the same simple code (below) to detect the radio and connect to it.
But this code (below) does not work now when I start making a new cllient.
The clients I already have made and are still installed (manually) STILL work with NO problems. However, if I move the program files to another folder location - they stop working.
The reason they don't work is because the API.RadioAddedEventHandler is NEVER fired. It never gets the message from the radio.
This makes me think it may be some security issue caused by Windows 10 - or It might be some changes in the latest FlexLib code that I use. I always keep up with latest FlexLib. However, it seems to me that Windows 10 is a more likely culprit.
I do NOT use ANY virus or security software - except that which Windows 10 has included with it.
Any ideas or suggestions would be welcome.
---Gary WB8ROL
----------------------------
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Flex.Smoothlake.FlexLib;
using Flex.UiWpfFramework;
using System.Net.Sockets;
using System.Net;
using System.Threading;
using System.IO;
using System.Globalization;
namespace RecSlice
{
public partial class Form1 : Form
{
public Radio curRadio = null;
public Panadapter curPanadapter = null;
public Slice curSlice = null;
public List<Radio> clientList;
public NumberFormatInfo nfi;
public Form1()
{
InitializeComponent();
nfi = new CultureInfo("en-US", false).NumberFormat;
API.RadioAdded += new API.RadioAddedEventHandler(flexRadioAdded);
API.RadioRemoved += new API.RadioRemovedEventHandler(flexRadioRemoved);
API.ProgramName = "recSlice";
API.Init();
}
void flexRadioAdded(Radio radio)
{
curRadio = radio;
if (radio.Connect())
{
radio.SliceAdded += new Flex.Smoothlake.FlexLib.Radio.SliceAddedEventHandler(radio_SliceAdded); //.SliceAddedEventHandler(radio_SliceAdded);
radio.SliceRemoved += new Radio.SliceRemovedEventHandler(radio_SliceRemoved);
radio.PanadapterAdded += new Radio.PanadapterAddedEventHandler(radio_PanadapterAdded);
radio.PanadapterRemoved += new Radio.PanadapterRemovedEventHandler(radio_PanadapterRemoved);
radio.PropertyChanged += new PropertyChangedEventHandler(radio_PropertyChanged);
}
}
void flexRadioRemoved(Radio radio)
{
}
void radio_SliceAdded(Slice slice)
{
}
void radio_SliceRemoved(Slice slice)
{
}
void radio_PanadapterAdded(Panadapter panadapter, Waterfall waterfall)
{
}
void radio_PanadapterRemoved(Panadapter panadapter)
{
}
void radio_PropertyChanged(object obj, PropertyChangedEventArgs args)
{
}
//***************
//Windows Events
//***************
private void Form1_Load(object sender, EventArgs e)
{
CheckForIllegalCrossThreadCalls = false;
}
private void Form1_Shown(object sender, EventArgs e)
{
}
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
}
private void Form1_FormClosed(object sender, FormClosedEventArgs e)
{
}
}
}
But this code (below) does not work now when I start making a new cllient.
The clients I already have made and are still installed (manually) STILL work with NO problems. However, if I move the program files to another folder location - they stop working.
The reason they don't work is because the API.RadioAddedEventHandler is NEVER fired. It never gets the message from the radio.
This makes me think it may be some security issue caused by Windows 10 - or It might be some changes in the latest FlexLib code that I use. I always keep up with latest FlexLib. However, it seems to me that Windows 10 is a more likely culprit.
I do NOT use ANY virus or security software - except that which Windows 10 has included with it.
Any ideas or suggestions would be welcome.
---Gary WB8ROL
----------------------------
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Flex.Smoothlake.FlexLib;
using Flex.UiWpfFramework;
using System.Net.Sockets;
using System.Net;
using System.Threading;
using System.IO;
using System.Globalization;
namespace RecSlice
{
public partial class Form1 : Form
{
public Radio curRadio = null;
public Panadapter curPanadapter = null;
public Slice curSlice = null;
public List<Radio> clientList;
public NumberFormatInfo nfi;
public Form1()
{
InitializeComponent();
nfi = new CultureInfo("en-US", false).NumberFormat;
API.RadioAdded += new API.RadioAddedEventHandler(flexRadioAdded);
API.RadioRemoved += new API.RadioRemovedEventHandler(flexRadioRemoved);
API.ProgramName = "recSlice";
API.Init();
}
void flexRadioAdded(Radio radio)
{
curRadio = radio;
if (radio.Connect())
{
radio.SliceAdded += new Flex.Smoothlake.FlexLib.Radio.SliceAddedEventHandler(radio_SliceAdded); //.SliceAddedEventHandler(radio_SliceAdded);
radio.SliceRemoved += new Radio.SliceRemovedEventHandler(radio_SliceRemoved);
radio.PanadapterAdded += new Radio.PanadapterAddedEventHandler(radio_PanadapterAdded);
radio.PanadapterRemoved += new Radio.PanadapterRemovedEventHandler(radio_PanadapterRemoved);
radio.PropertyChanged += new PropertyChangedEventHandler(radio_PropertyChanged);
}
}
void flexRadioRemoved(Radio radio)
{
}
void radio_SliceAdded(Slice slice)
{
}
void radio_SliceRemoved(Slice slice)
{
}
void radio_PanadapterAdded(Panadapter panadapter, Waterfall waterfall)
{
}
void radio_PanadapterRemoved(Panadapter panadapter)
{
}
void radio_PropertyChanged(object obj, PropertyChangedEventArgs args)
{
}
//***************
//Windows Events
//***************
private void Form1_Load(object sender, EventArgs e)
{
CheckForIllegalCrossThreadCalls = false;
}
private void Form1_Shown(object sender, EventArgs e)
{
}
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
}
private void Form1_FormClosed(object sender, FormClosedEventArgs e)
{
}
}
}
0
Comments
-
Check your firewall settings. If your old firewall rule was for your original app then it is for the full path.0
-
Mark,
If I had a million dollars I would send it to you!! It was the firewall! I just turned the WIndows firewall OFF - not sure if there is a more simple solution. My router firewall is good enough.
Again, thanks very much. It just makes me wish even harder that FlexLib was available on Linux hihi
---Gary!0
Leave a Comment
Categories
- All Categories
- 289 Community Topics
- 2.1K New Ideas
- 530 The Flea Market
- 7.5K Software
- 6K SmartSDR for Windows
- 146 SmartSDR for Maestro and M models
- 357 SmartSDR for Mac
- 249 SmartSDR for iOS
- 229 SmartSDR CAT
- 171 DAX
- 352 SmartSDR API
- 8.7K Radios and Accessories
- 7K FLEX-6000 Signature Series
- 20 FLEX-8000 Signature Series
- 841 Maestro
- 43 FlexControl
- 847 FLEX Series (Legacy) Radios
- 793 Genius Products
- 415 Power Genius XL Amplifier
- 277 Tuner Genius XL
- 101 Antenna Genius
- 243 Shack Infrastructure
- 166 Networking
- 404 Remote Operation (SmartLink)
- 129 Contesting
- 630 Peripherals & Station Integration
- 125 Amateur Radio Interests
- 869 Third-Party Software