예제 #1
0
 protected async override void OnApplicationReady()
 {
     base.OnApplicationReady();
     _server = new BluetoothServer();
     _server.ConnectionRequest += _server_ConnectionRequest;
     await _server.StartAsync();
 }
예제 #2
0
 private void InitializeBluetoothServer()
 {
     _bluetoothServer = BluetoothServer.Instance;
     GattServerObserver.Instance.ServiceAdded +=
         (status, service) =>
         DialogView.ShowDialog("Server service uuid: " + BluetoothServiceFactory.ServiceUuid, this);
 }
예제 #3
0
 public Login()
 {
     this.sonEklenenId = -1;
     InitializeComponent();
     ac  = new arduinoController(this);
     bs  = new BluetoothServer(this);
     bcc = new BluetoothClientController(this);
 }
예제 #4
0
 public InitialSetupPage(BluetoothServer btServer, Dictionary <string, string> knownDevices)
 {
     InitializeComponent();
     server      = btServer;
     Devices     = knownDevices;
     rsaProvider = GenerateKeyContainer();
     RenderPublicKey(rsaProvider);
 }
예제 #5
0
 public MainForm()
 {
     InitializeComponent();
     controlLocker   = new object();
     isGLControlLoad = false;
     server          = new BluetoothServer(this);
     droneList       = new Dictionary <int, BebopDrone>();
     uwbManager      = new UWBManager(this);
 }
 private void arayuz_Load(object sender, EventArgs e)
 {
     ac.scan();
     pictureBox2.SizeMode = PictureBoxSizeMode.StretchImage;
     pictureBox5.SizeMode = PictureBoxSizeMode.StretchImage;
     pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
     bs = new BluetoothServer(this);
     bs.ConnectAsServer();
 }
 public MainPage()
 {
     InitializeComponent();
     Globals.CreateAssemblyDirectories();
     lockedApp       = true;
     devices         = new Dictionary <string, string>();
     processManager  = new ProcessManager(this, Globals.secretDirectory);
     bluetoothServer = new BluetoothServer(this);
 }
        /*
         * Pairing of Extra Devices requires a trusted device to be paired.
         * Under that condition the secret key, followed by the public key, are displayed briefly in the form window.
         * The user gets the QR Code of both and then needs to synch with the computer immediatly in order for the device to be
         * added to the trusted list. He won't be able to use those for pairing later, has the device will not be listed as trusted
         * unless he spoofs the device of already known devices by check the list of known devices...
         * We recognize that this protocol is not the safest and could be more robust, such has insert a master password on top of the
         * connected device requirement. However, this feature was only an extra mile, more as a product demo, than a full feature.
         */

        public DevicesPage(BluetoothServer tempserver, Dictionary <string, string> knownDevices)
        {
            InitializeComponent();
            KnownDevices = knownDevices;
            foreach (var deviceName in KnownDevices.Keys)
            {
                knownDevicesComboBox.Items.Add(deviceName);
            }
            UpdateSelectedItem();
            server = tempserver;
        }
예제 #9
0
 static void Main(string[] args)
 {
     World.Robot = new Robot();
       var bluetoothServer = new BluetoothServer();
       var httpServer = new HttpServer(8000);
       bluetoothServer.Start();
       httpServer.Start();
       Console.ReadLine();
       bluetoothServer.Stop();
       httpServer.Stop();
 }
예제 #10
0
 // Constructors
 public BebopDrone(int id, MainForm mainForm, BluetoothServer server)
 {
     this.isGetSpec        = false;
     this.id               = id;
     this.tagId            = -1;
     this.mainForm         = mainForm;
     this.server           = server;
     this.infoPacketBuffer = new byte[Marshal.SizeOf(typeof(DroneInfoPacket))];
     this.bufferStartIndex = 0;
     this.commandSchedule  = new List <CommandPacket>();
     this.scheduleIndex    = 0;
 }
예제 #11
0
        static void Main(string[] args)
        {
            World.Robot = new Robot();
            var bluetoothServer = new BluetoothServer();
            var httpServer      = new HttpServer(8000);

            bluetoothServer.Start();
            httpServer.Start();
            Console.ReadLine();
            bluetoothServer.Stop();
            httpServer.Stop();
        }
예제 #12
0
        public AndroidBluetoothAdapter Create(Activity currentActivity, Context applicationContext, BluetoothAdapter nativeBluetoothAdapter)
        {
            var automaticPairingService = new AutomaticPairingService(applicationContext);
            var bluetoothFacade         = new AndroidBluetoothFacade(applicationContext);

            bluetoothFacade.EnableBluetoothFromActivity(currentActivity);

            var bluetoothDiscoveryFacade    = new BluetoothDiscoveryFacade(applicationContext);
            var inboundBluetoothSocketTable = new InboundBluetoothSocketTable();
            var bluetoothServer             = BluetoothServer.Create(nativeBluetoothAdapter, inboundBluetoothSocketTable);

            bluetoothServer.Start();
            var campfireNetBluetoothAdapter = new AndroidBluetoothAdapter(applicationContext, nativeBluetoothAdapter, bluetoothDiscoveryFacade, inboundBluetoothSocketTable);

            return(campfireNetBluetoothAdapter);
        }
예제 #13
0
 private void InitializeBluetoothServer()
 {
     _bluetoothServer = BluetoothServer.Instance;
     GattServerObserver.Instance.ServiceAdded +=
         (status, service) =>
             DialogView.ShowDialog("Server service uuid: " + BluetoothServiceFactory.ServiceUuid, this);
 }
예제 #14
0
        static void Main(string[] args)
        {
            var bltServer = new BluetoothServer();

            bltServer.init().Wait();
        }