private void connectToReader()
        {
            try
            {
                if (!TagDataProvider.IsConnected)
                {
                    Logging.Logger.Log("INFO", "READER NOT CONNECTED");

                    if (ReaderStatus == "CONNECTED")
                    {
                        Logging.Logger.Log("INFO", "READER CHANGE FROM CONNECTED TO DISCONNECTED");
                    }

                    using (var dp = SimpleIoc.Default.GetInstance <IUnitOfWorkFactory>().CreateUnitOfWork())
                    {
                        var setting = dp.SettingsRepository.GetSettingWithDefault(BridgeSettingKeys.READER_HOST_NAME, "169.254.1.1");
                        TagDataProvider.SetHostName(setting);
                        TagDataProvider.Connect();
                        //System.Threading.Thread.Sleep(1000);
                    }
                }

                if (!TagDataProvider.IsConnected)
                {
                    ReaderStatus = "DISCONNECTED";
                }
                else
                {
                    if (ReaderStatus == "DISCONNECTED")
                    {
                        Logging.Logger.Log("INFO", "READER RE-CONNECTED");
                    }


                    ReaderStatus = "CONNECTED";
                    if (!readerTimeSet)
                    {
                        readerTimeSet = true;
                        TagDataProvider.Stop();
                        TagDataProvider.SyncReaderTime();
                        //TagDataProvider.Disconnect();
                    }
                }

                if (TagDataProvider.IsConnected && !TagDataProvider.IsSingulating())
                {
                    System.Threading.Thread.Sleep(500);

                    TagDataProvider.Start(0);

                    if (!TagDataProvider.IsSingulating())
                    {
                        TagDataProvider.Stop();
                        TagDataProvider.Disconnect();
                    }
                }
            }
            catch (Exception readerExc)
            {
                ReaderStatus = "ERROR";
                Logging.Logger.Log(readerExc);
            }
        }