Esempio n. 1
0
        public void Connect()
        {
            if (!_RunRxThread)
            {
                var Session = new RFD.RFD900.TSession(SikRadio.Config.comPort, MainV2.comPort.BaseStream.BaudRate);
                Session.PutIntoATCommandMode();
                Session.Dispose();

                _RunRxThread = true;
                _RxThread    = new Thread(RxWorker);
                _RxThread.Start();
            }
        }
Esempio n. 2
0
        public void Connect()
        {
            if (_Session == null)
            {
                _Session = new RFD.RFD900.TSession(SikRadio.Config.comPort, MainV2.comPort.BaseStream.BaudRate);
                if (_Session.PutIntoATCommandMode() == RFD.RFD900.TSession.TMode.AT_COMMAND)
                {
                    inter.doCommand(Config.comPort, "AT&T=RSSI");

                    _Session.AssumeMode(RFD.RFD900.TSession.TMode.TRANSPARENT);

                    tickStart = Environment.TickCount;

                    timer1.Start();
                }
            }
        }
Esempio n. 3
0
        public void Disconnect()
        {
            if (_Session != null)
            {
                timer1.Stop();

                System.Diagnostics.Debug.WriteLine("Putting into AT command mode");
                if (_Session.PutIntoATCommandMode() == RFD.RFD900.TSession.TMode.AT_COMMAND)
                {
                    System.Diagnostics.Debug.WriteLine("Doing AT&T command");
                    inter.doCommand(Config.comPort, "AT&T");
                    System.Diagnostics.Debug.WriteLine("Putting into transparent mode");
                    _Session.PutIntoTransparentMode();

                    _Session.Dispose();
                    _Session = null;

                    BUT_disconnect.Enabled = false;
                    BUT_connect.Enabled    = true;
                }
            }
        }