nxtlib/src/Connect/Bluetooth.cs
/// <summary> 
/// Connect to the device via Bluetooth.
/// </summary>
Connect to the device via Bluetooth.
Connect to the device via Bluetooth .
public override void Connect(Brick brick)
        {
            Initialize();
            if (!IsConnected)
            {
                lock (commLock)
                {
                    BluetoothAddress adr = new BluetoothAddress(brick.brickinfo.address);
                    BluetoothDeviceInfo device = new BluetoothDeviceInfo(adr);
                    BluetoothSecurity.PairRequest(adr, "1234");
                    client.Connect(adr, NXT_GUID);
                }
                if (!IsConnected) { throw new NXTNotConnected(); }
            }
            return;
        }
public override void Connect ( Brick brick ) { Initialize ( ) ; if ( ! IsConnected ) { lock ( commLock ) { BluetoothAddress adr = new BluetoothAddress ( brick . brickinfo . address ) ; BluetoothDeviceInfo device = new BluetoothDeviceInfo ( adr ) ; BluetoothSecurity . PairRequest ( adr , " " ) ; client . Connect ( adr , NXT_GUID ) ; } if ( ! IsConnected ) { throw new NXTNotConnected ( ) ; } } return ; }
Connect to the device via Bluetooth.
Connect to the device via Bluetooth .
//BluetoothSecurity.RevokePin(adr); //BluetoothSecurity.RemoveDevice(adr);
brick
Brick