After issuing the methods in section 3 Important Information About Bluetooth LE, the MTSCRA SDK libraries will call these Delegate methods (callback functions) to provide the requested data and / or a detailed response. For details about data received by these functions, see the Programmer's Manual (COMMANDS) for the specific device with which you are communicating.
For details about registering Delegate methods, see the demo application included with the SDK.
MTSCRA Delegate Methods 5.1 - 5.10
5.1 trackDataReadyNotification
The SDK sends this notification when card data is available from the device.
5.2 devConnectionNotification
The SDK sends this notification when the connection status of the device changes.
5.3 onDataReceived
Return a card object type with card swipe data.
Parameter
Description
cardDataObj
Card swipe has started.
Card swipe got an error during transmission.
Device connection changed whether from close to open or vice versa.
Bluetooth LE Reader was connected.
Bluetooth LE Reader was disconnected.
Bluetooth LE Reader was discovered.
Bluetooth LE state changed. Enumerated possible values that would arrive via this delegate are:
MTCardData object
instance
Instance ID
Parameter
Description
instance
Instance ID
Parameter
Description
deviceType
MTSCRADeviceType object
connected
Boolean for connection state. True = Connected
False = Not connected
instance
Instance ID
Parameter
Description
peripheral
CBPeripheral object
Parameter
Description
connectionInfo
MTConnectionInfo object
Parameter
Description
state
MTSCRABLEState
5.4 cardSwipeDidStart
5.5 cardSwipeDidGetTransError
5.6 onDeviceConnectionDidChange
5.7 bleReaderConnected
5.8 bleReaderDidDisconnected
5.9 bleReaderDidDiscoverPeripheral
5.10 bleReaderStateUpdated
MTSCRA Delegate Methods 5.11 - 5.22
5.11 onDeviceResponse
This message occurs when a non EMV command response is returned from the device.
Parameter
Description
data
Byte array containing the data received from the device. For details, see the Programmer's Manual (COMMANDS) for the specific device with which you are communicating.
5.12 onDeviceError
This message occurs when an error occurs.
The SDK sends this notification when the transaction status has changed.
Device request for displaying information to user.
Device request for application to display a User Selection Menu.
This notification is sent from the device for ARQC data.
This message occurs when the transaction result is received from the EMV device.
This message occurs when an EMV command result is received from the EMV device.
This message occurs when and extended response is received from the device.
This message occurs when a command is sent to an unpaired Bluetooth LE device.
This message occurs when and extended response is received from the device.
This call back will be raised if host software subscribes to it.
Parameter
Description
error
Error object.
Parameter
Description
data
Byte array containing the transaction status received from the device. For details about the Transaction Status, see the Programmer's Manual (COMMANDS) for the specific device with which you are communicating.
Parameter
Description
data
Byte array containing the display message received from the device. For details about the Display Message Request, see the Programmer's Manual (COMMANDS) for the specific device with which you are communicating.
Parameter
Description
data
Byte array containing the display selection from the device. For details about the Display Message Request, see the Programmer's Manual (COMMANDS) for the specific device with which you are communicating.
Offset
Field Name
Value
0
Message Length
Two byte binary, most significant byte first. This gives the total length of the ARQC message that follows.
2
ARQC
Message
Parameter
Description
data
Byte array containing the transaction result from the EMV device. For details about the Display Message Request, see the Programmer's Manual (COMMANDS) for the specific device you are communicating with.
Parameter
Description
data
Byte array containing the command result from the EMV device. For details about the Display Message Request, see the Programmer's Manual (COMMANDS) for the specific device you are communicating with.
Parameter
Description
data
Hexadecimal string containing the extended response data received from the device. The first two bytes represent the result codes for the extended command. The next two bytes (most significant byte first) indicate the total length for the following data in bytes.
Parameter
Description
RSSI
Integer value for the Received Signal Strength Indicator.
error
NSError object
5.13 onTransactionStatus (EMV Device Only)
5.14 onDisplayMessageRequest (EMV Device Only)
5.15 onUserSelectionRequest (EMV Device Only)
5.16 onARQCReceived (EMV Device Only)
5.17 onTransactionResult (EMV Device Only)
5.18 onEMVCommandResult (EMV Device Only)
5.19 onDeviceExtendedResponseReceived
5.20 deviceNotPaired
5.21 didGetRSSI
5.22 debugInfoCallback
For details about the ARQC format, see the Programmer's Manual (COMMANDS) for the specific device with which you are communicating.