private void GattServerCharacteristic_OnRead(object sender, ICharacteristicReadRequest e)
 {
     if (RfcommAddressDict.ContainsKey(e.SourceDevice))
     {
         e.RespondWithValue(BitConverter.GetBytes(RfcommAddressDict[e.SourceDevice]));
     }
     else
     {
         e.RespondWithProtocolError(GattErrorCode.Failure);
     }
 }
 private void _OnRead(object sender, ICharacteristicReadRequest e)
 {
     e.RespondWithValue(null);
 }
예제 #3
0
 private void OnManufacturerNameStringCharacteristicRead(object sender, ICharacteristicReadRequest e)
 {
     e.RespondWithValue(Encoding.UTF8.GetBytes("XJ Studio"));
 }
 private void GattServerCharacteristic_OnRead(object sender, ICharacteristicReadRequest e)
 {
     e.RespondWithValue(AngularVelocityInBytes);
 }
예제 #5
0
 private void GattServerCharacteristic_OnRead(object sender, ICharacteristicReadRequest e)
 {
     e.RespondWithValue(TranspondCharacteristicWrapper.Value);
 }
 private void _OnCharacteristicRead(object sender, ICharacteristicReadRequest e)
 {
     GattRequestViewModels.Add(new GattRequestViewModel(e));
 }
        private void _OnRead(object sender, ICharacteristicReadRequest e)
        {
            var device = e.SourceDevice;

            e.RespondWithValue(GattServerCharacteristic.Value);
        }
        private void GattServerCharacteristic_OnRead(object sender, ICharacteristicReadRequest e)
        {
            var bytes = BitConverter.GetBytes(RfcommServerServiceWrapper.BluetoothManager.MacAddress);

            e.RespondWithValue(bytes);
        }
 private void GattServerCharacteristic_OnRead(object sender, ICharacteristicReadRequest e)
 {
     e.RespondWithValue(Encoding.UTF8.GetBytes(RfcommServerServiceWrapper.BluetoothManager.Name));
 }