For the complete documentation index, see llms.txt. This page is also available as Markdown.
Page cover

MTSCRA Functions - 61 - 70

sendExtendedCommandSync (EMV Device Only)

Send a synchronous extended command to device. Operation waits for the command to return.

(NSString) sendExtendedCommandSync:(NSString *)Command

Parameters:

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.

setTimeout

Set the timeout in milliseconds for a sync command or sync extended command. Default value is 5000 milleseconds.

(void) setTimeout:(NSUInteger)timeoutMS

Parameters:

Parameter

Description

timeoutMS

Timeout in milliseconds.

Return Value: None.

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.

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.

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

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.

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

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

command

Command to send to the NFC tag.

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

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

1sendNFCCommandSync

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.

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