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()); } }
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; } } }
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? } }
public override void DidAuthenticateWithError(ABTBluetoothReader bluetoothReader, NSError error) { base.DidAuthenticateWithError(bluetoothReader, error); }
public override void DidReturnAtr(ABTBluetoothReader bluetoothReader, NSData atr, NSError error) { base.DidReturnAtr(bluetoothReader, atr, error); }
public override void DidReturnResponseApdu(ABTBluetoothReader bluetoothReader, NSData apdu, NSError error) { base.DidReturnResponseApdu(bluetoothReader, apdu, error); }
public override void DidReturnEscapeResponse(ABTBluetoothReader bluetoothReader, NSData response, NSError error) { base.DidReturnEscapeResponse(bluetoothReader, response, error); }