public static Task <List <string> > FindPorts()
        {
            return(Task.Run(async() =>
            {
                var testedPorts = new List <string>();

                var portNames = SerialPort.GetPortNames();
                foreach (var portName in portNames)
                {
                    var device = new NTIXL2MeterReader(portName, 1500);
                    if (await device.testDevice())
                    {
                        testedPorts.Add(portName);
                    }
                }
                return testedPorts;
            }));
        }
        public static Task<List<string>> FindPorts()
        {
            return Task.Run(async () =>
            {
                var testedPorts = new List<string>();

                var portNames = SerialPort.GetPortNames();
                foreach (var portName in portNames)
                {
                    var device = new NTIXL2MeterReader(portName, 1500);
                    if (await device.testDevice())
                    {
                        testedPorts.Add(portName);
                    }
                }
                return testedPorts;
            });
        }