/**
         * set Antenna Mode
         *
         * @param	string	value
         */
        public void setAntennaMode(string value)
        {
            if (checkLogin().Equals(false))
            {
                return;
            }

            string response = sendEnryptedRequest("data/lteinfo.json", string.Concat("mode_select=", value));

            if (response.IsNullOrEmpty())
            {
                return;
            }
            try
            {
                LteInfoModel obj = JsonConvert.DeserializeObject <LteInfoModel>(response);

                string antenna_mode;
                if (obj.antenna_mode.Equals("Antennal set to internal"))
                {
                    antenna_mode = "Inner";
                }
                else if (obj.antenna_mode.Equals("Antennal set to external"))
                {
                    antenna_mode = "Outer";
                }
                else
                {
                    antenna_mode = "Auto";
                }

                if (antenna_mode.Equals(value))
                {
                    new Thread(() => { MessageBox.Show("Antennen Modus geändert", "Confirmation", MessageBoxButton.OK, MessageBoxImage.Information); }).Start();
                }
                else
                {
                    new Thread(() => { MessageBox.Show("Antennen Modus ändern Fehlgeschlagen", "Confirmation", MessageBoxButton.OK, MessageBoxImage.Error); }).Start();
                }

                antenna_mode = null;

                obj = null;
            }
            catch (Exception ex)
            {
                LogManager.WriteToLog(ex.ToString());
            }

            response = null;
        }
        public static void initLtePopup()
        {
            try
            {
                if (SpeedportHybridAPI.getInstance().checkLogin().Equals(false))
                {
                    return;
                }

                ltepopupModel lte = Application.Current.FindResource("ltepopupModel") as ltepopupModel;

                string response = SpeedportHybridAPI.getInstance().sendEnryptedRequest("data/lteinfo.json");
                if (response.IsNullOrEmpty())
                {
                    return;
                }

                LteInfoModel obj = JsonConvert.DeserializeObject <LteInfoModel>(response);
                response = null;

                lte.phycellid = obj.phycellid;
                lte.cellid    = obj.cellid;
                lte.rsrp      = obj.rsrp;
                lte.rsrp_bg   = util.getRSRPColor(obj.rsrp.ToInt());
                lte.rsrq      = obj.rsrq;
                lte.rsrq_bg   = util.getRSRQColor(obj.rsrq.ToInt());

                DateTime time   = DateTime.Now;
                string   format = "dd.MM.yyyy HH:mm:ss";
                lte.datetime = time.ToString(format);

                obj = null;
            }
            catch (Exception ex)
            {
                LogManager.WriteToLog(ex.ToString());
            }
        }
        public static void initSyslog(bool isLTE = false)
        {
            try
            {
                if (SpeedportHybridAPI.getInstance().checkLogin().Equals(false))
                {
                    return;
                }

                SyslogPageModel syslog   = Application.Current.FindResource("SyslogPageModel") as SyslogPageModel;
                string          response = SpeedportHybridAPI.getInstance().sendEnryptedRequest("data/Syslog.json", string.Concat("csrf_token=", SpeedportHybridAPI.getInstance().getToken(), "&exporttype=0"));
                if (response.IsNullOrEmpty())
                {
                    return;
                }

                string[]          lines      = response.Split(new string[] { "\r\n", "\r", "\n" }, StringSplitOptions.None);
                List <SyslogList> syslogList = new List <SyslogList>();
                foreach (string line in lines)
                {
                    // first line / last line
                    if ((line.Contains("Datum/Uhrzeit") && line.Contains("Meldung")) || line.IsNullOrEmpty())
                    {
                        continue;
                    }

                    // login
                    if (line.Contains("(G101)").Equals(true))
                    {
                        continue;
                    }

                    // logout
                    if (line.Contains("(G102)").Equals(true))
                    {
                        continue;
                    }

                    // session timeout
                    if (line.Contains("(G103)").Equals(true))
                    {
                        continue;
                    }

                    // dnsv6 error
                    if (line.Contains("(P008)").Equals(true))
                    {
                        continue;
                    }

                    string[] parts;

                    // Funkzellen Info
                    if (line.Contains("(LT004)") && isLTE.Equals(true))
                    {
                        //2016-09-01 17:15:20: LTE-ZellInfo: PLMN = 26201, CellID = 25721859, Band = LTE1800, RSRP = -90dBm, RSRQ = -8dB (LT004)
                        //01.09.2016 19:44:48: Funkzellen Info: 26201,34701569,3,-96,-11 (LT004)
                        LteInfoModel lte = Application.Current.FindResource("LteInfoModel") as LteInfoModel;

                        parts = line.Split(',');
                        string frequenz = parts[2];

                        if (line.Contains("Band = LTE"))
                        {
                            lte.frequenz = string.Concat(frequenz.Substring(10, frequenz.Length - 10), " MHz");
                        }
                        else
                        {
                            if (frequenz.Equals("20"))
                            {
                                frequenz = "800 MHz";
                            }
                            else if (frequenz.Equals("3"))
                            {
                                frequenz = "1800 MHz";
                            }
                            else if (frequenz.Equals("7"))
                            {
                                frequenz = "2600 MHz";
                            }

                            lte.frequenz = frequenz;
                        }

                        syslogList = null;
                        return;
                    }

                    parts = line.Split(new string[] { " " }, 3, StringSplitOptions.None);
                    syslogList.Add(new SyslogList()
                    {
                        timestamp = string.Concat(parts[0], " ", parts[1]), message = parts[2]
                    });
                }

                syslog.syslogList = syslogList;
                syslogList        = null;

                DateTime time   = DateTime.Now;
                string   format = "dd.MM.yyyy HH:mm:ss";
                syslog.datetime = time.ToString(format);

                syslog = null;
            }
            catch (Exception ex)
            {
                LogManager.WriteToLog(ex.ToString());
            }
        }
        public static void initLTE()
        {
            try
            {
                if (SpeedportHybridAPI.getInstance().checkLogin().Equals(false))
                {
                    return;
                }

                LteInfoModel lte = Application.Current.FindResource("LteInfoModel") as LteInfoModel;

                string response = SpeedportHybridAPI.getInstance().sendEnryptedRequest("data/lteinfo.json");
                if (response.IsNullOrEmpty())
                {
                    return;
                }

                LteInfoModel obj = JsonConvert.DeserializeObject <LteInfoModel>(response);
                response = null;

                lte.imei          = obj.imei;
                lte.imsi          = obj.imsi;
                lte.device_status = obj.device_status;
                lte.card_status   = obj.card_status;
                lte.antenna_mode  = obj.antenna_mode;

                if (obj.antenna_mode.Equals("Antennal set to internal"))
                {
                    lte.antenna_mode2 = "Inner";
                }
                else if (obj.antenna_mode.Equals("Antennal set to external"))
                {
                    lte.antenna_mode2 = "Outer";
                }
                else
                {
                    lte.antenna_mode2 = "Auto";
                }

                lte.phycellid      = obj.phycellid;
                lte.cellid         = obj.cellid;
                lte.rsrp           = obj.rsrp;
                lte.rsrp_bg        = util.getRSRPColor(obj.rsrp.ToInt());
                lte.rsrq           = obj.rsrq;
                lte.rsrq_bg        = util.getRSRQColor(obj.rsrq.ToInt());
                lte.service_status = obj.service_status;
                lte.tac            = obj.tac;

                DateTime time   = DateTime.Now;
                string   format = "dd.MM.yyyy HH:mm:ss";
                lte.datetime = time.ToString(format);

                initSyslog(true);

                obj = null;
            }
            catch (Exception ex)
            {
                LogManager.WriteToLog(ex.ToString());
            }
        }