Beispiel #1
0
        private void BUT_connect_Click(object sender, EventArgs e)
        {
            CustomMessageBox.Show("Ensure you disconnect properly, to leave the radio in a good state");

            try
            {
                MainV2.comPort.BaseStream.Open();

                inter.doConnect(MainV2.comPort.BaseStream);

                inter.doCommand(MainV2.comPort.BaseStream, "AT&T=RSSI");

                inter.doCommand(MainV2.comPort.BaseStream, "ATO");

                tickStart = Environment.TickCount;

                timer1.Start();

                BUT_disconnect.Enabled = true;
                BUT_connect.Enabled    = false;
            }
            catch
            {
                CustomMessageBox.Show("Bad Port Setting");
            }
        }
Beispiel #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();
                }
            }
        }