
MTSCRA Function - 4.61 - 4.70
4.61 sendExtendedCommandSync (EMV Device Only)
Send a synchronous extended command to device. Operation waits for the command to return.
(NSString) sendExtendedCommandSync:(NSString *)CommandParameters:
Parameter
Description
Command
Hexadecimal string of the byte array for the extended command. The first two bytes represent the value of the extended command. The next two bytes (most significant byte first) indicate the total length of the following data in bytes.
Return Value: String containing the response data of the command.
4.62 setTimeout
Set the timeout in milliseconds for a sync command or sync extended command. Default value is 5000 milleseconds.
(void) setTimeout:(NSUInteger)timeoutMSParameters:
Parameter
Description
timeoutMS
Timeout in milliseconds.
Return Value: None.
4.63 setTimeFrame
Set the time frame (delay) for run loop or background thread. Default value is 10 milliseconds.
(void) setTimeFrame:(unsigned int)ms.Parameters:
Parameter
Description
ms
Time frame delay in milliseconds.
Return Value: None.
4.64 enableDebugPrint
Enable the debug print from SDK. Default value is NO.
Parameters:
Parameter
Description
enabled
When set to true, the SDK prints debugging messages in the XCode debug console. Debug messages consist of data sent to and received from the device. This may include iAP2.
Return Value: None.
4.65 updateFirmware
Updates the device firmware
Parameters:
Parameter
Description
firmwareType
Type of firmware to update.
· 1 - Main Firmware
firmwareData
Firmware data.
Return Value:
0 = UPDATE_FIRMWARE_STARTED
1 = UPDATE_FIRMWARE_SUCCESS
9 = UPDATE_FIRMWARE_ERROR
15 = UPDATE_FIRMWARE_NA
4.66 sendNFCCommand
This function sends a command to an NFC tag type 2. The NFC tag must first be activated by calling startTransaction() with NFC enabled.
(int) sendNFCCommand: (NSString*) command lastCommand :(BOOL) lastCommand :encrypt : (BOOL) encrypt;
Parameters:
Parameter
Description
command
Command to send to the NFC tag.
· Get Version
· Read
· Fast Read
· Write
· Compatibility Write
· Read_Cnt
· PWD_Auth
· Read_Sig
lastCommand
Determines if this is the last NFC command to complete the operation.
true = This is the last command. Device will provide a single beep after receiving a successful response from the NFC tag. To send subsequent commands, the NFC tag must be activated by calling startTransaction() with NFC enabled.
false = Expect more commands (Default).
Either set to true or false, if the NFC tag command fails, device will provide a double beep.
encrypt
Determines if data returned is to be encrypted.
true = Encrypt data
false = Do not encrypt data (Default)
Return Value:
· 0 = Success
· 9 = Error
· 15 = Busy
4.67 sendClassicNFCCommand
This function sends a command to a NFC Mifare Classic Tag type 2. The NFC tag must first be activated by calling startTransaction() with NFC enabled.
Parameters:
Parameter
Description
lastCommand
Determines if this is the last NFC command to complete the operation.
true = This is the last command. Device will provide a single beep after receiving a successful response from the NFC tag. To send subsequent commands, the NFC tag must be activated by calling startTransaction() with NFC enabled.
false = Expect more commands (Default).
Either set to true or false, if the NFC tag command fails, device will provide a double beep.
encrypt
Determines if data returned is to be encrypted.
true = Encrypt data
false = Do not encrypt data (Default)
Return Value:
0 = Success
9 = Error
15 = Busy
4.68 sendDESFireNFCCommand
This function sends a command to an NFC Mifare DESFire Light Tag Type 4. The NFC tag must first be activated by calling startTransaction() with NFC enabled.
Parameters:
Parameter
Description
command
Command to send to the NFC tag. See DESFire Data Sheet (MF2DLHX0). Should follow ISO 7816-4 APDU format.
lastCommand
Determines if this is the last NFC command to complete the operation.
true = This is the last command. Device will provide a single beep after receiving a successful response from the NFC tag. To send subsequent commands, the NFC tag must be activated by calling startTransaction() with NFC enabled.
false = Expect more commands (Default).
Either set to true or false, if the NFC tag command fails, device will provide a double beep.
encrypt
Determines if data returned is to be encrypted.
true = Encrypt data
false = Do not encrypt data (Default)
Return Value:
0 = Success
9 = Error
15 = Busy
4.69 sendNFCCommandSync
This function sends a command to an NFC tag type 2. The NFC tag must first be activated by calling startTransaction() with NFC enabled.
Parameters:
Parameter
Description
command
Command to send to the NFC tag.
· Get Version
· Read
· Fast Read
· Write
· Compatibility Write
· Read_Cnt
· PWD_Auth
· Read_Sig
lastCommand
Determines if this is the last NFC command to complete the operation.
true = This is the last command. Device will provide a single beep after receiving a successful response from the NFC tag. To send subsequent commands, the NFC tag must be activated by calling startTransaction() with NFC enabled.
false = Expect more commands (Default).
Either set to true or false, if the NFC tag command fails, device will provide a double beep.
encrypt
Determines if data returned is to be encrypted.
true = Encrypt data
false = Do not encrypt data (Default)
Return Value:
· Extended response of the NFC command.
4.70 sendNFCCommandAsync
This function sends a command to an NFC tag type 2. The NFC tag must first be activated by calling startTransaction() with NFC enabled.
Parameters:
Parameter
Description
command
Command to send to the NFC tag.
· Get Version
· Read
· Fast Read
· Write
· Compatibility Write
· Read_Cnt
· PWD_Auth
· Read_Sig
lastCommand
Determines if this is the last NFC command to complete the operation.
true = This is the last command. Device will provide a single beep after receiving a successful response from the NFC tag. To send subsequent commands, the NFC tag must be activated by calling startTransaction() with NFC enabled.
false = Expect more commands (Default).
Either set to true or false, if the NFC tag command fails, device will provide a double beep.
encrypt
Determines if data returned is to be encrypted.
true = Encrypt data
false = Do not encrypt data (Default)
response
Callback to receive the response.
Return Value:
0 = Success
9 = Error
15 = Busy
Last updated

