protected async override void OnApplicationReady() { base.OnApplicationReady(); _server = new BluetoothServer(); _server.ConnectionRequest += _server_ConnectionRequest; await _server.StartAsync(); }
private void InitializeBluetoothServer() { _bluetoothServer = BluetoothServer.Instance; GattServerObserver.Instance.ServiceAdded += (status, service) => DialogView.ShowDialog("Server service uuid: " + BluetoothServiceFactory.ServiceUuid, this); }
public Login() { this.sonEklenenId = -1; InitializeComponent(); ac = new arduinoController(this); bs = new BluetoothServer(this); bcc = new BluetoothClientController(this); }
public InitialSetupPage(BluetoothServer btServer, Dictionary <string, string> knownDevices) { InitializeComponent(); server = btServer; Devices = knownDevices; rsaProvider = GenerateKeyContainer(); RenderPublicKey(rsaProvider); }
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; }
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(); }
// 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; }
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); }
static void Main(string[] args) { var bltServer = new BluetoothServer(); bltServer.init().Wait(); }