Example #1
0
 public override void DidAttachPeripheral(ABTBluetoothReader bluetoothReader, CBPeripheral peripheral, NSError error)
 {
     if (error == null)
     {
         _helper.Reader.AuthenticateWithMasterKey(@"41 43 52 31 32 35 35 55 2D 4A 31 20 41 75 74 68".ToByteArray());
     }
 }
Example #2
0
        public override void DidChangeCardStatus(ABTBluetoothReader bluetoothReader, ABTBluetoothReaderCardStatus cardStatus, NSError error)
        {
            if (error == null)
            {
                // Power on card to get ATR:
                switch (cardStatus)
                {
                case ABTBluetoothReaderCardStatus.Present:
                    bluetoothReader.PowerOnCard();
                    break;

                case ABTBluetoothReaderCardStatus.Absent:
                    // Tag lost
                    break;
                }
            }
        }
Example #3
0
        public override void DidDetectReader(ABTBluetoothReaderManager bluetoothReaderManager, ABTBluetoothReader reader, CBPeripheral peripheral, NSError error)
        {
            if (error == null)
            {
                _helper.Reader?.Detach();

                _helper.Reader              = reader;
                _helper.ReaderDelegate      = new ReaderDelegate(_helper);
                _helper.Reader.WeakDelegate = _helper.ReaderDelegate;
                _helper.Reader.AttachPeripheral(peripheral);
            }
            else
            {
                // Disconnect, not a reader:
                //_helper.centralManager.CancelPeripheralConnection(peripheral); // TODO: Maybe needed?
            }
        }
Example #4
0
 public override void DidAuthenticateWithError(ABTBluetoothReader bluetoothReader, NSError error)
 {
     base.DidAuthenticateWithError(bluetoothReader, error);
 }
Example #5
0
 public override void DidReturnAtr(ABTBluetoothReader bluetoothReader, NSData atr, NSError error)
 {
     base.DidReturnAtr(bluetoothReader, atr, error);
 }
Example #6
0
 public override void DidReturnResponseApdu(ABTBluetoothReader bluetoothReader, NSData apdu, NSError error)
 {
     base.DidReturnResponseApdu(bluetoothReader, apdu, error);
 }
Example #7
0
 public override void DidReturnEscapeResponse(ABTBluetoothReader bluetoothReader, NSData response, NSError error)
 {
     base.DidReturnEscapeResponse(bluetoothReader, response, error);
 }