Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
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.
Welcome to the resource hub for the iDynamo 5 Gen III, a compact and versatile secure card reader (SCR) designed for modern point-of-sale (P2PE) environments. It reads ISO-standard magnetic stripe cards and offers universal connectivity across iOS, Android, and Windows platforms via USB (Keyboard, HID, iAP2). This section provides all the documentation, software, and developer tools you need to successfully integrate, manage, and support the iDynamo 5 Gen III.
This document provides instructions for software developers who want to create software solutions that include a MagTek Secure Card Reader / Authenticator (SCRA) device connected to a Windows PC, Windows tablet device or Windows Phone mobile device.
Custom Windows software installed on a host PC can communicate with MagTek SCRA devices via the Audio/Headset Interface, Bluetooth, Bluetooth LE, or USB using the MTSCRA library.
The supported platforms for .NET projects include Windows 7, Windows 8/8.1, and Windows 10. The
.NET project should contain references to these files: MTSCRANET.dll and MTLIB.dll.
For Universal Windows projects, the supported platforms include all Windows 10 devices. The Universal/Windows Store project should contain references to MTSCRAUWP.dll file.
This section gives the format of the data for the Online Processing Result / Acquirer Response message. This request is sent to the reader in response to an ARQC Message notification from the reader. The output is controlled by Property 0x68 – EMV Message Format. There are currently 2 selectable formats: Original and DynaPro. It is a TLV object with the following contents.
Original format:
DynaPro format:
To develop an iOS app using the MTSCRA SDK, follow the setup steps in section 2 How to Set Up the MTSCRA SDK, then create an instance of the MTSCRA object in your software project, then call the functions described in this chapter to communicate with the device. For sample code that demonstrates how to use these functions, see the contents of the MTSCRA Demo folder included with the SDK.
Generally, these functions will run in one of two modes:
Asynchronous functions will return data using the event handlers (callback functions) defined in section 5 MTSCRA Delegate Methods.
Synchronous functions will return requested data immediately in the function’s return value. If the requested data is not available immediately, synchronous calls will generally block until a specified wait time has elapsed.
Most calls that wait for input from the user will run in the asynchronous mode.
To add the MTSCRA library to a custom software project in the Eclipse development environment, follow these steps:
Create or open your custom software project in Eclipse.
Copy the following JAR file to the libs subfolder of your software project: mtscra.jar
Ensure your project settings are set up correctly.
Clean, build, and run your custom software project to make sure the library imported correctly.
In your custom software, create an instance of MTSCRA. For examples, see the source code included with the MagTek SCRA Demo project and/or the Code Examples section in this document.
Depending on the connection types supported, the project should include the uses-features and uses- permissions as specified in the table below in its AndroidManifest.xml file. For examples, see the AndroidManifest.xml included with the MagTek SCRA Demo project
F9<len>/* container for ARQC Response data */
DFDF25 (IFD Serial Number)<len><val>
FA<len>/* Container for generic data */
70<len>/* Container for ARQC */
8A<len> approval
Further objects as needed...F9<len>/* container for MAC structure and generic data */
DFDF54 (MAC KSN)<len><val>
DFDF55 (Mac Encryption Type><len><val>
DFDF25 (IFD Serial Number)<len><val>
FA<len>/* Container for generic data */
70<len>/* Container for ARQC */
8A<len> approval
Further objects as needed... (ARQC padding, if any, to be a multiple of 8 bytes)
CBC-MAC (4 bytes, use MAC variant of MSR DUKPT key that was used in ARQC request, from
message length up to and including ARQC padding, if anyThis section gives the format of the ARQC Message delivered in the ARQC Message notification. The output is controlled by Property 0x68 – EMV Message Format. There are currently 2 selectable formats: Original and DynaPro. It is a TLV object with the following contents.
Original Format:
FD<len>/* container for generic data */
DFDF25(IFD Serial Number)<len><val>
FA<len>/* container for generic data */
<tags defined by DFDF02 >
. Note: Sensitive Data cannot be defined in DFDF02
.
DFDF4D(Masked T2 ICC Data)
DFDF52 - Card Type Used
F8<len>/* container tag for encrypted data */
DFDF56(Encrypted Transaction Data KSN)<len><val>
DFDF57(Encrypted Transaction Data Encryption Type)<val>
FA<len>/* container for generic data */
DF30(Encrypted Tag 56 TLV, T1 Data)<len><val>
DF31(Encrypted Tag 57 TLV, T2 Data)<len><val>
DF32(Encrypted Tag 5A TLV, PAN)<len><val>
DF35(Encrypted Tag 9F1F TLV, T1 DD)<len><val>
DF36(Encrypted Tag 9F20 TLV, T2, DD)<len><val>
DF37(Encrypted Tag 9F61 TLV, T2 CVC3)<len><val>
DF38(Encrypted Tag 9F62 TLV, T1,PCVC3)<len><val>
DF39(Encrypted Tag DF812A TLV, T1 DD)<len><val>
DF3A(Encrypted Tag DF812B TLV, T2 DD)<len><val>
DF3B(Encrypted Tag DFDF4A TLV, T2 ISO Format)<len><val>
DF40(Encrypted Value only of DFDF4A, T2 ISO Format)<len><val>DynaPro Format:
The Value inside tag DFDF59 is encrypted and contains the following after decryption:
FC<len>/* container for encrypted generic data */
<tags defined by DFDF02 >
.
F9<len>/* container for MAC structure and generic data */
DFDF54(MAC KSN)<len><val>
DFDF55(MAC Encryption Type)<len><val>
DFDF25(IFD Serial Number)<len><val>
FA<len>/* container for generic data */
70<len>/*container for ARQC */
DFDF53<len><value>/*fallback indicator */
5F20<len><value>/*cardholder name */
5F30<len><value>/*service code */
DFDF4D<len><value>/* Mask T2 ICC Data */
DFDF52<len><value>/* card type */
F8<len>/*container tag for encryption */
DFDF59(Encrypted Data Primitive)<len><Encrypted Data val (Decrypt data to read tags)>
DFDF56(Encrypted Transaction Data KSN)<len><val>
DFDF57(Encrypted Transaction Data Encryption Type)<val>
DFDF58(# of bytes of padding in DFDF59)<len><val>
(Buffer if any to be a multiple of 8 bytes)
CBC-MAC (4 bytes, always set to zeroes)This manual provides a detailed technical reference for developers, describing how to communicate with the iDynamo 5 Gen III secure card reader using its command set and the MP ASIC.
This guide offers concise, step-by-step instructions for physically connecting the iDynamo 5 Gen III to a host device via USB-C and establishing basic communication.
This collection includes resources such as Software Development Kits (SDKs), demo apps, and sample code to help developers integrate the iDynamo 5 Gen III into their software applications.
These manuals provide comprehensive information for end-users and administrators on the proper, secure operation, mounting, and maintenance of the iDynamo 5 Gen III.
This is an interactive online demonstration that showcases the iDynamo 5 Gen III's secure reading capabilities and MagneSafe security features.
This API (Remote Management System) allows developers to programmatically manage, configure, and update iDynamo 5 Gen III devices from within their own applications.
This section provides access to various software applications for the iDynamo 5 Gen III, including the MagTek RMS app for remote management and the MagTek Test app for verifying device functionality.
This is a Windows-based software utility for configuring device settings, updating firmware, and performing diagnostic tests on the iDynamo 5 Gen III.
This is a full-function HTML browser application for Windows that integrates with device drivers to control MagTek payment devices, including the iDynamo 5 Gen III, via HTML over HTTP(S).
Need Help?
For additional support, please contact MagTek Support:
Technical Support:
📧 Email: support@magtek.com
📞 Phone: 1-800-788-6835 (US) | +1-562-546-6616 (International)
🕐 Hours: Monday-Friday, 6:00 AM - 5:00 PM PST
Online Resources:
🌐 Official Site:
💬 Developer Forum:
Documentation Feedback:
Help us improve this documentation!
This document details the device's PCI PTS POI v6.2 security features, including its support for encryption algorithms (AES, TDEA) and DUKPT key management to ensure secure payment transactions.
These manuals provide procedures for visually inspecting the physical integrity of the iDynamo 5 Gen III device and its secure packaging to ensure it hasn't been tampered with before deployment.
When calling functions startScanningForPeripherals or openDevice, the application should make sure bleReaderStateUpdated has received a device status and that the most recent status was OK , otherwise the device will not be able to connect, and iOS will not throw any error if Bluetooth is not ready.
Starting in iOS 13, app projects must specify the Privacy Usage Description for Bluetooth by NSBluetoothAlwaysUsageDescription in the info.plist file. file. Accessing Core Bluetooth without the usage descriptions will cause a runtime crash. For backward compatibility with older versions of iOS, define NSBluetoothAlwaysUsageDescription as well.
Make sure device is in pairing mode. If not, press and hold the button for 3 seconds until the blue light blinks, and then release the button.
Set device type and connection type.
Wait for callback bleReaderStateUpdated(), and then call startScanningForPeripheral().
Wait for onDeviceList() callback. Here you can call getDiscoveredPeripherals().
Select the device in the list.
Open the device you want to connect.
Library will pair the device. After inputting passcode, device is ready to use.
This document provides instructions for software developers who want to create software solutions that include a MagTek Secure Card Reader Authenticator (SCRA) device connected to an Android device via the Audio/Headset Interface, Bluetooth, Bluetooth LE, or USB.
The MagTek SCRA Demo, available from MagTek, provides demonstration source code and a reusable MTSCRA library that provides developers of custom software solutions with an easy-to-use interface for Dynamag, DynaMAX, eDynamo, uDynamo, aDynamo, BulleT, mDynamo, DynaWave, tDynamo, iDynamo 6, DynaGlass, and iDynamo 5 (Gen III) readers. Developers can include the MTSCRA library in custom branded software which can be distributed to customers or distributed internally as part of an enterprise solution.
The general terms “device” and “host” are used in different, often incompatible ways in a multitude of specifications and contexts. For example “host” may have different meanings in the context of USB communication than it does in the context of networked financial transaction processing. In this document, “device” and “host” are used strictly as follows:
Device refers to the reader device that receives and responds to the command set specified in this document.
Host refers to the piece of general-purpose electronic equipment the device is connected or paired to, which can send data to and receive data from the device. Host types include PC, laptops, tablets, smartphones, and even test harnesses. In many cases the host may have custom software installed on it that communicates with the device. When “host” must be used differently, it is qualified as something specific, such as “USB host.”
Development Environment: Eclipse 4.3 and above or Android Studio 3 and above.
Android Operating System: 4.4.2 and above
Custom software can use the sendCommandToDevice method to send direct commands to the devices. This section provides information about commonly used commands.
To send a Discovery command to device, use:
public void sendCommandToDevice(string command)Parameters: Use “C10206C20503840900” as command string for audio readers.
Return Value:
The following device information will be retrieved.
Device SN, internal: Device serial number created by chip manufacturer. Use getDeviceSerial method to retrieve data.
Device SN, MagTek: Device serial number created by MagTek. Use getDeviceSerialMagTek method to retrieve data.
Device Firmware Part Number: Device firmware part number. Use getFirmware method to retrieve data.
Device Model Name: Device model name. Use getDeviceName method to retrieve data. Device TLV Version: Device TLV version. Use getTLVVersion method to retrieve data.
Device Part Number: Device part number. Use getDevicePartNumber method to retrieve data. Capability - MSR: 0 = No MSR, 1 = MSR. Use getCapMSR method to retrieve data.
Capability - TRACKS:
0 = Supported tracks: None.
1 = Supported tracks: Track1.
2 = Supported tracks: Track2.
3 = Supported tracks: Track1, Track2.
Use getCapTracks method to retrieve data.
Capability - MagStripe Encryption: 0 = No Encryption, 1 = TripDES DUKPT. Use getCapMagStripeEncryption method to retrieve data.
This page provides comprehensive documentation for the iDynamo 5 Gen III secure card reader authenticator (SCRA), including developer guides, user manuals, and security policies to support integration and operation across iOS, Android, and Windows platforms.
This function retrieves the card’s encrypted MagnePrint, for readers that support MagnePrint.
Parameters: None
Return Value: String containing the card’s encrypted MagnePrint.
This function retrieves the card MagnePrint status. For more information, see D99875475. Only available on iDynamo; it will return an empty string in audio reader.
Parameters: None Return Value:
Return stored MagnePrintStatus string.
This function retrieves the device serial number.
This function retrieves the track decode status after a cardholder swipes a card.
Parameters: None
Return Value:
Hex string, each 2 digits represent one track’s decode status, where the left most 2 digits are for Track 1.
“00” = Success
Get stored key serial number. This 10-byte Binary field contains the DUKPT Key Serial Number used to encrypt the encrypted fields in this message. This 80-bit field includes the Initial Key Serial Number in the leftmost 59 bits and a value for the Encryption Counter in the rightmost 21 bits. If no keys are loaded, all bytes will have the value 0x00.
public string getKSN()
Parameters: None Return Value:
Return stored key serial number.
Get device model name.
public string getDeviceName()
Parameters: None
The following instructions detail how to use the MTNET OEM Demo with mDynamo or DynaDip on Windows PC via USB interface.
MTNET OEM Demo queries for device features upon connecting. Some demo features are disabled based on what is supported on the device. MTNET OEM Demo does not automatically set Time.
Connect the device to the USB port of the Windows PC.
Launch the MTNET OEM Demo and press the button to scan for connected USB devices
To add the MTSCRA SDK libraries to a custom software project in the XCode development environment, follow these steps:
Download the MTSCRA Demo app from MagTek.com.
Open your custom software project in XCode.
Open the MTSCRA Demo app folder in Finder.
Custom software can use the sendCommandToDevice method to send direct commands to the device. This section provides information about commonly used commands.
To send a command to device, use:
Parameters: Use “C10206C20503840900” as command string for audio readers.
Return Value:
The following device information will be retrieved.
Device SN, internal: Device serial number created by chip manufacturer. Use getDeviceSerial method to retrieve data.
Retrieves Track Capabilities.
public string getCapTracks()
Parameters: None Return Value:
String representing Track Capabilities:
Bit 0 = 1 / Track 1 supported,
To connect via an interface listed in the Type box follow these steps:
Connect the device to the USB port of the Windows PC.
Launch the MTNET Demo, select USB as the device type in the Type list box, and press the Scan button to display a list of available devices.
4 = Supported tracks: Track3.
5 = Supported tracks: Track1, Track3.
6 = Supported tracks: Track2, Track3.
7 = Supported tracks: Track1, Track2, Track3.
File
Description
mtscra.jar
MagTek SCRA Library
public interface IMTCardData
{
public byte[] getData();
public String getMaskedTracks(); public String getTrack1();
public String getTrack2(); public String getTrack3();
public String getTrack1Masked(); public String getTrack2Masked(); public String getTrack3Masked(); public String getMagnePrint(); public String getMagnePrintStatus(); public String getDeviceSerial(); public String getSessionID();
public String getKSN();
public String getDeviceName(); public void clearBuffers(); public long getBatteryLevel(); public long getSwipeCount();
public String getCapMagnePrint();
public String getCapMagnePrintEncryption(); public String getCapMagneSafe20Encryption(); public String getCapMagStripeEncryption(); public String getCapMSR();
public String getCapTracks(); public long getCardDataCRC(); public String getCardExpDate(); public String getCardIIN(); public String getCardLast4(); public String getCardName(); public String getCardPAN(); public int getCardPANLength();
public String getCardServiceCode(); public String getCardStatus(); public int getDataFieldCount(); public String getHashCode();
public String getDeviceConfig(String configType); public String getEncryptionStatus();
public String getFirmware();
public String getMagTekDeviceSerial(); public String getResponseType();
public String getTagValue(String tag, String data); public String getTLVVersion();
public String getTrackDecodeStatus();
public String getTLVPayload();
public String getMessageID(); public boolean isQwantumCard(); public boolean isQwantumBuffer();
public boolean isCustomerMessage();
String getMSRDUKPTKeySerialNumber(); String getMSRDUKPTKeyInfo();
String getMPDUKPTKeySerialNumber(); String getMPDUKPTKeyInfo();
public String getTokenDUKPTKeySerialNumber(); public String getTokenDUKPTKeyInfo();
public String getQwantumStatus(); public String getQwantumToken(); public String getQwantumCardID();
public String getEncryptedQwantumDataBuffer(); public String getMACDUKPTKeyInfo();
public String getMACMessageLength(); public String getMAC();
public String getCustomerMessageCode(); public String getCustomerMessageText();
public String getEncryptedSCDE();
public String getSCDEDUKPTKeySerialNumber(); public String getSCDEDUKPTKeyInfo();
Return device model name.
Clears buffered data retrieved from the reader.
public void clearBuffers()
Parameters: None
Return Value: None
Retrieves battery level.
public long getBatteryLevel()
Parameters: None Return Value:
Battery Level (0 to 100)
Retrieves swipe count.
public long getSwipeCount()
Parameters: None
Return Value:
Long value representing swipe count. If the value is less than zero, it indicates the device does not support tracking of the number of card swipes.
Retrieves MagnePrint Capabilities.
public string getCapMagnePrint()
Parameters: None Return Value:
String representing MagnePrint capabilities:
0 = No MagnePrint,
1 = Short MagnePrint,
2 = Long MagnePrint
Retrieves MagnePrint Encryption Capabilities.
public string getCapMagnePrintEncryption()
Parameters: None Return Value:
String representing MagnePrint Encryption capabilities:
0 = No Encryption,
1 = Same as MagStripe (8122), other values TBD.
If absent, the default value is 1.
Retrieves MagneSafe 2.0 Encryption Capabilities.
public string getCapMagneSafe20Encryption ()
Parameters: None
Return Value:
String representing MagneSafe 2.0 Encryption Capabilities. 0 = Not supported, other values TBD.
Retrieves MagneStripe Encryption Capabilities.
public string getCapMagStripeEncryption()
Parameters: None Return Value:
String representing MagStripe Encryption Capabilities. 0 = No Encryption, 1 = TDES DUKPT / PIN Variant, other values TBD
Retrieves MSR Capabilities. public string getCapMSR() Parameters: None
Return Value:
String representing MSR Capabilities. 0 = No MSR, 1 = MSR.
Bit 2 = 1 / Track 3 supported, All other bits = 0.
Retrieves CRC from card data.
public long getCardDataCRC()
Parameters: None Return Value:
Card data CRC
Retrieves CRC from card data.
public string getCardExpDate ()
Parameters: None Return Value:
String representing card expiration date.
Retrieves Issuer Identification Number (IIN) from card data.
public string getCardIIN()
Parameters: None
Return Value: String representing card IIN.
Retrieves Last 4 digits of card number from card data.
public string getCardLast4()
Parameters: None
Return Value:
String representing card last 4 digits.
Retrieves card name from card data.
public string getCardName()
Parameters: None Return Value:
String representing card name.
Retrieves PAN from card data.
public string getCardPAN()
Parameters: None
Return Value: String representing card PAN.
Retrieves PAN length from card data.
public int getCardPANLength()
Parameters: None
Return Value: PAN length.
Retrieves Service Code.
public string getCardServiceCode()
Parameters: None
Return Value: String representing service code.
Retrieves the card status.
public string getCardStatus()
Parameters: None Return Value:
String representing the card status.
Card Status
This is a string value which indicates the card status. The following table defines the possible values.
Value
Description
00
The card was swiped in the withdrawal direction.
01
The card was swiped in the insertion direction.

Device SN, MagTek: Device serial number created by MagTek. Use getDeviceSerialMagTek method to retrieve data.
Device Firmware Part Number: Device firmware part number. Use getFirmware method to retrieve data.
Device Model Name: Device model name. Use getDeviceName method to retrieve data. Device TLV Version: Device TLV version. Use getTLVVersion method to retrieve data.
Device Part Number: Device part number. Use getDevicePartNumber method to retrieve data. Capability - MSR: 0 = No MSR, 1 = MSR. Use getCapMSR method to retrieve data.
Capability - TRACKS:
0 = Supported tracks: None.
1 = Supported tracks: Track1.
2 = Supported tracks: Track2.
3 = Supported tracks: Track1, Track2.
4 = Supported tracks: Track3.
5 = Supported tracks: Track1, Track3.
6 = Supported tracks: Track2, Track3.
7 = Supported tracks: Track1, Track2, Track3.
Use getCapTracks method to retrieve data.
Capability - MagStripe Encryption:
0 = No Encryption,
1 = TripDES DUKPT.
Use: getCapMagStripeEncryption method to retrieve data.
Return Value: String containing the device serial number.
This function returns the MagTek serial number of the currently opened device.
Parameters: None
Return Value: Return stored serial number created by MagTek.
This function retrieves the Session ID from the currently opened device, which the host can use to uniquely identify a transaction to prevent replay. Only supported by iDynamo/uDynamo; on other devices this function will return an empty string. For more information, see D99875475
Parameters: None
Return Value: Stored session ID.
This function retrieves the Key Serial Number (KSN) from the device.
Parameters: None
Return Value: String containing the stored key serial number.
This function gets the device’s product name.
Parameters: None
Return Value: String containing the device product name.
This function gets the device type.
Parameters: None
Return Value: Device Type
This function sets the type of device to open. Call this function before calling openDevice.
Parameters:
Device Type:
MAGTEKAUDIOREADER = Audio readers aDynamo, uDynamo.
MAGTEKIDYNAMO = iOS 30-pin and Lightning readers iDynamo.
MAGTEKDYNAMAX = Bluetooth LE reader DynaMAX.
MAGTEKEDYNAMO = Bluetooth LE reader eDynamo.
MAGTEKKDYNAMO = Lightning reader kDynamo.
MAGTEKTDYNAMO = Bluetooth LE reader tDynamo.
Return Value: None
This function gets the capabilities of the currently opened device.
Parameters: None
Return Value: Return device capabilities.
CAP_MASKING = 1,
CAP_ENCRYPTION=2,
CAP_CARD_AUTH = 4,
CAP_DEVICE_AUTH = 8,
CAP_SESSION_ID = 16,
CAP_DISCOVERY= 32,
“02” = No track present
Examples:
“000000” = Track 1, 2, and 3 success.
“000100” = Track 1 and 3 success. Track 2 had error.
“000002” = Track 1 and 2 success. Track 3 not present.
This function retrieves device’s battery level percentage between 0% and 100%, if the device has a battery and supports battery level monitoring. To retrieve the most up to date percentage, call this function after a transaction.
Parameters: None
Return Value: Long value between 0 and 100
This function returns the currently opened device’s part number.
Parameters: None
Return Value: String containing the device part number.
Retrieves the Card Status
Parameters: None
Return Value: Card Status, which depends on the device.
This function retrieves individual TLV tag values. Only supported on aDynamo/UDynamo.
Parameters:
Tag = An MTSCRATransactionData type (see section D.5 MTSCRATransactionData).
Return Value: String containing the value of the specified tag.
This function gets the status of the currently connected device.
Parameters: None
Return Value: Return device status of swipe count and battery level.
This function gets the status of the current operation.
Parameters: None
Return Value: Operation Status
This function returns the version of the tag-length-value (TLV) format supported by the device.
Parameters: None
Return Value: String containing the firmware TLV version.
This function sets the protocol string the SDK will use to communicate with the device. See example in Open Device code example.
Parameters: Protocol String
Return Value: None
This function gets the response type.
Parameters: None
Return Value: Response Type
self.lib.setConnectionType(UInt(BLE_EMV))
self.lib.setDeviceType(UInt32(MAGTEKEDYNAMO))func bleReaderStateUpdated(_ state: MTSCRABLEState) {
print("readerStateUpdated - ", state)
if (state == 0) {
// dispatch in main queue is very important
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1,
execute: {
self.lib.startScanningForPeripherals()
})
}
}
func onDeviceList(_ instance: Any!, connectionType: UInt, deviceList:
[Any]!) {
let devices = deviceList as! [MTDeviceInfo]
devList.removeAll()
let peripherals = self.lib.getDiscoveredPeripherals()
print(peripherals as Any)
...
}
lib.stopScanningForPeripherals()
lib.setAddress(devList[selected].address)
lib.openDevice()public void sendCommandToDevice(String command)if (! m_SCRA.isDeviceConnected())
{
m_SCRA.openDevice();
}if (m_SCRA != null)
{
m_SCRA.closeDevice();
}if (! m_SCRA.isDeviceConnected())
{
}private Handler m_SCRAHandler =
new Handler(new SCRAHandlerCallback());
private MTSCRA m_SCRA = new MTSCRA(m_SCRAHandler);
private class SCRAHandlerCallback implements Callback
{
public boolean handleMessage(Message msg)
{
Switch (msg.what)
{
Case MTSCRAEvent.CardDataReceived:
OnCardDataReceived();
break;
}
}
}
public void OnCardDataReceived()
{
// Display raw card data
CardData.Text = m_SCRA.getResponseData();
// Display last 4 digits of the card
CardLast4.Text = m_SCRA.getCardLast4();
}if (mSCRA.isDeviceConnected())
{
// Send discovery command
m_SCRA.sendCommandToDevice(“C10206C20503840900”, 0);
}(NSString *) getMagnePrint(NSString *) getMagnePrintStatus(NSString *) getDeviceSerial(NSString *) getMagTekDeviceSerial(NSString *) getSessionID(NSString *) getKSN(NSString *) getDeviceName (int) getDeviceType (void) setDeviceType:(UInt32 *)deviceType (NSString *) getDeviceCaps(NSString *) getTrackDecodeStatus(long) getBatteryLevel(NSString *) getDevicePartNumber(NSString *) getCardStatus(NSString *) getTagValue:(UInt32)tag(NSString *) getDeviceStatus(NSString *) getOperationStatus(NSString *) getTLVVersion(void) setDeviceProtocolString:(NSString *)pData(NSString *) getResponseTypeIf your device has an additionally attached device to its SPI or UART port, select the appropriate device type in the list for SPI port and UART Port before connecting.
Select the Device ID and press the Connect button to open the device
Swipe a magnetic stripe card to read the card data if you have an attached MSR head.
To send a command to the device, enter the command in the command text box, select the appropriate device to send to and press the Send Command button..
To read a chip card, press the Set Time button and send to the Board. If you have an attached NFC module connected to the UART port, press the Set Time button, and send the UART before reading a contactless card.
To begin an EMV transaction, select desired Transaction type and Response, press the Start button, and then present the appropriate card whenthe Present Card message appears.
Select an Application in the Select Application window.
If you want to cancel the EMV transaction, press the Cancel button. Please note that the cancel feature will only work before the card is inserted.
To clear the screen, press the Clear button.
To close the device, press the Disconnect button
Open the Lib subfolder.
Include the following files in your custom software project within XCode:
libMTSCRA.a
MTSCRA.h
Ensure the library search paths are set up correctly.
If you are writing an app that will connect to Bluetooth LE devices, see the additional steps section 3 Important Information About Bluetooth LE.
Clean, build, and run your custom software project to make sure the library imported correctly.) In your custom software, create an instance of MTSCRA. For examples, including how to register delegate functions in your app for callbacks, see the source code included with the MTSCRA Demo app and / or Appendix C Code Examples .
Begin using the features provided by the MTSCRA object’s methods. For details about these methods, see section 4 MTSCRA Functions
Add the following files to project, and setup the bridge header folder in build settings.
MTSCRA.H
MTSCRA-Bridge.h
Add libMTSCRA.a, in build phases->Link Binary with libraries, click ‘+’, then select Add Files and browse to libMTSCRA.a.
Add libc++.tbd in build phases->Link Binary with libraries, click ‘+’, then type “c++” in the filter area and pick libc++.tbd.
After adding those two libraries, this will be in the project.
Add the external accessory protocols into info file. In the screen shot, it adds iDynamo5 and iDynamo6 with default protocols. Add your custom protocol if different.
Pair the device to the Windows PC.
Launch the MTNET Demo and select either Bluetooth LC, Bluetooth LE EMV, or Bluetooth LE EMVT ass the device type in the devices. Type list box, press the Scan button to display a list of available devices.
Select the Device ID and press the Connect button to open the device.
Pair the device to the Windows PC.
Launch the MTNET Demo and select Serial button to display type in the Type list box, press the Scan button to display a list of available Ports
Select the Device ID and press the Connect button to open the device.

Need Help?
For additional support, please contact MagTek Support:
Technical Support:
📧 Email: support@magtek.com
📞 Phone: 1-562-546-6800 (US)
🕐 Hours: Monday-Friday, 5:30 AM - 5:00 PM PST
Online Resources:
🌐 Support Portal: developer.magtek.com
Documentation Feedback:
Help us improve this documentation!
This manual provides a detailed technical reference for developers, describing how to communicate with the iDynamo 5 Gen III secure card reader using its command set and the MP ASIC.
This is a full-function HTML browser application for Windows that integrates with device drivers to control MagTek payment devices, including the iDynamo 5 Gen III, via HTML over HTTP(S).
A developer guide that helps you understand when and how to transition from 3DES/TDEA DUKPT to AES DUKPT encryption and AES CMAC authentication, covering security landscape risks, migration benefits, and solution planning.
This guide offers concise, step-by-step instructions for physically connecting the iDynamo 5 Gen III to a host device via USB-C and establishing basic communication.
Technical resources including the Programmer's Manual (COMMANDS) for communicating with the device using the MP ASIC, along with .NET, Android, and demo guides for building software solutions with MagTek Secure Card Reader Authenticators.
End-user documentation including the Installation and Operation Manual for mounting and using the reader on Windows and Android via USB-C, as well as a Quick Installation Guide for basic setup.
Supplementary documentation including the Security Policy for PCI PTS POI v6.2 compliance, Device and Package Inspection documents for tamper verification, the MagneFlex Navy Browser guide, and the Windows Utility manual for testing and configuration.
This page provides comprehensive developer documentation for the iDynamo 5 Gen III, including programmer’s manuals, demo guides, and SDK references to help you integrate the secure card reader authenticator into your applications across Windows, Android, and iOS platforms.
Need Help?
For additional support, please contact MagTek Support:
Technical Support:
📧 Email:
To request a list of devices:
Create an MTSCRANET.MTSCRA object.
Set the connection type with setConnectionType().
Add a handler for OnDeviceList().
Call requestDeviceList().
To open multiple devices:
Create an MTSCRANET.MTSCRA object.
Set the connection type with setConnectionType().
Add a handler for OnDeviceList().
Call requestDeviceList().
The following instructions detail how to use the MTNET Demo on Windows PC via USB interface. Same instructions apply to the other interface types.
MTNET Demo queries for device features upon connecting. Some demo features are disabled based on what is supported on the device. MTNET Demo does not automatically set MSR power or set Time.
Connect the device to the USB port of the Windows PC.
Launch the MTNET Demo, select USB as the device type in the Type list box, and press the Scan button to display a list of available devices.
Select the Device ID and press the Connect button to open the device.
Swipe a magnetic stripe card to read the card data.
If you want to send a command to the device, enter the command in the command text box and press the Send button.
To retrieve device information, press the Device Info button
To set the MSR On for the device, press the Set MSR On button.
To set the MSR Off for the device, press the SET MSR off button. Device will not send card data after swiping a magnetic stripe card but will during an EMV transaction.
To configure the current PC date and time in devices which require a Date/Time be set after power up, press the Set Time button before performing an EMV transaction.
To retrieve the battery level of the device, press the Battery button. Note: When powered by USB, the level returns as 100%.
If you have an EMV device and want to read a chip card, select from the Transaction Types, Response, Options, Timeout, and then press the Start button to begin an EMV transaction
If you want to cancel the EMV transaction, press the only work before the card is presented.
To clear the screen, press the Clear button.
To close the device, press the Disconnect button.
This document describes how to communicate with iDynamo 5 Gen III secure card reader (SCR) equipped with the MP application specific integrated circuit (ASIC).
MagTek provides convenient software development kits (SDKs) and corresponding documentation for various programming languages and operating systems. The API libraries included in the SDKs wrap the details of the connection in an interface that conceptually parallels the device’s internal operation, freeing software developers to focus on the business logic, without having to deal with the complexities of platform APIs for connecting to the various available connection types, communicating using the various available protocols, and parsing the various available data formats. Information about using MagTek wrapper APIs is available in separate documentation, including D99875535 Secure Card Reader Authenticator API PROGRAMMING REFERENCE MANUAL.
The SDKs and corresponding documentation include:
Functions for sending the direct commands described in this manual
Wrappers for commonly used commands that further simplify development
Sample source code to demonstrate how to communicate with the device using the direct commands described in this manual
To download the SDKs and documentation, search for “SDK” and select the SDK and documentation for the programming languages and platforms you need, or contact MagTek Support Services for assistance.
Software developers also have the option to revert to direct communication with the device using libraries available in the chosen development framework. For example, custom software written in Visual Basic or visual C++ may make API calls to the standard Windows USB HID driver. This document provides information and support for developing host software using that method.
MagTek has also developed software that demonstrates direct communication with the device, which software developers can use to test the device, and which provides a starting point for developing other software. For more information, see the MagTek web site, or contact your reseller or MagTek Support Services.
The general terms “device” and “host” are used in different, often incompatible ways in a multitude of specifications and contexts. For example, “host” may have different a meaning in the context of USB communication than in the context of networked financial transaction processing. In this document, “device” and “host” are used strictly as follows:
Device refers to the Secure Card Reader Authenticator (SCRA) that receives and responds to the command set specified in this document; device refers to iDynamo 5 Gen III.
Host refers to the piece of general-purpose electronic equipment the device is connected or paired to, which can send data to and receive data from the device. Host types include PC and Mac computers/laptops, tablets, smartphones, teletype terminals, and even test harnesses. In many cases the host may have custom software installed on it that communicates with the device. When “host” must be used differently, it is qualified as something specific, such as “acquirer host” or “USB host.”
Similarly, the word “user” is used in different ways in different contexts. This document separates users into more descriptive categories:
Because some connection types, payment brands, and other vocabulary name spaces (notably Bluetooth® (LE), EMV, smart phones, and more recent versions of Windows) use very specific meanings for the term “Application,” this document favors the term software to refer to software on the host that provides a user interface for the operator.
The combination of device(s), host(s), software, firmware, configuration settings, physical mounting and environment, user experience, and documentation is referred to as the solution.
This function clears the SDK library’s local cache of card swipe data.
(void) clearBuffersParameters: None
Return Value: None
This function sets a callback function to notify when the device has card data to send to the host or when the device state changes. See example in Open Device code example.
(void) listenForEvents:(UInt32)eventParameters: Event
Parameter
Return Value: None
This function retrieves masked card track data after a cardholder swipes a card. Only available on iDynamo/uDynamo; other devices will return an empty string.
Parameters: None
Return Value:
Return stored masked track data string. Tracks are delimited with start and end sentinels.
This function retrieves masked track 1 data after a cardholder swipes a card.
Parameters: None
Return Value: Return stored masked track1 data string.
This function retrieves masked track 2 data, if any, after a cardholder swipes a card.
Parameters: None
Return Value: Return stored masked track2 data string.
This function retrieves masked track 3 data, if any, after a cardholder swipes a card.
Parameters: None
Return Value: Return stored masked track3 data string.
This function retrieves masked PAN data, if any, after a cardholder swipes a card.
Parameters: None
Return Value: Return stored masked PAN data string.
This function retrieves the card’s track 1 data in encrypted format after a cardholder swipes a card.
Parameters: None
Return Value: String containing encrypted track 1 data.
This function retrieves the card’s track 2 data in encrypted format, if any, after a cardholder swipes a card.
Parameters: None
Return Value: String containing encrypted track 2 data.
This function retrieves the card’s track 3 data in encrypted format, if any, after a cardholder swipes a card.
Parameters: None
Return Value: String containing encrypted track 3 data
To add the MTSCRA SDK libraries to a custom software project in the XCode development environment, follow these steps:
Download the MTSCRA Demo app from MagTek.com.
Open your custom software project in XCode.
Open the MTSCRA Demo app folder in Finder.
Open the Lib subfolder.
Include the following files in your custom software project within XCode:
ibMTSCRA.a
MTSCRA.h
Ensure the library search paths are set up correctly.
If you are writing an app that will connect to Bluetooth LE devices, see the additional steps section 3 Important Information About Bluetooth LE.
Clean, build, and run your custom software project to make sure the library imported correctly.
In your custom software, create an instance of MTSCRA. For examples, including how to register delegate functions in your app for callbacks, see the source code included with the MTSCRA Demo app and / or Appendix C Code Examples .
Begin using the features provided by the MTSCRA object’s methods. For details about these methods, see section 4 MTSCRA Functions.
Add the following files to project, and setup the bridge header folder in build settings.
MTSCRA.H
MTSCRA-Bridge.h
Add libMTSCRA.a, in build phases->Link Binary with libraries, click ‘+’, then select Add Files and browse to libMTSCRA.a
Add libc++.tbd in build phases->Link Binary with libraries, click ‘+’, then type “c++” in the filter area and pick libc++.tbd.
After adding those two libraries, this will be in the project.
Add the external accessory protocols into info file. In the screen shot, it adds iDynamo5 and iDynamo6 with default protocols. Add your custom protocol if different.
When calling functions startScanningForPeripherals or openDevice, the application should make sure bleReaderStateUpdated has received a device status and that the most recent status was OK , otherwise the device will not be able to connect, and iOS will not throw any error if Bluetooth is not ready.
Starting in iOS 13, app projects must specify the Privacy Usage Description for Bluetooth by including NSUsageAlwaysUsageDescription in the info.plist file. Accessing Core Bluetooth without the usage descriptions will cause a runtime crash. For backward compatibility with older versions of iOS, define NSBluetoothPeripheralUsageDescription as well.
Make sure device is in pairing mode. If not, press and hold the button for 3 seconds until the blue light blinks, and then release the button.
Set device type and connection type.
Wait for callback bleReaderStateUpdated(), and then call startScanningForPeripheral().
Wait for onDeviceList() callback. Here you can call getDiscoveredPeripherals().
Select the device in the list.
Open the device you want to connect.
Library will pair the device. After inputting passcode, device is ready to use.
MagTek I 1710 Apollo Court I Seal Beach, CA 90740 I Phone: (562) 546-6400 I Technical Support: (888) 624-8350
Copyright © 2006 - 2024 MagTek, Inc. Printed in the United States of America
Information in this publication is subject to change without notice and may contain technical inaccuracies or graphical discrepancies. Changes or improvements made to this product will be updated in the next publication release. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of MagTek, Inc.
MagTek® is a registered trademark of MagTek, Inc. MagneSafe® is a registered trademark of MagTek, Inc. iDynamo™, and uDynamo are trademarks of MagTek, Inc.
eDynamo™, Dynamag, DynaMAX and DynaDip are trademarks of MagTek, Inc.
The Bluetooth® word mark and logos are registered trademarks owned by Bluetooth SIG, Inc. and any use of such marks by MagTek is under license.
@interface MTCardData : NSObject
- (id)initWithCardData:(NSString*)cardData;
/*!
@attribute cardIIN
@discussion cardIIN is 6 digits of the account, usually can help to identify the issuer
*/
@property(nonatomic, strong) NSString *cardIIN;
/*!
This section gives the format of the data the device uses to do completion processing. The output is controlled by Property 0x68 – EMV Message Format. There are currently 2 selectable formats: Original and DynaPro. It is a TLV object with the following contents.
Original Format:
0x00 = Approved
0x01 = Declined
This function gets the MSR capability of the device. For more information, see D99875483 – Track ID Enable Property.
Parameters: None Return Value:
Return MSR Capability bit masking.
ERROR_SUCCESS = 0
ERROR_TIMEOUT = 1
ERROR_DEVICE_NOT_OPEN = 5
ERROR_INVALID_PARAMETER = 6
ERROR_DEVICE_COMMUNICATION_ERROR = 7
ERROR_OTHER_ERROR = 9
ERROR_BUSY = 15
ERROR_DATA_IS_NOT_EXIST = 16
The SDK sends this notification when card data is available from the device.
The SDK sends this notification when the connection status of the device changes.
Return a card object type with card swipe data.
To connect DynaMAX or eDynamo to a host with Windows 8.1 or higher and Bluetooth 4.0 hardware that supports Bluetooth LE, follow these steps:
If you are using an external Bluetooth adapter, install any required drivers and connect it to the host.
On the host, install and configure the software you intend to use with DynaMAX or eDynamo:
MSR Card Swipe
EMV Transaction (Quick Chip)
EMV Transaction (Full)
This function retrieves the card’s encrypted MagnePrint, for readers that support MagnePrint.
Parameters: None
Return Value: String containing the card’s encrypted MagnePrint.
This function retrieves the card MagnePrint status. For more information, see D99875475. Only available on iDynamo; it will return an empty string in audio reader.
Parameters: None Return Value:
Return stored MagnePrintStatus string.
This function retrieves the device serial number.
This function clears the SDK library’s local cache of card swipe data.
(void) clearBuffers
Parameters: None
Return Value: None
This function sets a callback function to notify when the device has card data to send to the host or when the device state changes. See example in Open Device code example.
Parameters: Event
This function retrieves the track decode status after a cardholder swipes a card.
Parameters: None
Return Value:
Hex string, each 2 digits represent one track’s decode status, where the left most 2 digits are for Track 1.
“00” = Success
Get device model name.
Parameters: None
Return Value:
Return device model name.
Clears buffered data retrieved from the reader.
Return Value: None
Retrieves battery level.
Parameters: None
@discussion track1 | track2 | track3
*/
@property(nonatomic, strong) NSString *cardData;
/*!
@attribute cardLast4
@discussion last 4 digits of account, usually can help user to identify him/her self
*/
@property(nonatomic, strong) NSString *cardLast4;
/*!
@attribute cardName @discussion card holder name
*/
@property(nonatomic, strong) NSString *cardName;
@property (strong, nonatomic) NSString *cardLastName;
@property (strong, nonatomic) NSString *cardMiddleName;
@property (strong, nonatomic) NSString *cardFirstName;
@property(nonatomic, strong) NSString *cardExpDate;
@property(nonatomic, strong) NSString *cardServiceCode;
@property(nonatomic, strong) NSString *cardStatus;
@property(nonatomic, strong) NSString *responseData;
@property(nonatomic, strong) NSString *maskedTracks;
@property(nonatomic, strong) NSString *encryptedTrack1;
@property(nonatomic, strong) NSString *encryptedTrack2;
@property(nonatomic, strong) NSString *encryptedTrack3;
@property(nonatomic, strong) NSString *encryptionStatus;
@property(nonatomic, strong) NSString *maskedTrack1;
@property(nonatomic, strong) NSString *maskedTrack2;
@property(nonatomic, strong) NSString *maskedTrack3;
@property(nonatomic, strong) NSString *trackDecodeStatus;
@property(nonatomic, strong) NSString *encryptedMagneprint;
@property(nonatomic, strong) NSString *magneprintStatus;
@property(nonatomic, strong) NSString *deviceSerialNumber;
@property(nonatomic, strong) NSString *deviceSerialNumberMagTek;
@property(nonatomic, strong) NSString *encrypedSessionID;
/*!
@attribute deviceKSN
@discussion Key Serial Number for the card swipe
*/
@property(nonatomic, strong) NSString *deviceKSN;
@property(nonatomic, strong) NSString *deviceFirmware;
@property(nonatomic, strong) NSString *deviceName;
@property(nonatomic, strong) NSString *deviceCaps;
@property(nonatomic, strong) NSString *deviceStatus;
@property(nonatomic, strong) NSString *tlvVersion;
@property(nonatomic, strong) NSString *devicePartNumber;
@property(nonatomic, strong) NSString *capMSR;
@property(nonatomic, strong) NSString *capTracks;
@property(nonatomic, strong) NSString *capMagStripeEncryption;
@property(nonatomic, strong) NSString *maskedPAN;
@property(nonatomic) long cardPANLength;
@property(nonatomic, strong) NSString *additionalInfoTrack1;
@property(nonatomic, strong) NSString *additionalInfoTrack2;
@property(nonatomic, strong) NSString *responseType;
@property(nonatomic) long batteryLevel;
@property(nonatomic) long swipeCount;
@property(nonatomic, strong) NSString *firmware;
@property(nonatomic, strong) NSString *tagValue;
@property(nonatomic) int magnePrintLength;
@property(nonatomic) int cardType;
@property(nonatomic, strong) NSString *cardExpDateMonth;
@property(nonatomic, strong) NSString *cardExpDateYear;
@property(nonatomic, strong) NSString *cardPAN;
@property(nonatomic, strong) NSString *track1DecodeStatus;
@property(nonatomic, strong) NSString *track2DecodeStatus;
@property(nonatomic, strong) NSString *track3DecodeStatus;
@property(nonatomic, strong) NSDate* timeStamp;
@property(nonatomic, strong) NSString* messageID;
@property(nonatomic, strong) NSString* msrDUKPTKeyInfo; // 16 bytes
@property(nonatomic, strong) NSString* mpDUKPTKeySerialNumber; // 0/20/24 @property(nonatomic, strong) NSString* mpDUKPTKeyInfo; // 16 bytes
@property(nonatomic, strong) NSString* macKeyInfo; // 16 bytes
@property(nonatomic, strong) NSString* macMessageLength;
@property(nonatomic, strong) NSString* mac;
@property(nonatomic, strong) NSString* tokenDUKPTKeyInfo;
@property(nonatomic, strong) NSString* tokenDUKPTKeySerialNumber;
@property(nonatomic, strong) NSString* encryptedQwantumDataBuffer;
@property(nonatomic, strong) NSString* qwantumStatus;
@property(nonatomic, strong) NSString* qwantumToken;
@property(nonatomic, strong) NSString* qwantumCardID;
@property(nonatomic, strong) NSString* customerMessageCode;
@property(nonatomic, strong) NSString* customerMessage;
@property(nonatomic) BOOL isQwantumCard;
@property(nonatomic) BOOL isQwantumBuffer;
@property(nonatomic) BOOL isCustomerMessage;
@property(nonatomic, strong) NSString* encryptedSCDE;
@property(nonatomic, strong) NSString* scdeDUKPTKeySerialNumber;
@property(nonatomic, strong) NSString* scdeDUKPTKeyInfo;
@property(nonatomic, strong) NSDictionary* allObjects;
@property(nonatomic, strong) NSArray<NSString*>* objectArray;
@end
The cardholder
The operator (such as a cashier, bank teller, customer service representative, or server), and
The developer or the administrator (such as an integrator configuring the device for the first time).
📞 Phone: 1-562-546-6800 (US)
🕐 Hours: Monday-Friday, 5:30 AM - 5:00 PM PST
Online Resources:
🌐 Support Portal: developer.magtek.com
Documentation Feedback:
Help us improve this documentation! feedback@magtek.com
This manual provides a detailed technical reference for developers, describing how to communicate with the iDynamo 5 Gen III secure card reader using its command set and the MP ASIC.
A technical reference for .NET and Portable Class Library developers, detailing how to communicate with the iDynamo 5 Gen III using MagTek’s command set and the MP ASIC.
A step-by-step guide that provides instructions for using the MTNET Demo to test and validate communication with the iDynamo 5 Gen III within a .NET environment.
A guide for iOS developers, offering instructions on using the MagTek Universal SDK (MTUSDK) to build custom software solutions that communicate with iDynamo 5 Gen III and other SCRA devices.
A developer guide that helps you understand when and how to transition from 3DES/TDEA DUKPT to AES DUKPT encryption and AES CMAC authentication, covering security landscape risks, migration benefits, and solution planning.
A reference manual that describes how to connect and communicate with the iDynamo 5 Gen III from an Android host using the device’s USB-C connection and command set.
A companion document that provides sample code and instructions for using the Android demo application to test iDynamo 5 Gen III integration and functionality.
A manual that explains how to develop iOS applications that interface with the iDynamo 5 Gen III, including details on using Apple iAP2 connections over USB-C or Lightning.
This is a full-function HTML browser application for Windows that integrates with device drivers to control MagTek payment devices, including the iDynamo 5 Gen III, via HTML over HTTP(S).
A library reference that provides developers of custom software solutions with an easy-to-use interface for connecting to the iDynamo 5 Gen III and other MagTek SCRA devices.





















































ERROR_UNKNOWN = 255
MAGTEKAUDIOREADER = Audio readers aDynamo, uDynamo.
MAGTEKIDYNAMO = iOS 30-pin and Lightning readers iDynamo.
MAGTEKDYNAMAX = Bluetooth LE reader DynaMAX.
MAGTEKEDYNAMO = Bluetooth LE reader eDynamo
MAGTEKUSBMSR = USB on OSX Only
MAGTEKKDYNAMO = Lightning EMV reader kDynamo
MAGTEKTDYNAMO = Bluetooth LE reader tDynamo
MAGTEKDYNAWAVE= DynaWave
MAGTEKMDYNAMO = mDynamo
MAGTEKIDYNAMO_G3 = USB-C iDynamo 5 Gen III
MAGTEKNONE
TRANS_STATUS_OK = Transaction succeeded.
TRANS_STATUS_START = Reader started sending data.
TRANS_STATUS_ERROR = Reader failed sending data.
TRANS_EVENT_OK = Transaction succeeded.
TRANS_EVENT_ERROR = Reader failed sending data.
TRANS_EVENT_START = Reader started sending data.
TLV_OPSTS = Operation Status
TLV_CARDSTS = Card Information
TLV_TRACKSTS = Card tracks status
TLV_CARDNAME = Cardholder name
TLV_CARDIIN = Card issuer identification number
TLV_CARDLAST4 = Last four digits of PAN number
TLV_CARDEXPDATE = Card Expiration date
TLV_CARDSVCCODE = Card service code
TLV_CARDPANLEN = Length of the PAN
TLV_ENCTK1 = Encrypted track 1
TLV_ENCTK2 = Encrypted track 2
TLV_ENCTK3 = Encrypted track 3
TLV_DEVSN = Device serial number
TLV_DEVSNMAGTEK = Device serial number created by MagTek
TLV_DEVFW = Device firmware version
TLV_DEVNAME = Device model name
TLV_DEVCAPS = Device capabilities
TLV_DEVSTATUS = Device status
TLV_TLVVERSION = Firmware TLV version
TLV_DEVPARTNUMBER = Device part number
TLV_CAPMSR = Magstripe capabilities
TLV_CAPTRACKS = Track capabilities
TLV_CAPMAGSTRIPEENCRYPTION = Magstripe encryption capabilities
TLV_KSN = KSN
TLV_CMAC = CMAC
TLV_SWPCOUNT = Swipe count
TLV_BATTLEVEL = Battery level
TLV_CFGTLVVERSION = TLV version
TLV_CFGDISCOVERY = Discovery
TLV_CFGCARDNAME = Card name
TLV_CFGCARDIIN = Card issuer identification number
TLV_CFGCARDLAST4 = Card last 4 PAN
TLV_CFGCARDEXPDATE = Card expiration date
TLV_CFGCARDSVCCODE = Card service code
TLV_CFGCARDPANLEN = Card PAN length
TLV_MSKTK1 = Masked Track 1
TLV_MSKTK2 = Masked Track 2
TLV_MSKTK3 = Masked Track 3
TLV_HASHCODE = Hash code
TLV_SESSIONID = Session ID
TLV_MAGNEPRINT = MagnePrint
TLV_MAGNEPRINT_STS = MagnePrint status
CAP_MASKING = Masking
CAP_ENCRYPTION = Encryption
CAP_CARD_AUTH = Card authorization
CAP_DEVICE_AUTH = Device authorization
CAP_SESSION_ID = Session ID
CAP_DISCOVERY= Discovery
BLE = Bluetooth LE
BLE_EMV = Bluetooth LE EMV
USB = Universal Serial Bus Lightning = Lightning
NONE = None
Connection
CommandMessageData
CardMessageData
BLERawMessage
DeviceInfo
RawDataMessage
OK
OFF
RESETTING
DISCONNECTED
UNSUPPORTED UNAUTHORIZED UNKNOWN
instance
Instance ID
Card swipe has started.
Parameter
Description
instance
Instance ID
Card swipe got an error during transmission.
Device connection changed whether from close to open or vice versa.
Parameter
Description
deviceType
MTSCRADeviceType object
connected
Boolean for connection state. True = Connected
False = Not connected
instance
Instance ID
Bluetooth LE Reader was connected.
Parameter
Description
peripheral
CBPeripheral object
Bluetooth LE Reader was disconnected.
Parameter
Description
connectionInfo
MTConnectionInfo object
Bluetooth LE Reader was discovered.
Bluetooth LE state changed. Enumerated possible values that would arrive via this delegate are:
Parameter
Description
state
MTSCRABLEState
Parameter
Description
cardDataObj
MTCardData object
Create an MTSCRANET.MTSCRA object for each reader.
Set the connection type with setConnectionType() for each reader.
Call openDevice() for each reader.
Description
event
Event type.
· TRANS_EVENT_OK = Transaction succeeded.
· TRANS_EVENT_START = Reader started sending data.
· TRANS_EVENT_ERROR = Reader failed sending data.

Note: This is broad to cover multiple devices. For devices that do not need or support a specific command, (i.e. SetMSRAlwaysOn), that portion may be omitted in the flow.
Note: This is broad to cover multiple devices. For devices that do not need or support a specific command, (i.e. SetMSRAlwaysOn), that portion may be omitted in the flow.
Note: This is broad to cover multiple devices. For devices that do not need or support a specific command, (i.e. SetMSRAlwaysOn), that portion may be omitted in the flow.








0x02 = Error
0x10 = Cancelled by Host
0x1E = Manual Selection Cancelled by Host
0x1F = Manual Selection Timeout
0x21 = Waiting for Card Cancelled by Host
0x22 = Waiting for Card Timeout
0x23 = Cancelled by Card Swipe
0xFF = Unknown
DynaPro Format:
Bit 3
Bit 2
Bit 1
Bit 0
Id
0
T3
T3
T2
T2
T1
T1
0 – Decodes standard ISO/ABA cards only
1 – Decodes AAMV and 7-bit cards also
If this flag is set to 0, only tracks that conform to the ISO format allowed for that track will be decoded. If the track cannot be decoded by the ISO method it will be considered to be in error.
00 – Track Disabled
01 – Track Enabled
10 – Track Enabled/Required (Error if blank)
This function gets the device’s capability for encrypting track data.
Return Value:
“1” = Available
“0” = Unavailable.
This function gets information about the device’s tracks capability.
Parameters: None
Return Value: A hex string for the track capability. See Track ID Enable Property in D99875475.
This function retrieves the card expiration date after a cardholder swipes a card.
Parameters: None
Return Value: String containing the card expiration date
This function gets the last 4 digits of the card account number (PAN) after a cardholder swipes a card.
Parameters: None
Return Value: String containing the last 4 digits of the PAN
This function gets the issuer identification number (IIN) of the card number after a cardholder swipes a card.
Parameters: None
Return Value: String containing the IIN
This function gets the cardholder name after a cardholder swipes a card.
Parameters: None
Return Value: String containing the cardholder name, for example, “John Wayne”.
This function gets the length of the PAN after a cardholder swipes a card.
Parameters: None
Return Value: Length of card number or PAN
This function retrieves the card’s service code after a cardholder swipes a card.
Parameters: None
Return Value: String containing the card’s service code
This function retrieves the part number and revision of the device’s firmware.
Parameters: None
Return Value: String containing firmware part number and revision.
Bit 7
Bit 6
Bit 5
Bit 4
Return Value: String containing the device serial number.
This function returns the MagTek serial number of the currently opened device.
Parameters: None
Return Value: Return stored serial number created by MagTek.
This function retrieves the Session ID from the currently opened device, which the host can use to uniquely identify a transaction to prevent replay. Only supported by iDynamo/uDynamo; on other devices this function will return an empty string. For more information, see D99875475
Parameters: None
Return Value: Stored session ID.
This function retrieves the Key Serial Number (KSN) from the device.
Parameters: None
Return Value: String containing the stored key serial number.
This function gets the device’s product name.
Return Value: String containing the device product name.
This function gets the device type.
Parameters: None
Return Value: Device Type
This function sets the type of device to open. Call this function before calling openDevice.
Parameters:
Device Type:
MAGTEKAUDIOREADER = Audio readers aDynamo, uDynamo.
MAGTEKIDYNAMO = iOS 30-pin and Lightning readers iDynamo.
MAGTEKDYNAMAX = Bluetooth LE reader DynaMAX.
MAGTEKEDYNAMO = Bluetooth LE reader eDynamo.
MAGTEKKDYNAMO = Lightning reader kDynamo.
MAGTEKTDYNAMO = Bluetooth LE reader tDynamo.
Return Value: None
This function gets the capabilities of the currently opened device.
Parameters: None
Return Value: Return device capabilities.
CAP_MASKING = 1,
CAP_ENCRYPTION=2,
CAP_CARD_AUTH = 4,
CAP_DEVICE_AUTH = 8,
CAP_SESSION_ID = 16,
CAP_DISCOVERY= 32,
Parameter
Description
event
Event type.
TRANS_EVENT_OK = Transaction succeeded.
TRANS_EVENT_START = Reader started sending data.
TRANS_EVENT_ERROR = Reader failed sending data.
Return Value: None
This function retrieves masked card track data after a cardholder swipes a card. Only available on iDynamo/uDynamo; other devices will return an empty string.
Parameters: None
Return Value:
Return stored masked track data string. Tracks are delimited with start and end sentinels.
This function retrieves masked track 1 data after a cardholder swipes a card.
Parameters: None
Return Value: Return stored masked track1 data string.
This function retrieves masked track 2 data, if any, after a cardholder swipes a card.
Parameters: None
Return Value: Return stored masked track2 data string.
This function retrieves masked track 3 data, if any, after a cardholder swipes a card.
Parameters: None
Return Value: Return stored masked track3 data string.
This function retrieves masked PAN data, if any, after a cardholder swipes a card.
Parameters: None
Return Value: Return stored masked PAN data string.
This function retrieves the card’s track 1 data in encrypted format after a cardholder swipes a card.
Parameters: None
Return Value: String containing encrypted track 1 data.
This function retrieves the card’s track 2 data in encrypted format, if any, after a cardholder swipes a card.
Parameters: None
Return Value: String containing encrypted track 2 data.
This function retrieves the card’s track 3 data in encrypted format, if any, after a cardholder swipes a card.
Parameters: None
Return Value: String containing encrypted track 3 data.q
“02” = No track present
Examples:
“000000” = Track 1, 2, and 3 success.
“000100” = Track 1 and 3 success. Track 2 had error.
“000002” = Track 1 and 2 success. Track 3 not present.
This function retrieves device’s battery level percentage between 0% and 100%, if the device has a battery and supports battery level monitoring. To retrieve the most up to date percentage, call this function after a transaction.
Parameters: None
Return Value: Long value between 0 and 100
This function returns the currently opened device’s part number.
Parameters: None
Return Value: String containing the device part number.
Retrieves the Card Status
Parameters: None
Return Value: Card Status, which depends on the device.
This function retrieves individual TLV tag values. Only supported on aDynamo/UDynamo.
Parameters:
Tag = An MTSCRATransactionData type (see section D.5 MTSCRATransactionData).
Return Value: String containing the value of the specified tag.
This function gets the status of the currently connected device.
Parameters: None
Return Value: Return device status of swipe count and battery level.
This function gets the status of the current operation.
Parameters: None
Return Value: Operation Status
This function returns the version of the tag-length-value (TLV) format supported by the device.
Parameters: None
Return Value: String containing the firmware TLV version.
This function sets the protocol string the SDK will use to communicate with the device. See example in
Open Device code example.
Parameters: Protocol String
Return Value: None
This function gets the response type.
Parameters: None
Return Value: Response Type
Battery Level (0 to 100)
Retrieves swipe count.
Parameters: None
Return Value:
Long value representing swipe count.
Retrieves MagnePrint capabilities.
Parameters: None
Return Value:
String representing MagnePrint capabilities:
0 = No MagnePrint,
1 = Short MagnePrint,
2 = Long MagnePrint
Retrieves MagnePrint Encryption capabilities.
Parameters: None Return Value:
String representing MagnePrint Encryption capabilities:
0 = No Encryption,
1 = Same as MagStripe (8122), other values TBD.
If absent, default value is 1.
Retrieves MagneSafe 2.0 Encryption capabilities.
Parameters: None
Return Value:
String representing MagneSafe 2.0 Encryption capabilities. 0 = Not supported, other values TBD.
Retrieves MagneStripe Encryption capabilities.
Parameters: None
Return Value:
String representing MagStripe Encryption capabilities. 0 = No Encryption, 1 = TDES DUKPT / PIN Variant, other values TBD
Retrieves MSR capabilities.
Return Value:
String representing MSR capabilities. 0 = No MSR, 1 = MSR.
Retrieves Track capabilities.
Parameters: None Return Value:
String representing Track capabilities:
Bit 0 = 1 / Track 1 supported,
Bit 1 = 1 / Track 2 supported,
Bit 2 = 1 / Track 3 supported,
All other bits = 0.
MTSCRANET.MTSCRA listMTSCRA = new MTSCRANET.MTSCRA();
listMTSCRA.setConnectionType(MTConnectionType.USB);
listMTSCRA.OnDeviceList() += listMTSCRA_OnDeviceList;
listMTSCRA.requestDeviceList(MTConnectionType.USB);
listMTSCRA_OnDeviceList(
object sender,
MTConnectionType connectionType,
List<MTDeviceInformation> deviceList)
{
//Handle deviceList
}MTSCRANET.MTSCRA listMTSCRA = new MTSCRANET.MTSCRA();
listMTSCRA.setConnectionType(MTConnectionType.USB);
listMTSCRA.OnDeviceList() += listMTSCRA_OnDeviceList;
MTDeviceInformation listDeviceInfo;
listMTSCRA.requestDeviceList(MTConnectionType.USB);
listMTSCRA_OnDeviceList(
object sender,
MTConnectionType connectionType,
List<MTDeviceInformation> deviceList)
{
//Handle deviceList
For Each (dev in deviceList)
{
}
listDeviceInfo.Add(dev)
}
MTSCRANET.MTSCRA msr1 = new MTSCRANET.MTSCRA();
MTSCRANET.MTSCRA msr2 = new MTSCRANET.MTSCRA();
MTSCRANET.MTSCRA msr3 = new MTSCRANET.MTSCRA();
msr1.setConnectionType(MTConnectionType.USB);
msr1.setAddress(dev.Address); msr1.openDevice();
if (! msr1.isDeviceConnected())
{
msr1.openDevice();
}
msr2.setConnectionType(MTConnectionType.USB);
msr2.setAddress(dev.Address);
msr2.openDevice();
if (! msr2.isDeviceConnected())
{
msr2.openDevice();
}
msr3.setConnectionType(MTConnectionType.USB);
msr3.setAddress(dev.Address);
msr3.openDevice();
if (! msr3.isDeviceConnected())
{
msr3.openDevice();
}
if (mMTSCRA != null)
{
mMTSCRA.closeDevice();
}if (! mMTSCRA.isDeviceConnected())
{
}if (! mMTSCRA.isDeviceConnected())
{
mMTSCRA.CardDataReceived += OnCardDataReceived;
mMTSCRA.openDevice();
}
public void OnCardDataReceived(Object sender)
{ // Display last 4 digits of the card
CardLast4.Text = mMTSCRA.getCardLast4();
}if (mMTSCRA.isDeviceConnected())
{
// Send discovery command
mMTSCRA.sendCommandToDevice(“C10206C20503840900”, 0);
}(NSString *) getMaskedTracks(NSString *) getTrack1Masked(NSString *) getTrack2Masked(NSString *) getTrack3Masked(NSString *) getCardPAN(NSString *) getTrack1(NSString *) getTrack2(NSString *) getTrack3 self.lib.setConnectionType(UInt(BLE_EMV))
self.lib.setDeviceType(UInt32(MAGTEKEDYNAMO))func bleReaderStateUpdated(_ state: MTSCRABLEState) {
print("readerStateUpdated - ", state)
if (state == 0) {
// dispatch in main queue is very important
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1,
execute: {
self.lib.startScanningForPeripherals() })
})
}
} lib.stopScanningForPeripherals()
lib.setAddress(devList[selected].address)
lib.openDevice() self.mtSCRALib = [[MTSCRA alloc] init];
[self.mtSCRALib
listenForEvents: TRANS_EVENT_OK|TRANS_EVENT_START|TRANS_EVENT_ERROR)];
//iDynamo
[self.mtSCRALib setDeviceType:(MAGTEKIDYNAMO)];
[self.mtSCRALib setDeviceProtocolString:(“com.magtek.idynamo”)];
//Audio
//[self.mtSCRALib setDeviceType:(MAGTEKAUDIOREADER)];
[self.mtSCRALib openDevice];[self.mtSCRALib closeDevice];[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(trackDataReady:) name:@"trackDataReadyNotification"
object:nil];
- (void)trackDataReady:(NSNotification *)notification
{
NSNumber *status = [[notification userInfo]
valueForKey:@"status"];
[self performSelectorOnMainThread:@selector(onDataEvent:)
withObject:status waitUntilDone:YES];
}
- (void)onDataEvent:(id)status
{
//[self clearLabels];
switch ([status intValue]) {
case TRANS_STATUS_OK:
NSLog(@"TRANS_STATUS_OK");
break;
case TRANS_STATUS_ERROR:
NSLog(@"TRANS_STATUS_ERROR");
break;
default:
break;
}
}[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(devConnStatusChange)
name:@"devConnectionNotification" object:nil];
- (void)devConnStatusChange
{
BOOL isDeviceConnected = [self.mtSCRALib isDeviceConnected];
if (isDeviceConnected)
{
self.deviceStatus.text = @"Device Connected";
}
else
{
self.deviceStatus.text = @"Device Disconnected";
}
}FE<len>/* container for generic data
*/ DFDF25(IFD Serial Number)<len><val>
FA<len>/* container for generic data */
F0<len>/* Transaction Results */
F1<len>/* container for Status Data */
… /* Status Data tags */
DFDF1A - Transaction Status (See DFDF1A descriptions)
DFDF1B - Additional Transaction Information (always 0)
DFDF52 - Card Type Used
F2<len>/* container for Batch Data */
… /* Batch Data tags defined in DFDF17 */
…/* Note: Sensitive Data cannot be defined in DFDF17*/
F3<len>/* container for Reversal Data, if any */
… /* Reversal Data tags defined in DFDF05 */
…/* Note: Sensitive Data cannot be defined in DFDF05*/
F7<len>/* container for Merchant Data */
… /* < Merchant Data tags */
F8<len>/* container tag for encrypted data */
DFDF56(Encrypted Transaction Data KSN)<len><val>
DFDF57(Encrypted Transaction Data Encryption Type)<val>
FA<len>/* container for generic data */
DF30(Encrypted Tag 56 TLV, T1 Data)<len><val>
DF31(Encrypted Tag 57 TLV, T2 Data)<len><val>
DF32(Encrypted Tag 5A TLV, PAN)<len><val>
DF35(Encrypted Tag 9F1F TLV, T1 DD)<len><val>
DF36(Encrypted Tag 9F20 TLV, T2, DD)<len><val>
DF37(Encrypted Tag 9F61 TLV, T2 CVC3)<len><val>
DF38(Encrypted Tag 9F62 TLV, T1,PCVC3)<len><val>
DF39(Encrypted Tag DF812A TLV, T1 DD)<len><val>
DF3A(Encrypted Tag DF812B TLV), T2 DD<len><val>
DF3B(Encrypted Tag DFDF4A TLV, T2 ISO Format)<len><val>
DF40(Encrypted Value only of DFDF4A, T2 ISO
Format)<len><val>F9<len>/* container for MAC structure and generic data */
DFDF54(MAC KSN)<len><val>
DFDF55(MAC Encryption Type)<len><val>
DFDF25(IFD Serial Number)<len><val>
FA<len>/* container for generic data */
F0<len>/* Transaction Results */
F1<len>/* container for Status Data */
… /* Status Data tags */
F8<len>/* container tag for encryption */
DFDF59(Encrypted Data Primative)<len><Encrypted Data val>
(Decrypt data to read tags)
DFDF56(Encrypted Transaction Data KSN)<len><val>
DFDF57(Encrypted Transaction Data Encryption Type)<val>
DFDF58(# of bytes of padding in DFDF59)<len><val>
F7<len>/* container for Merchant Data */
… /* < Merchant Data tags */
(Buffer if any to be a multiple of 8 bytes)
CBC-MAC (4 bytes, always set to zeroes)(NSString *) getCapMSR(NSString *) getCapMagStripeEncryption Parameters: None(NSString *) getCapTracks(NSString *) getCardExpDate(NSString *) getCardLast4(NSString *) getCardIIN(NSString *) getCardName(int) getCardPANLength(NSString *) getCardServiceCode(NSString *) getFirmware(NSString *) getMagnePrint(NSString *) getMagnePrintStatus(NSString *) getDeviceSerial(NSString *) getMagTekDeviceSerial(NSString *) getSessionID(NSString *) getKSN(NSString *) getDeviceName Parameters: None(int) getDeviceType (void) setDeviceType:(UInt32 *)deviceType(NSString *) getDeviceCaps(void) listenForEvents:(UInt32)event(NSString *) getMaskedTracks(NSString *) getTrack1Masked(NSString *) getTrack2Masked(NSString *) getTrack3Masked(NSString *) getCardPAN(NSString *) getTrack1(NSString *) getTrack2(NSString *) getTrack3(NSString *) getTrackDecodeStatus(long) getBatteryLevel(NSString *) getDevicePartNumber(NSString *) getCardStatus (NSString *) getTagValue:(UInt32)tag(NSString *) getDeviceStatus(NSString *) getOperationStatus(NSString *) getTLVVersion(void) setDeviceProtocolString:(NSString *)pData(NSString *) getResponseType public String getDeviceName()public void clearBuffers() Parameters: Nonepublic long getBatteryLevel()public long getSwipeCount()public String getCapMagnePrint()public String getCapMagnePrintEncryption()public String getCapMagneSafe20Encryption()public String getCapMagStripeEncryption()public String getCapMSR() Parameters: Nonepublic String getCapTracks()Microsoft®, Windows® and .NET® are registered trademarks of Microsoft Corporation.
EMV® is a registered trademark in the U.S. and other countries and an unregistered trademark elsewhere. The EMV trademark is owned by EMVCo, LLC. The Contactless Indicator mark, consisting of four graduating arcs, is a trademark owned by and used with permission of EMVCo, LLC.
All other system names and product names are the property of their respective owners.
Table 0.1 - Revisions
Rev Number
Date
Notes
10
January 5, 2017
Initial release
11
May 24, 2018
SOFTWARE LICENSE AGREEMENT
IMPORTANT: YOU SHOULD CAREFULLY READ ALL THE TERMS, CONDITIONS AND RESTRICTIONS OF THIS LICENSE AGREEMENT BEFORE INSTALLING THE SOFTWARE PACKAGE. YOUR INSTALLATION OF THE SOFTWARE PACKAGE PRESUMES YOUR ACCEPTANCE OF THE TERMS, CONDITIONS, AND RESTRICTIONS CONTAINED IN THIS AGREEMENT. IF YOU DO NOT AGREE WITH THESE TERMS, CONDITIONS, AND RESTRICTIONS, PROMPTLY RETURN THE SOFTWARE PACKAGE AND ASSOCIATED DOCUMENTATION TO THE ADDRESS ON THE FRONT PAGE OF THIS DOCUMENT, ATTENTION: CUSTOMER SUPPORT.
MagTek, Incorporated (the "Licensor") owns and has the right to distribute the described software and documentation, collectively referred to as the "Software."
LICENSE: Licensor grants you (the "Licensee") the right to use the Software in conjunction with MagTek products. LICENSEE MAY NOT COPY, MODIFY, OR TRANSFER THE SOFTWARE IN WHOLE OR IN PART EXCEPT AS EXPRESSLY PROVIDED IN THIS AGREEMENT. Licensee
may not decompile, disassemble, or in any other manner attempt to reverse engineer the Software. Licensee shall not tamper with, bypass, or alter any security features of the software or attempt to do so.
TRANSFER: Licensee may not transfer the Software or license to the Software to another party without the prior written authorization of the Licensor. If Licensee transfers the Software without authorization, all rights granted under this Agreement are automatically terminated.
COPYRIGHT: The Software is copyrighted. Licensee may not copy the Software except for archival purposes or to load for execution purposes. All other copies of the Software are in violation of this Agreement.
TERM: This Agreement is in effect as long as Licensee continues the use of the Software. The Licensor also reserves the right to terminate this Agreement if Licensee fails to comply with any of the terms, conditions, or restrictions contained herein. Should Licensor terminate this Agreement due to Licensee's failure to comply, Licensee agrees to return the Software to Licensor. Receipt of returned Software by the Licensor shall mark the termination.
LIMITED WARRANTY: Licensor warrants to the Licensee that the disk(s) or other media on which the Software is recorded are free from defects in material or workmanship under normal use.
THE SOFTWARE IS PROVIDED AS IS. LICENSOR MAKES NO OTHER WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Because of the diversity of conditions and PC hardware under which the Software may be used, Licensor does not warrant that the Software will meet Licensee specifications or that the operation of the Software will be uninterrupted or free of errors.
IN NO EVENT WILL LICENSOR BE LIABLE FOR ANY DAMAGES, INCLUDING ANY LOST PROFITS, LOST SAVINGS, OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE, OR INABILITY TO USE, THE SOFTWARE. Licensee's sole remedy in the event of a defect in material or workmanship is expressly limited to replacement of the Software disk(s) if applicable.
GOVERNING LAW: If any provision of this Agreement is found to be unlawful, void, or unenforceable, that provision shall be removed from consideration under this Agreement and will not affect the enforceability of any of the remaining provisions. This Agreement shall be governed by the laws of the State of California and shall inure to the benefit of MagTek, Incorporated, its successors or assigns.
ACKNOWLEDGMENT: LICENSEE ACKNOWLEDGES THAT HE HAS READ THIS AGREEMENT, UNDERSTANDS ALL OF ITS TERMS, CONDITIONS, AND RESTRICTIONS, AND AGREES TO BE BOUND BY THEM. LICENSEE ALSO AGREES THAT THIS AGREEMENT SUPERSEDES ANY AND ALL VERBAL AND WRITTEN COMMUNICATIONS BETWEEN LICENSOR AND LICENSEE OR THEIR ASSIGNS RELATING TO THE SUBJECT MATTER OF THIS AGREEMENT.
QUESTIONS REGARDING THIS AGREEMENT SHOULD BE ADDRESSED IN WRITING TO MAGTEK, INCORPORATED, ATTENTION: CUSTOMER SUPPORT, AT THE ADDRESS LISTED IN THIS DOCUMENT, OR E-MAILED TO SUPPORT@MAGTEK.COM.
Make sure the host software knows which device(s) it should interface with.
Make sure the host software is configured to properly interpret incoming data from the device. This depends on whether the device is configured to transmit data in GATT format or streaming format emulating a keyboard.
Make sure the DynaMAX’s batteries are installed and have adequate charge. If using eDynamo, make sure the device has an adequate charge.
Test the batteries by powering on the DynaMAX or eDynamo device. Provided the device is not already paired, the Bluetooth Status LED will flash blue every two seconds for up to 60 seconds until pairing is complete. If the Bluetooth Status LED is solid blue, the device is already paired with a host. Unpair from the host it is already paired with before continuing.
Enter app mode, scroll down to Apps by name , and launch the Windows PC Settings app.
In the left side navigator, select PC and devices > Bluetooth
Make sure Bluetooth is turned on and close the PC and devices all
Launch the Windows Manage Bluetooth Devices app by following these steps:
Enter desktop mode by swiping in from the left side of the touchscreen.
Touch the Bluetooth icon in the system tray and select Add a Bluetooth Devices (see Error! Reference source not found.).
Locate the serial number on the label on the bottom of the device. Note the final four digits.
Read through the list of pairable devices and locate the device called DynaMAX-nnnn or eDynamo-nnnn, where nnnn is the last four digits of the device’s serial number (if the device does not show in the list, power it off then power it back on). Below the device name you should see the Ready to pair.
Select the device and press Pair button. If the device is configured to run in KB mode. Windows will prompt you Enter the passcode for your keyboard.
Enter default passcode 000000 (or the device’s actual password if it has been configured differently), then press the Next button. Windows will return you to the Manage Bluetooth devices page. After a short period of time, you will see the text Connected below the device you are pairing with.
After a few seconds, the device will disconnect, which is normal power-saving behavior.
Use the host software to test swiping a card. If you do not yet have host software and the device is configured to run in KB mode, open any text editor and swipe a card. The card contents should appear in the text editor.
The device consumes very little power when not transmitting card data, so it is not necessary to power off the device to conserve power. If the device appears as Not Connected in the Windows list of Bluetooth devices, swiping a card should cause the device to reconnect briefly, transmit the card data, then disconnect.
Remember to change the default password. See the DynaMAX Programmer’s Reference documents for details.
To unpair from the device:
Locate the device in the Manage Bluetooth devices window
Press the Remove device button.
To set up the headset interface on Windows PC to communicate with the MagTek SCRA device, follow these steps:
Connect the device to the headset jack of the Windows PC.
Open the Windows Control Panel.
Open Sound
Select the Playback tab.S
Select the playback device that is connected to the SCRA device (for example, Speakers and Headphones).
Press the Properties button to launch the (device name) Properties tab.
Select the Levels tab
Set the volume to maximum. See Figure 3-1 for an example.
Select the Recording tab.
Select the headset interface that is connected to the SCRA device (for example, Headset Mic).
Press the Properties button to launch the (device name) Properties tab.
Select the Levels tab.
Turn any boost settings or other special volume settings completely off (for example, set Microphone Boost ) to 0.0dB). See Figure 3-2 for an example.
If the (device name) Properties window has and Enhancements tab, select it.
Make sure all checkboxes in the Enhancements tab are turned off. See Figure 3-3 for an example.
If the (device name) Properties window has an Effects tab, select it
If the Enhancements tab has a Disable System Effects checkbox, turn it ON. Turn all other effects off. See Figure 3-4 for an example.
Figure 3-1 Device Volume Level Set to 100
Figure 3-2 Microphone Boost Turned Off
Figure 3-3 Enhancements Turned Off
Figure 3-4 Effects Turned Off
To set up the headset interface on Windows Phone to communicate with the MagTek SCRA device, follow these steps:
Connect the device to the headset jack of the Windows Phone.
Adjust the audio output to the maximum level using the physical volume buttons of the Windows Phone.
To add the MagTek SCRA libraries to a .NET project in Microsoft Visual Studio, follow these steps:
Create or open your .NET project in Visual Studio.
Copy the following DLL files from the MTNETDemo folders to the library folder of your software project:
MTDevice.dll
In order to use the MagTek USB card readers with PID 0011, follow these steps:
Open Device Manager
Right Click on MagTek MagneSafe Magnetic Stripe Reader Device
Select Update Driver Software .
Select Browse My Computer for driver software .
Select Let me pick from a list of device drivers on my computer .
Select HiD-Compliant Device then click Next.
Windows will pop up a message saying successfully updated your driver. Click to finish.
MTSCRA Class Methods.
To add the MagTek SCRA libraries to a Universal Windows project in Microsoft Visual Studio, follow these steps:
Create or open your Universal Windows project in Visual Studio.
Copy the following DLL file from the SDK library folder to the library folder of your software project:
MTSCRAUWP.dll
In order to use the MagTek USB card readers with PID 0011, follow these steps:
Open Device Manager
Right Click on MagTek MagneSafe Magnetic Stripe Reader Device .
Select Update Driver Software .
Select Browse My Computer for driver software .
Select Let me pick from a list of device drivers on my computer .
Select Let me pick from a list of device drivers on my computer.
Select HiF-Compliant Device then click Next.
Windows will pop up a message saying successfully updated your driver. Click Close to finish.
To troubleshoot runtime issues with custom software, use standard XCode debugging methods and tools.
This command is used to set the device’s date and time before calling startTransaction().
Devices with a battery-backed real time clock have the date and time set by the manufacturer, so this command may not need to be used after that. Devices that do not have a battery-backed real time clock must use this command frequently because (a) the clock must be set before the device can process EMV transactions, and (b) the host software must use this command every time the device is power cycled or reset.
Offset
Field Name
For 5:00 PM January 01, 2023 030C001800000000000000000000000000000000000101110000000F
The host uses this command to directly control power to the magnetic stripe reader head inside the device, to manage device power consumption and battery life. The host must power up the head before a cardholder swipes a magnetic stripe card outside the scope of an EMV transaction.
When the state is set to Always On, the head will always be powered.
When the state is set to Off When Idle, the head will be off when the device is idle. In this state, the device will not be able to read magnetic stripe cards outside the scope of EMV transactions without first turning the head on.
If the host sends startTransaction() the device will automatically power up the head, then power it down when the EMV transaction terminates.
Result codes: 0x00 = Success
Example Request (Hex):
This document provides instructions for software developers who want to create custom software solutions that communicate with DynaMAX, eDynamo, aDynamo, iDynamo, uDynamo, kDynamo, sDynamo, tDynamo, iDynamo 5 Gen II, iDynamo 5 Gen III, or iDynamo 6 connected to an iOS host via audio connector or Bluetooth LE. It is part of a larger library of documents which includes:
MagneSafe V5 Programmer’s Reference (Commands)
DynaMAX Programmer's Manual (Commands)
eDynamo Programmer's Manual (Command)
iDynamo 5 (Gen II) Programmer's Manual (Commands)
iDynamo 5 (Gen III) Programmer's Manual (Commands)
kDynamo Programmer's Manual (Commands)
tDynamo Programmer's Manual (Commands)
D998200324 iDynamo 6 Programmer's Manual (Command )
The MTSCRADemo software, available from MagTek, provides demonstration source code and a reusable MTSCRA library that provides developers of custom iOS software solutions with an easy-to-use interface. Developers can include the MTSCRA library in custom branded software which can be distributed to customers or distributed internally as part of an enterprise solution.
The general terms “device” and “host” are used in different, often incompatible ways in a multitude of specifications and contexts. For example, “host” may have different meanings in the context of USB communication than it does in the context of networked financial transaction processing. In this document, “device” and “host” are used strictly as follows:
Device refers to the MSR device that receives and responds to the command set specified in this document; in this case, DynaMAX, eDynamo, aDynamo, iDynamo, uDynamo, kDynamo, sDynamo, tDynamo, or iDynamo 6.
Host refers to the piece of general-purpose electronic equipment the device is connected or paired to, which can send data to and receive data from the device. Host types include PC and Mac computers/laptops, tablets, smartphones, teletype terminals, and even test harnesses. In many cases the host may have custom software installed on it that communicates with the device. When “host” must be used differently, it is qualified as something specific, such as “USB host.”
The word “user” is also often used in different ways in different contexts. In this document, user generally refers to the cardholder.
Tested devices:
iPhone 7, 7 Plus, 8, 8 Plus, X, XS, XS Max, 11, 12, 13, 14, 15 series, iPhone 12 and 13 mini
iPad 6th 7th, 8th, 9th, 10th gen, iPad Air, iPad Air 2/3/4/5, iPad Pro, iPad Pro 2nd, 3rd, 4th, and 5th gen
iPad Mini 2, iPad Mini 3, iPad Mini 4, iPad Mini 5, iPad Mini 6 Tested operating systems: iOS 13 and above
Build Platforms: XCode 15.3 and above
The following table matches the device interface to operating system.
When is the right time to transition to AES DUKPT and what needs to be considered?
Since the 1970s the electronic payments and secure banking communities have strived to provide their customers with greater convenience, faster speeds, and improved security for electronic transactions. Throughout this timeline, the Open Standards Community, comprised of the International Standards Organization (ISO) and the American National Standards Institute (ANSI-X9), have led the way with the development of numerous security standards that have provided an open platform for proper implementation of accepted encryption and authentication methods. This platform was further augmented in 2007 when the PCI Security Standards council adopted these standards and provided a superset of additional guidance and requirements for PCI DSS.
Collectively, the Open Standards and PCI Security Standards communities have provided a trusted foundation for guiding the global implementation of accepted security methods for Electronic Payments and Secure Banking.
Paramount amongst these security standards has been defining the use of encryption and authentication technologies for the protection of customer PINs and payment data.
TDEA ENCRYPTION WITH DUKPT KEY MANAGEMENT
Since 1998, the use of Triple DES (3DES), also known as Triple Data Encryption Algorithm (TDEA), in combination with DUKPT Key Management (Derived Unique Key Per Transaction) has been the gold-standard for protection of PINs and payment data. To its credit, the TDEA DUKPT platform continues to serve its community well and has never yet suffered a “real world” security compromise.
That said, numerous universities and security labs have conducted research and published data that suggests the security capabilities of TDEA DUKPT may soon be challenged (and surpassed) by security threats from advanced computing platforms that will brute-force calculations at ever faster speeds (e.g., quantum computers). These threats may soon provide a viable path for attackers to “crack” the TDEA DUKPT level of security. To mitigate these threats, stronger encryption and authentication methods are required.
In anticipation of increased security threats to the TDEA DUKPT platform, the Open Standards community released a new set of improved security standards in 2017 that support AES DUKPT. (Reference: ANSI X9.24-3) The AES DUKPT standards provide a pathway to improved security features that are significantly stronger and more resistant to brute-force attacks. Specifically, these standards use the AES algorithm (Advanced Encryption Standard) in conjunction with an updated DUKPT specification. AES-128 DUKPT and AES-256 DUKPT are the new standards.
AES-128 uses crypto keys that are 128-bits in length and AES-256 uses crypto keys that are 256-bits in length. Both are far more secure than the existing TDEA DUKPT implementation that uses crypto keys that provide only 112-bits of key strength.
In the world of cryptography, each additional bit represents an order-of-magnitude improvement in security. The larger AES key sizes represent a significant improvement in encryption protection from attackers. In addition, the AES algorithm itself provides numerous security improvements for faster calculation speeds and reduces the possibilities of crypto-analysis side-channel attacks.
In addition to stronger AES encryption, CMAC (cipher-based message authentication code) authentication enhances the security of sensitive data. In this context, CMAC authentication is the cryptographic process of validating that the encrypted sensitive data has not been manipulated or altered from its original form. The authentication process begins within the trusted hardware reader device, where prior to AES encryption, the sensitive clear-text data has a cryptographic CMAC calculation applied to it using a secret MAC key. This results in a unique 6-digit CMAC checksum that is unique to the sensitive data.
The sensitive data is then AES encrypted within the hardware reader device and the CMAC checksum is included with the encrypted data packet that is transferred to a trusted decryption host. Upon receipt at the trusted decryption host, the sensitive data is both decrypted and CMAC validated to confirm that clear-text sensitive data is still in its original form and without alteration or compromise.
Combined, the use of AES DUKPT encryption in combination with CMAC data authentication provides a powerful “one-two punch” that ensures sensitive data remains protected and intact.
Planning your Roadmap
TDEA DUKPT is in its twilight era and needs to be replaced by the more secure AES DUKPT platform. The benefits of doing so are improved security and higher confidence that financial transaction data will remain safe for now and into the future.
To stay ahead of potential threats, PCI has been encouraging the electronic payments community to begin the migration from TDEA DUKPT to AES DUKPT to protect both PIN and payment data. Although no mandates have been made, the threat landscape is expanding, and the urgency to migrate towards more secure encryption is accelerating.
WHAT DATA DO I NEED TO PROTECT? WHAT PROTECTION SHOULD I USE?
Ideally, to meet PCI DSS requirements, it is necessary to protect sensitive PAN (Personal Account Number) payment data and/or PIN (Personal Identification Number) data so that the clear-text sensitive data is never stored, transmitted, or available within the merchant’s payment systems. To do this, it is recommended to use AES DUKPT to protect this sensitive data.
IS THERE A REQUIREMENT TO AUTHENTICATE DATA?
After determining the data that needs to be protected and the best protection method, the next step is to determine how to build out the complete ecosystem including the customer environment, hardware, and services.
WHAT HARDWARE DO I NEED?
To move to AES DUKPT encryption, you will need a card reader / PIN entry device (PED) that is specifically rated and approved to support AES DUKPT operations. Check the data sheet of your device or speak with the product support team from your vendor. Ideally, the device should be a “PCI Approved” device rated as “PCI 6.x” (or higher) and list AES support.
DO I NEED NEW KEYS?
Transitioning from TDEA DUKPT to AES DUKPT requires a plan and trusted partners. MagTek and Magensa have a complete solution of integrated hardware, services, and support to make this migration simple, fast, and painless. Partner with us today and let us show you how to migrate to a higher-security AES DUKPT platform that provides maximum data protection for your customers and your business.
REGISTERED TO ISO 9001:2015
Copyright © 2006 - 2024 MagTek, Inc.
Information in this publication is subject to change without notice and may contain technical inaccuracies or graphical discrepancies. Changes or improvements made to this product will be updated in the next publication release. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of MagTek, Inc.
MagTek® is a registered trademark of MagTek, Inc.
MagnePrint® is a registered trademark of MagTek, Inc.
MagneSafe® is a registered trademark of MagTek, Inc.
Magensa™ is a trademark of MagTek, Inc.
IntelliStripe® is a registered trademark of MagTek, Inc.
AAMVA™ is a trademark of AAMVA.
American Express® and EXPRESSPAY FROM AMERICAN EXPRESS® are registered trademarks of American Express Marketing & Development Corp.
D-PAYMENT APPLICATION SPECIFICATION® is a registered trademark to Discover Financial Services CORPORATION
ANSI®, the ANSI logo, and numerous other identifiers containing "ANSI" are registered trademarks, service marks, and accreditation marks of the American National Standards Institute (ANSI).
ISO® is a registered trademark of the International Organization for Standardization.
UL™ and the UL logo are trademarks of UL LLC.
PCI Security Standards Council® is a registered trademark of the PCI Security Standards Council, LLC.
Apple Pay®, iPhone®, iPod®, and Mac® are registered trademarks of Apple Inc., registered in the U.S. and other countries. App StoreSM is a service mark of Apple Inc., registered in the U.S. and other countries. iPad™ and iPad mini™ are trademarks of Apple, Inc. Apple and MFi are registered trademarks of Apple Inc. IOS is a trademark or registered trademark of Cisco in the U.S. and other countries and is used by Apple Inc. under license.
Google Play™ store and Android™ platform are trademarks of Google Inc.
Microsoft® and Windows® are registered trademarks of Microsoft Corporation.
USB (Universal Serial Bus) Specification is Copyright © 1998 Compaq Computer Corporation, Intel Corporation, Microsoft Corporation, NEC Corporation.
Keyboard Usage Definitions content is taken from Universal Serial Bus HID Usage Tables, Version 1.12, Section 10, Keyboard/Keypad Page (0x07) ©1996-2005 USB Implementers’ Forum
Modifier Byte Definitions content is taken from Section 8.3 Report Format for Array Items, Device Class Definition for Human Interface Devices (HID) Version 1.11, ©1996-2001 USB Implementers’ Forum, .
Some device icons courtesy of , used under the Creative Commons Attribution-NoDerivs 3.0 license.
All other system names and product names are the property of their respective owners.
Table 0‑1 - Revisions
Retrieves the card encode type.
public string getCardEncodeType()
Parameters: None Return Value:
String representing the card encode type.
Card Encode Type
This is a string value which indicates the type of encoding that was found on the card. The following table defines the possible values.
Retrieves data field count.
public int getDataFieldCount()
Parameters: None
Return Value:
Data field count
Retrieves SHA-x hash code.
public string getHashCode()
Parameters: None Return Value:
String representing SHA-x hash code.
Retrieves device configuration.
public string getDeviceConfig(string configType)
Parameters:
configType can be one of:
8180: Send TLV Version on Power Up
8181: Send Discovery on Power Up
8280: Send Card name
8281: Send Card IIN
Return Value:
String representing device configuration.
Retrieves encryption status. This two-byte Binary field contains the Encryption Status. The Reader Encryption Status is sent in big endian byte order. Byte 1 is the least significant byte. Byte 1 LSB is status bit 0. Byte 2 MSB is status bit 15.
public string getEncryptionStatus()
Parameters: None Return Value:
String representing decryption status as a 2-byte binary field.
Bit 0 = DUKPT Keys exhausted (1=exhausted, 0=keys available)
Bit 1 = Initial DUKPT key Injected, always set to One (Primary DUKPT Key)
Bit 2 = Encryption Enabled, always set to One
Retrieves firmware version.
public string getFirmware()
Parameters: None
Return Value:
String representing firmware version.
Retrieves MagTek device serial number.
public string getMagTekDeviceSerial()
Parameters: None
Return Value:
String representing MagTek device serial number.
Retrieves response data.
public string getResponseData()
Parameters: None
Return Value:
String representing response data.
Retrieves response type.
public string getResponseType()
Parameters: None
Return Value:
String representing response type. For Audio Reader, always “C101”.
Retrieves the value of the specified tag.
public string getTagValue(string tag, string data)
Parameters: None
tag
Tag to search for
Return Value: String representing tag value.
// #1
MTSCRA m_SCRA = new MTSCRA();
// Delegate the MTSCRA Events.
m_SCRA.OnDisplayMessageRequest += OnDisplayMessageRequest;
.
// Assign parameters.
byte timeLimit = 0x3C;
byte cardType = 0x07;
byte option = 0x00;
byte[] amount = new byte[] { 0x00, 0x00, 0x00, 0x00, 0x15, 0x00 };
byte transactionType = 0x00; // Purchase
byte[] cashBack = new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
byte[] currencyCode = new byte[] { 0x08, 0x40 };
byte reportingOption = 0x02; // All Status Changes
// Start transaction.
long result = m_SCRA.startTransaction(
timeLimit,
cardType,
option,
amount,
transactionType,
cashBack,
currentCode, reportingOption);
// #2
protected void OnDisplayMessageRequest(obj sender, byte[] data)
{
String message;
// Get the message.
if (data != NULL)
{
message = System.Text.Encoding.UTF8.GetString(data);
}
// A data size of 0 is an instruction to clear the display.
if (data.Length == 0)
{
// Clear the display.
}
}// #3
protected void OnUserSelectionRequest(object sender, byte[] data)
{
/* data[0] – selection type
data[1] – timeout
data[2..n] – remainder contains zero-terminated string items */
// display/retrieve user selection.
.
// set status and selection result.
m_SCRA.setUserSelectionResult(status, selection);
}// #4
protected void OnARQCReceived(object sender, byte[] data)
{
/* data[0..1] – ARQC length
data[2..n] – remainder contains the ARQC TLV object */
// #4a Forward ARQC to Processor.
/* An application function to forward the ARQC
to a Processor for approval. */
proccesorResponse = sendARQCToProcesor(data);
/* No need to send ARQC Response if transaction option
had enabled Quick Chip mode. */
if (isQuickChipEnabled())
{
return;
}
// #4b Set Acquirer Response.
// An application function to build Acquirer Response.
buildAcquirerResponse(processorResponse);
// Set Acquirer Response.
m_SCRA.setAcquirerResponse(response);
}// #5
protected void OnDisplayMessageRequest(obj sender, byte[] data)
{
String message;
// Get the message.
if (data != NULL)
{
message = System.Text.Encoding.UTF8.GetString(data);
}
// A data size of 0 is an instruction to clear the display. if (data.Length == 0)
{
// Clear the display.
}
}// #6
protected void OnTransactionResult(obj sender, byte[] data)
{
/* data[0] – Signature Required
data[1..2] – Batch Data length
data[3..n] – remainder contains the Batch Data TLV object */
// Parse the TLV from data[].
.
// Abstract Approval status from TLV tag “DFDF1A”.
.
// Abstract Signature Required status from TLV tag data[0].
.
}This function gets the MSR capability of the device. For more information, see D99875483 – Track ID Enable Property.
(NSString *) getCapMSRParameters: None Return Value:
Return MSR Capability bit masking.
Bit 7
Bit 6
Bit 5
Id
0 – Decodes standard ISO/ABA cards only
1 – Decodes AAMV and 7-bit cards also
If this flag is set to 0, only tracks that conform to the ISO format allowed for that track will be decoded. If the track cannot be decoded by the ISO method it will be considered to be in error.
T#
00 – Track Disabled
01 – Track Enabled
10 – Track Enabled/Required (Error if blank)
This function gets the device’s capability for encrypting track data.
(NSString *) getCapMagStripeEncryption Parameters: None
Return Value:
“1” = Available
“0” = Unavailable.
This function gets information about the device’s tracks capability.
Parameters: None
Return Value: A hex string for the track capability. See Track ID Enable Property in D99875475.
This function retrieves the card expiration date after a cardholder swipes a card.
Parameters: None
Return Value: String containing the card expiration date
This function gets the last 4 digits of the card account number (PAN) after a cardholder swipes a card.
Parameters: None
Return Value: String containing the last 4 digits of the PAN
This function gets the issuer identification number (IIN) of the card number after a cardholder swipes a card.
Parameters: None
Return Value: String containing the IIN
This function gets the cardholder name after a cardholder swipes a card.
Parameters: None
Return Value: String containing the cardholder name, for example, “John Wayne”.
This function gets the length of the PAN after a cardholder swipes a card.
Parameters: None
Return Value: Length of card number or PAN
This function retrieves the card’s service code after a cardholder swipes a card.
Parameters: None
Return Value: String containing the card’s service code
This function retrieves the part number and revision of the device’s firmware.
Parameters: None
Return Value: String containing firmware part number and revision.
self.mtSCRALib = [[MTSCRA alloc] init];
[self.mtSCRALib
listenForEvents:(TRANS_EVENT_OK|TRANS_EVENT_START|TRANS_EVENT_ERROR)];
//iDynamo
[self.mtSCRALib setDeviceType:(MAGTEKIDYNAMO)];
[self.mtSCRALib setDeviceProtocolString:(“com.magtek.idynamo”)];
//Audio //
[self.mtSCRALib setDeviceType:(MAGTEKAUDIOREADER)];
[self.mtSCRALib openDevice];self.mtSCRALib closeDevice];[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(trackDataReady:) name:@"trackDataReadyNotification"
object:nil];
- (void)trackDataReady:(NSNotification *)notification
{
NSNumber *status = [[notification userInfo]
valueForKey:@"status"];
[self performSelectorOnMainThread:@selector(onDataEvent:)
withObject:status waitUntilDone:YES];
}
- (void)onDataEvent:(id)status
{
//[self clearLabels];
switch ([status intValue]) {
case TRANS_STATUS_OK:
NSLog(@"TRANS_STATUS_OK");
break;
case TRANS_STATUS_ERROR:
NSLog(@"TRANS_STATUS_ERROR");
break;
default:
break;
}
} [[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(devConnStatusChange)
name:@"devConnectionNotification" object:nil];
- (void)devConnStatusChange
{
BOOL isDeviceConnected = [self.mtSCRALib isDeviceConnected];
if (isDeviceConnected)
{
self.deviceStatus.text = @"Device Connected";
}
else
}
self.deviceStatus.text = @"Device Disconnected";
}
}MSR Card Swipe
Note: This is broad to cover multiple devices. For devices that do not need or support a specific command, (i.e. SetMSRAlwaysOn), that portion may be omitted in the flow.
EMV Transaction (Quick Chip)
Note: This is broad to cover multiple devices. For devices that do not need or support a specific command, (i.e. SetMSRAlwaysOn), that portion may be omitted in the flow.
EMV Transaction (Full)
Note: This is broad to cover multiple devices. For devices that do not need or support a specific command, (i.e. SetMSRAlwaysOn), that portion may be omitted in the flow.
MagTek I 1710 Apollo Court I Seal Beach, CA 90740 I Phone: (562) 546-6400 I Technical Support: (888) 624-8350 www.magtek.com
Copyright © 2006 - 2024 MagTek, Inc. Printed in the United States of America
Information in this publication is subject to change without notice and may contain technical inaccuracies or graphical discrepancies. Changes or improvements made to this product will be updated in the next publication release. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of MagTek, Inc.
MagTek® is a registered trademark of MagTek, Inc. MagnePrint® is a registered trademark of MagTek, Inc. MagneSafe® is a registered trademark of MagTek, Inc. Magensa™ is a trademark of MagTek, Inc.
aDynamo™, and uDynamo are trademarks of MagTek, Inc. eDynamo™, Dynamag, and DynaMAX are trademarks of MagTek, Inc.
mDynamo™, DynaWave™, and tDynamo™ are trademarks of MagTek, Inc.
The Bluetooth® word mark and logos are registered trademarks owned by Bluetooth SIG, Inc. and any use of such marks by MagTek is under license.
Google Play™ store and Android™ platform are trademarks of Google Inc.
USB (Universal Serial Bus) Specification is Copyright © 1998 Compaq Computer Corporation, Intel Corporation, Microsoft Corporation, NEC Corporation.
EMV® is a registered trademark in the U.S. and other countries and an unregistered trademark elsewhere. The EMV trademark is owned by EMVCo, LLC. The Contactless Indicator mark, consisting of four graduating arcs, is a trademark owned by and used with permission of EMVCo, LLC.
All other system names and product names are the property of their respective owners.
Revisions
SOFTWARE LICENSE AGREEMENT
IMPORTANT: YOU SHOULD CAREFULLY READ ALL THE TERMS, CONDITIONS AND RESTRICTIONS OF THIS LICENSE AGREEMENT BEFORE INSTALLING THE SOFTWARE PACKAGE. YOUR INSTALLATION OF THE SOFTWARE PACKAGE PRESUMES YOUR ACCEPTANCE OF THE TERMS, CONDITIONS, AND RESTRICTIONS CONTAINED IN THIS AGREEMENT. IF YOU DO NOT AGREE WITH THESE TERMS, CONDITIONS, AND RESTRICTIONS, PROMPTLY RETURN THE SOFTWARE PACKAGE AND ASSOCIATED DOCUMENTATION TO THE ADDRESS ON THE FRONT PAGE OF THIS DOCUMENT, ATTENTION: CUSTOMER SUPPORT.
MagTek, Incorporated (the "Licensor") owns and has the right to distribute the described software and documentation, collectively referred to as the "Software."
LICENSE: Licensor grants you (the "Licensee") the right to use the Software in conjunction with MagTek products. LICENSEE MAY NOT COPY, MODIFY, OR TRANSFER THE SOFTWARE IN WHOLE OR IN PART EXCEPT AS EXPRESSLY PROVIDED IN THIS AGREEMENT. Licensee may not decompile, disassemble, or in any other manner attempt to reverse engineer the Software. Licensee shall not tamper with, bypass, or alter any security features of the software or attempt to do so.
TRANSFER: Licensee may not transfer the Software or license to the Software to another party without the prior written authorization of the Licensor. If Licensee transfers the Software without authorization, all rights granted under this Agreement are automatically terminated.
COPYRIGHT: The Software is copyrighted. Licensee may not copy the Software except for archival purposes or to load for execution purposes. All other copies of the Software are in violation of this Agreement.
TERM: This Agreement is in effect as long as Licensee continues the use of the Software. The Licensor also reserves the right to terminate this Agreement if Licensee fails to comply with any of the terms, conditions, or restrictions contained herein. Should Licensor terminate this Agreement due to Licensee's failure to comply, Licensee agrees to return the Software to Licensor. Receipt of returned Software by the Licensor shall mark the termination.
LIMITED WARRANTY: Licensor warrants to the Licensee that the disk(s) or other media on which the Software is recorded are free from defects in material or workmanship under normal use.
THE SOFTWARE IS PROVIDED AS IS. LICENSOR MAKES NO OTHER WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Because of the diversity of conditions and PC hardware under which the Software may be used, Licensor does not warrant that the Software will meet Licensee specifications or that the operation of the Software will be uninterrupted or free of errors.
IN NO EVENT WILL LICENSOR BE LIABLE FOR ANY DAMAGES, INCLUDING ANY LOST PROFITS, LOST SAVINGS, OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE, OR INABILITY TO USE, THE SOFTWARE. Licensee's sole remedy in the event of a defect in material or workmanship is expressly limited to replacement of the Software disk(s) if applicable.
GOVERNING LAW: If any provision of this Agreement is found to be unlawful, void, or unenforceable, that provision shall be removed from consideration under this Agreement and will not affect the enforceability of any of the remaining provisions. This Agreement shall be governed by the laws of the State of California and shall inure to the benefit of MagTek, Incorporated, its successors or assigns.
ACKNOWLEDGMENT: LICENSEE ACKNOWLEDGES THAT HE HAS READ THIS AGREEMENT, UNDERSTANDS ALL OF ITS TERMS, CONDITIONS, AND RESTRICTIONS, AND AGREES TO BE BOUND BY THEM. LICENSEE ALSO AGREES THAT THIS AGREEMENT SUPERSEDES ANY AND ALL VERBAL AND WRITTEN COMMUNICATIONS BETWEEN LICENSOR AND LICENSEE OR THEIR ASSIGNS RELATING TO THE SUBJECT MATTER OF THIS AGREEMENT.
QUESTIONS REGARDING THIS AGREEMENT SHOULD BE ADDRESSED IN WRITING TO MAGTEK, INCORPORATED, ATTENTION: CUSTOMER SUPPORT, AT THE ADDRESS LISTED IN THIS DOCUMENT, OR E-MAILED TO
To develop an iOS app using the MTSCRA SDK, follow the setup steps in section 2 How to Set Up the MTSCRA SDK, then create an instance of the MTSCRA object in your software project, then call the functions described in this chapter to communicate with the device. For sample code that demonstrates MTSCRA Demo how to use these functions, see the contents of the folder included with the SDK.
Generally, these functions will run in one of two modes:
Asynchronous functions will return data using the event handlers (callback functions) defined in section 5 MTSCRA Delegate Methods.
Synchronous functions will return requested data immediately in the function’s return value. If the requested data is not available immediately, synchronous calls will generally block until a specified wait time has elapsed.
Most calls that wait for input from the user will run in the asynchronous mode.
This function retrieves the SDK revision number.
Parameters: None
Return Value: String containing the SDK revision number.
This function retrieves a list of available Bluetooth LE devices. After calling this function to locate the device you wish to connect to, use setAddress to tell the library which device you want to connect to. Use stopScanningForPeripherals to stop the scan.
Parameters: None
Return Value: An array of peripherals
This function stops the scanning of available Bluetooth LE devices.
Parameters: None
Return Value: None
This function sets device’s address for Bluetooth LE devices.
address Parameters:
Return Value: None
This function opens a connection to the device.
To use this function to connect to a Bluetooth LE device, the app should follow these steps:
Call startScanningForPeripherals to find the device you want to connect to.
Call setAddress to tell the library which device you want to connect to.
Make sure your app’s bleReaderStateUpdated function most recent status is was OK .
After calling this function, call isDeviceOpened to make sure the device was successfully opened.
Parameters: None Return Value:
YES = Success
NO = Error
This function closes the connection to the currently opened device. After calling this function, call isDeviceOpened to make sure the device was successfully closed.
Parameters: None
Return Value:
YES = Success
NO = Error
This function reports whether any compatible devices are connected to the host.
Parameters: None
Return Value:
YES = host is connected to a device
NO = host is not connected to a device
This function retrieves device opened status, which changes on successful completion of a call to startScanningForPeripherals or closeDevice.
(BOOL) isDeviceOpened
Parameters: None Return Value:
YES = Device is opened
NO = Device is not opened
This function sends a direct command to device. See D99875475 MagneSafe V5 Programmer’s Reference (Commands) for details about available commands and syntax.
Parameter
Return Value:
0 = Success
9 = Error
15 = Busy
This function retrieves card data from a string separated by ‘|’ after a cardholder swipes a card. The host software should call it in response to the trackDataReadyNotification callback.
Parameters: None
Return Value:
A null terminated hex string for Card Data, Field separated by ‘|’.NULL value for failed.
Fields:
Device ID, Device Serial Number, Card Swipe Status, CardEncode Type, Track 1 Decode Status, Track 2 Decode Status, Track 3 Decode Status, MagnePrint Status, Track 1 Length, Track 2 Length, Track 3 Length, Masked Track 1 Length, Masked Track 2 Length, Masked Track 3 Length, MagnePrint Length, Card Data, Masked Card Data, DUKPT Session ID, DUKPT Key Serial Number, First Name, Last Name, PAN, Month, Year, Track 1 Data, Track 2 Data, Track 3 Data, Masked Track 1 Data, Masked Track 2 Data, Masked Track 3 Data, MagnePrint Data
This class provides methods to retrieve configuration parameters from the server.
This method retrieves the configuration parameters from the server as an XML data. The method will throw an exception if there is a problem with retrieving the configuration XML.
public String getConfigurationXML(
String username,
String password,
int readerType,
SCRAConfigurationDeviceInfo deviceInfo,
String address,
int timeout) throws MTSCRAExceptionParameters:
Parameter
Description
username
Return Value:
String value of the configuration parameters retrieved from the server.
This method retrieves the configuration parameters from XML data as a ProcessMessageResponse object. The method will throw an exception if there is a problem with retrieving the configuration XML.
Parameters:
Return Value:
ProcessMessageResponse containing the configuration parameters.
This method retrieves the configuration parameters from the server as an XML data. The method will throw an exception if there is a problem with retrieving the configuration XML.
Parameters:
Return Value:
String value of the configuration parameters for the specified device model.
ERROR_SUCCESS = 0
ERROR_TIMEOUT = 1
ERROR_DEVICE_NOT_OPEN = 5
ERROR_INVALID_PARAMETER = 6
ERROR_DEVICE_COMMUNICATION_ERROR = 7
ERROR_OTHER_ERROR = 9
ERROR_BUSY = 15
ERROR_DATA_IS_NOT_EXIST = 16
ERROR_NOT_SUPPORT = 17
ERROR_UNKNOWN = 255
MAGTEKAUDIOREADER = Audio readers aDynamo, uDynamo.
MAGTEKIDYNAMO = iOS 30-pin and Lightning readers iDynamo.
MAGTEKDYNAMAX = Bluetooth LE reader DynaMAX.
MAGTEKEDYNAMO = Bluetooth LE reader eDynamo
MAGTEKUSBMSR = USB on OSX Only
MAGTEKKDYNAMO = Lightning EMV reader kDynamo
MAGTEKTDYNAMO = Bluetooth LE reader tDynamo
MAGTEKDYNAWAVE= DynaWave
MAGTEKMDYNAMO = mDynamo
MAGTEKIDYNAMO_G3 = USB-C
iDynamo 5 Gen III MAGTEKNONE
TRANS_STATUS_OK = Transaction succeeded.
TRANS_STATUS_START = Reader started sending data.
TRANS_STATUS_ERROR = Reader failed sending data.
TRANS_EVENT_OK = Transaction succeeded.
TRANS_EVENT_ERROR = Reader failed sending data.
TRANS_EVENT_START = Reader started sending data.
TLV_OPSTS = Operation Status
TLV_CARDSTS = Card Information
TLV_TRACKSTS = Card tracks status
TLV_CARDNAME = Cardholder name
TLV_CARDIIN = Card issuer identification number
TLV_CARDLAST4 = Last four digits of PAN number
TLV_CARDEXPDATE = Card Expiration date
TLV_CARDSVCCODE = Card service code
TLV_CARDPANLEN = Length of the PAN
TLV_ENCTK1 = Encrypted track 1
TLV_ENCTK2 = Encrypted track 2
TLV_ENCTK3 = Encrypted track 3
TLV_DEVSN = Device serial number
TLV_DEVSNMAGTEK = Device serial number created by MagTek
TLV_DEVFW = Device firmware version
TLV_DEVNAME = Device model name
TLV_DEVCAPS = Device capabilities
TLV_DEVSTATUS = Device status
TLV_TLVVERSION = Firmware TLV version
TLV_DEVPARTNUMBER = Device part number
TLV_CAPMSR = Magstripe capabilities
TLV_CAPTRACKS = Track capabilities
TLV_CAPMAGSTRIPEENCRYPTION = Magstripe encryption capabilities
TLV_KSN = KSN
TLV_CMAC = CMAC
TLV_SWPCOUNT = Swipe count
TLV_BATTLEVEL = Battery level
TLV_CFGTLVVERSION = TLV version
TLV_CFGDISCOVERY = Discovery
TLV_CFGCARDNAME = Card name
TLV_CFGCARDIIN = Card issuer identification number
TLV_CFGCARDLAST4 = Card last 4 PAN
TLV_CFGCARDEXPDATE = Card expiration date
TLV_CFGCARDSVCCODE = Card service code
TLV_CFGCARDPANLEN = Card PAN length
TLV_MSKTK1 = Masked Track 1
TLV_MSKTK2 = Masked Track 2
TLV_MSKTK3 = Masked Track 3
TLV_HASHCODE = Hash code
TLV_SESSIONID = Session ID
TLV_MAGNEPRINT = MagnePrint
TLV_MAGNEPRINT_STS = MagnePrint status
CAP_MASKING = Masking
CAP_ENCRYPTION = Encryption
CAP_CARD_AUTH = Card authorization
CAP_DEVICE_AUTH = Device authorization
CAP_SESSION_ID = Session ID
CAP_DISCOVERY= Discovery
BLE = Bluetooth LE
BLE_EMV = Bluetooth LE EMV
USB = Universal Serial Bus Lightning = Lightning
NONE = None
Connection
CommandMessageData
CardMessageData
BLERawMessage
DeviceInfo
RawDataMessage
OK
OFF
RESETTING
DISCONNECTED
UNSUPPORTED
UNAUTHORIZED
UNKNOWN
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.
The SDK sends this notification when card data is available from the device.
The SDK sends this notification when the connection status of the device changes.
Return a card object type with card swipe data.
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:
Secure Card Reader Authenticator
Programmer’s Manual ( .NET/Universal Windows )
REGISTERED TO ISO 9001:2015
MagTek I 1710 Apollo Court I Seal Beach, CA 90740 I Phone: (562) 546-6400 I Technical Support: (888) 624-8350
Copyright © 2006-2025 MagTek, Inc. Printed in the United States of America
Information in this publication is subject to change without notice and may contain technical inaccuracies or graphical discrepancies. Changes or improvements made to this product will be updated in the next publication release. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of MagTek, Inc.
This section describes how to use the MagTek SCRA OEM Demo on an Android host. Some peripherals are not included in every MagTek OEM device. Use each feature of the Demo accordingly.
Connect the MagTek SCRA OEM device to the Android host USB port using an OTG cable.
Press on MagTek SCRA OEM Demo to launch the app.
This command is used to set the device’s date and time before calling startTransaction().
Devices with a battery-backed real time clock have the date and time set by the manufacturer, so this command may not need to be used after that. Devices that do not have a battery-backed real time clock must use this command frequently because (a) the clock must be set before the device can process EMV transactions, and (b) the host software must use this command every time the device is power cycled or reset.
This function retrieves the SDK revision number.
Parameters: None
Return Value: String containing the SDK revision number.
This function retrieves a list of available Bluetooth LE devices. After calling this function to locate the device you wish to connect to, use setAddress to tell the library which device you want to connect to. Use stopScanningForPeripherals to stop the scan.
Parameters: None
Return Value: An array of peripherals
This function stops the scanning of available Bluetooth LE devices.
Retrieves CRC from card data.
Parameters: None
Return Value:
Card data CRC
Retrieves card experiation date from card data.
Return Value:
String representing card expiration date.
Retrieves Issuer Identification Number (IIN) from card data.
REGISTERED TO ISO 9001:2015
MagTek I 1710 Apollo Court I Seal Beach, CA 90740 I Phone: (562) 546-6400 I Technical Support: (888) 624-8350
Copyright © 2006 – 2019 MagTek, Inc. Printed in the United States of America
Information in this publication is subject to change without notice and may contain technical inaccuracies or graphical discrepancies. Changes or improvements made to this product will be updated in the next publication release. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of MagTek, Inc.
MagTek® is a registered trademark of MagTek, Inc. MagnePrint® is a registered trademark of MagTek, Inc. Magensa™ is a trademark of MagTek, Inc.
This document provides instructions on how to interact with the MagneFlex Browser.
The MagneFlex Browser, available from MagTek, is a full-function HTML browser application that is integrated with driver applications that allow the control of a set of MagTek payment card readers.
In this document, the following nomenclature are used strictly as follows:
Device refers to the MagTek device (eg. Dynamag, DynaPro, MICRSafe) that receives and responds to the command set specified in this document.
Added support for tDynamo and DynaWave.
12
January 30, 2019
Updated to correctly reference Bluetooth LE. Added device feature detection during connection and MSR head power control. Added battery level.
13
November 19, 2020
Added support for iDynamo 6.
14
February 11, 2021
Updated MTNET OEM Demo instructions. Added DynaDip in the supported device list.
100
June 4, 2024
Added iDynamo 5 (Gen III) in the supported device list at section 1.
No. PCI DSS only requires that sensitive data be protected/encrypted. However, this document recommends that CMAC authentication be used when available, as it provides an additional layer of security to ensure that sensitive data has not been altered from its original form. This will direct which decryption host services, card readers, and PIN entry devices are used to meet this extra level of security.
Yes, you will minimally need to have a new AES BDK generated as your Data Protection Key. If the reader device also supports PIN entry, an additional AES BDK is required as your PIN Protection Key. Regarding AES Key Size, you will need to select between 128-bits or 256-bits. Typically, the card reader / PED vendor provides key-generation and key-injection services.
WHAT ABOUT DECRYPTION SERVICES?
You will need to check with your existing Payment Gateway / Decryption service and validate that they can support AES DUKPT decryption for your specific reader device. Ensure they can support both AES-128 and AES-256 key sizes. Additionally, you should check if they can provide CMAC data validation services.
AES-128 VS AES-256 KEY SIZE? WHICH ONE SHOULD I CHOOSE?
All things being equal, it is preferable to migrate to AES-256 DUKPT. Doing so ensures that you are using the maximum level of encryption protection available. However, in some cases you may discover that certain products / services only support AES-128 DUKPT. In that case, it is your preference. Although AES-256 DUKPT is strongest, AES-128 DUKPT still provides encryption that is substantially stronger than TDEA DUKPT and is fully supported by PCI.
HOW DO I INJECT THE NEW AES KEY(s)?
Typically, all newly ordered reader devices are injected with their AES key(s) from the factory during the initial order process. For devices already in the field, these devices can typically be updated via remote management services. Check with your reader vendor for details.
CAN I STILL USE MY TDEA DUKPT DEVICES DURING THE MIGRATION TO AES?
Yes. There should be no problems with operating a “mixed fleet” of both TD
8282: Send Card Last 4 Digits of PAN
8283: Send Card Expiration
8284: Send Card Service Code
8285: Send Card PAN Length
Bit 4 = Reserved (always set to zero)
Bit 5 = Reserved (always set to zero)
Bit 6 = Reserved (always set to zero)
Bit 7 = Reserved (always set to zero)
Bit 8 = Reserved (always set to zero)
Bit 9 = Initial DUKPT key injected (Secondary DUKPT Key)
Bit 10 = DUKPT Key used for encryption, 0=Primary, 1=Secondary
Bit 11 = DUKPT Key Variant used to encrypt data, 0=PIN Variant, 1=Data Variant/Bidirectional
Bits 12–15 = Unassigned (always set to Zero)
Data to search from
Value
Encode Type
Description
00
ISO/ABA
ISO/ABA encode format. At least one track in ISO/ABA format, Track 3 not AAMVA format.
01
AAMVA
AAMVA encode Track 3 is AAMVA format. Tracks 1 and 2 are ISO/ABA if correctly decoded.
02
Reserved
03
Blank
The card is blank. Only occurs if all tracks decode without error and without data.
04
Other
The card has a non-standard encode format. For example, ISO/ABA track 1 format on track 2.
05
Undetermined
The card encode type could not be determined because no tracks could be decoded. (Combination of Error tracks and Blank Tracks, at least one Error track).
06
None
No decode has occurred. This type occurs if no magnetic stripe data has been acquired since the data has been cleared or since the reader was powered on. This reader only sends an Input report when a card has been swiped so this value will never occur.
Parameter
Description
cardDataObj
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
MTSCRANET.dll
MTService.dll
In the Visual Studio Solution Explorer, right-click the project and select Add Reference to show the Add Referenc window.
Select the Browse tab and press the Browse... button.
Navigate to your library folder, select MTSCRANET.dll and MTLIB.dll, then press the button.
In your custom software, create an instance of MTSCRA. For examples, see the source code included with the MTNETDemo project and/or Appendix A Code Examples.
Begin using the features provided by the MagTekSCRA library. Details about each method are provided in section How to remove POS HID Magnetic Stripe Reader.
Select the Browse tab and press the Browse... button.
Navigate to your library folder, select MTSCRAUWP.dll, then press the Add button.
In your custom software, create an instance of MTSCRA. For examples, see the source code included with the MTSCRAWindowsStoreApp project and/or Appendix A Code Examples.
Begin using the features provided by the MagTekSCRA library. Details about each methods are provided in section 4 MTSCRA Class Methods.






























iDynamo
30-pin
iOS 13 and above
Lightning
iOS 13 and above
uDynamo
Audio
iOS 13 and above
DynaMAX
Bluetooth LE 4.0
iOS 13 and above
kDynamo
Lightning
iOS 13 and above
sDynamo
Lightning
iOS 13 and above
tDynamo
Bluetooth LE 4.0
iOS 13 and above
iDynamo 5 Gen II
Lightning
iOS 13 and above
iDynamo 5 Gen III
USB-C (iAP2)
iOS 13 and above
iDynamo 6
Lightning
iOS 13 and above
File Name
Description
MTSCRA.h
Header file for the MTSCRA SDK
libMTSCRA.a
Library binary for the MTSCRA SDK
MTSCRADemo Folder
Sample code and projects
Device
Interface
Operating System
eDynamo
Bluetooth LE 4.0
iOS 13 and above
aDynamo
Audio
iOS 13 and above
Rev Number
Date
Notes
10
February 5, 2020
Initial release
100
June 4, 2024
Added support for iDynamo 5 (Gen III) at sections 1, and 2.1.
Value
0
Type of MAC
MAC algorithm designator
0x00 = ISO 9797 MAC Algorithm 3, Padding Method 1.
1..16
Device Serial Number
16 Bytes Device Serial Number.
The host can set this field to all zeroes.
17
Month
Value from 0x01..0x0C
18
Day
Value from 0x01..0x1F (less depending on month)
19
Hour
Value from 0x00..0x17
20
Minute
Value from 0x00..0x3B
21
Second
Value from 0x00..0x3B
22
Unused
Value from 0x00..0x06
23
Year
Value from 0x00 (2008)..0x44 (2076) Example:
Year 2023 = 15 (0x0F) = 20023 – 2008
24..27
MAC
MAC computed over all preceding fields except Type of MAC. The host can set this field to all zeroes.
Offset
Field Name
Value
0
State
One byte specifying what the state should be: 0x00 = Off When Idle
0x01 = Always On
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Id
0
T3
T3
T2
T2
T1
T1
Parameter
Description
address
Address of the Bluetooth LE device to communicate with
Parameter
Description
pData
Command to send to the device. For example, pass command string
“C10206C20503C30100” to call the Discovery command.
String value of the username.
password
String value of the password.
readerType
Integer value indicating the type of reader device.
deviceInfo
SCRAConfigurationDeviceInfo value containing information pertaining to the device.
address
String value of the address for connection to the server.
timeout
Integer value of the timeout in seconds for connection to the server.
Parameter
Description
xmlConfig
String value of the the configuration parameters from the server.
Parameter
Description
model
String value containing the device model.
messageResponse
ProcessMessageResponse containing the configuration parameters.
Type of MAC
MAC algorithm designator
0x00 = ISO 9797 MAC Algorithm 3, Padding Method 1.
1..16
Device Serial Number
16 Bytes Device Serial Number.
The host can set this field to all zeroes.
17
Month
Value from 0x01..0x0C
18
Day
Value from 0x01..0x1F (less depending on month)
19
Hour
Value from 0x00..0x17
20
Minute
Value from 0x00..0x3B
21
Second
Value from 0x00..0x3B
22
Unused
Value from 0x00..0x06
23
Year
Value from 0x00 (2008)..0x44 (2076) Example:
Year 2023 = 15 (0x0F) = 20023 – 2008
24..27
MAC
MAC computed over all preceding fields except Type of MAC. The host can set this field to all zeroes.
Example:
For 5:00 PM January 01, 2023 030C001800000000000000000000000000000000000101110000000F
The host uses this command to directly control power to the magnetic stripe reader head inside the device, to manage device power consumption and battery life. The host must power up the head before a cardholder swipes a magnetic stripe card outside the scope of an EMV transaction.
When the state is set to Always On, the head will always be powered.
When the state is set to Off When Idle, the head will be off when the device is idle. In this state, the device will not be able to read magnetic stripe cards outside the scope of EMV transactions without first turning the head on.
If the host sends startTransaction() the device will automatically power up the head, then power it down when the EMV transaction terminates.
Offset
Field Name
Value
0
State
One byte specifying what the state should be: 0x00 = Off When Idle
0x01 = Always On
Result codes: 0x00 = Success
Example Request (Hex):
Offset
Field Name
Value
0
This function sets device’s address for Bluetooth LE devices.
Parameters:
Parameter
Description
address
Address of the Bluetooth LE device to communicate with
Return Value: None
This function opens a connection to the device.
To use this function to connect to a Bluetooth LE device, the app should follow these steps:
Call startScanningForPeripherals to find the device you want to connect to.
Call setAddress to tell the library which device you want to connect to.
Make sure your app’s bleReaderStateUpdated function most recent status is was OK .
Call openDevice.
After calling this function, call isDeviceOpened to make sure the device was successfully opened.
Parameters: None
Return Value:
YES = Success
NO = Error
This function closes the connection to the currently opened device. After calling this function, call isDeviceOpened to make sure the device was successfully closed.
Parameters: None
Return Value:
YES = Success
NO = Error
This function reports whether any compatible devices are connected to the host.
Parameters: None
Return Value:
YES = host is connected to a device
NO = host is not connected to a device
This function retrieves device opened status, which changes on successful completion of a call to startScanningForPeripherals or closeDevice.
Parameters: None
Return Value:
YES = Device is opened
NO = Device is not opened
This function sends a direct command to device. See MagneSafe V5 Programmer’s Reference (Commands) for details about available commands and syntax.
Parameter
Description
pData
Command to send to the device. For example, pass command string
“C10206C20503C30100” to call the Discovery command.
Return Value:
0 = Success
9 = Error
15 = Busy
This function retrieves card data from a string separated by ‘|’ after a cardholder swipes a card. The host software should call it in response to the trackDataReadyNotification callback.
Parameters: None
Return Value:
A null terminated hex string for Card Data, Field separated by ‘|’.NULL value for failed.
Fields:
Device ID, Device Serial Number, Card Swipe Status, CardEncode Type, Track 1 Decode Status, Track 2 Decode Status, Track 3 Decode Status, MagnePrint Status, Track 1 Length, Track 2 Length, Track 3 Length, Masked Track 1 Length, Masked Track 2 Length, Masked Track 3 Length, MagnePrint Length, Card Data, Masked Card Data, DUKPT Session ID, DUKPT Key Serial Number, First Name, Last Name, PAN, Month, Year, Track 1 Data, Track 2 Data, Track 3 Data, Masked Track 1 Data, Masked Track 2 Data, Masked Track 3 Data, MagnePrint Data
NSString *DateTime =
@“030C001800000000000000000000000000000000000101110000000F”;
[self.mtSCRALib sendExtendedCommandSync:DateTime];
NSString *SetMSRAlwaysOn = @“580101”;
[self.mtSCRALib sendCommandSync:SetMSRAlwaysOn];NSString *SetMSROffWhenIdle = @“580100”;
[self.mtSCRALib sendCommandSync:SetMSROffWhenIdle];(NSString *) getCapTracks(NSString *) getCardExpDate(NSString *) getCardLast4(NSString *) getCardIIN(NSString *) getCardName(int) getCardPANLength(NSString *) getCardServiceCode(NSString *) getFirmware(NSString *) getSDKVersion (void)startScanningForPeripherals(void)stopScanningForPeripherals(void)setAddress:(NSString *)(BOOL) openDevice(BOOL) closeDevice(BOOL) isDeviceConnected(int) sendCommandToDevice:(NSString *)pData (NSString *) getResponseDatapublic ProcessMessageResponse getConfigurationResponse(
String xmlConfig) throws MTSCRAExceptionpublic String getConfigurationParams(
String model,
ProcessMessageResponse messageReponse) throws MTSCRAExceptionNSString *DateTime =
@“030C001800000000000000000000000000000000000101110000000F”;
[self.mtSCRALib sendExtendedCommandSync:DateTime];NSString *SetMSRAlwaysOn = @“580101”;
[self.mtSCRALib sendCommandSync:SetMSRAlwaysOn];NSString *SetMSROffWhenIdle = @“580100”;
[self.mtSCRALib sendCommandSync:SetMSROffWhenIdle];(NSString *) getSDKVersion (void)startScanningForPeripherals(void)stopScanningForPeripherals(void)setAddress:(NSString *)address (BOOL) openDevice(BOOL) closeDevice(BOOL) isDeviceConnected(BOOL) isDeviceOpened(int) sendCommandToDevice:(NSString *)pData Parameters:(NSString *) getResponseData102
June 12, 2024
Add 6.31.1 BYTE Description
103
November, 2024
Add Property 0x15 – MP Options (MAC MREQMK); Add Property 0x54 - Card Data Encryption Variant (MAC MREQMK); Add Property 0x6E - Mask Service Code (Set Mask Service Code Only), add Property 0x81 – Mode of Operation (MAC MREQMK); add Property 0x83 – QWANTUM Secure Data Butter (MAC MREQMK) Property 0x85 Keyset ID; Add: Command 0x788 – Get Certificate, Command 0x789 – Get Device CSR, Command 0x78A – Load Certificate, Command 0x78B – Authenticate Device, Command 0x07E0 – Set Button Mode (MAC Protected).
104
May, 2026
Added missing descriptions - Notification Identifier, Q001/Q002/Q003 message definition.
Added the difference between PCI device PAN masking and Non-PCI device PAN masking.
Updated the description of Property 0x07 and 0x08 for Non-PCI device and PCI device.
Rev Number
Date
Notes
100
March 15, 2024
Initial release.
101
May 05, 2024

Add Property 0x88 USB Packet Delay
eDynamo™, Dynamag, and DynaMAX are trademarks of MagTek, Inc.
The Bluetooth® word mark and logos are registered trademarks owned by Bluetooth SIG, Inc. and any use of such marks by MagTek is under license.
Microsoft®, Windows® and .NET® are registered trademarks of Microsoft Corporation.
EMV® is a registered trademark in the U.S. and other countries and an unregistered trademark elsewhere. The EMV trademark is owned by EMVCo, LLC. The Contactless Indicator mark, consisting of four graduating arcs, is a trademark owned by and used with permission of EMVCo, LLC.
All other system names and product names are the property of their respective owners.
Table 1.1 Revisions
Rev Number
Date
Notes
10
02/25/2015
Initial Release
20
12/03/2015
Rev Number
Date
Notes
500
06/03/2024
Added EMV transaction flow as Appendix F.
Added support for iDynamo 5 Gen III at sections 4.2, 4.61, and Appendix E.
501
07/03/2025
IMPORTANT: YOU SHOULD CAREFULLY READ ALL THE TERMS, CONDITIONS AND RESTRICTIONS OF THIS LICENSE AGREEMENT BEFORE INSTALLING THE SOFTWARE PACKAGE. YOUR INSTALLATION OF THE SOFTWARE PACKAGE PRESUMES YOUR ACCEPTANCE OF THE TERMS, CONDITIONS, AND RESTRICTIONS CONTAINED IN THIS AGREEMENT. IF YOU DO NOT AGREE WITH THESE TERMS, CONDITIONS, AND RESTRICTIONS, PROMPTLY RETURN THE SOFTWARE PACKAGE AND ASSOCIATED DOCUMENTATION TO THE ADDRESS ON THE FRONT PAGE OF THIS DOCUMENT, ATTENTION: CUSTOMER SUPPORT.
TERMS, CONDITIONS, AND RESTRICTIONS
MagTek, Incorporated (the "Licensor") owns and has the right to distribute the described software and documentation, collectively referred to as the "Software."
LICENSE: Licensor grants you (the "Licensee") the right to use the Software in conjunction with MagTek products. LICENSEE MAY NOT COPY, MODIFY, OR TRANSFER THE SOFTWARE IN WHOLE OR IN PART EXCEPT AS EXPRESSLY PROVIDED IN THIS AGREEMENT. Licensee
may not decompile, disassemble, or in any other manner attempt to reverse engineer the Software. Licensee shall not tamper with, bypass, or alter any security features of the software or attempt to do so.
TRANSFER: Licensee may not transfer the Software or license to the Software to another party without the prior written authorization of the Licensor. If Licensee transfers the Software without authorization, all rights granted under this Agreement are automatically terminated.
COPYRIGHT: The Software is copyrighted. Licensee may not copy the Software except for archival purposes or to load for execution purposes. All other copies of the Software are in violation of this Agreement.
TERM: This Agreement is in effect as long as Licensee continues the use of the Software. The Licensor also reserves the right to terminate this Agreement if Licensee fails to comply with any of the terms, conditions, or restrictions contained herein. Should Licensor terminate this Agreement due to Licensee's failure to comply, Licensee agrees to return the Software to Licensor. Receipt of returned Software by the Licensor shall mark the termination.
LIMITED WARRANTY: Licensor warrants to the Licensee that the disk(s) or other media on which the Software is recorded are free from defects in material or workmanship under normal use.
THE SOFTWARE IS PROVIDED AS IS. LICENSOR MAKES NO OTHER WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Because of the diversity of conditions and PC hardware under which the Software may be used, Licensor does not warrant that the Software will meet Licensee specifications or that the operation of the Software will be uninterrupted or free of errors.
IN NO EVENT WILL LICENSOR BE LIABLE FOR ANY DAMAGES, INCLUDING ANY LOST PROFITS, LOST SAVINGS, OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE, OR INABILITY TO USE, THE SOFTWARE. Licensee's sole remedy in the event of a defect in material or workmanship is expressly limited to replacement of the Software disk(s) if applicable.
GOVERNING LAW: If any provision of this Agreement is found to be unlawful, void, or unenforceable, that provision shall be removed from consideration under this Agreement and will not affect the enforceability of any of the remaining provisions. This Agreement shall be governed by the laws of the State of California and shall inure to the benefit of MagTek, Incorporated, its successors or assigns.
ACKNOWLEDGMENT: LICENSEE ACKNOWLEDGES THAT HE HAS READ THIS AGREEMENT, UNDERSTANDS ALL OF ITS TERMS, CONDITIONS, AND RESTRICTIONS, AND AGREES TO BE BOUND BY THEM. LICENSEE ALSO AGREES THAT THIS AGREEMENT SUPERSEDES ANY AND ALL VERBAL AND WRITTEN COMMUNICATIONS BETWEEN LICENSOR AND LICENSEE OR THEIR ASSIGNS RELATING TO THE SUBJECT MATTER OF THIS AGREEMENT.
QUESTIONS REGARDING THIS AGREEMENT SHOULD BE ADDRESSED IN WRITING TO MAGTEK, INCORPORATED, ATTENTION: CUSTOMER SUPPORT, AT THE ADDRESS LISTED IN THIS DOCUMENT, OR E-MAILED TO SUPPORT@MAGTEK.COM.
To start the process of connecting, press on Connect .
Select the appropriate peripheral connected to the MagTek SCRA OEM device’s SPI Port and UART Port, and then press on Connect .
Approve any prompts for allowing the app to access the USB device by pressing on OK .
To disconnect the MagTek SCRA OEM device, press the red X at the top of the app.
To begin the process of sending a command to the device, press on Send at the top of the app.
Select which interface the command is to be sent to:
Board: Commands to the main board chip peripheral.
UAER: Commands to NFC contactless peripheral.
SPI: Commands to the MSR peripheral.
Enter the command under Custom Command , then press on Send.
Sent commands and device responses are displayed similarly as below.
To clear the display, press on Clear at the top of the app.
To begin the process of starting an EMV transaction, press on EMV at the top of the app.
Select the transaction approval type:
Approved: On for approval response code. Off for decline response code.
Quick Chip: On to transact only an Acquirer Request Cryptogram (ARQC). Off to transact both ARQC and Acquirer Response Code (ARPC.
MagTek SCRA OEM devices and peripherals not equipped with batteries will need to have their time set on each USB connection to the Android host device. This step is needed only once until there is a power cycle or reset of the MagTek SCRA OEM device. Set the time according to which peripheral is to be used for the transaction:
Set Time: For the main board chip transaction.
Set Time [UART]: For NFC contactless transaction.
Select one of the card types for the transaction:
Start Chip Transaction: for chip cards only.
Start Contactless: for contactless only.
Start Chip & Contavtless: for both chip and contactless.
Present the card to the device.
Follow the prompts for selecting any languages and applications to complete the transaction. The result will be displayed similar as below.
To cancel a transacion, press EMV at the top of the app and press Cancel Transaction. A transaction may only be canceled before a card is presented.
This section describes the get, set, and commit commands for terminal configuration on the device.
Get – retrieves the terminal configuration.
Set – sets the terminal configuration. Changes do not remain after device power cycle or reset.
Commit – is used to store configuration changes to non-volatile memory to remain in place after a power cycle or reset.
To access the device’s terminal configuration, press at the top of the app and select Configuration.
To get the devices terminal configuration, select Get Terminal Config . The value will be displayed similar as below.
To set the devices terminal configuration, select Set Terminal Config . The value will be displayed similar as below. Setting the Terminal Configuration requires an authenticated message unique to each device, so in the MagTek SCRA OEM Demo the response will indicate an invalid serial number or invalid MAC.
To commit the devices terminal configuration, select Commit Config . The value will be displayed similar as below.

Return Value: String representing card IIN.
Retrieves Last 4 digits of card number from card data.
Return Value:
String representing card last 4 digits.
Retrieves card name from card data. public
Return Value:
String representing card name.
Retrieves PAN from card data.
Return Value:
String representing card PAN.
Retrieves PAN length from card data.
Return Value:
PAN length
Retrieves Service Code.
Parameters: None Return Value:
String representing service code.
Retrieves Card Status.
Parameters: None
Return Value:
String representing card status.
This one-byte value indicates the type of encoding that was found on the card. The following table defines the possible values.
Parameters: None Return Value:
Value
Encode Type
Description
0
ISO/ABA
ISO/ABA encode format. At least one track in ISO/ABA format, Track 3 not AAMVA format.
1
AAMVA
public long getCardDataCRC()public String getCardExpDate() Parameters: Nonepublic String getCardIIN()public String getCardLast4() Parameters: NoneString getCardName() Parameters: Nonepublic String getCardPAN() Parameters: Nonepublic int getCardPANLength() Parameters: Nonepublic String getCardServiceCode()public String getCardStatus()public int getEncodeType()MagneSafe® is a registered trademark of MagTek, Inc. iDynamo™, and uDynamo are trademarks of MagTek, Inc.
eDynamo™, Dynamag, and DynaMAX are trademarks of MagTek, Inc.
DynaPro Mini™, DynaPro™, and DynaPro Go™ are trademarks of MagTek, Inc.
The Bluetooth® word mark and logos are registered trademarks owned by Bluetooth SIG, Inc. and any use of such marks by MagTek is under license
Microsoft® and Windows® are registered trademarks of Microsoft Corporation.
All other system names and product names are the property of their respective owners.
Table 0.1 – Revisions
Rev Number
Date
Notes
10
07/10/2017
Initial Release
20
10/10/2018
IMPORTANT: YOU SHOULD CAREFULLY READ ALL THE TERMS, CONDITIONS AND RESTRICTIONS OF THIS LICENSE AGREEMENT BEFORE INSTALLING THE SOFTWARE PACKAGE. YOUR INSTALLATION OF THE SOFTWARE PACKAGE PRESUMES YOUR ACCEPTANCE OF THE TERMS, CONDITIONS, AND RESTRICTIONS CONTAINED IN THIS AGREEMENT. IF YOU DO NOT AGREE WITH THESE TERMS, CONDITIONS, AND RESTRICTIONS, PROMPTLY RETURN THE SOFTWARE PACKAGE AND ASSOCIATED DOCUMENTATION TO THE ADDRESS ON THE FRONT PAGE OF THIS DOCUMENT, ATTENTION: CUSTOMER SUPPORT.
TERMS, CONDITIONS, AND RESTRICTIONS
MagTek, Incorporated (the "Licensor") owns and has the right to distribute the described software and documentation, collectively referred to as the "Software."
LICENSE: Licensor grants you (the "Licensee") the right to use the Software in conjunction with MagTek products. LICENSEE MAY NOT COPY, MODIFY, OR TRANSFER THE SOFTWARE IN WHOLE OR IN PART EXCEPT AS EXPRESSLY PROVIDED IN THIS AGREEMENT. Licensee
may not decompile, disassemble, or in any other manner attempt to reverse engineer the Software. Licensee shall not tamper with, bypass, or alter any security features of the software or attempt to do so.
TRANSFER: Licensee may not transfer the Software or license to the Software to another party without the prior written authorization of the Licensor. If Licensee transfers the Software without authorization, all rights granted under this Agreement are automatically terminated.
COPYRIGHT: The Software is copyrighted. Licensee may not copy the Software except for archival purposes or to load for execution purposes. All other copies of the Software are in violation of this Agreement.
TERM: This Agreement is in effect as long as Licensee continues the use of the Software. The Licensor also reserves the right to terminate this Agreement if Licensee fails to comply with any of the terms, conditions, or restrictions contained herein. Should Licensor terminate this Agreement due to Licensee's failure to comply, Licensee agrees to return the Software to Licensor. Receipt of returned Software by the Licensor shall mark the termination.
LIMITED WARRANTY: Licensor warrants to the Licensee that the disk(s) or other media on which the Software is recorded are free from defects in material or workmanship under normal use.
THE SOFTWARE IS PROVIDED AS IS. LICENSOR MAKES NO OTHER WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Because of the diversity of conditions and PC hardware under which the Software may be used, Licensor does not warrant that the Software will meet Licensee specifications or that the operation of the Software will be uninterrupted or free of errors.
IN NO EVENT WILL LICENSOR BE LIABLE FOR ANY DAMAGES, INCLUDING ANY LOST PROFITS, LOST SAVINGS, OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE, OR INABILITY TO USE, THE SOFTWARE. Licensee's sole remedy in
the event of a defect in material or workmanship is expressly limited to replacement of the Software disk(s) if applicable.
GOVERNING LAW: If any provision of this Agreement is found to be unlawful, void, or unenforceable, that provision shall be removed from consideration under this Agreement and will not affect the enforceability of any of the remaining provisions. This Agreement shall be governed by the laws of the State of California and shall inure to the benefit of MagTek, Incorporated, its successors or assigns.
ACKNOWLEDGMENT: LICENSEE ACKNOWLEDGES THAT HE HAS READ THIS AGREEMENT, UNDERSTANDS ALL OF ITS TERMS, CONDITIONS, AND RESTRICTIONS, AND AGREES TO BE BOUND BY THEM. LICENSEE ALSO AGREES THAT THIS AGREEMENT SUPERSEDES ANY AND ALL VERBAL AND WRITTEN COMMUNICATIONS BETWEEN LICENSOR AND LICENSEE OR THEIR ASSIGNS RELATING TO THE SUBJECT MATTER OF THIS AGREEMENT.
QUESTIONS REGARDING THIS AGREEMENT SHOULD BE ADDRESSED IN WRITING TO MAGTEK, INCORPORATED, ATTENTION: CUSTOMER SUPPORT, AT THE ADDRESS LISTED IN THIS DOCUMENT, OR E-MAILED TO SUPPORT@MAGTEK.COM.



User refers to the cardholder.
Web App refers to the application provided by the integrator of MagneFlex Browser. The web app will communicate with the MagneFlex browser via query strings. MagneFlex then controls and obtains data from the MagTek device.
Query string refers to the web app’s interface to MagneFlex WEB API sent as an HTTP request. The query string is added to the base URL. This string contains field-value pairs referred to as parameters and begins after the question mark character “?” at the end of the base URL. Each parameter is defined in the parameter table for each resource of the MagneFlex WEB API. In the following example, the place holder for field will be listed in the parameter column of the table and value will be explained in the description column.
Example query:
Postback refers to the response from a request or command from the device. The web app shall consume the postback. MagneFlex sends the postback in two forms.
HTTP GET - returns the response data in the form of a query string.
HTTP POST - returns the response data in the form of a body message. POST is recommended for EVM related transactions or commands of lengthy response to accommodate limits on query string lengths.
Tested operating systems:
iOS 8 to iOS 10
Windows 7, 8.1, 10
The following table matches the device interface to operating system.
Device
Interface
Operating System
DynaPro Mini
Bluetooth LE
iOS 8 – 10
Windows 8.1, 10
USB
iOS 8 – 10
Windows 7, 8.1, 10
After creating an instance of the MTSCRA class in your custom software project, use the methods described in this section to communicate with SCRA device.
This method initiates the discovery of devices that are visible to the host using the specified connection interface. The DeviceListReceived() event will provide information regarding the available devices once the discovery process is completed.
public void requestDeviceList(MTConnectionType connectionType)
Parameters:
Parameter
Return Value: None
This method sets the connection type of the device.
public void setConnectionType(MTConnectionType connectionType)
Parameters:
The following table shows the connection types supported by the various programming interfaces:
The following table shows the connection types supported by the various SCRA devices:
Return Value: None
This method sets the address of the device.
public void setAddress(string deviceAddress)
Parameters:
Return Value: None
This method sets the device ID.
public void setDeviceID(string deviceID)
Parameters:
Return Value: None
This method opens connection to the device. If you use the MagTek Universal Windows SDK and USB Card reader with PID 0011, please refer to section 2.5 How to remove POS HID Magnetic Stripe Reader.
public void openDevice()
Parameters: None
Return Value: None
This method closes the connection to the device.
public void closeDevice()
Parameters: None
Return Value: None
This method returns whether the device is connected or not.
public bool isDeviceConnected()
Parameters: None Return Value:
Return true if the device is connected. Otherwise, return false.
This method returns whether the device supports EMV or not.
public bool isDeviceEMV()
Parameters: None Return Value:
Return true if EMV is supported by the device. Otherwise, return false.
This method returns whether the device is an OEM device or not.
public bool isDeviceOEM()
Parameters: None Return Value:
Return true if device is OEM. Otherwise, return false.
Get stored masked tracks data. If decodable track data exists for a given track, it is located in the Masked Track Data field that corresponds to the track number. The length of each Masked Track Data field is fixed at 112 bytes, but the length of valid data in each field is determined by the Masked Track Data Length field that corresponds to the track number. Masked Track Data located in positions greater than indicated in the Masked Track Data Length field are undefined and should be ignored.
The Masked Track Data is decoded and converted to ASCII and then it is masked. The Masked Track Data includes all data starting with the start sentinel and ending with the end sentinel. Much of the data is masked; a specified mask character is sent instead of the actual character read from the track. Which characters are masked depends on the format of the card. Only ISO/ABA (Financial Cards with Format Code B) and AAMVA cards are selectively masked; all other card types are either entirely masked or sent totally in the clear. There is a separate masking property for ISO/ABA cards and AAMVA cards. See the ISO Track Masking property and the AAMVA Track Masking property for more information. See 99875475 for a description on how ISO/ABA and AAMVA cards are identified.
Each of these properties allows the application to specify masking details for the Primary Account Number and Driver’s License / ID Number (DL/ID#), the masking character to be used, and whether a correction should be applied to make the Mod 10 9 (Luhn algorithm) digit at the end of the number be correct.
public string getMaskedTracks()
Parameters: None Return Value:
Return stored masked tracks data string.
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.
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.
REGISTERED TO ISO 9001:2015
MagTek I 1710 Apollo Court I Seal Beach, CA 90740 I Phone: (562) 546-6400 I Technical Support: (888) 624-8350 www.magtek.com
Copyright © 2006-2025 MagTek, Inc. Printed in the United States of America
Information in this publication is subject to change without notice and may contain technical inaccuracies or graphical discrepancies. Changes or improvements made to this product will be updated in the next publication release. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of MagTek, Inc.
MagTek® is a registered trademark of MagTek, Inc. MagneSafe® is a registered trademark of MagTek, Inc. iDynamo™, and uDynamo are trademarks of MagTek, Inc.
eDynamo™, Dynamag, and DynaMAX are trademarks of MagTek, Inc. DynaGlass™ is a trademark of MagTek, Inc.
The Bluetooth® word mark and logos are registered trademarks owned by Bluetooth SIG, Inc. and any use of such marks by MagTek is under license.
Android™ is a registered trademark of Google Inc.
EMV® is a registered trademark in the U.S. and other countries and an unregistered trademark elsewhere. The EMV trademark is owned by EMVCo, LLC. The Contactless Indicator mark, consisting of four graduating arcs, is a trademark owned by and used with permission of EMVCo, LLC.
All other system names and product names are the property of their respective owners.
Table 0-1 – Revisions
IMPORTANT: YOU SHOULD CAREFULLY READ ALL THE TERMS, CONDITIONS AND RESTRICTIONS OF THIS LICENSE AGREEMENT BEFORE INSTALLING THE SOFTWARE PACKAGE. YOUR INSTALLATION OF THE SOFTWARE PACKAGE PRESUMES YOUR ACCEPTANCE OF THE TERMS, CONDITIONS, AND RESTRICTIONS CONTAINED IN THIS AGREEMENT. IF YOU DO NOT AGREE WITH THESE TERMS, CONDITIONS, AND RESTRICTIONS, PROMPTLY RETURN THE SOFTWARE PACKAGE AND ASSOCIATED DOCUMENTATION TO THE ADDRESS ON THE FRONT PAGE OF THIS DOCUMENT, ATTENTION: CUSTOMER SUPPORT.
TERMS, CONDITIONS, AND RESTRICTIONS
MagTek, Incorporated (the “Licensor”) owns and has the right to distribute the described software and documentation, collectively referred to as the “Software.”
LICENSE: Licensor grants you (the “Licensee”) the right to use the Software in conjunction with MagTek products. LICENSEE MAY NOT COPY, MODIFY, OR TRANSFER THE SOFTWARE IN WHOLE OR IN PART EXCEPT AS EXPRESSLY PROVIDED IN THIS AGREEMENT. Licensee
may not decompile, disassemble, or in any other manner attempt to reverse engineer the Software. Licensee shall not tamper with, bypass, or alter any security features of the software or attempt to do so.
TRANSFER: Licensee may not transfer the Software or license to the Software to another party without the prior written authorization of the Licensor. If Licensee transfers the Software without authorization, all rights granted under this Agreement are automatically terminated.
COPYRIGHT: The Software is copyrighted. Licensee may not copy the Software except for archival purposes or to load for execution purposes. All other copies of the Software are in violation of this Agreement.
TERM: This Agreement is in effect as long as Licensee continues the use of the Software. The Licensor also reserves the right to terminate this Agreement if Licensee fails to comply with any of the terms, conditions, or restrictions contained herein. Should Licensor terminate this Agreement due to Licensee’s failure to comply, Licensee agrees to return the Software to Licensor. Receipt of returned Software by the Licensor shall mark the termination.
LIMITED WARRANTY: Licensor warrants to the Licensee that the disk(s) or other media on which the Software is recorded are free from defects in material or workmanship under normal use.
THE SOFTWARE IS PROVIDED AS IS. LICENSOR MAKES NO OTHER WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Because of the diversity of conditions and PC hardware under which the Software may be used, Licensor does not warrant that the Software will meet Licensee specifications or that the operation of the Software will be uninterrupted or free of errors.
IN NO EVENT WILL LICENSOR BE LIABLE FOR ANY DAMAGES, INCLUDING ANY LOST PROFITS, LOST SAVINGS, OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE, OR INABILITY TO USE, THE SOFTWARE. Licensee’s sole remedy in
the event of a defect in material or workmanship is expressly limited to replacement of the Software disk(s) if applicable.
GOVERNING LAW: If any provision of this Agreement is found to be unlawful, void, or unenforceable, that provision shall be removed from consideration under this Agreement and will not affect the enforceability of any of the remaining provisions. This Agreement shall be governed by the laws of the State of California and shall inure to the benefit of MagTek, Incorporated, its successors or assigns.
ACKNOWLEDGMENT: LICENSEE ACKNOWLEDGES THAT HE HAS READ THIS AGREEMENT, UNDERSTANDS ALL OF ITS TERMS, CONDITIONS, AND RESTRICTIONS, AND AGREES TO BE BOUND BY THEM. LICENSEE ALSO AGREES THAT THIS AGREEMENT SUPERSEDES ANY AND ALL VERBAL AND WRITTEN COMMUNICATIONS BETWEEN LICENSOR AND LICENSEE OR THEIR ASSIGNS RELATING TO THE SUBJECT MATTER OF THIS AGREEMENT.
QUESTIONS REGARDING THIS AGREEMENT SHOULD BE ADDRESSED IN WRITING TO MAGTEK, INCORPORATED, ATTENTION: CUSTOMER SUPPORT, AT THE ADDRESS LISTED IN THIS DOCUMENT, OR E-MAILED TO
This document provides instructions for software developers who want to create custom software solutions that communicate with DynaMAX, eDynamo, aDynamo, iDynamo, uDynamo, kDynamo, sDynamo, tDynamo, iDynamo 5 Gen II, iDynamo 5 Gen III, or iDynamo 6 connected to an iOS host via audio connector or Bluetooth LE. It is part of a larger library of documents which includes:
D99875475 MagneSafe V5 Programmer’s Reference (Commands)
D998200175 DynaMAX Programmer's Manual (Commands)
D998200115 eDynamo Programmer's Manual (Command )
D998200309 iDynamo 5 (Gen II) Programmer's Manual (Commands)
D998200587 iDynamo 5 (Gen III) Programmer's Manual (Commands)
D998200230 kDynamo Programmer's Manual (Commands)
D998200226 tDynamo Programmer's Manual (Commands)
D998200324 iDynamo 6 Programmer's Manual (Command )
The MTSCRADemo software, available from MagTek, provides demonstration source code and a reusable MTSCRA library that provides developers of custom iOS software solutions with an easy-to-use interface. Developers can include the MTSCRA library in custom branded software which can be distributed to customers or distributed internally as part of an enterprise solution.
The general terms “device” and “host” are used in different, often incompatible ways in a multitude of specifications and contexts. For example, “host” may have different meanings in the context of USB communication than it does in the context of networked financial transaction processing. In this document, “device” and “host” are used strictly as follows:
Device refers to the MSR device that receives and responds to the command set specified in this document; in this case, DynaMAX, eDynamo, aDynamo, iDynamo, uDynamo, kDynamo, sDynamo, tDynamo, or iDynamo 6.
Host refers to the piece of general-purpose electronic equipment the device is connected or paired to, which can send data to and receive data from the device. Host types include PC and Mac computers/laptops, tablets, smartphones, teletype terminals, and even test harnesses. In many cases the host may have custom software installed on it that communicates with the device. When “host” must be used differently, it is qualified as something specific, such as “USB host.”
The word “user” is also often used in different ways in different contexts. In this document, user generally refers to the cardholder.
Tested devices:
iPhone 7, 7 Plus, 8, 8 Plus, X, XS, XS Max, 11, 12, 13, 14, 15 series, iPhone 12 and 13 mini
iPad 6th 7th, 8th, 9th, 10th gen, iPad Air, iPad Air 2/3/4/5, iPad Pro, iPad Pro 2nd, 3rd, 4th, and 5th gen
iPad Mini 2, iPad Mini 3, iPad Mini 4, iPad Mini 5, iPad Mini 6 Tested operating systems: iOS 13 and above
The following table matches the device interface to operating system.
This message occurs when a non EMV command response is returned from the device.
This message occurs when an error occurs.
Added a missing property (0x51).
Removed factory-only commands.
Fixed typos and formats.
Updates for EMV devices
30
05/17/2016
Added DynaPro format for EMV transaction messages.
40
06/20/2016
Added getCardPAN.
50
10/28/2016
Added support for mDynamo.
51
June 9, 2017
Fix table in section 5.6 listing values for card events; misc. formatting cleanup.
52
10/16/2017
Updates for Universal Windows. Enhanced the code examples.
53
05/23/2018
Added isDeviceOEM
54
01/31/2019
Updated to correctly reference Bluetooth LE. Added getDeviceFeatures() and getPowerManagementValue().
55
10/08/2019
Updated events for the event onTransactionStatus(), and result codes for the event onEMVCommandResult().
Updated the method startTransaction(): cardType, options. and transactionType.
Updated and included IMTCardData to support SCDE (section 6.1).
AAMVA encode Track 3 is AAMVA format, Tracks 1 and 2 are ISO/ABA if correctly decoded.
2
Reserved
3
Blank
The card is blank. Only occurs if all tracks decode without error and without data.
4
Other
The card has a non-standard encode format. For example, ISO/ABA track 1 format on track 2.
5
Undetermined
The card encode type could not be determined because no tracks could be decoded. (Combination of Error tracks and Blank Tracks, at least one Error track).
6
None
No decode has occurred. This type occurs if no magnetic stripe data has been acquired since the data has been cleared or since the reader was powered on. This reader only sends an Input report when a card has been swiped so this value will never occur.
Added requestData resource and extended all resources to support requestLocation.
Fixed requestManualCard options field.
30
10/28/2019
Corrected typo qwickChipMode to quickChipMode on pages 16,17, and 18
DynaPro
Ethernet
iOS 8 – 10
Windows 7, 8.1, 10
USB
iOS 8 – 10
Windows 7, 8.1, 10
DynaMAX
Bluetooth LE
iOS 8 – 10
Windows 8.1, 10
USB
iOS 8 – 10
Windows 7, 8.1, 10
eDynamo
Bluetooth LE
iOS 8 – 10
Windows 8.1, 10
USB
iOS 8 – 10
Windows 7, 8.1, 10
iDynamo
Lightning
iOS 8 – 10
uDynamo
Audio
iOS 8 – 10
Windows 7, 8.1, 10
MICRSafe
USB
Windows 7, 8.1, 10
























X
X
X
Universal Windows Platform
X
Bluetooth
BulleT
USB
BulletT DynaMag DynaMAX eDynamo mDynamo DynaWave tDynamo
iDynamo 5 Gen III
Serial
DynaWave
Description
connectionType
MTConnectionType value: MTConnectionType.Audio, MTConnectionType.BLE, MTConnectionType.BLEEMV, MTConnectionType.Bluetooth, MTConnectionType.USB, MTConnectionType.Serial, MTConnectionType.Net, MTConnectionType.Net_TLS12, MTConnectionType.Net_TLS12_Trust_All
Parameter
Description
connectionType
MTConnectionType value: MTConnectionType.Audio, MTConnectionType.BLE, MTConnectionType.BLEEMV, MTConnectionType.Bluetooth, MTConnectionType.USB, MTConnectionType.Serial, MTConnectionType.Net, MTConnectionType.Net_TLS12, MTConnectionType.Net_TLS12_Trust_All
Connection Type / Programming Interface
Audio
Bluetooth LE
Bluetooth LE EMV
Bluetooth
USB
UART
.NET Framework
X
Connection Type
SCRA Device
Audio
aDynamo uDynamo
Bluetooth LE
DynaMAX
Bluetooth LE EMV
eDynamo tDynamo
Parameter
Description
deviceAddress
String value of the address.
Parameter
Description
deviceID
String value of the device ID.
X
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
For details about the ARQC format, see the Programmer's Manual (COMMANDS) for the specific device with which you are communicating.
12
11/11/2015
Added 0x08 event value for Card Removed in OnTransactionStatus.
13
11/18/2015
Updated event value definitions for 0x03 and 0x04 in OnTransactionStatus.
20
08/04/2016
Added DynaPro format for EMV transaction messages. Added getCardPAN, and setConnectionRetry.
30
03/10/2017
Updated the device capatibility list for setConnectionType.
31
06/09/2017
Fix table in section 5.5 providing values for card events; misc. formatting fixes
40
08/21/2018
Added support for tDynamo and DynaWave.
50
01/31/2019
Updated startTransaction to support Quick Chip mode. Removed service declarations to be specified in the
AndroidManifest.xml file. Updated to correctly reference Bluetooth LE. Added getDeviceFeature and getPowerManagementValue methods.
600
06/04/2024
Added iDynamo 5 (Gen III) in the supported device list at sections
1.1 and 3.1.
601
07/03/2025
Updated and included IMTCardData to support SCDE. (section 6.9).
Revision Number
Date
Notes
10
09/29/2015
Initial Release
11
11/09/2015
Revision Number
Date
Notes
51
11/19/2020
Removed appendix B,C,D and advised customer to use command manuals. Updated tested OS. Added support of iDynamo 6, DynaGlass.
60
09/01/2021
Added SendExtendedCommand and OnDeviceExentededResponse.
Updated to support banking functions for DynaGlass. Added section for enums, constants, and status.
Build Platforms: XCode 15.3 and above
iDynamo
30-pin
iOS 13 and above
Lightning
iOS 13 and above
uDynamo
Audio
iOS 13 and above
DynaMAX
Bluetooth LE 4.0
iOS 13 and above
kDynamo
Lightning
iOS 13 and above
sDynamo
Lightning
iOS 13 and above
tDynamo
Bluetooth LE 4.0
iOS 13 and above
iDynamo 5 Gen II
Lightning
iOS 13 and above
iDynamo 5 Gen III
USB-C (iAP2)
iOS 13 and above
iDynamo 6
Lightning
iOS 13 and above
File Name
Description
MTSCRA.h
Header file for the MTSCRA SDK
libMTSCRA.a
Library binary for the MTSCRA SDK
MTSCRADemo Folder
Sample code and projects
Device
Interface
Operating System
eDynamo
Bluetooth LE 4.0
iOS 13 and above
aDynamo
Audio
iOS 13 and above
Parameter
Description
error
Error object.
The SDK sends this notification when the transaction status has changed.
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.
Device request for displaying information to user.
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.
Device request for application to display a User Selection Menu.
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.
This notification is sent from the device for ARQC data.
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
This message occurs when the transaction result is received from the EMV device.
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.
This message occurs when an EMV command result is received from the EMV device.
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.
This message occurs when and extended response is received from the device.
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.
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.
Parameter
Description
RSSI
Integer value for the Received Signal Strength Indicator.
error
NSError object
This call back will be raised if host software subscribes to it.
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.
Request the device to display a message for swiping a card.
Parameters:
After creating an instance of the MTSCRA class in your custom software project, use the methods described in this section to communicate with SCRA device.
This method sets the connection type of the device.
Parameters:
This section describes how to use the MagTek SCRA Demo on an Android host. Some peripherals are not included in every MagTek SCRA device, so use each feature of the Demo accordingly.
This section describes how to use the MagTek SCRA Demo with a SCRA Device such as Dynamag, DynaMAX, eDynamo, mDynamo, BulleT, uDynamo, tDynamo, and DynaWave, iDynamo 5 (Gen III) connected to an Android host via USB OTG cable. Please note that the Android host must have USB OTG support to use this connection type.
Connect the MagTek SCRA device to the Android host USB port using an OTG cable.
Press on MagTek SCRA Demo to launch the app.
For details about the ARQC format, see the Programmer's Manual (COMMANDS) for the specific device with which you are communicating.
Card Message ID to display:
0x00 = Swipe Card / Idle (alternating) 0x01 = Swipe Card
0x02 = Please Swipe Card
0x03 = Please Swipe Card Again 0x04 = Chip Error, Use Mag Stripe 0x07 = Please Swipe, Insert or Tap 0x08 = Insert Card
0x09 = Please Swipe or Insert Card 0x0C = Tap Card
0x0D = Please Insert or Tap Card
beepCount
0x00 = None
0x01 = Single Beep 0x02 = Double Beep
Return Value:
0 = Success
9 = Error
15 = Busy
This function requests the device to send MSR data after calling requestCardSwipe().
Return Value:
0 = Success
9 = Error
15 = Busy
Request PIN entry by the cardholder.
Parameters:
Parameter
Description
waitTie
Wait Time in seconds, (0x01 – 0xFF; 0x00 = 256 seconds)
pinMode
Message mode to display on the device. 0x00 = Enter PIN
0x01 = Enter PIN Amount 0x02 = Reenter PIN Amount 0x03 = Reenter PIN
0x04 = Verify PIN
pinLength
Range for the PIN entered.
High nibble = Max PIN length (<=12) Low nibble = Min PIN length (>=4)
Example: 0x64 is for PIN length of 4 to 6 Example: 0xC4 is for PIN length of 4 to 12 Example: 0xC8 is for PIN length of 8 to 12
Return Value:
0 = Success
9 = Error
15 = Busy
Request the card holder to enter card data manually.
Parameters:
Parameter
Description
waitTime
Wait Time in seconds, (0x01 – 0xFF; 0x00 = 256 seconds)
options
Message and mode to display on the device. Bit (7,6,5)
Reserved
Bit 4
0=Use PAN min 9, max 19
1=Use PAN min 14, max 21
Bit 3
1=Use PAN in PIN block creation
Bit 2
1=Use QwickCodes entry Bit (1,0)
beepCount
0x00 = None
0x01 = Single Beep 0x02 = Double Beep
Return Value:
0 = Success
9 = Error
15 = Busy
Request the card holder to sign on the screen.
Parameters:
Parameter
Description
waitTime
Wait Time in seconds, (0x01 – 0xFF; 0x00 = 256 seconds)
options
0x00 = Timeout clears any signature data
0x01 = Timeout returns timeout status plus length collected. Sig Data can be requested.
beepCount
0x00 = None
0x01 = Single Beep 0x02 = Double Beep
Return Value:
0 = Success
9 = Error
15 = Busy
Request the card holder signature from the device. To be used after calling requestSignature().
Return Value:
0 = Success
9 = Error
15 = Busy
Request the card holder to enter text for encryption.
Parameters:
Parameter
Description
waitTime
Wait Time in seconds, (0x01 – 0xFF; 0x00 = 256 seconds)
beepCount
0x00 = None
0x01 = Single Beep 0x02 = Double Beep
Return Value:
0 = Success
9 = Error
15 = Busy
Request the encrypted input data from the device. To be used after calling requestEncryptedInputData().
Return Value:
0 = Success
9 = Error
15 = Busy
Request to cancel a command or request while the device is waiting for the card holder.
Return Value:
0 = Success
9 = Error
15 = Busy
public int requestSwipeCard(
byte waitTime,
byte messageID,
byte beepCount)Parameter
Description
waitTime
Wait Time in seconds, (0x01 – 0xFF; 0x00 = Infinite Wait Time)
messageID
public int getMSRData()public int requestPINEntry(
byte waitTime,
byte pinMode,
byte pinLength,
byte beepCount,
byte pinOption,
byte[] amount,
byte[] pan)public int requestManualCardEntry(
byte waitTime,
byte options,
byte beepCount)public int requestSignature(
byte waitTime,
byte options,
byte beepCount)public int getSignature()public int requestEncryptedInputData(
byte waitTime,
byte beepCount)public int getEncryptedInputData()public int cancelRequest()The following table shows the connection types supported by the various SCRA devices:
Connection Type
SCRA Device
Note
Audio
aDynamo uDynamo
Bluetooth LE
DynaMAX
Return Value: None
This function when set to True instructs the SDK to automatically retry to connect to the Bluetooth LE reader upon pairing. If set to False, the Bluetooth LE reader will be disconnected after pairing. This function is set to False by default in the SDK, but MagTek highly recommends to set this flag to True in your application in order to make sure that you'll have a successful secure connection between Android OS and Bluetooth LE reader after the paring.
Parameters:
Parameter
Description
connectionRetry
Connection retry value:
True = SDK will retry the conection after pairing.
False = SDK will not retry the connection after pairing.
Return Value: None
This method sets the address of the device.
Parameters:
Parameter
Description
deviceAddress
String value of the address.
Return Value: None
This method sets the configuration parameters for the device.
Parameters:
Parameter
Description
configuration
String value of the configuration parameters to be used for the device.
Audio Reader Device Configuration
Parameter
Default Value
Configurable Values
PAN_MOD10_CHECKDIGIT
TRUE
Return Value: None
This method opens connection to the device.
Parameters: None
Return Value: None
This method closes the connection to the device.
Parameters: None
Return Value: None
This method returns whether the device is connected or not.
Parameters: None
Return Value:
Return true if the device is connected. Otherwise, return false.
This method returns whether the device supports EMV or not.
Parameters: None
Return Value:
Return true if EMV is supported by the device. Otherwise, return false.
Get stored masked tracks data. If decodable track data exists for a given track, it is located in the Masked Track Data field that corresponds to the track number. The length of each Masked Track Data field is fixed at 112 bytes, but the length of valid data in each field is determined by the Masked Track Data
Length field that corresponds to the track number. Masked Track Data located in positions greater than indicated in the Masked Track Data Length field are undefined and should be ignored.
The Masked Track Data is decoded and converted to ASCII and then it is masked. The Masked Track Data includes all data starting with the start sentinel and ending with the end sentinel. Much of the data is masked; a specified mask character is sent instead of the actual character read from the track. Which characters are masked depends on the format of the card. Only ISO/ABA (Financial Cards with Format Code B) and AAMVA cards are selectively masked; all other card types are either entirely masked or sent totally in the clear. There is a separate masking property for ISO/ABA cards and AAMVA cards. See D99875475 for the ISO Track Masking property and the AAMVA Track Masking property for more information. See D99875475 for a description on how ISO/ABA and AAMVA cards are identified.
Each of these properties allows the application to specify masking details for the Primary Account Number and Driver’s License / ID Number (DL/ID#), the masking character to be used, and whether a correction should be applied to make the Mod 10 9 (Luhn algorithm) digit at the end of the number be correct.
Parameters: None
Return Value:
Return stored masked tracks data string.
Get stored track1 data. This field contains the encrypted track data for track 1.
public String getTrack1()
Parameters: None
Return Value:
Return stored track1 data string.
public void setConnectionType(MTConnectionType connectionType)Parameter
Description
connectionType
MTConnectionType value: MTConnectionType.Unknown, MTConnectionType.Audio, MTConnectionType.BLE, MTConnectionType.BLEEMV, MTConnectionType.Bluetooth, MTConnectionType.USB, MTConnectionType.Serial, MTConnectionType.Net, MTConnectionType.Net_TLS12, MTConnectionType.Net_TLS12_Trust_All, MTConnectionType.BLEEMVT, MTConnectionType.AIDL
public void setConnectionRetry(boolean connectionRetry)public void setAddress(String deviceAddress)public void setDeviceConfiguration(String configuration)public void openDevice()public void closeDevice()public boolean isDeviceConnected()public boolean isDeviceEMV()public String getMaskedTracks()Connect a SCRA Device via USB OTG cable, then select USB in the menu.
If the device is Serial with a USB OTG cable, press on the device selector to the right of USB, then select Serial .
Press on Connect .
Approve any prompts for allowing the app to access the USB device by pressing on OK .
If you have a tDynamo device, press the icon and select Set MSR On to turn on the head.
Swipe a card to see the card data displays on the screen.
To disconnect the MagTek SCRA device, press the red X.
This section describes how to use the MagTek SCRA Demo with a SCRA Device such as Dynamag, DynaMAX, eDynamo, BulleT, and tDynamo connected to an Android host via USB OTG cable. Please note that the Android host must support Bluetooth and Bluetooth LE to use this connection type.
Connect the MagTek SCRA device to the Android host USB port using an OTG cable.
Press on the device selector and select either Bluetooth, BLE, BLE EMVT from the list.
Bluetooth: for BulleT
BLE: for eDynamo and DynaMAX
BLE EMVT: for iDynamo
Select the intended device from the list. Example shown below.
Press Connect to connect to the device.
The host will prompt to pair the device the first time the connection is established. Enter the pairing PIN and press OK .
After the Connection State changes to Connected , the device is ready.
To begin the process of sending a command to the device, press on the magnetic stripe card icon at the top of the app, then select SEND .
Enter a command, then press on SEND . An example is shown below with the response.
The selections other than SEND command are as follows.
Clear: Clears the screen.
Device Info: Returns information about the device.
Battery Level: Returns the battery level of the device.
Set MSR On: Powers on the MSR head while idle for devices that support this feature.
Set MSR Off: Powers off the MSR head while idle for devices that support this feature
To begin the process of starting an EMV transaction, press the chip card icon at the top of the app.
Select the transaction approval type:
Approved: On for approval response code. Off for decline response code.
Quick Chip: On to transact only an Acquirer Request Cryptogram (ARQC). Off to transact both ARQC and Acquirer Response Code (ARPC).
For MagTek SCRA devices not equipped with batteries, the devices must have their time set after a power up from the host. This is needed only once until the next power cycle or reset.
Select Set Time. A response of all 0’s means the time was set.
Select Start Transaction and select each Transaction Types. Transaction types may be combined.
Swipe: For magnetic stripe
Chip: for chip.
Contactless: for contactless
Press Start to start the transaction
Present the card to the device and follow the prompts for selecting any languages and applications to complete the transaction. The result will be displayed similar as below.
To cancel a transaction, press EMV at the top of the app and press Cancel Transaction . A transaction may only be canceled before a card is presented.
This section describes the get, set, and commit commands for terminal configuration on the device.
Get – retrieves the terminal configuration.
Set – sets the terminal configuration. Changes do not remain after device power cycle or reset.
Commit – is used to store configuration changes to non-volatile memory to remain in place after a power cycle or reset.
To access the device’s terminal configuration, press on the chip card icon at the top of the app and select Configuration.
To get the devices terminal configuration, select Get Terminal Config . The value will be displayed similar as below.
To set the devices terminal configuration, select Set Terminal Config . The value will be displayed similar as below. Setting the Terminal Configuration requires an authenticated message unique to each device, so in the MagTek SCRA OEM Demo the response will indicate an invalid serial number or invalid MAC.
To commit the devices terminal configuration, select Commit Config . The value will be displayed similar as below.
Document Number: D99875568-133
REGISTERED TO ISO 9001:2015
MagTek I 1710 Apollo Court I Seal Beach, CA 90740 I Phone: (562) 546-6400 I Technical Support: (888) 624-8350
Copyright © 2006 – 2025 MagTek, Inc. Printed in the United States of America
INFORMATION IN THIS PUBLICATION IS SUBJECT TO CHANGE WITHOUT NOTICE AND MAY CONTAIN TECHNICAL INACCURACIES OR GRAPHICAL DISCREPANCIES. CHANGES OR IMPROVEMENTS MADE TO THIS PRODUCT WILL BE UPDATED IN THE NEXT PUBLICATION RELEASE. NO PART OF THIS DOCUMENT MAY BE REPRODUCED OR TRANSMITTED IN ANY FORM OR BY ANY MEANS, ELECTRONIC OR MECHANICAL, FOR ANY PURPOSE, WITHOUT THE EXPRESS WRITTEN PERMISSION OF MAGTEK, INC.
MagTek®, MagnePrint®, and MagneSafe® are registered trademarks of MagTek, Inc. Magensa™ is a trademark of MagTek, Inc.
1 = Acct, Date
2 = Acct, CVC
3 = Acct
beepCount
0x00 = None
0x01 = Single Beep 0x02 = Double Beep
pinOption
Bit(7,6,5)
PIN Block Format 0b000 = ISO Format 0
0b001 = ISO Format 1 (No PAN Required) 0b011 = ISO Format 3
0b100 = ISO Format 4
Bit(4,3)
(PIN Language Select Only) Language Select:
0b00 = Disabled
0b01 = English or French Only
0b10 = All Languages as defined by DFDF2D
Bit 2
Wait Message
Bit 1
Verify PIN
Bit 0
Reserved
amount
Numeric: n12
pan
Min.: 9 bytes; Max.: 21 bytes
Android 4.4.2 and above
Bluetooth LE EMV
eDynamo
Android 4.4.2 and above
Bluetooth LE EMVT
tDynamo
Android 4.4.2 and above
Bluetooth
BulleT
Card swipe only
USB
BulletT DynaMag DynaMAX eDynamo tDynamo DynaWave iDynamo 6
iDynamo 5 (Gen III)
Host must support USB On- The-Go.
Serial
DynaGlass
Android 7.1.2
Serial
DynaWave
Android 4.4.2 and above
AIDL
DynaGlass
Android 7.1.2
FALSE, TRUE
INPUT_AUDIO_SOURE
VRECOG
MIC, VRECOG
INPUT_SAMPLE_RATE_IN_HZ
44100
32000, 44100, 48000



































AAMVA™ is a trademark of AAMVA.
American Express® and EXPRESSPAY FROM AMERICAN EXPRESS® are registered trademarks of American Express Marketing & Development Corp.
D-PAYMENT APPLICATION SPECIFICATION® is a registered trademark to Discover Financial Services CORPORATION
MasterCard® is a registered trademark and PayPass™ and Tap & Go™ are trademarks of MasterCard International Incorporated.
Visa® and Visa payWave® are registered trademarks of Visa International Service Association.
ANSI®, the ANSI logo, and numerous other identifiers containing “ANSI” are registered trademarks, service marks, and accreditation marks of the American National Standards Institute (ANSI).
ISO® is a registered trademark of the International Organization for Standardization. UL™ and the UL logo are trademarks of UL LLC.
PCI Security Standards Council® is a registered trademark of the PCI Security Standards Council, LLC. EMV® is a registered trademark in the U.S. and other countries and an unregistered trademark elsewhere. The EMV trademark is owned by EMVCo, LLC. The Contactless Indicator mark, consisting of four graduating arcs, is a trademark owned by and used with permission of EMVCo, LLC.
The Bluetooth® word mark and logos are registered trademarks owned by Bluetooth SIG, Inc. and any use of such marks by MagTek is under license.
Apple Pay®, iPhone®, iPod®, Mac®, and OS X® are registered trademarks of Apple Inc., registered in the U.S. and other countries. iPad™ is a trademark of Apple. Inc. App StoreSM is a service mark of Apple Inc., registered in the U.S. and other countries. IOS is a trademark or registered trademark of Cisco in the U.S. and other countries and is used by Apple Inc. under license.
Microsoft®, Windows®, and .NET® are registered trademarks of Microsoft Corporation. All other system names and product names are the property of their respective owners.
Rev Number
Date
Notes
1.01
2011 Dec 22
Initial Release
1.02
2011 Aug 02
Rev Number
Date
Notes
90
2019 Sep 16
Updated events for the delegate onTransactionStatus(), and result codes for the deletgate onEMVCommandResult().
Updated the function startTransaction(): cardType and transactionType.
91
2020 Jul 16
MagTek warrants that the products sold pursuant to this Agreement will perform in accordance with MagTek’s published specifications. This warranty shall be provided only for a period of one year from the date of the shipment of the product from MagTek (the “Warranty Period”). This warranty shall apply only to the “Buyer” (the original purchaser, unless that entity resells the product as authorized by MagTek, in which event this warranty shall apply only to the first repurchaser).
During the Warranty Period, should this product fail to conform to MagTek’s specifications, MagTek will, at its option, repair or replace this product at no additional charge except as set forth below. Repair parts and replacement products will be furnished on an exchange basis and will be either reconditioned or new. All replaced parts and products become the property of MagTek. This limited warranty does not include service to repair damage to the product resulting from accident, disaster, unreasonable use, misuse, abuse, negligence, or modification of the product not authorized by MagTek. MagTek reserves the right to examine the alleged defective goods to determine whether the warranty is applicable.
Without limiting the generality of the foregoing, MagTek specifically disclaims any liability or warranty for goods resold in other than MagTek’s original packages, and for goods modified, altered, or treated without authorization by MagTek.
Service may be obtained by delivering the product during the warranty period to MagTek (1710 Apollo Court, Seal Beach, CA 90740). If this product is delivered by mail or by an equivalent shipping carrier, the customer agrees to insure the product or assume the risk of loss or damage in transit, to prepay shipping charges to the warranty service location, and to use the original shipping container or equivalent. MagTek will return the product, prepaid, via a three (3) day shipping service. A Return Material Authorization (“RMA”) number must accompany all returns. Buyers may obtain an RMA number by contacting MagTek Support Services at (888) 624-8350.
EACH BUYER UNDERSTANDS THAT THIS MAGTEK PRODUCT IS OFFERED AS-IS. MAGTEK MAKES NO OTHER WARRANTY, EXPRESS OR IMPLIED, AND MAGTEK DISCLAIMS ANY WARRANTY OF ANY OTHER KIND, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
IF THIS PRODUCT DOES NOT CONFORM TO MAGTEK’S SPECIFICATIONS, THE SOLE REMEDY SHALL BE REPAIR OR REPLACEMENT AS PROVIDED ABOVE. MAGTEK’S LIABILITY, IF ANY, SHALL IN NO EVENT EXCEED THE TOTAL AMOUNT PAID TO MAGTEK UNDER THIS AGREEMENT. IN NO EVENT WILL MAGTEK BE LIABLE TO THE BUYER FOR ANY DAMAGES, INCLUDING ANY LOST PROFITS, LOST SAVINGS, OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF, OR INABILITY TO USE, SUCH PRODUCT, EVEN IF MAGTEK HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY.
LIMITATION ON LIABILITY
EXCEPT AS PROVIDED IN THE SECTIONS RELATING TO MAGTEK’S LIMITED WARRANTY, MAGTEK’S LIABILITY UNDER THIS AGREEMENT IS LIMITED TO THE CONTRACT PRICE OF THIS PRODUCT.
MAGTEK MAKES NO OTHER WARRANTIES WITH RESPECT TO THE PRODUCT, EXPRESSED OR IMPLIED, EXCEPT AS MAY BE STATED IN THIS AGREEMENT, AND MAGTEK DISCLAIMS ANY IMPLIED WARRANTY, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
MAGTEK SHALL NOT BE LIABLE FOR CONTINGENT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES TO PERSONS OR PROPERTY. MAGTEK FURTHER LIMITS ITS LIABILITY OF ANY KIND WITH RESPECT TO THE PRODUCT, INCLUDING NEGLIGENCE ON ITS PART, TO THE CONTRACT PRICE FOR THE GOODS.
MAGTEK’S SOLE LIABILITY AND BUYER’S EXCLUSIVE REMEDIES ARE STATED IN THIS SECTION AND IN THE SECTION RELATING TO MAGTEK’S LIMITED WARRANTY.
IMPORTANT: YOU SHOULD CAREFULLY READ ALL THE TERMS, CONDITIONS AND RESTRICTIONS OF THIS LICENSE AGREEMENT BEFORE INSTALLING THE SOFTWARE PACKAGE. YOUR INSTALLATION OF THE SOFTWARE PACKAGE PRESUMES YOUR ACCEPTANCE OF THE TERMS, CONDITIONS, AND RESTRICTIONS CONTAINED IN THIS AGREEMENT. IF YOU DO NOT AGREE WITH THESE TERMS, CONDITIONS, AND RESTRICTIONS, PROMPTLY RETURN THE SOFTWARE PACKAGE AND ASSOCIATED DOCUMENTATION TO THE ADDRESS ON THE FRONT PAGE OF THIS DOCUMENT, ATTENTION: CUSTOMER SUPPORT.
TERMS, CONDITIONS, AND RESTRICTIONS
MagTek, Incorporated (the "Licensor") owns and has the right to distribute the described software and documentation, collectively referred to as the "Software."
LICENSE: Licensor grants you (the "Licensee") the right to use the Software in conjunction with MagTek products. LICENSEE MAY NOT COPY, MODIFY, OR TRANSFER THE SOFTWARE IN WHOLE OR IN PART EXCEPT AS EXPRESSLY PROVIDED IN THIS AGREEMENT. Licensee
may not decompile, disassemble, or in any other manner attempt to reverse engineer the Software. Licensee shall not tamper with, bypass, or alter any security features of the software or attempt to do so.
TRANSFER: Licensee may not transfer the Software or license to the Software to another party without the prior written authorization of the Licensor. If Licensee transfers the Software without authorization, all rights granted under this Agreement are automatically terminated.
COPYRIGHT: The Software is copyrighted. Licensee may not copy the Software except for archival purposes or to load for execution purposes. All other copies of the Software are in violation of this Agreement.
TERM: This Agreement is in effect as long as Licensee continues the use of the Software. The Licensor also reserves the right to terminate this Agreement if Licensee fails to comply with any of the terms, conditions, or restrictions contained herein. Should Licensor terminate this Agreement due to Licensee's failure to comply, Licensee agrees to return the Software to Licensor. Receipt of returned Software by the Licensor shall mark the termination.
LIMITED WARRANTY: Licensor warrants to the Licensee that the disk(s) or other media on which the Software is recorded are free from defects in material or workmanship under normal use.
THE SOFTWARE IS PROVIDED AS IS. LICENSOR MAKES NO OTHER WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Because of the diversity of conditions and PC hardware under which the Software may be used, Licensor does not warrant that the Software will meet Licensee specifications or that the operation of the Software will be uninterrupted or free of errors.
IN NO EVENT WILL LICENSOR BE LIABLE FOR ANY DAMAGES, INCLUDING ANY LOST PROFITS, LOST SAVINGS, OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE, OR INABILITY TO USE, THE SOFTWARE. Licensee's sole remedy in the event of a defect in material or workmanship is expressly limited to replacement of the Software disk(s) if applicable.
GOVERNING LAW: If any provision of this Agreement is found to be unlawful, void, or unenforceable, that provision shall be removed from consideration under this Agreement and will not affect the enforceability of any of the remaining provisions. This Agreement shall be governed by the laws of the State of California and shall inure to the benefit of MagTek, Incorporated, its successors or assigns.
ACKNOWLEDGMENT: LICENSEE ACKNOWLEDGES THAT HE HAS READ THIS AGREEMENT, UNDERSTANDS ALL OF ITS TERMS, CONDITIONS, AND RESTRICTIONS, AND AGREES TO BE BOUND BY THEM. LICENSEE ALSO AGREES THAT THIS AGREEMENT SUPERSEDES ANY AND ALL VERBAL AND WRITTEN COMMUNICATIONS BETWEEN LICENSOR AND LICENSEE OR THEIR ASSIGNS RELATING TO THE SUBJECT MATTER OF THIS AGREEMENT.
QUESTIONS REGARDING THIS AGREEMENT SHOULD BE ADDRESSED IN WRITING TO MAGTEK, INCORPORATED, ATTENTION: CUSTOMER SUPPORT, AT THE ADDRESS LISTED IN THIS DOCUMENT, OR E-MAILED TO SUPPORT@MAGTEK.COM.
DEMO SOFTWARE / SAMPLE CODE: Unless otherwise stated, all demo software and sample code are to be used by Licensee for demonstration purposes only and MAY NOT BE incorporated into any production or live environment. The PIN Pad sample implementation is for software PIN Pad test purposes only and is not PCI compliant. To meet PCI compliance in production or live environments, a third-party PCI compliant component (hardware or software-based) must be used.
This command lets the host retrieve a property (see section on properties) from the device using the 1-byte Property ID.
Command
Parameter Data Len
Parameter Data
0x0000
0x0001
Property ID (1-byte)
Legacy (if needed) for simple & short properties.
This command sets a property in the device. For secure properties, this command should be the payload for the Send Secured Command.
This command is used to reset the device.
The host uses this command to get the date / time from the device’s internal clock. The value returned is set to Coordinated Universal Time (UTC). The host is responsible for converting the response to local time.
This command returns the information about the specified key to the host.
This command is used to activate or deactivate the button. The command is rejected if the device is not in Qwantum mode. The button always defaults to disabled after reset or when switching modes.
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.
Set the timeout in milliseconds for a sync command or sync extended command. Default value is 5000 milleseconds.
Parameters:
Return Value: None.
Set the time frame (delay) for run loop or background thread. Default value is 10 milliseconds.
Parameters:
Return Value: None.
Enable the debug print from SDK. Default value is NO.
Parameters:
Return Value: None.
Updates the device firmware
Parameters:
Return Value:
0 = UPDATE_FIRMWARE_STARTED
1 = UPDATE_FIRMWARE_SUCCESS
9 = UPDATE_FIRMWARE_ERROR
15 = UPDATE_FIRMWARE_NA
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:
Return Value:
· 0 = Success
· 9 = Error
· 15 = Busy
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:
Return Value:
0 = Success
9 = Error
15 = Busy
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:
Return Value:
0 = Success
9 = Error
15 = Busy
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:
Return Value:
· Extended response of the NFC command.
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:
Return Value:
0 = Success
9 = Error
15 = Busy
This message occurs when the state of the device is changed.
Parameter
Description
Obj
MTConnectionState value indicating the state of the device:
Disconnected Connecting Connected Disconneting
This message occurs when the state of the card information is changed.
This message occurs when card information is received from the device.
This message occurs when a response is received from the device.
This message occurs when transaction status update is received from the EMV device.
This message occurs when the EMV device has display message to present to the user.
This message occurs when the EMV device has user selection message to present to the user.
This message occurs when ARQC is received from the EMV device.
This message occurs when transaction result is received from the EMV device.
This message occurs when an EMV command result is received from the EMV device.
Result Code Description
0x0000 = Success 0x0001 = Failure
0x0381 = Failure, DUKPT scheme is not loaded
0x0382 = Failure, DUKPT scheme is loaded but all of its keys have been used
This function will return the signal strength of Bluetooth LE devices.
(int)getBluetoothRSSI;This function sets the UUIDString for the Bluetooth LE connection.
(void) setUUIDString:(NSString *)uuidString Parameters: UUID String of the device
Return Value: None
This function gets the current connected peripheral (device).
(NSString *) getConnectedPeripheralParameters: None
Return value: Current connected device
This function gets an array of DynaMAX/eDynamo devices connected to the host.
Parameters: None
Return Value: Array of DynaMAX/eDynamo devices.
Start EMV Transaction.
The device’s system date and time must be set prior to sending this command. Use sendExentedCommandSync() to set the date and time.
Devices without a battery-backed real time clock require the host to set the date and time using Extended Command 0x030C - Set Date and Time every time the device is power cycled or reset.
Devices that have a battery-backed real time clock (See Supported Devices) would typically have the date and time set at the factory.
Parameters:
Return Value:
0 = Success
9 = Error
15 = Busy
This function sets the user selection result. It should be called after receiving the onUserSelectRequest event which is triggered after the user makes a selection.
Parameters:
Return Value:
0 = Success
9 = Error
15 = Busy
This function cancels a transaction while waiting for the user to insert a card.
Return Value:
0 = Success
9 = Error
15 = Busy
The library returns the status of this function in the delegate method onEMVCommandResult (EMV Device Only).
Parameters:
This function informs EMV device to process transaction decision from acquirer.
Parameters:
Return Value:
0 = Success
9 = Error
15 = Busy
Send extended command to device. Command response is returned in the event message onDeviceExtendedResponseReceived.
Parameters:
Return Value:
0 = Success
9 = Error
15 = Busy
Send a synchronous command to device. Operation waits for the command to return.
Parameters:
Return Value: String containing the response data of the command.
This function will return the signal strength of Bluetooth LE devices.
(int)getBluetoothRSSI;This function sets the UUIDString for the Bluetooth LE connection.
(void) setUUIDString:(NSString *)uuidString Parameters: UUID String of the device
Return Value: None
This function gets the current connected peripheral (device).
(NSString *) getConnectedPeripheralParameters: None
Return value: Current connected device
This function gets an array of DynaMAX/eDynamo devices connected to the host.
Parameters: None
Return Value: Array of DynaMAX/eDynamo devices.
Start EMV Transaction.
The device’s system date and time must be set prior to sending this command. Use sendExentedCommandSync() to set the date and time.
Devices without a battery-backed real time clock require the host to set the date and time using Extended Command 0x030C - Set Date and Time every time the device is power cycled or reset.
Devices that have a battery-backed real time clock (See Supported Devices) would typically have the date and time set at the factory.
(int) startTransaction:
(Byte)timeLimit cardType:
(Byte)cardType option:
(Byte)option amount:
(Byte*)amount transactionType:
(Byte)transactionType cashBack:
(Byte*)cashBack currencyCode:
(Byte*)currencyCode reportingOption:
(Byte)reportingOption
Parameters:
Return Value:
0 = Success
9 = Error
15 = Busy
This function sets the user selection result. It should be called after receiving the onUserSelectRequest event which is triggered after the user makes a selection.
Parameters:
Return Value:
0 = Success
9 = Error
15 = Busy
This function cancels a transaction while waiting for the user to insert a card.
Return Value:
0 = Success
9 = Error
15 = Busy
The library returns the status of this function in the delegate method onEMVCommandResult (EMV Device Only).
Parameters:
This function informs EMV device to process transaction decision from acquirer.
Parameters:
Return Value:
0 = Success
9 = Error
15 = Busy
Send extended command to device. Command response is returned in the event message onDeviceExtendedResponseReceived.
Parameters:
Return Value:
0 = Success
9 = Error
15 = Busy
Send a synchronous command to device. Operation waits for the command to return.
Parameters:
Return Value: String containing the response data of the command.
This event occurs when device information is available.
public event DeviceListHandler OnDeviceList
public delegate void DeviceListHandler(object sender, MTConnectionType connectionType, List<MTDeviceInformation> deviceList)
Retrieves track decode status. This is a one-byte value, which indicates the status of decoding track 1. Bit position zero indicates if there was an error decoding track 1 if the bit is set to one. If it is zero, then no error occurred. If a track has data on it that is not noise, and it is not decodable, then a decode error is indicated. If a decode error is indicated, the corresponding track data length value for the track that has the error will be set to zero and no valid track data will be supplied.
public String getTrackDecodeStatus()
Track Decode Status. Consists of three 2-byte hex values representing the decode status for tracks 1, 2, and 3 (respectively from left to right). Values are:
00 = Track OK
Retrieves TLV version.
public string getTLVVersion()
Parameters: None
Return Value:
String representing TLV version as a two-byte hex string.
Retrieves track decode status. This is a one-byte value, which indicates the status of decoding track 1. Bit position zero indicates if there was an error decoding track 1 if the bit is set to one. If it is zero, then no error occurred. If a track has data on it that is not noise, and it is not decodable, then a decode error is indicated. If a decode error is indicated, the corresponding track data length value for the track that has the error will be set to zero and no valid track data will be supplied.
public string getTrackDecodeStatus()
Send a synchronous extended command to device. Operation waits for the command to return.
Parameters:
Remove Audio reader
1.03
2012 Feb 29
Added Functionality
1.04
2012 Mar 26
Added getBatteryLevel
1.05
2012 Apr 19
Added getSDKVersion & getOperationStatus
1.06
2012 May 01
Made iDynamo-specific
20
2015 Jan 30
Added DynaMAX; reformat; added introduction and how to set up; included aDynamo and uDynamo; general cleanup and clarifying detail.
Updated the MTSCRATransactionData enum. Updated the MTSCRADeviceType enum.
Added delegate methods: onDataReceived, cardSwipeDidStart,
cardSwipeDidGetTransError, onDeviceConnectionDidChange, bleReaderConnected,
bleReaderDidDiscoverPeripheral, bleReaderStateUpdated
30
2015 Nov 19
Added support for eDynamo Added new functions for eDynamo: onTransactionStatus onDisplayMessageRequest onUserSelectionRequest onARQCReceived onTransactionResult onEMVCommandResult
Update return code for EMV function Return Value: 0 = Success
9 = Error
15 = Busy
40
2016 Jul 6
Added DynaPro format for EMV transaction messages. Added getCardPAN function.
Added deviceNotPaired delegate.
50
2017 Feb 9
Updated the tested operating systems.
60
2017 Oct 3
Added support for kDynamo, sDynamo, tDynamo.
70
2018 Aug 6
Added device type kDynamo and tDynamo to setDeviceType().
80
2018 Sep 14
Added onDeviceResponse delegate.
Updated startTransaction to support Quick Chip mode.
Update supported iOS versions; Add Bluetooth permission information for iOS 13 in section 3; Add startScanningForPeripherals and stopScanningForPeripherals and add details about the Bluetooth LE connection sequence; Remove Appendix E, F and in some sections, replaced copy-pasted text from other documents with cross references to command manual for the device; Misc. clarifications and corrections.
92
2020 Aug 27
Added 1 new function getBluetoothRSSI, and 2 callback: bleReaderDidDisconnected and debugInfoCallback under sections: 4.51, 5.18, 5.19
100
2021 Aug 18
Added new functions sendCommandSync() and sendExtendedCommandSync()
110
2021 Dec 13
Added setTimeout(), setTimeFrame(), and enableDebugPrint(). Added enums to current SDK.
120
January 31, 2023
Added information table for extended command set date and time, and for MSR head power.
Added setup for Swift project.
Added more details for setting up Bluetooth LE. Added transaction diagrams.
130
June 20, 2023
Added 0 for transaction timeout of startTransaction() at section 4.55.
131
March 11, 2024
Added support for iDynamo5 Gen III under section Appendix C and Appendix D.2.
Added functions starting at section 4.65: updateFirmware(), sendNFCCommand(),
sendClassicNFCCommand(), sendDESFireNFCCommand(), sendNFCCommandSync(), sendNFCCommandAsync()
132
April 18, 2024
Added support for iPhone 15 and XCode 15.3 at section 1.4. Updated support iOS 13 and above at section 1.5.
133
June 11, 2025
Added SCDE properties to MTCardData (section 6.1).
1
Hour
Value from 0x00...0x17 (0-23)
1
Minute
Value from 0x00...0x3B (0-59)
1
Second
Value from 0x00...0x3B (0-59)
1
Unused
0x00
1
Year
Value from 0x00 (2008) ...0xFF (2263)
2
TK ID
(2 byte)
The Key ID used to transport this key (a parent key ID)
9
Key Algorithm
(1 byte)
1 = DES 4 = AES128
2 = 2TDES 5 = AES192
3 = 3TDES 6 = AES256
10
KCV
(5 or 3 bytes)
5 bytes for AES-CMAC or 3 bytes for TDES-CBCMAC including the KCV algorithm info as defined in X9.143 ‘KP’/’KC’ format (A.5.8 of X9.143 spec)
15 or 13
Length of KSI
(1 bytes)
Length of Key Set Identifier
16 or 14
Key Set Identifier
(n bytes)
Encoded in Hex-ASCII refer to Table 11 in X9.143 specification.
(16 + n) or
(14 + n)
Key Restriction
(2 bytes)
16-bit Key Restriction Bitmask (for TK and DKPT keys)
(16 + n + 3) or
(14 + n + 3)
Key Configuration
(2 bytes)
16-bit Key Configuration Bitmask
Currently supports Data Type Configuration only.
(16 + n + 4) or
(14 + n + 4)
Timestamp
(24 bytes)
Time and date in UTC time format that indicates when the key block was formed.
Return Code
Response Data Len
Response Data
0x0000
varies
Property Value
Command
Parameter Data Len
Parameter Data
0x00
0x01
Property ID (1-byte)
Return Code
Response Data Len
Response Data
0x00
varies
0 to 58 bytes
Command
Parameter Data Len
Parameter Data
0x0001
varies
Property ID (1 byte)
Property Value (varies)
Return Code
Response Data Len
Response Data
0x0001
0x0001
0=Property in effect
1=Needs reset
Command
Parameter Data Len
Parameter Data
0x0002
0x0000
None
Command
Parameter Data Len
Parameter Data
0x030D
0x0000
None
Return Code
Response Data Len
Response Data
0x0000
0x0007
See Table
Length
Field Name
Value
1
Month
Value from 0x01...0x0C (1-12)
1
Day
Command
Parameter Data Len
Parameter Data
0703
0x0002
Key ID
Offset
Field Name
Description
0
Key Slot Status
(1 byte)
0 = Empty
1 = Loaded (Purpose not assigned)
2 = Loaded & active
3 = Exhausted (End of DUKPT key sequence)
4 = Expired (RFU, cert status?)
0xFF = Not supported in this device
1
Slot Type
(1 byte)
Offset
Field Name
Description
4
Key Environment
(1 byte)
‘T’ for test or ‘P’ for production
5
X9.143 Attributes
(4 bytes)
Command
Parameter Data Len
Parameter Data
0x07E0
0x0001
0x00 – Disable button
The push-button functionality is disabled.
0x01 – Enable button
The push-button functionality is enabled, allowing the operator to output buffer data by pressing the button. The functionality remains active until a command is issued to disable it or the device is power cycled.
0x02 – Enable button for single press
The push-button functionality is enabled, allowing the operator to output buffer data by pressing the button once. The functionality will be disabled automatically afterward or upon power cycling.
0x03 – Enable Button Persistently
The push-button functionality is enabled, allowing the operator to output buffer data by pressing the button. The push-button activation persists even after a power cycle. The functionality remains active until a command is issued to disable it.
Value from 0x01...0x1F (1-31, depends on the month)
First byte of Slot ID (Slot ID = Key ID)
‘Key Usage || Algorithm || Mode of Use’ from X9.143 Key Block Header.
response
Callback to receive the response.
Parameter
Description
timeoutMS
Timeout in milliseconds.
Parameter
Description
ms
Time frame delay in milliseconds.
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.
Parameter
Description
firmwareType
Type of firmware to update.
· 1 - Main Firmware
firmwareData
Firmware data.
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)
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)
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)
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)
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)
cashBack
Cash back Amount (if non-zero, EMV Tag 9F03, format n12, 6 bytes) in hex string.
For example: “000000001000”, means 10.00 dollars.
currencyCode
Transaction Currency Code (EMV Tag 5F2A, format n4, 2 bytes) Sample Valid values:
0x0840 – US Dollar 0x0978 – Euro 0x0826 – UK Pound
reportingOption
This single byte field indicates the level of Transaction Status notifications the host desires to receive during the course of this transaction.
0x00 = Termination Status only (normal termination, card error, timeout, host cancel)
0x01 = Major Status changes (terminations plus card insertions and waiting on user)
0x02 = All Status changes (documents the entire transaction flow)
Parameter
Description
timeLimit
Specifies the maximum time, in seconds, allowed to complete the total transaction. This includes time for the user to insert the card, choose a language, choose an application, and online processing. If this time is exceeded, the transaction will be aborted and an appropriate Transaction Status will be available.
Values:
0 = no timeout, infinite. To cancel before a payment method is presented, use cancelTransaction().
(1 to 255) seconds. Use 255 for the longest time limit for devices that do not support 0.
Device Time Limit
========= =========
DynaMAX n/a
aDynamo n/a
cDynamo n/a
iDynamo 5/(GENII) n/a sDynamo n/a
uDynamo n/a
eDynamo 1 to 255
iDynamo 6 0 to 255
kDynamo 1 to 255
tDynamo 0 to 255
cardType
Card Type to Read:
0x01 = Magnetic Stripe (as alternative to EMV L2, card swipe causes abort of EMV L2)
0x02 = Contact chip card
0x03 = Magnetic Stripe and Contact chip Card. 0x04 = Contactless chip card
0x05 = Magnetic Stripe and Contactless chip card. 0x06 = Contact chip card and Contactless chip card.
0x07 = Magnetic Stripe, Contact chip card, Contactless chip card.
Refer to Appendix C for supported devices.
Parameter
Description
option
0x00 = Normal 0x01 = Bypass PIN 0x02 = Force Online
0x04 = Acquirer not available (Note: prevents long timeout on waiting for host approval) (causes “decline” to be generated internally if ARQC is generated)
To use Quick Chip mode, set the most significant bit to ‘1’.
0x80 = Quick Chip, Normal 0x81 = Quick Chip, Bypass PIN 0x82 = Quick Chip, Force Online
Refer to Appendix C for supported devices.
amount
Amount Authorized (EMV Tag 9F02, format n12, 6 bytes) in hex string For example: “000000000999”, means 9.99 dollars.
transactionType
Valid values:
0x00 = Purchase (listed as “Payment” on ICS)
0x01 = Cash Advance (not supported for this reader)
0x02 or 0x09 = Cash back (0x09 only supported when using contactless) 0x04 = Goods (Purchase)
0x08 = Services (Purchase)
0x10 = International Goods (Purchase) 0x20 = Refund
0x40 = International Cash Advance or Cash Back 0x80 = Domestic Cash Advance or Cash Back
Parameter
Description
status
Indicates the status of User Selection:
0x00 – User Selection Request completed, see Selection Result 0x01 – User Selection Request aborted, cancelled by user
0x02 – User Selection Request aborted, timeout
selection
Indicates the menu item selected by the user. This is a single byte zero based binary value.
Parameter
Description
status
Result codes:
0x0000 = Success, the transaction was cancelled 0x038D = Failure, no transaction currently in progress
0x038F = Failure, transaction in progress, card already inserted
Parameter
Description
response
Hex string for the response data following TLV response message. For details about the ARQC format, see the Programmer's Manual (COMMANDS) for the specific device with which you are communicating.
length
Two byte binary, most significant byte first. This gives the total length of the Acquirer Response message that follows.
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.
Parameter
Description
Command
Hexadecimal string of the byte array for the command.
cashBack
Cash back Amount (if non-zero, EMV Tag 9F03, format n12, 6 bytes) in hex string.
For example: “000000001000”, means 10.00 dollars.
currencyCode
Transaction Currency Code (EMV Tag 5F2A, format n4, 2 bytes) Sample Valid values:
0x0840 – US Dollar 0x0978 – Euro 0x0826 – UK Pound
reportingOption
This single byte field indicates the level of Transaction Status notifications the host desires to receive during the course of this transaction.
0x00 = Termination Status only (normal termination, card error, timeout, host cancel)
0x01 = Major Status changes (terminations plus card insertions and waiting on user)
0x02 = All Status changes (documents the entire transaction flow)
Parameter
Description
timeLimit
Specifies the maximum time, in seconds, allowed to complete the total transaction. This includes time for the user to insert the card, choose a language, choose an application, and online processing. If this time is exceeded, the transaction will be aborted and an appropriate Transaction Status will be available.
Values:
0 = no timeout, infinite. To cancel before a payment method is presented, use cancelTransaction().
(1 to 255) seconds. Use 255 for the longest time limit for devices that do not support 0.
Device Time Limit
========= =========
DynaMAX n/a
aDynamo n/a
cDynamo n/a
iDynamo 5/(GENII) n/a sDynamo n/a
uDynamo n/a
eDynamo 1 to 255
iDynamo 6 0 to 255
kDynamo 1 to 255
tDynamo 0 to 255
cardType
Card Type to Read:
0x01 = Magnetic Stripe (as alternative to EMV L2, card swipe causes abort of EMV L2)
0x02 = Contact chip card
0x03 = Magnetic Stripe and Contact chip Card. 0x04 = Contactless chip card
0x05 = Magnetic Stripe and Contactless chip card. 0x06 = Contact chip card and Contactless chip card.
0x07 = Magnetic Stripe, Contact chip card, Contactless chip card.
Refer to Appendix C for supported devices.
Parameter
Description
option
0x00 = Normal 0x01 = Bypass PIN 0x02 = Force Online
0x04 = Acquirer not available (Note: prevents long timeout on waiting for host approval) (causes “decline” to be generated internally if ARQC is generated)
To use Quick Chip mode, set the most significant bit to ‘1’.
0x80 = Quick Chip, Normal 0x81 = Quick Chip, Bypass PIN 0x82 = Quick Chip, Force Online
Refer to Appendix C for supported devices.
amount
Amount Authorized (EMV Tag 9F02, format n12, 6 bytes) in hex string For example: “000000000999”, means 9.99 dollars.
transactionType
Valid values:
0x00 = Purchase (listed as “Payment” on ICS)
0x01 = Cash Advance (not supported for this reader)
0x02 or 0x09 = Cash back (0x09 only supported when using contactless) 0x04 = Goods (Purchase)
0x08 = Services (Purchase)
0x10 = International Goods (Purchase) 0x20 = Refund
0x40 = International Cash Advance or Cash Back 0x80 = Domestic Cash Advance or Cash Back
Parameter
Description
status
Indicates the status of User Selection:
0x00 – User Selection Request completed, see Selection Result 0x01 – User Selection Request aborted, cancelled by user
0x02 – User Selection Request aborted, timeout
selection
Indicates the menu item selected by the user. This is a single byte zero based binary value.
Parameter
Description
status
Result codes:
0x0000 = Success, the transaction was cancelled 0x038D = Failure, no transaction currently in progress
0x038F = Failure, transaction in progress, card already inserted
Parameter
Description
response
Hex string for the response data following TLV response message. For details about the ARQC format, see the Programmer's Manual (COMMANDS) for the specific device with which you are communicating.
length
Two byte binary, most significant byte first. This gives the total length of the Acquirer Response message that follows.
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.
Parameter
Description
Command
Hexadecimal string of the byte array for the command.
(void) setTimeout:(NSUInteger)timeoutMS(void) setTimeFrame:(unsigned int)ms.(void) enableDebugPrint:(BOOL)enabled.(int) updateFirmware: (int) firmwareType Data : (NSData*) firmwareData;(int) sendClassicNFCCommand: (NSString*) command lastCommand :(BOOL) lastCommand encrypt : (BOOL) encrypt;(int) sendDESFireNFCCommand: (NSString*) command lastCommand :(BOOL) lastCommand encrypt : (BOOL) encrypt;(NSString*) sendNFCCommandSync: (NSString*) command lastCommand :(BOOL) lastCommand encrypt : (BOOL) encrypt;(int) sendNFCCommandAsync: (NSString*) command lastCommand :(BOOL) lastCommand encrypt : (BOOL) encrypt response : (void (^)(NSString*)) response;(NSMutableArray *) getDiscoveredPeripherals(int) startTransaction:
(Byte)timeLimit
cardType:(Byte)cardType
option:(Byte)option
amount:(Byte*)amount
transactionType:(Byte)transactionType
cashBack:(Byte*)cashBack currencyCode:(Byte*)currencyCode
reportingOption:(Byte)reportingOption(int) setUserSelectionResult:(Byte)status selection:(Byte)selection;(int) cancelTransaction(int) setAcquirerResponse:(Byte*)response length:(int)length(int) sendExtendedCommand:(NSString *)Command(NSString) sendCommandSync:(NSString *)Command(NSMutableArray *) getDiscoveredPeripherals(int) setUserSelectionResult:(Byte)status selection:(Byte)selection;(int) cancelTransaction(int) setAcquirerResponse:(Byte*)response length:(int)length(int) sendExtendedCommand:(NSString *)Command(NSString) sendCommandSync:(NSString *)Command
This one byte field indicates the current processing stage for the transaction: 0x00 = No transaction in progress
0x01 = waiting for user to insert card 0x02 = powering up the card
0x03 = selecting the application
0x04 = waiting user language selection 0x05 = waiting user application selection 0x06 = initiating application
0x07 = reading application data 0x08 = offline data authentication 0x09 = process restrictions
0x0A = card holder verification 0x0B = terminal risk management 0x0C = terminal action analysis
0x0D = generating first application cryptogram 0x0E = card action analysis
0x0F = online processing
3-4
Final Status
TBD
2
Menu Items
This field is variable length and is a collection of “C” style zero terminated strings (maximum 17 strings). The maximum length of each string is 20 characters, not including a Line Feed (0x0A) character that may be in the string. The last string may not have the Line Feed character.
The first string is a title and should not be considered for selection.
It is expected that the receiver of the notification will display the menu items and return (in the User Selection Result request) the number of the item the user selects. The minimum value of the Selection Result should be 1 (the first item, #0, was a title line only). The maximum value of the Selection Result is based on the number of items displayed.
3
Batch Data
Byte array containing the Batch Data. For details about the batch data format, see the Programmer's Manual (COMMANDS) for the specific device you are communicating with..
0x0384 = Invalid Total Transaction Time field
0x0385 = Invalid Card Type field 0x0386 = Invalid Options field
0x0387 = Invalid Amount Authorized field
0x0388 = Invalid Transaction Type field
0x0389 = Invalid Cash Back field
0x038A = Invalid Transaction Currency Code field
0x038B = Invalid Selection Status
0x038C = Invalid Selection Result
0x038D = Failure, no transaction currently in progress
0x038E = Invalid Reporting Option
0x038F = Failure, transaction already in progress 0x0390 = Device Has No Keys
0x0391 = Invalid Device Serial Number
0x0392 = Invalid Type of MAC field
0x0393 = Invalid Slot Number field
0x0394 = Invalid Operation field
0x0395 = Invalid Database Selector field
0x0396 = Invalid System Date and Time
0x0396 = Invalid Objects to Write field
0x0396 = Invalid Tags to Read field
0x0396 = Invalid Date / Time data (Date / Time has not been set yet)
0x0397 = Invalid MAC
0x0398 = No Slots Available
0x0399 = Object Write Protected
0x039B = Invalid CAPK Checksum
0x039C = Invalid Configuration Identifier
Parameter
Description
obj
MTCardDataState value indicating the state of the card data:
DataNotReady DataReady DataError
Parameter
Description
obj
IMTCardData value containing the card data received.
Parameter
Description
obj
String containing the response data received from the device.
Parameter
Description
obj
Byte array containing the data received from the device. See table below for descriptions of the data.
Offset
Field Name
Value
0
Event
Indicates the event that triggered this notification: 0x00 = No events since start of transaction
0x01 = Card Inserted 0x02 = Card Error
0x03 = Transaction Progress Change 0x04 = Waiting for User Response 0x05 = Timed Out
0x06 = Transaction Terminated 0x07 = Host Cancelled Transaction 0x08 = Card Removed
1
Current Transaction Time remaining
Parameter
Description
obj
Byte array containing the display message. If the length is zero, the request to clear the display.
Parameter
Description
obj
Byte array containing the data received from the device. See table below for descriptions of the data.
Offset
Field Name
Value
0
Selection Type
This field specifies what kind of selection request this is: 0x00 = Application Selection
0x01 = Language Selection
1
Timeout
Parameter
Description
Obj
Byte array containing the data received from the device. See table below for descriptions of the data.
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
Obj
Byte array containing the data received from the device. See table below for descriptions of the data.
Offset
Field Name
Value
0
Signature Required
This field indicates whether a card holder signature is required to complete the transaction:
0x00 = No signature required 0x01 = Signature required
If a signature is required, it is expected that the host will acquire the signature from the card holder as part of the transaction data.
1
Batch Data Length
Indicates the remaining time available, in seconds, for the transaction to complete. If the transaction does not complete within this time it will be aborted.
Specifies the maximum time, in seconds, allowed to complete the selection process. If this time is exceeded, the host should send the User Selection Result command with transaction will be aborted and an appropriate Transaction Status will be available. Value 0 is not allowed.
Byte array containing the ARQC Message. For details about the ARQC format, see the Programmer's Manual (COMMANDS) for the specific device you are communicating with.
Two byte binary, most significant byte first. This gives the total length of the Batch Data that follows.
connectionType
MTConnectionType value: MTConnectionType.Audio, MTConnectionType.USB
deviceList
A list of MTDeviceInformation objects
This event occurs when the connection state of the device is changed.
public event DeviceConnectionStateHandler
OnDeviceConnectionStateChanged
public delegate void DeviceConnectionStateHandler(object sender, MTConnectionState state)
Parameter
Description
sender
Object representing the publisher of the event
state
MTDeviceState value indicating the state of the device:
Disconnected Connecting Error Connected Disconneting
This event occurs when the state of the card information is changed.
public event CardDataStateHandler OnCardDataState
public delegate void CardDataStateHandler(object sender, MTCardDataState state)
Parameter
Description
sender
Object representing the publisher of the event
state
MTCardDataState value indicating the state of the card data:
DataNotReady DataReady DataError
This event occurs when card information is received from the device.
public event DataReceivedHandler OnDataReceived
public delegate void DataReceivedHandler(object sender, IMTCardData cardData)
Parameter
Description
sender
Object representing the publisher of the event
cardData
IMTCardData object containing the card information received
This event occurs when a response is received from the device.
public event DeviceResponseHandler OnDeviceResponse
public delegate void DeviceResponseHandler(object sender, string data)
Parameter
Description
sender
Object representing the publisher of the event
data
String representing data received
This message occurs when transaction status update is received from the EMV device.
Parameter
Description
sender
Object representing the publisher of the event
data
Byte array containing the data received from the device. See table below for descriptions of the data.
0 Event
Indicates the event that triggered this notification:
· 0x00 = No events since start of transaction
· 0x01 = Card Inserted (Contact Only)
· 0x02 = Payment method communication or data error
· 0x03 = Transaction Progress Change
· 0x04 = Waiting for User Response
· 0x05 = Timed Out
· 0x06 = End of Transaction
This message occurs when the EMV device has a display message to present to the user.
Parameter
Description
sender
Object representing the publisher of the event
data
Byte array containing the display message. If the length is zero, the request to clear the display.
This message occurs when the EMV device has a user selection message to present to the user.
Parameter
Description
sender
Object representing the publisher of the event
data
Byte array containing the data received from the device. See table below for descriptions of the data.
0
Selection Type
This field specifies what kind of selection request this is:
· 0x00 – Application Selection
· 0x01 – Language Selection
1
Timeout
This message occurs when ARQC is received from the EMV device.
Parameter
Description
sender
Object representing the publisher of the event
data
Byte array containing the data received from the device. See table below for descriptions of the data.
0 Message Length
Two-byte binary, most significant byte first. This gives the total length of the ARQC message that follows.
This message occurs when transaction result is received from the EMV device.
Parameter
Description
sender
Object representing the publisher of the event
data
Byte array containing the data received from the device. See table below for descriptions of the data.
0
Signature Required
This field indicates whether a card holder signature is required to complete the transaction:
· 0x00 – No signature required
· 0x01 – Signature required
If a signature is required, it is expected that the host will acquire the signature from the card holder as part of the transaction data.
1
Batch Data Length
This message occurs when an EMV command result is received from the EMV device.
Parameter
Description
sender
Object representing the publisher of the event
data
Byte array containing the result code received from the device. See table below for descriptions of the result code.
0x0000 = Success, the transaction process has been started
0x0381 = Failure, DUKPT scheme is not loaded
0x0382 = Failure, DUKPT scheme is loaded but all of its keys have been used
This message occurs when an extended response is received from the device.
Parameter
Description
Obj
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 of the following data in bytes.
Parameter
Description
Sender
Object representing the publisher of the event
01 = Track read Error
02 = Track is Blank
Retrieves SDK version.
Parameters: None
Return Value:
The version information of the SDK.
Send command to device.
Parameters:
Parameter
Description
command
Command string to send to the device.
Return Value:
0 = Success
9 = Error
15 = Busy
This function starts an EMV L2 transaction.
Parameters:
Parameter
Description
timeLimit
Specifies the maximum time, in seconds, allowed to complete the total transaction. This includes time for the user to insert the card, choose a language, choose an application, and online processing. If this time is exceeded, the transaction will be aborted and an appropriate Transaction Status will be available. Value 0 is not allowed.
cardType
Card Type to Read:
0x01 = Magnetic Stripe (as alternative to EMV L2, card swipe causes abort of EMV L2)
0x02 = Contact smart card 0x04 = Contactless smart card
Note: Multiple Card Types can be selected, for example: Set this byte to 3 to read both Magnetic Stripe and Contact Smart Card.
option
0x00 = Normal 0x01 = Bypass PIN 0x02 = Force Online
0x04 = Acquirer not available (Note: prevents long timeout on waiting for host approval) (causes “decline” to be generated internally if ARQC is generated)
To use Quick Chip mode, set the most significant bit to ‘1’. 0x80 = Quick Chip, Normal
0x81 = Quick Chip, Bypass PIN 0x82 = Quick Chip, Force Online
Parameter
Description
transactionType
Valid values:
0x00 = Purchase (listed as “Payment” on ICS)
0x01 = Cash Advance (not supported for this reader)
0x02 or 0x09 = Cash back (0x09 not supported, contactless) 0x04 = Goods (Purchase)
0x08 = Services (Purchase)
0x10 = International Goods (Purchase) 0x20 = Refund
0x40 = International Cash Advance or Cash Back 0x80 = Domestic Cash Advance or Cash Back
cashBack
Cash back Amount (if non-zero, EMV Tag 9F03, format n12, 6 bytes) in hex string.
For example: “000000001000”, means 10.00 dollars.
currencyCode
Transaction Currency Code (EMV Tag 5F2A, format n4, 2 bytes) Sample Valid values:
0x0840 – US Dollar 0x0978 – Euro 0x0826 – UK Pound
Return Value:
0 = Success
9 = Error
15 = Busy
This function sets the user selection result. It should be called after receiving the OnUserSelectRequest event which is triggered after the user makes a selection.
Parameters:
Parameter
Description
status
Indicates the status of User Selection:
0x00 – User Selection Request completed, see Selection Result
0x01 – User Selection Request aborted, cancelled by user
0x02 – User Selection Request aborted, timeout
selection
Indicates the menu item selected by the user. This is a single byte zero based binary value.
Return Value:
0 = Success
9 = Error
15 = Busy
This function informs EMV device to process transaction decision from acquirer.
Parameters:
Parameter
Description
response
The first two bytes (most significant byte first) indicate the total length of the following byte array. The byte array contains the ARQC Response message. For details about the ARQC response, see the Programmer's Manual (COMMANDS) for the specific device you are communicating with.
Return Value:
0 = Success
9 = Error
15 = Busy
This function cancels a transaction while waiting for the user to insert a card.
Parameters: None Return Value:
0 = Success
9 = Error
15 = Busy
Send extended command to device.
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 the following data in bytes.
Return Value:
0 = Success
9 = Error
15 = Busy
Retrieves features for the device.
Parameters: None
Return Value:
Retrieves power management value for the device.
Parameters: None
Return Value: Returns the PM value associated with the device.
Parameter
Power Management
BulleT KB BulleT SPP
cDynamo
PM1
Dynamag, Dynamag Duo, USB Enc IntelliHead V5
Parameters: None Return Value:public String getSDKVersion()public int sendCommandToDevice(String command)public int startTransaction(
byte timeLimit,
byte cardType,
byte option,
byte[] amount,
byte transactionType,
byte[] cashBack,
byte[] currentCode,
byte reportingOption)public int setUserSelectionResult(byte status, byte selection)public int setAcquirerResponse(byte[] response)public int cancelTransaction()public int sendExtendedCommand(String command)public MTDeviceFeatures getDeviceFeatures()public class MTDeviceFeatures
{
public boolean MSR;
public boolean Contact;
public boolean Contactless;
public boolean PINPad;
public boolean MSRPowerSaver;
public boolean BatteryBackedClock;
public boolean SRED;
public boolean SignatureCapture;
public boolean ManualEntry; }public String getPowerManagementValue()Yes
Set Property:
Yes
Default Value:
0x7C (‘|’)
If the value is 0, the device does not send a delimiter which is not recommended.
Property ID:
0x24
Property Type:
Byte
Length:
1 byte
Get Property:
Yes
The device uses this character for the Track 1 start sentinel when it recognizes the track is encoded in the standard ISO format for Track 1.
Property Type:
Byte
Length:
1 byte
Get Property:
Yes
Set Property:
Yes
The device uses this character for the Track 2 start sentinel when it recognizes the track is encoded in the standard ISO format for Track 2.
Property ID:
0x26
Property Type:
Byte
Length:
1 byte
Get Property:
Yes
The device uses this character for the Track 3 start sentinel when it recognizes the track is encoded in the standard ISO format for Track 3.
Property ID:
0x27
Property Type:
Byte
Length:
1 byte
Get Property:
Yes
The device uses this character for the Track 3 start sentinel when it recognizes the track is encoded in the standard Track 3 AAMVA format.
Property ID:
0x28
Property Type:
Byte
Length:
1 byte
Get Property:
Yes
The device uses this character for the Track 2 start sentinel when it recognizes the track is encoded in the 7-bit ISO format, normally used for Track 1.
Property ID:
0x29
Property Type:
Byte
Length:
1 byte
Get Property:
Yes
The device uses this character for the Track 3 start sentinel when it recognizes the track is encoded in the 7-bit ISO format, normally used for Track 1.
Property ID:
0x2B
Property Type:
Byte
Length:
1 byte
Get Property:
Yes
The device uses this character for all track end sentinels.
Property ID:
0x31
Property Type:
Byte
Length:
1 byte
Get Property:
Yes
This property designates whether cards which do not decode as either ISO/ABA (Financial) or AAMVA (Driver License) format should be sent with their data masked or unmasked. The default value (0x00) is to send the data unmasked. If this property is set to 0x01, the device sends the track(s) to the host using a “0” for each byte of track data the device reads from the card.
If a card is encoded according to ISO/ABA rules (Track 1 in 7-bit format, Tracks 2 and Track 3 in 5-bit format), and it’s not a QWANTUM card, and Track 1 does not begin with the character ‘B’, the device always sends the Track 1 Masked Data value unmasked, regardless of the value of this property.
An AAMVA card is typically used for Drivers Licenses and ID cards.
Property ID:
0x34
Property Type:
Byte
Length:
1 byte
Get Property:
Yes
0 = Sends masked AAMVA card data.
1 = Sends clear AAMVA card data.
Property ID:
0x3A
Property Type:
String
Length:
varies
Get Property:
Yes
This read-only property returns the boot firmware part number, a dash, the major and minor revision number, followed by a dash and the firmware type.
Property ID:
0x51
Property Type:
String
Length:
0..51 byte
Get Property:
Yes
The device and host software use this value as part of the iAP2 connection process. The value of this property is generally the device purchaser’s or host software developer’s reverse DNS name in all uppercase and must be specified by the purchaser and set by the manufacturer during manufacturing configuration. For further details about the requirements, purpose, and use of this property, see ExternalAccessoryProtocolName in Apple’s software developer documentation.
Property ID:
0x53
Property Type:
Binary
Length:
1 byte
Get Property:
Yes
This property controls how long the device pauses between each key report. This delay can be adjusted between 0 and 250 milliseconds. Some host devices cannot handle full speed keyboard input without dropping key presses, so delays can be added. The time needed to send the entire message also increases.
Property ID:
0x54
Property Type:
Byte
Length:
1 byte
Get Property:
Yes
This property specifies which variant of the current TDES DUKPT Key the device uses to encrypt card data.
0x00 = Use PIN Encryption variant (Ignored when using an AES DUKPT key)
0x01 = Use Data Encryption, request or both ways variant
Property ID:
0x23
Property Type:
Character
Length:
1 byte
Get Property:
{boot fw pn}-{rev}-PCI
Example: 1000004854-AA0-PCITrack Decode Status. Consists of three 2-byte hex values representing the decode status for tracks 1, 2, and 3 (respectively from left to right). Values are:
00 = Track OK
01 = Track read Error
02 = Track is Blank
Retrieves SDK version.
public string getSDKVersion()
Parameters: None Return Value:
The version information of the SDK.
Send command to device.
public int sendCommandToDevice(string command)
Parameters:
Parameter
Description
command
Command string to send to the device.
Return Value:
0 = Success
9 = Error
15 = Busy
This function starts an EMV L2 transaction for smart card.
public int startTransaction(
byte timeLimit,
byte cardType,
byte option,
byte[] amount,
byte transactionType,
byte[] cashBack,
byte[] currentCode,
byte reportingOption)
Parameters:
Parameter
Description
Card Type to Read:
0x01 = Magnetic Stripe (as alternative to EMV L2, card swipe causes abort of EMV L2)
0x02 = Contact chip card
0x03 = Magnetic Stripe and Contact chip Card. 0x04 = Contactless chip card
0x05 = Magnetic Stripe and Contactless chip card. 0x06 = Contact chip card and Contactless chip card.
0x07 = Magnetic Stripe, Contact chip card, Contactless chip card.
Refer to Supported Device Features for supported devices.
Parameter
Description
timeLimit
Specifies the maximum time, in seconds, allowed to complete the total transaction. This includes time for the user to insert the card, choose a language, choose an application, and online processing. If this time is exceeded, the transaction will be aborted, and an appropriate Transaction Status will be available. Value 0 is not allowed.
cardType
Card Type to Read:
0x01 = Magnetic Stripe (as alternative to EMV L2, card swipe causes abort of EMV L2)
0x02 = Contact chip card
0x03 = Magnetic Stripe and Contact chip Card. 0x04 = Contactless chip card
0x05 = Magnetic Stripe and Contactless chip card. 0x06 = Contact chip card and Contactless chip card.
0x07 = Magnetic Stripe, Contact chip card, Contactless chip card.
Refer to Supported Device Features for supported devices.
option
0x00 = Normal 0x01 = Bypass PIN 0x02 = Force Online
0x04 = Acquirer not available (Note: prevents long timeout on waiting for host approval) (causes “decline” to be generated internally if ARQC is generated)
To use Quick Chip mode, set the most significant bit to ‘1’.
0x80 = Quick Chip, Normal 0x81 = Quick Chip, Bypass PIN 0x82 = Quick Chip, Force Online
Refer to Supported Device Features for supported devices.
Return Value:
0 = Success
9 = Error1
15 = Busy
This function sets the user selection result. It should be called after receiving the OnUserSelectRequest event which is triggered after the user makes a selection.
public int setUserSelectionResult(byte status, byte selection)
Parameters:
Parameter
Description
Status
Indicates the status of User Selection:
0x00 – User Selection Request completed, see Selection Result 0x01 – User Selection Request aborted, cancelled by user
0x02 – User Selection Request aborted, timeout
selection
Indicates the menu item selected by the user. This is a single byte zero based binary value.
Return Value:
0 = Success
9 = Error
15 = Busy
This function sends to the device the transaction decision from acquirer.
public int setAcquirerResponse(byte[] response)
Parameters:
Parameter
Description
response
The first two bytes (most significant byte first) indicate the total length of the following byte array. The byte array contains the ARQC Response message. See Appendix C for ARQC Response Message Format.
Return Value:
0 = Success
9 = Error
15 = Busy
This function cancels a transaction while waiting for the user to insert a card.
public int cancelTransaction ()
Parameters: None Return Value:
0 = Success
9 = Error
15 = Busy
Send extended command to device.
public int sendExtendedCommand(string 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:
0 = Success
9 = Error
15 = Busy
Retrieves features for the device.
public MTDeviceFeatures getDeviceFeatures()
Parameters: None
Return Value:
Retrieves power management value for the device.
public String getPowerManagementValue()
Parameters: None
Return Value: Returns the PM value associated with the device.
Parameter
Power Management
BulleT KB BulleT SPP
PM1
cDynamo
Dynamag, Dynamag Duo, USB Enc IntelliHead V5
public class MTDeviceFeatures
{
bool MSR;
bool Contact;
bool Contactless;
bool PINPad;
bool MSRPowerSaver;
bool BatteryBackedClock;
bool SRED;
bool SignatureCapture;
bool ManualEntry; }Set the timeout in milliseconds for a sync command or sync extended command. Default value is 5000 milleseconds.
Parameters:
Parameter
Description
timeoutMS
Timeout in milliseconds.
Return Value: None.
Set the time frame (delay) for run loop or background thread. Default value is 10 milliseconds.
Parameters:
Parameter
Description
ms
Time frame delay in milliseconds.
Return Value: None.
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.
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
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
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
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
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.
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
(NSString) sendExtendedCommandSync:(NSString *)CommandParameter
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.
(void) setTimeout:(NSUInteger)timeoutMS(void) setTimeFrame:(unsigned int)ms.(void) enableDebugPrint:(BOOL)enabled.(int) updateFirmware: (int) firmwareType Data : (NSData*) firmwareData;(int) sendNFCCommand: (NSString*) command
lastCommand :(BOOL) lastCommand
encrypt : (BOOL) encrypt;(int) sendClassicNFCCommand: (NSString*) command
lastCommand :(BOOL) lastCommand
encrypt : (BOOL) encrypt;(int) sendDESFireNFCCommand: (NSString*) command
lastCommand :(BOOL) lastCommand
encrypt : (BOOL) encrypt;(NSString*) sendNFCCommandSync: (NSString*) command
lastCommand :(BOOL) lastCommand
encrypt : (BOOL) encrypt;(int) sendNFCCommandAsync: (NSString*) command
lastCommand :(BOOL) lastCommand
encrypt : (BOOL) encrypt
response : (void (^)(NSString*)) response;Get stored track1 data. This field contains the encrypted track data for track 1.
public string getTrack1()
Parameters: None Return Value:
Return stored track1 data string.
Get stored track2 data. This field contains the encrypted track data for track 2.
public string getTrack2()
Parameters: None Return Value:
Return stored track2 data string.
Get stored track3 data. This field contains the encrypted track data for track 3.
public string getTrack3 ()
Parameters: None Return Value:
Return stored track3 data string.
Get stored masked track1 data.
public string getTrack1Masked()
Parameters: None Return Value:
Return stored masked track1 data string.
For an ISO/ABA card, the PAN is masked as follows:
The specified number of initial characters is sent unmasked. The specified number of trailing characters is sent unmasked. If Mod 10 correction is specified, all but one of the intermediate characters of the PAN are set to zero; one of them will be set such that last digit of the PAN calculates an accurate Mod 10 check of the rest of the PAN as transmitted. If the Mod 10 correction is not specified, all of the intermediate characters of the PAN are set to the specified mask character.
The Card Holder’s name and the Expiration Date are transmitted unmasked.
All Field Separators are sent unmasked.
For an AAMVA card, the specified mask character is substituted for each of the characters read from the card.
Get stored masked track2 data.
public string getTrack2Masked()
Parameters: None Return Value:
Return stored masked track2 data string.
For an ISO/ABA card, the PAN is masked as follows:
The specified number of initial characters are sent unmasked. The specified number of trailing characters are sent unmasked. If Mod 10 correction is specified, all but one of the intermediate characters of the PAN are set to zero; one of them will be set such that last digit of the PAN calculates an accurate Mod 10 check of the rest of the PAN as transmitted. If the Mod 10 correction is not specified, all of the intermediate characters of the PAN are set to the specified mask character.
The Expiration Date is transmitted unmasked.
All Field Separators are sent unmasked.
For an AAMVA card, the DL/ID# is masked as follows:
The specified number of initial characters are sent unmasked. The specified number of trailing characters are sent unmasked. If Mod 10 correction is specified, all but one of the intermediate characters of the DL/ID#PAN are set to zero; one of them will be set such that last digit of the DL/ID# calculates an accurate Mod 10 check of the rest of the DL/ID# as transmitted. If the Mod 10 correction is not specified, all of the intermediate characters of the DL/ID# are set to the specified mask character.
The Expiration Date and Birth Date are transmitted unmasked.
All other characters are set to the specified mask character.
Get stored masked track3 data.
public string getTrack3Masked()
Parameters: None Return Value:
Return stored masked track3 data string.
For an ISO/ABA card, the PAN is masked as follows:
The specified number of initial characters are sent unmasked. The specified number of trailing characters are sent unmasked. If Mod 10 correction is specified, all but one of the intermediate characters of the PAN are set to zero; one of them will be set such that last digit of the PAN calculates an accurate Mod 10 check of the rest of the PAN as transmitted. If the Mod 10 correction is not specified, all of the intermediate characters of the PAN are set to the specified mask character.
All Field Separators are sent unmasked.
All other characters are set to the specified mask character.
For an AAMVA card, the specified mask character is substituted for each of the characters read from the card.
Supported on uDynamo only. This 128-byte Binary field contains the MagnePrint data. Only the number of bytes specified in the MagnePrint data length field are valid. The least significant bit of the first byte of data in this field corresponds to the first bit of MagnePrint data. If the Enable/Disable MagnePrint property is set to disable MagnePrint, this field will not be sent.
public string getMagnePrint()
Parameters: None
Return Value:
Return the MagnePrint data.
Supported on uDynamo only.
public string getMagnePrintStatus()
Parameters: None Return Value:
Returns the MagnePrint status.
This Binary field represents 32 bits of MagnePrint status information. Each character represents 4 bits (hexadecimal notation). For example, suppose the characters are: “A1050000”:
Usage Legend:
D = Direction
F = Too Fast
L = Too Slow
M = MagnePrint capable
This four-byte field contains the MagnePrint status. The MagnePrint status is in little endian byte order. Byte 1 is the least significant byte. Byte 1 LSB is status bit 0. Byte 4 MSB is status bit 31. MagnePrint status is defined as follows:
Bit 0 = MagnePrint-capable product (usage M)
Bits 1-15 = Product revision & mode (usage R)
Bit 16 = STATUS-only state (usage S)
If the Enable/Disable MagnePrint property is set to disable MagnePrint, this field will not be sent.
Get stored device serial number. This 16-byte ASCII field contains the device serial number. The device serial number is a NUL (zero) terminated string. So the maximum length of the device serial number, not including the null terminator, is 15 bytes. The device’s serial number can also be retrieved and set with the device serial number property explained in the property section of this document. This field is stored in non-volatile memory, so it will persist when the unit is power cycled.
public string getDeviceSerial()
Parameters: None Return Value:
Return stored device serial number.
Not suported on Audio Reader. This 8-byte Binary field contains the encrypted version of the current Session ID. Its primary purpose is to prevent replays. After a card is read, this property will be encrypted, along with the card data, and supplied as part of the transaction message. The clear text version of this will never be transmitted. To avoid replay, the application sets the Session ID property before a transaction and verifies that the Encrypted Session ID returned with card data decrypts to the value set.
public string getSessionID()
Parameters: None Return Value:
Return the Session ID
REGISTERED TO ISO 9001:2015
MagTek I 1710 Apollo Court I Seal Beach, CA 90740 I Phone: (562) 546-6400 I Technical Support: (888) 624-8350 www.magtek.com
Copyright © 2006 – 2025 MagTek, Inc. Printed in the United States of America
INFORMATION IN THIS PUBLICATION IS SUBJECT TO CHANGE WITHOUT NOTICE AND MAY CONTAIN TECHNICAL INACCURACIES OR GRAPHICAL DISCREPANCIES. CHANGES OR IMPROVEMENTS MADE TO THIS PRODUCT WILL BE UPDATED IN THE NEXT PUBLICATION RELEASE. NO PART OF THIS DOCUMENT MAY BE REPRODUCED OR TRANSMITTED IN ANY FORM OR BY ANY MEANS, ELECTRONIC OR MECHANICAL, FOR ANY PURPOSE, WITHOUT THE EXPRESS WRITTEN PERMISSION OF MAGTEK, INC.
MagTek®, MagnePrint®, and MagneSafe® are registered trademarks of MagTek, Inc. Magensa™ is a trademark of MagTek, Inc.
IPAD® is a trademark of MagTek, Inc.
AAMVA™ is a trademark of AAMVA.
American Express® and EXPRESSPAY FROM AMERICAN EXPRESS® are registered trademarks of American Express Marketing & Development Corp.
D-PAYMENT APPLICATION SPECIFICATION® is a registered trademark to Discover Financial Services CORPORATION
MasterCard® is a registered trademark and PayPass™ and Tap & Go™ are trademarks of MasterCard International Incorporated.
Visa® and Visa payWave® are registered trademarks of Visa International Service Association.
ANSI®, the ANSI logo, and numerous other identifiers containing “ANSI” are registered trademarks, service marks, and accreditation marks of the American National Standards Institute (ANSI).
ISO® is a registered trademark of the International Organization for Standardization. UL™ and the UL logo are trademarks of UL LLC.
PCI Security Standards Council® is a registered trademark of the PCI Security Standards Council, LLC. EMV® is a registered trademark in the U.S. and other countries and an unregistered trademark elsewhere. The EMV trademark is owned by EMVCo, LLC. The Contactless Indicator mark, consisting of four graduating arcs, is a trademark owned by and used with permission of EMVCo, LLC.
The Bluetooth® word mark and logos are registered trademarks owned by Bluetooth SIG, Inc. and any use of such marks by MagTek is under license.
Apple Pay®, iPhone®, iPod®, Mac®, and OS X® are registered trademarks of Apple Inc., registered in the U.S. and other countries. iPad™ is a trademark of Apple. Inc. App StoreSM is a service mark of Apple Inc., registered in the U.S. and other countries. IOS is a trademark or registered trademark of Cisco in the U.S. and other countries and is used by Apple Inc. under license.
Microsoft®, Windows®, and .NET® are registered trademarks of Microsoft Corporation. All other system names and product names are the property of their respective owners.
Table 0-1 – Revisions
MagTek warrants that the products sold pursuant to this Agreement will perform in accordance with MagTek’s published specifications. This warranty shall be provided only for a period of one year from the date of the shipment of the product from MagTek (the “Warranty Period”). This warranty shall apply only to the “Buyer” (the original purchaser, unless that entity resells the product as authorized by MagTek, in which event this warranty shall apply only to the first repurchaser).
During the Warranty Period, should this product fail to conform to MagTek’s specifications, MagTek will, at its option, repair or replace this product at no additional charge except as set forth below. Repair parts and replacement products will be furnished on an exchange basis and will be either reconditioned or new. All replaced parts and products become the property of MagTek. This limited warranty does not include service to repair damage to the product resulting from accident, disaster, unreasonable use, misuse, abuse, negligence, or modification of the product not authorized by MagTek. MagTek reserves the right to examine the alleged defective goods to determine whether the warranty is applicable.
Without limiting the generality of the foregoing, MagTek specifically disclaims any liability or warranty for goods resold in other than MagTek’s original packages, and for goods modified, altered, or treated without authorization by MagTek.
Service may be obtained by delivering the product during the warranty period to MagTek (1710 Apollo Court, Seal Beach, CA 90740). If this product is delivered by mail or by an equivalent shipping carrier, the customer agrees to insure the product or assume the risk of loss or damage in transit, to prepay shipping charges to the warranty service location, and to use the original shipping container or equivalent. MagTek will return the product, prepaid, via a three (3) day shipping service. A Return Material Authorization (“RMA”) number must accompany all returns. Buyers may obtain an RMA number by contacting MagTek Support Services at (888) 624-8350.
EACH BUYER UNDERSTANDS THAT THIS MAGTEK PRODUCT IS OFFERED AS-IS. MAGTEK MAKES NO OTHER WARRANTY, EXPRESS OR IMPLIED, AND MAGTEK DISCLAIMS ANY WARRANTY OF ANY OTHER KIND, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
IF THIS PRODUCT DOES NOT CONFORM TO MAGTEK’S SPECIFICATIONS, THE SOLE REMEDY SHALL BE REPAIR OR REPLACEMENT AS PROVIDED ABOVE. MAGTEK’S LIABILITY, IF ANY, SHALL IN NO EVENT EXCEED THE TOTAL AMOUNT PAID TO MAGTEK UNDER THIS AGREEMENT. IN NO EVENT WILL MAGTEK BE LIABLE TO THE BUYER FOR ANY DAMAGES, INCLUDING ANY LOST PROFITS, LOST SAVINGS, OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF, OR INABILITY TO USE, SUCH PRODUCT, EVEN IF MAGTEK HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY.
LIMITATION ON LIABILITY
EXCEPT AS PROVIDED IN THE SECTIONS RELATING TO MAGTEK’S LIMITED WARRANTY, MAGTEK’S LIABILITY UNDER THIS AGREEMENT IS LIMITED TO THE CONTRACT PRICE OF THIS PRODUCT.
MAGTEK MAKES NO OTHER WARRANTIES WITH RESPECT TO THE PRODUCT, EXPRESSED OR IMPLIED, EXCEPT AS MAY BE STATED IN THIS AGREEMENT, AND MAGTEK DISCLAIMS ANY IMPLIED WARRANTY, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
MAGTEK SHALL NOT BE LIABLE FOR CONTINGENT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES TO PERSONS OR PROPERTY. MAGTEK FURTHER LIMITS ITS LIABILITY OF ANY KIND WITH RESPECT TO THE PRODUCT, INCLUDING NEGLIGENCE ON ITS PART, TO THE CONTRACT PRICE FOR THE GOODS.
MAGTEK’S SOLE LIABILITY AND BUYER’S EXCLUSIVE REMEDIES ARE STATED IN THIS SECTION AND IN THE SECTION RELATING TO MAGTEK’S LIMITED WARRANTY.
IMPORTANT: YOU SHOULD CAREFULLY READ ALL THE TERMS, CONDITIONS AND RESTRICTIONS OF THIS LICENSE AGREEMENT BEFORE INSTALLING THE SOFTWARE PACKAGE. YOUR INSTALLATION OF THE SOFTWARE PACKAGE PRESUMES YOUR ACCEPTANCE OF THE TERMS, CONDITIONS, AND RESTRICTIONS CONTAINED IN THIS AGREEMENT. IF YOU DO NOT AGREE WITH THESE TERMS, CONDITIONS, AND RESTRICTIONS, PROMPTLY RETURN THE SOFTWARE PACKAGE AND ASSOCIATED DOCUMENTATION TO THE ADDRESS ON THE FRONT PAGE OF THIS DOCUMENT, ATTENTION: CUSTOMER SUPPORT.
TERMS, CONDITIONS, AND RESTRICTIONS
MagTek, Incorporated (the "Licensor") owns and has the right to distribute the described software and documentation, collectively referred to as the "Software."
LICENSE: Licensor grants you (the "Licensee") the right to use the Software in conjunction with MagTek products. LICENSEE MAY NOT COPY, MODIFY, OR TRANSFER THE SOFTWARE IN WHOLE OR IN PART EXCEPT AS EXPRESSLY PROVIDED IN THIS AGREEMENT. Licensee
may not decompile, disassemble, or in any other manner attempt to reverse engineer the Software. Licensee shall not tamper with, bypass, or alter any security features of the software or attempt to do so.
TRANSFER: Licensee may not transfer the Software or license to the Software to another party without the prior written authorization of the Licensor. If Licensee transfers the Software without authorization, all rights granted under this Agreement are automatically terminated.
COPYRIGHT: The Software is copyrighted. Licensee may not copy the Software except for archival purposes or to load for execution purposes. All other copies of the Software are in violation of this Agreement.
TERM: This Agreement is in effect as long as Licensee continues the use of the Software. The Licensor also reserves the right to terminate this Agreement if Licensee fails to comply with any of the terms, conditions, or restrictions contained herein. Should Licensor terminate this Agreement due to Licensee's failure to comply, Licensee agrees to return the Software to Licensor. Receipt of returned Software by the Licensor shall mark the termination.
LIMITED WARRANTY: Licensor warrants to the Licensee that the disk(s) or other media on which the Software is recorded are free from defects in material or workmanship under normal use.
THE SOFTWARE IS PROVIDED AS IS. LICENSOR MAKES NO OTHER WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Because of the diversity of conditions and PC hardware under which the Software may be used, Licensor does not warrant that the Software will meet Licensee specifications or that the operation of the Software will be uninterrupted or free of errors.
IN NO EVENT WILL LICENSOR BE LIABLE FOR ANY DAMAGES, INCLUDING ANY LOST PROFITS, LOST SAVINGS, OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE, OR INABILITY TO USE, THE SOFTWARE. Licensee's sole remedy in
the event of a defect in material or workmanship is expressly limited to replacement of the Software disk(s) if applicable.
GOVERNING LAW: If any provision of this Agreement is found to be unlawful, void, or unenforceable, that provision shall be removed from consideration under this Agreement and will not affect the enforceability of any of the remaining provisions. This Agreement shall be governed by the laws of the State of California and shall inure to the benefit of MagTek, Incorporated, its successors or assigns.
ACKNOWLEDGMENT: LICENSEE ACKNOWLEDGES THAT HE HAS READ THIS AGREEMENT, UNDERSTANDS ALL OF ITS TERMS, CONDITIONS, AND RESTRICTIONS, AND AGREES TO BE BOUND BY THEM. LICENSEE ALSO AGREES THAT THIS AGREEMENT SUPERSEDES ANY AND ALL VERBAL AND WRITTEN COMMUNICATIONS BETWEEN LICENSOR AND LICENSEE OR THEIR ASSIGNS RELATING TO THE SUBJECT MATTER OF THIS AGREEMENT.
QUESTIONS REGARDING THIS AGREEMENT SHOULD BE ADDRESSED IN WRITING TO MAGTEK, INCORPORATED, ATTENTION: CUSTOMER SUPPORT, AT THE ADDRESS LISTED IN THIS DOCUMENT, OR E-MAILED TO
DEMO SOFTWARE / SAMPLE CODE: Unless otherwise stated, all demo software and sample code are to be used by Licensee for demonstration purposes only and MAY NOT BE incorporated into any production or live environment. The PIN Pad sample implementation is for software PIN Pad test purposes only and is not PCI compliant. To meet PCI compliance in production or live environments, a third-party PCI compliant component (hardware or software-based) must be used.
Get stored track2 data. This field contains the encrypted track data for track 2.
Parameters: None
Return Value:
Return stored track2 data string.
Get stored track3 data. This field contains the encrypted track data for track 3.
Parameters: None
Return Value:
Return stored track3 data string.
2
Current Transaction Progress Indicator
0x10 = waiting online processing response 0x11 = transaction completion
0x12 = transaction error 0x13 = transaction approved 0x14 = transaction declined
· 0x08 = Card Removed (Contact Only)
0x0383 = Failure, DUKPT scheme is not loaded (Security Level not 3 or 4)
0x0384 = Invalid Total Transaction Time field
0x0385 = Invalid Card Type field
0x0386 = Invalid Options field
0x0387 = Invalid Amount Authorized field
0x0388 = Invalid Transaction Type field
0x0389 = Invalid Cash Back field
0x038A = Invalid Transaction Currency Code field
0x038B = Invalid Selection Status
0x038C = Invalid Selection Result
0x038D = Failure, no transaction currently in progress
0x038E = Invalid Reporting Option
0x038F = Failure, transaction in progress, card already inserted
0x0390 = Device Has No Keys
0x0391 = Invalid Device Serial Number
0x0396 = Invalid System Date and Time
1 Current Transaction Time remaining
Indicates the remaining time available, in seconds, for the transaction to complete. If the transaction does not complete within this time, it will be aborted.
2 Current Transaction Progress Indicator
This one-byte field indicates the current processing stage for the transaction:
· 0x00 = No transaction in progress
· 0x01 = Waiting for cardholder to present payment
· 0x02 = Powering up the card
· 0x03 = Selecting the application
· 0x04 = Waiting for user language selection (Contact Only)
· 0x05 = Waiting for user application selection (Contact Only)
· 0x06 = Initiating application (Contact Only)
· 0x07 = Reading application data (Contact Only)
· 0x08 = Offline data authentication (Contact Only)
· 0x09 = Process restrictions (Contact Only)
· 0x0A = Cardholder verification (Contact Only)
· 0x0B = Terminal risk management (Contact Only)
· 0x0C = Terminal action analysis (Contact Only)
· 0x0D = Generating first application cryptogram (Contact Only)
· 0x0E = Card action analysis (Contact Only)
· 0x0F = Online processing
· 0x10 = Waiting online processing response
· 0x11 = Transaction Complete
· 0x12 = Transaction Error
· 0x13 = Transaction Approved
· 0x14 = Transaction Declined
· 0x15 = Transaction Cancelled by MSR Swipe (MSR Only)
· 0x16 = EMV error - Conditions Not Satisfied (Contact Only)
· 0x17 = EMV error - Card Blocked (Contact Only)
· 0x18 = Application selection failed (Contact Only)
· 0x19 = EMV error - Card Not Accepted (Contact Only)
· 0x1A = Empty Candidate List
· 0x1B = Application Blocked
3-4 Final Status
TBD
Specifies the maximum time, in seconds, allowed to complete the selection process. If this time is exceeded, the host should send the User Selection Result command with transaction will be aborted and an appropriate Transaction Status will be available. Value 0 is not allowed.
2
Menu Items
This field is variable length and is a collection of “C” style zero terminated strings (maximum 17 strings). The maximum length of each string is 20 characters, not including a Line Feed (0x0A) character that may be in the string. The last string may not have the Line Feed character.
The first string is a title and should not be considered for selection.
It is expected that the receiver of the notification will display the menu items and return (in the User Selection Result request) the number of the item the user selects. The minimum value of the Selection Result should be 1 (the first item, #0, was a title line only). The maximum value of the Selection Result is based on the number of items displayed.
2 ARQC Message
Byte array containing the ARQC Message. See Appendix B for ARQC Message Format.
Two-byte binary, most significant byte first. This gives the total length of the ARQC message that follows.
3
Batch Data
Byte array containing the Batch Data. See Appendix D for Batch Data Format.
amount
Amount Authorized (EMV Tag 9F02, format n12, 6 bytes) in hex string
For example: “000000000999”, means 9.99 dollars.
reportingOption
This single byte field indicates the level of Transaction Status notifications the host desires to receive during the course of this transaction.
0x00 = Termination Status only (normal termination, card error, timeout, host cancel)
0x01 = Major Status changes (terminations plus card insertions and waiting on user)
0x02 = All Status changes (documents the entire transaction flow)
Dynasty
PM3
DynaMAX
PM2
DynaPAD
DynaWave
eDynamo
PM3
Flash
PM1
iDynamo
iDynamo 5
Home Banking (Dynamo LCD)
kDynamo
PM5
mDynamo
P-series and I-65 w/V5
pDynamo
PM6
sDynamo
SPI Encrypting IntelliHead V5
tDynamo
PM5
UART Enc IntelliHead V5
uDynamo
PM4
U-Finity
PM1
Set Property:
Yes
Default Value:
0x25 (‘%’)
Default Value:
0x3B (‘;’)
Set Property:
Yes
Default Value:
0x2B (‘+’)
Set Property:
Yes
Default Value:
0x23 (‘#’)
Set Property:
Yes
Default Value:
0x40 (‘@’)
Set Property:
Yes
Default Value:
0x26 (‘&’)
Set Property:
Yes
Default Value:
0x3F (‘?’)
Set Property:
Yes
Default Value:
0x00 (Don’t Mask Other cards)
Set Property:
Yes
Default Value:
0x00
Set Property:
No
Default Value:
N/A
Set Property:
Yes (secure MAC)
Default Value:
com.magtek.idynamo
Set Property:
Yes
Default Value:
0x04 (4 ms)
Set Property:
Yes (Secure MAC)
Default Value:
0x01 (Data Variant)
amount
Amount Authorized (EMV Tag 9F02, format n12, 6 bytes) in hex string.
For example: “000000000999”, means 9.99 dollars.
transactionType
Valid values:
0x00 = Purchase (listed as “Payment” on ICS)
0x01 = Cash Advance (not supported for this reader)
0x02 or 0x09 = Cash back (0x09 only supported when using contactless) 0x04 = Goods (Purchase)
0x08 = Services (Purchase)
0x10 = International Goods (Purchase) 0x20 = Refund
0x40 = International Cash Advance or Cash Back 0x80 = Domestic Cash Advance or Cash Back
cashBack
Cash back Amount (if non-zero, EMV Tag 9F03, format n12, 6 bytes) in hex string.
For example: “000000001000”, means 10.00 dollars.
currencyCode
Transaction Currency Code (EMV Tag 5F2A, format n4, 2 bytes) Sample Valid values:
0x0840 – US Dollar 0x0978 – Euro 0x0826 – UK Pound
reportingOption
This single byte field indicates the level of Transaction Status notifications the host desires to receive during the course of this transaction.
0x00 = Termination Status only
(normal termination, card error, timeout, host cancel)
0x01 = Major Status changes
(terminations plus card insertions and waiting on user)
0x02 = All Status changes
(documents the entire transaction flow)
Dynasty
PM3
DynaMAX
PM2
DynaPAD
DynaWave
eDynamo
PM3
Flash
PM1
iDynamo
iDynamo 5
IDynamo 5 Gen III
Home Banking (Dynamo LCD)
kDynamo
PM5
mDynamo
P-series and I-65 w/V5
pDynamo
PM6
sDynamo
SPI Encrypting IntelliHead V5
tDynamo
PM5
UART Enc IntelliHead V5
uDynamo
PM4
U-Finity
PM1
response
Callback to receive the response.
1.03
2012 Feb 29
Added Functionality
1.04
2012 Mar 26
Added getBatteryLevel
1.05
2012 Apr 19
Added getSDKVersion & getOperationStatus
1.06
2012 May 01
Made iDynamo-specific
20
2015 Jan 30
Added DynaMAX; reformat; added introduction and how to set up; included aDynamo and uDynamo; general cleanup and clarifying detail.
Updated the MTSCRATransactionData enum. Updated the MTSCRADeviceType enum.
Added delegate methods: onDataReceived, cardSwipeDidStart,
cardSwipeDidGetTransError, onDeviceConnectionDidChange, bleReaderConnected,
bleReaderDidDiscoverPeripheral, bleReaderStateUpdated
30
2015 Nov 19
Added support for eDynamo Added new functions for eDynamo: onTransactionStatus onDisplayMessageRequest onUserSelectionRequest onARQCReceived onTransactionResult onEMVCommandResult
Update return code for EMV function Return Value: 0 = Success
9 = Error
15 = Busy
40
2016 Jul 6
Added DynaPro format for EMV transaction messages. Added getCardPAN function.
Added deviceNotPaired delegate.
50
2017 Feb 9
Updated the tested operating systems.
60
2017 Oct 3
Added support for kDynamo, sDynamo, tDynamo.
70
2018 Aug 6
Added device type kDynamo and tDynamo to setDeviceType().
80
2018 Sep 14
Added onDeviceResponse delegate.
Updated startTransaction to support Quick Chip mode.
92
2020 Aug 27
Added 1 new function getBluetoothRSSI, and 2 callback: bleReaderDidDisconnected and debugInfoCallback under sections: 4.51, 5.18, 5.19
100
2021 Aug 18
Added new functions sendCommandSync() and sendExtendedCommandSync()
110
2021 Dec 13
Added setTimeout(), setTimeFrame(), and enableDebugPrint(). Added enums to current SDK.
120
January 31, 2023
Added information table for extended command set date and time, and for MSR head power.
Added setup for Swift project.
Added more details for setting up Bluetooth LE. Added transaction diagrams.
130
June 20, 2023
Added 0 for transaction timeout of startTransaction() at section 4.55.
131
March 11, 2024
Added support for iDynamo5 Gen III under section Appendix C and Appendix D.2.
Added functions starting at section 4.65: updateFirmware(), sendNFCCommand(),
sendClassicNFCCommand(), sendDESFireNFCCommand(), sendNFCCommandSync(), sendNFCCommandAsync()
132
April 18, 2024
Added support for iPhone 15 and XCode 15.3 at section 1.4. Updated support iOS 13 and above at section 1.5.
133
June 11, 2025
Added SCDE properties to MTCardData (section 6.1).
Rev Number
Date
Notes
1.01
2011 Dec 22
Initial Release
1.02
2011 Aug 02
Rev Number
Date
Notes
90
2019 Sep 16
Updated events for the delegate onTransactionStatus(), and result codes for the deletgate onEMVCommandResult().
Updated the function startTransaction(): cardType and transactionType.
91
2020 Jul 16
Remove Audio reader
Update supported iOS versions; Add Bluetooth permission information for iOS 13 in section 3; Add startScanningForPeripherals and stopScanningForPeripherals and add details about the Bluetooth LE connection sequence; Remove Appendix E, F and in some sections, replaced copy-pasted text from other documents with cross references to command manual for the device; Misc. clarifications and corrections.
All other characters are set to the specified mask character.
All other characters are set to the specified mask character.
Value
A
1
0
5
0
0
0
0
Bit
7
6
5
4
3
2
1
0
1
5
1
4
1
3
Value
1
0
1
0
0
0
0
1
0
0
0
Usage*
R
R
R
R
R
R
R
M
R
R
R
N = Too Noisy
R =Revision
Bit 18 = Swipe too slow (usage L)
Bit 19 = Swipe too fast (usage F)
Bit 20 = Unassigned (always set to Zero)
Bit 21 = Actual Card Swipe Direction (0 = Forward, 1 = Reverse) (usage D)
Bits 22-31 = Unassigned (always set to Zero)
Nibble
1
2
3
4
5
6
7
8
Parameters: None Return Value:
Return stored masked track1 data string.
For an ISO/ABA card, the PAN is masked as follows:
The specified number of initial characters is sent unmasked. The specified number of trailing characters is sent unmasked. If Mod 10 correction is specified, all but one of the intermediate characters of the PAN are set to zero; one of them will be set such that last digit of the PAN calculates an accurate Mod 10 check of the rest of the PAN as transmitted. If the Mod 10 correction is not specified, all of the intermediate characters of the PAN are set to the specified mask character.
The Card Holder’s name and the Expiration Date are transmitted unmasked.
All Field Separators are sent unmasked.
All other characters are set to the specified mask character.
For an AAMVA card, the specified mask character is substituted for each of the characters read from the card.
Get stored masked track2 data.
Parameters: None
Return Value:
Return stored masked track2 data string.
For an ISO/ABA card, the PAN is masked as follows:
The specified number of initial characters are sent unmasked. The specified number of trailing characters are sent unmasked. If Mod 10 correction is specified, all but one of the intermediate characters of the PAN are set to zero; one of them will be set such that last digit of the PAN calculates an accurate Mod 10 check of the rest of the PAN as transmitted. If the Mod 10 correction is not specified, all of the intermediate characters of the PAN are set to the specified mask character.
The Expiration Date is transmitted unmasked.
All Field Separators are sent unmasked.
All other characters are set to the specified mask character.
For an AAMVA card, the DL/ID# is masked as follows:
The specified number of initial characters are sent unmasked. The specified number of trailing characters are sent unmasked. If Mod 10 correction is specified, all but one of the intermediate characters of the DL/ID#PAN are set to zero; one of them will be set such that last digit of the DL/ID# calculates an accurate Mod 10 check of the rest of the DL/ID# as transmitted. If the Mod 10 correction is not specified, all of the intermediate characters of the DL/ID# are set to the specified mask character.
The Expiration Date and Birth Date are transmitted unmasked.
All other characters are set to the specified mask character.
Get stored masked track3 data.
Parameters: None
Return Value:
Return stored masked track3 data string.
For an ISO/ABA card, the PAN is masked as follows:
The specified number of initial characters are sent unmasked. The specified number of trailing characters are sent unmasked. If Mod 10 correction is specified, all but one of the intermediate characters of the PAN are set to zero; one of them will be set such that last digit of the PAN calculates an accurate Mod 10 check of the rest of the PAN as transmitted. If the Mod 10 correction is not specified, all of the intermediate characters of the PAN are set to the specified mask character.
All Field Separators are sent unmasked.
All other characters are set to the specified mask character.
For an AAMVA card, the specified mask character is substituted for each of the characters read from the card.
Not supported on aDynamo. This 128 byte Binary field contains the MagnePrint data. Only the number of bytes specified in the MagnePrint data length field are valid. The least significant bit of the first byte of data in this field corresponds to the first bit of MagnePrint data. If the Enable/Disable MagnePrint property is set to disable MagnePrint, this field will not be sent.
Parameters: None
Return Value:
String containing the MagnePrint data.
Not supported on aDynamo. Get the card MagnePrint status. For more information, see D9875475
Parameters: None
Return Value:
String containing the MagnePrint status.
This Binary field represents 32 bits of MagnePrint status information. Each character represents 4 bits (hexadecimal notation). For example, suppose the characters are: “A1050000”:
Nibble
1
2
3
4
5
6
7
8
Usage Legend:
D = Direction
F = Too Fast
L = Too Slow
M = MagnePrint capable
N = Too Noisy
R =Revision
This four-byte field contains the MagnePrint status. The MagnePrint status is in little endian byte order. Byte 1 is the least significant byte. Byte 1 LSB is status bit 0. Byte 4 MSB is status bit 31. MagnePrint status is defined as follows:
Bit 0 = MagnePrint-capable product (usage M)
Bits 1-15 = Product revision & mode (usage R)
Bit 16 = STATUS-only state (usage S)
Bit 17 = Noise too high or “move me” away from the noise source (used only in STATUS) (usage N)
Bit 18 = Swipe too slow (usage L)
Bit 19 = Swipe too fast (usage F)
Bit 20 = Unassigned (always set to Zero)
Bit 21 = Actual Card Swipe Direction (0 = Forward, 1 = Reverse) (usage D)
Bits 22-31 = Unassigned (always set to Zero)
If the Enable/Disable MagnePrint property is set to disable MagnePrint, this field will not be sent.
Get stored device serial number. This 16-byte ASCII field contains the device serial number. The device serial number is a NUL (zero) terminated string. So the maximum length of the device serial number, not including the null terminator, is 15 bytes. This device serial number can also be retrieved and set with the device serial number property explained in the property section of this document. This field is stored in non-volatile memory, so it will persist when the unit is power cycled.
Parameters: None
Return Value:
Return stored device serial number.
Not suported on aDynamo. This 8-byte Binary field contains the encrypted version of the current Session ID. Its primary purpose is to prevent replays. After a card is read, this property will be encrypted, along with the card data, and supplied as part of the transaction message. The clear text version of this will never be transmitted. To avoid replay, the application sets the Session ID property before a transaction and verifies that the Encrypted Session ID returned with card data decrypts to the value set.
public String getSessionID()
Parameters: None
Return Value:
Returns a string containing the session id.
Get stored key serial number. This 10-byte Binary field contains the DUKPT Key Serial Number used to encrypt the encrypted fields in this message. This 80-bit field includes the Initial Key Serial Number in the leftmost 59 bits and a value for the Encryption Counter in the rightmost 21 bits. If no keys are loaded, all bytes will have the value 0x00.
public String getKSN()
Parameters: None
Return Value:
Return stored key serial number.
public String getTrack2()public String getTrack3()public String getTrack1Masked()public String getTrack2Masked()public String getTrack3Masked()public String getMagnePrint()public String getMagnePrintStatus()public String getDeviceSerial()iDynamo 5 Gen III connects to iOS products via a USB-C or Lighting to USB-C cable.
This section provides information about developing an iOS app that interfaces with the device via the Lightning or USB connector using iPod Accessory Protocol 2 (iAP2). For sample code and other supporting materials, see DYNAMAX / EDYNAMO / UDYNAMO / ADYNAMO / IDYNAMO / KDYNAMO / SDYNAMO / TDYNAMO SDK FOR IOS (WEB), available from MagTek.
To develop host software for an iOS host that connects to the device, you must know the following device properties, which are specified by the purchaser when ordering, and loaded by the manufacturer:
protocolString, also known as the SDK Protocol, usually in the form of a reverse DNS string unique to the host software developer or the device purchaser.
The host software project must include the protocolString in its .plist file before compiling. Spelling, including punctuation and capitalization, must exactly match the protocolString of the device.
1
2
1
1
1
0
9
8
2
3
2
2
2
1
2
0
1
9
1
8
1
7
1
6
3
1
3
0
2
9
2
8
2
7
2
6
2
5
2
4
0
0
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
R
R
R
R
R
0
0
D
0
F
L
N
S
0
0
0
0
0
0
0
0
1
1
1
0
9
8
2
3
2
2
2
1
2
0
1
9
1
8
1
7
1
6
3
1
3
0
2
9
2
8
2
7
2
6
2
5
2
4
0
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
R
R
R
R
0
0
D
0
F
L
N
S
0
0
0
0
0
0
0
0
Value
A
1
0
5
0
0
0
0
Bit
7
6
5
4
3
2
1
0
1
5
1
4
1
3
Value
1
0
1
0
0
0
0
1
0
0
0
Usage*
R
R
R
R
R
R
R
M
R
R
R
1
2
0
R
The host software should initiate a connection to the device using the iOS SDK’s External Accessory Framework (for sample code, see Apple’s EADemo app). Upon establishing the connection, the host can begin exchanging data with the device.
This USB device conforms to the USB specification revision 2.0 and Human Interface Device (HID) class specification version 1.11. The device is set up as a full-speed, high-powered USB device that draws power from the USB bus. iDynamo5 Gen III identifies itself to the USB host with MagTek’s vendor ID 0x0801 and Product ID (PID) of 0x0020. All USB enumeration will include the device serial number.
HID reports used by the host can be divided into two types:
Feature Reports, which the host uses to send commands to the device and receive responses using Get Feature and Set Feature.
Input Reports are used by the device to send unsolicited notifications to the host when the device’s state changes, or to send asynchronous responses to the host when a command completes. The device commonly uses input reports when reporting card swipes, device events, or when a command takes more time for the device to process than is reasonable for the host to wait on a blocking call for the device to acknowledge completion.
A device in KB mode identifies itself to the USB host as a keyboard and transmits data to the host as ASCII as though it is being typed by a person on an actual keyboard. It does this by mapping each of the possible ASCII characters in the stream to keystrokes. To send an ASCII character to the host, the device looks up the ASCII character in the key and retrieves a combination of a single Key Usage which is a unique value assigned to every keyboard key, and a Key Modifier Byte and sends them to the host. The key modifier byte modifies the meaning of the key usage ID, by indicating whether any combination of the right or left Ctrl, Shift, Alt or GUI keys [as defined by Universal Serial Bus (USB) Device Class Definition for Human Interface Devices (HID)] are pressed at the same time as the key usage ID.
The device transmits ASCII 0 to 31 and 127 as their equivalent control code combinations. For example, for a carriage return value 13 (0x0D), the device appears to the host as a keyboard where a person very quickly presses and holds the Ctrl key, then presses the M key, then releases both keys.
When the keymap contains a Key Usage ID and Key Modifier Byte of 0xFF for the ASCII value the device wants to send, the device uses Alt ASCII code keystrokes instead of key map values, meaning it simulates holding down the Alt key on a keyboard and typing the three-digit decimal value of the ASCII character it wants to send. For example, to transmit the ASCII character ‘?’ (063 decimal in the ASCII table), the device sends keypad ‘0’ combined with the Left Alt key modifier, then keypad ‘6’ combined with the Left Alt key modifier, then keypad ‘3’ combined with the Left Alt key modifier.
Commands and Responses
Feature reports are used to send commands and receive responses, even when KB mode is active.
Notifications (RFU)
Description
Type
Txt Len
Notes
Message ID = “N001”
Clear
ASCII
4
This section defines how the device communicates with the host over the USB HID interface.
The data transmitted in commands, responses, and notifications can be substantial, with a size limit of 64 kilobytes (64K bytes). However, the USB HID interface utilized by V5 restricts messages to 64 bytes. Therefore, to accommodate larger messages, we employ specific methods to segment them into multiple 64-byte packets. The segmentation approach varies depending on the message type to ensure compatibility with legacy V5. Below is the core structure of a USB HID packet.
Data Offset
ID
Complete Data Len
Data Segment
2 bytes
2 bytes
2 bytes
varies
The device makes data available to the host using one or more Input Reports over a USB Interrupt IN pipe. The host will poll the device at the configured Polling Interval to see if Input Reports are ready. The device must respond to polls with a USB NAK when no Input Reports are available.
Data Messages sent by the device use Input Report ID 0x01.
Notification Messages sent by the device use Input Report ID 0x02.
The host sends commands using a Set Feature Report and sends a Get Feature Report to the device to retrieve a synchronous response when appropriate. Feature reports use report ID 0x01.
The host should send both Feature Report types using the default Control pipe using a blocking call to the operating system’s native USB libraries. The device NAKs the Status page of a Set Feature Report until it finishes the requested operation, and if it does not respond, the operating system will generally time out and report failure. This method ensures that as soon as the device has fulfilled the command request embedded in the Set Feature Report, the host software can immediately call a follow-up Get Feature Report to retrieve the command.
In very rare cases, the host may simply send a Get Feature Report directly without a preceding Set Feature Report. The Commands documentation specifies these special cases if they exist.
Commands are sent to the device using USB Set Feature Reports using Report ID 1.
Command
Parameter Data Len
Parameter Data
2 bytes
2 bytes
0-64k bytes
Sending commands to the device over a packeted interface (maximum parameter size is 64k (0xFFFF). Standard command format gets broken down into packets for interfaces that do not support unlimited length messages. This is compatible with the V5 extended command protocol.
The number ranges shown in packets assume the interface is USB with a maximum message size of 64 bytes.
Header
Packet Data Len
(Includes all subsequent field lengths)
Data Offset
Command
Full Parameter Data Len
Partial Parameter Data
0x49
1 Byte (6-58)
2 bytes
The Command and Parameter Data length fields stay the same for all packets. Each packet will contain one segment of parameter data up to 52 bytes. The data offset indicates which portion of the parameter data is contained within this packet.
If the required Parameter Data is 52 bytes or shorter, the host can send the entire command using a single command packet. If the Parameter Data is longer than 52 bytes, the host should split the data into multiple packets of 52 or fewer bytes and send multiple command packets. Assuming 52-byte packets, the first packet the host sends should specify Data Offset = 0, the next packet should specify Data Offset = 52, and so on, until the host has sent all the Parameter Data. The device’s response to each packet contains either an extended command result code or a standard result code for the command that was sent:
A packet with Data Offset = 0 is considered the start of a new command. If there are still packets pending from a previous command, then that command is cleared, and all data received is erased.
The device will respond to packets with a 0x0B,0x00 when it expects additional packets (i.e., the length of parameter data received is less than the full parameter data length). When all data has been received, then the device will respond with a packet starting with 0x0A and include the response message for the command.
ACK Packet … Send next packet.
Result Code 0x0B - Protocol Request Pending indicates the device is buffering the incoming data and expects the host to send subsequent packets.
Packet Result
Data Len
0x0B
0x00
Pkt Response
Data Len
Response
0x0A
1 byte
First portion of response
Error due to invalid or missing data or due to a timeout while the device is waiting for more packets.
Packet Result
Data Len
0x02
0x00
Response messages are generated after executing a command and made available to the host as a feature report with the report ID set to 1. The host uses the USB Get Feature Report to receive the response or a portion. The following should be compatible with V5 extended responses.
Return Code
Response Data Len
Response Data
2-bytes
2-bytes
0...n bytes
After the host receives the initial response packet, it’s up to the host to collect the data and send 0x4A commands to get more response packets until all data has been received.
Header
Packet Data Len
(Includes all subsequent field lengths)
Data Offset
Response Code
Full Response Data Len
Partial Response Data
0x0A
1 Byte (6-58)
2 bytes
Send Next Packet Command
Data Len
0x4A
0x00
Notification messages with a data size longer than 52 bytes will need to be split into multiple packets to accommodate the USB HID interface. Notifications are made available to the host as one or more USB Input Reports with the report ID set to 2.
Length
Field Name
Description
0..1
Partial Data Length
The length of the Data field contained in the current message. This field is in big endian format. If this value is not equal to the Complete Data Length, the device is sending the notification using multiple packets.
2..3
Data Offset
Data messages are another type of asynchronous communication and handled in the same manner as a notification, except the report ID is set to 1.
Length
Field Name
Description
1
Partial Data Length
The length of the Data field contained in the current message. This field is in big endian format. If this value is not equal to the Complete Data Length, the device is sending the data using multiple packets.
2
Data Offset
When connected to an iOS host, the device communicates over what appears to be a simple bidirectional serial line transferring binary data. To manage serial communications, we utilize an old method called SLIP (Serial Line Internet Protocol). This allows the addition of message control characters and a method to distinguish between control and data.
Each message is prefixed by a one-byte message type followed by a two-byte message length. The possible types are:
00 - Data (Data is ASCII text to be compatible with KB emulation output)
02 - Notification
04 - Response
05 – Command
Message Type
Message Len
Message
1 byte
2 bytes
Length varies
Messages are framed before and after with a byte value of 0xC0. Because this value can also appear as part of the data message, a few 2-byte sequences are added to distinguish between control and data bytes. The sender modifies the outgoing data, and the receiver translates the incoming data back to the original message. Conversion can be done on the fly during the sending and receiving processes.
Assemble message.
Add message type and length to the beginning of the message.
Replace any bytes with value 0xDB with bytes 0xDB 0xDD.
Replace any bytes with value 0xC0 with bytes 0xDB 0xDC.
Start and end the message with bytes 0xC0.
Start
Message Type
Message Len
Message
End
0xC0
1 byte
2 bytes
Length varies
SLIP example
Message 01 DB C0 05 S
LIP C0 01 DB DD DB DC 05 C0The command failed.
0x02
Bad Parameter
The command failed due to a bad parameter or command syntax error.
0x03
Redundant
The command is redundant.
0x04
Bad Cryptography
A bad cryptography operation occurred.
0x05
Delayed
The request is refused because the device is delaying requests as a defense against brute-force hacking.
0x06
No Keys
No keys are loaded.
0x07
Invalid Operation
Depends on the context of the command.
0x08
Response not available
The response is not available.
0x09
Not enough power
The battery is too low to operate reliably.
0x0A
Extended response first packet
The device is returning the first (and possibly only) packet of an Extended Response.
0x0B
Extended command pending
An extended command is pending and the device is waiting for more data.
0x0C
Extended command notification
Deprecated
0x0D
Not implemented
The command is not implemented.
0x0E
Unarmed tamper, device not ready
The tamper device is not ready to be armed.
0x0F
Unarmed tamper, bad signature
The tamper is not armed because of a bad signature.
Result Code Description
0x0000 = Success 0x0001 = Failure
0x0381 = Failure, DUKPT scheme is not loaded
0x0382 = Failure, DUKPT scheme is loaded but all of its keys have been used
0x0383 = Failure, DUKPT scheme is not loaded (Security Level not 3 or 4)
0x0384 = Invalid Total Transaction Time field
0x0385 = Invalid Card Type field 0x0386 = Invalid Options field
0x0387 = Invalid Amount Authorized field 0x0388 = Invalid Transaction Type field 0x0389 = Invalid Cash Back field
0x038A = Invalid Transaction Currency Code field 0x038B = Invalid Selection Status
0x038C = Invalid Selection Result
0x038D = Failure, no transaction currently in progress 0x038E = Invalid Reporting Option
0x038F = Failure, transaction already in progress 0x0390 = Device Has No Keys
0x0391 = Invalid Device Serial Number
0x0392 = Invalid Type of MAC field
0x0393 = Invalid Slot Number field
0x0394 = Invalid Operation field
0x0395 = Invalid Database Selector field
0x0396 = Invalid System Date and Time
0x0396 = Invalid Objects to Write field
0x0396 = Invalid Tags to Read field
0x0396 = Invalid Date / Time data (Date / Time has not been set yet)
0x0397 = Invalid MAC
0x0398 = No Slots Available 0x0399 = Object Write Protected
0x039B = Invalid CAPK Checksum
0x039C = Invalid Configuration Identifier
public class MTBankingEvent
{
public static final int OnDeviceState
= 1400;
public static final int OnCardStatus
= 1401;
public static final int OnCardData
= 1402;
public static final int OnPINResponse
= 1403;
}
Parameter
Description
OnDeviceState
The device sends the host this notification to report the condition/status of the device.
OnCardStatus
The device sends the host this notification to report the card status.
OnCardData
The device sends the host this notification to report the card data.
Parameter
Description
OnTransactionStatus
The device sends the host this notification to report progress during an EMV transaction.
OnDisplayMessageRequest
The device sends this notification to request that the host display a message for the cardholder. The host should display the message.
OnUserSelectionRequest
This device sends the host this notification to inform the host that a cardholder selection is needed before the device can continue processing the current transaction.
Parameter
Description
CardDataError
The device sends the host this notification to report and error in card data.
ConnectionError
This this notification reports an error when attempting to connect to the device.
Parameter
Description
Disconnected
Device is disconnected.
Connected
Device is connected and ready for transacting.
Error
There was an error either connecting or disconnecting the device.
Value (Hex)
Result Code
Description
0x00
Success
The command completed successfully.
0x01
Failure
public class MTEMVEvent
{
public static final int OnTransactionStatus = 200;
public static final int OnDisplayMessageRequest = 201;
public static final int OnUserSelectionRequest = 202;
public static final int OnARQCReceived = 203;
public static final int OnTransactionResult = 204;
public static final int OnEMVCommandResult = 205;
public static final int OnDeviceExtendedResponse = 206; }public enum MTError
{
CardDataError,
ConnectionError
}public class MTSCRAEvent
{
public static final int OnDeviceConnectionStateChanged = 0;
public static final int OnCardDataStateChanged = 1;
public static final int OnDataReceived = 2;
public static final int OnDeviceResponse = 3;
public static final int OnDeviceNotPaired = 4;
}public enum MTConnectionState
{
Disconnected,
Connected,
Error,
Connecting,
Disconnecting
}public enum MTConnectionType
{
Unknown(0),
Audio(1),
BLE(2),
BLEEMV(3),
Bluetooth(4),
USB(5),
Serial(6),
Net(7),
Net_TLS12(8),
Net_TLS12_Trust_All(9),
BLEEMVT(10),
AIDL(11);
}public interface IMTCardData
{
void setSOM(byte[] somBytes);
void setEOM(byte[] eomBytes);
void setFS(byte fsByte);
public byte[] getData();
public String getMaskedTracks();
public String getTrack1();
public String getTrack2();
public String getTrack3();
public String getTrack1Masked();
public String getTrack2Masked();
public String getTrack3Masked();
public String getMagnePrint();
public String getMagnePrintStatus();
public String getDeviceSerial();
public String getSessionID();
public String getKSN();
public String getDeviceName();
public void clearBuffers();
public long getBatteryLevel();
public long getSwipeCount();
public String getCapMagnePrint();
public String getCapMagnePrintEncryption();
public String getCapMagneSafe20Encryption();
public String getCapMagStripeEncryption();
public String getCapMSR();
public String getCapTracks();
public long getCardDataCRC();
public String getCardExpDate();
public String getCardIIN();
public String getCardLast4();
public String getCardName();
public String getCardPAN();
public int getCardPANLength();
public String getCardServiceCode();
public String getCardStatus();
public int getDataFieldCount();
public String getHashCode();
public String getDeviceConfig(String configType);
public String getEncryptionStatus();
public String getFirmware();
public String getMagTekDeviceSerial();
public String getResponseType();
public String getTagValue(String tag,
String data); public String getTLVVersion();
public String getTrackDecodeStatus();
public String getTLVPayload();
public String getMessageID();
public boolean isQwantumCard();
public boolean isQwantumBuffer();
public boolean isCustomerMessage();
String getMSRDUKPTKeySerialNumber();
String getMSRDUKPTKeyInfo();
String getMPDUKPTKeySerialNumber();
String getMPDUKPTKeyInfo();
public String getTokenDUKPTKeySerialNumber();
public String getTokenDUKPTKeyInfo();
public String getQwantumStatus();
public String getQwantumToken();
public String getQwantumCardID();
public String getEncryptedQwantumDataBuffer();
public String getMACDUKPTKeyInfo();
public String getMACMessageLength();
public String getMAC();
public String getCustomerMessageCode();
public String getCustomerMessageText();
public String getEncryptedSCDE();
public String getSCDEDUKPTKeySerialNumber();
public String getSCDEDUKPTKeyInfo(); }All result codes must be both universal and functional. The code 0x0396 signifies invalid date or time data, indicating that the date or time has not been set. Subsequent attempts to set the property will fail with result code 0x07, indicating a sequence error. The response may be delayed.
Value
Result Code
Description
0x0000
Success
This message occurs when an extended response is received from the device.
This message occurs when the device changes state.
Notification Msg ID in KB mode
Notification Length
Clear
HEX
4
Notification Length
Notification
Clear
Hex
var
Notification in ASCII-Hex
2 bytes
2 bytes
0-52 bytes
2 bytes
2 bytes
0-52 bytes
The offset position in bytes within the entire assembled notification where the first byte of the current packet’s Data field is located. This field is in big endian format. The first byte of the entire notification’s Data is at offset zero.
4..5
Notification Identifier
The type of notification being sent. This field is in big endian format. In many cases, two-byte notification identifiers are assigned such that the high byte indicates a group of related commands, and the low byte specifies a command within that group.
6..7
Complete Data Length
The total length of data for the entire notification message, summing all Partial Data Lengths for multiple packets. This field is in big endian format. If this value is not equal to the Partial Data Length of the current packet, the device is sending the data using multiple packets.
8..n
Data
May contain part or all the notification data. The size of this field is contained in the Partial Data Length field.
The offset position in bytes within the entire assembled notification where the first byte of the current packet’s Data field is located. This field is in big endian format. The first byte of the entire Data message is at offset zero.
2
Reserved
Set to 0000
2
Complete Data Length
The total length of data for the entire data message, summing all Partial Data Lengths for multiple packets. This field is in big endian format. If this value is not equal to the Partial Data Length of the current packet, the device is sending the data using multiple packets.
Varies
Data
May contain part or all the data. The size of this field is contained in the Partial Data Length field.
0xC0
public static final int OnSignatureState
= 1404;
public static final int OnSignature
= 1405;
public static final int OnEncryptedDataState
= 1406;
public static final int OnEncryptedData
= 1407;
OnPINResponse
The device sends the host this notification to report the PIN data.
OnSignatureState
The device sends the host this notification to report that signature data is available.
OnSignature
The device sends the host this notification to report the signature data.
OnEncryptedDataState
The device sends the host this notification to report the status of encrypted data.
OnEncryptedData
The device sends the host this notification to report the encrypted data.
OnARQCReceived
The device sends the host this notification to send ARQC data for the host to process. After the host processes the ARQC data, it should send the command setAcquirerResponse() to inform the device it can proceed with the transaction.
OnTransactionResult
The device sends this notification to provide the host with final information from the transaction. It usually includes data and an indication of whether a signature is required.
OnEMVCommandResult
The device sends the host this notification to report the result of an EMV command.
OnDeviceExtendedResponse
The device sends the host this notification to report the response to an extended command.
Connecting
Device is in the process of connecting. The next state is to be Connected.
Disconnecting
Device is in the process of disconnecting. The next state is to be Disconnected.
The command completed successfully.
0x0001
Failure
The command failed.
0x0002
Bad Parameter
The command failed due to a bad parameter or command syntax error.
0x0003
Redundant
The command is redundant.
0x0004
Bad Cryptography
A bad cryptography operation occurred.
*0x0005
Delayed
The request is refused because the device is delaying requests as a defense against brute-force hacking.
0x0006
No Keys
No keys are loaded.
0x0007
Invalid Operation
Depends on the context of the command.
0x0008
Response not available
The response is not available.
0x0009
Not enough power
The battery is too low to operate reliably.
0x000D
Not implemented
The command is not implemented.
0x000E
Unarmed tamper, device not ready
(Tamper Only)
The tamper device is not ready to be armed.
0x000F
Unarmed tamper, bad signature
(Tamper Only)
The tamper is not armed because of a bad signature.
0x0396
0x0080
DSN not found (in the device)
0x0081
Incorrect DSN
0x0082
Max token count reached
0x0083
Response data length error
0x0084
Incorrect DSN
0x0085
Challenge token timed out
0x0086
Invalid challenge token
0x0087
Message verification failed
0x0088
Invalid ECC key format
0x0089
ECC key format not supported
0x0085
Challenge token timed out
0x0086
Invalid challenge token
0x0087
Message verification failed
0x0088
Invalid ECC key format
0x0089
ECC key format not supported
0x0085
Challenge token timed out
0x0086
Invalid challenge token
0x008A
Invalid key block version ID
0x008B
Key block version not supported
0x008C
Invalid key usage
0x008D
Key usage not supported
0x008E
Invalid algorithm
0x008F
Algorithm not supported
0x0090
Invalid mode use
0x0091
Mode use not supported
0x0092
Key version not supported
0x0093
Invalid export
0x0094
Export not supported
0x0095
Invalid optional block ID
0x0096
Optional block ID not supported
0x0097
Invalid KCV algorithm
0x0098
KCV algorithm not supported
0x0099
Invalid HIMAC hash algorithm
0x009A
HMAC Hash algorithm not supported
0x009B
TR-31 format error
0x009C
MagTek custom optional block not found
0x009D
Key Environment not found in Opt Blk
0x009E
Key Environment not supported
0x009F
Key ID not found in Opt BlIk
0x00A0
Key ID not supported
0x00A1
Key ID of TK not found in Opt Blk
0x00A2
Transport key not found in key slot
0x00A3
Wrong transport key (relationship)
0x00A4
Key Restriction not found in Opt BIk
0x00A5
Invalid key type restriction
0x00A6
Invalid data type restriction
0x00A7
DSN not found in Opt BIk
0x00A8
Challenge token not found in Opt BIk
0x00A9
Expiration date/time not found in Opt BIk
0x00AA
KCV verification failed
0x00AB
MAC verification failed
0x00AE
Establish Ephemeral KBPK command is required
0x00AF
Temporary KBPK not found
0x00BO
Key ID doesn't match with Cipher Encryption Algorithm property setting.
0x00B1
Key already exists in the device
0x00B2
MTK deletion not allowed
0x00B3
Key doesn't match with the existing key
0x00B4
Incorrect key environment
0x00A0
Key ID not supported
0x00AC
Key ID not found (in the device)
0x00A0
Key ID not supported
0x00AC
Key ID not found (in the device)
0x00AB
MAC verification failed
0x00Ad
Invalid key configuration
0x00C0
Error from UCL library
0x00C1
Failed to save key in NVS
0x00C2
Key self-check failure
0x0010
ERR_SequenceNumber
Wrong firmware SequenceNumber
0x0011
ERR_FileID
Wrong firmware FileID
0x0012
ERR_ProductType
Wrong firmware ProductType
0x0013
ERR_OperationType
Wrong firmware OperationType
0x0014
ERR_SignatureLength
Wrong firmware SignatureLength
0x0015
ERR_SignatureMethod
Wrong firmware SignatureMethod
0x0016
ERR_CommType
Wrong Interface type
0x0017
TamperTrig
Device tamper triggered while downloading firmware
0x0018
ERR_FwCompareHash
Firmware hash comparison failed
0x0019
Invalid_iAP2offsetadd
iAP2 mode update firmware without downloading firmware, error
0x0020
ERR_FlashWrite
Failed to write flash
Parameter
Description
obj
Byte array containing the data received from the device.
Offset
Field Name
Value
0
Device State
0x00 = Idle 0x01 = Session
0x02 = Wait For Card 0x03 = Wait For PIN
0x04 = Wait For Selection
0x05 = Displaying Message
0x06 = Test (Reserved for future use)
0x07 = Manual Card Entry
0x08 = Wait for Signature Capture (SC-S Only | SC-F Only)
0x09 = Wait Cardholder Entry
0x0A = Chip Card
Offset
Field Name
Bit 7
6
5
4
3
2
1
The bits of Session State mean the following:
Pwr Chg:
1 = Power Change Occurred (occurs on Power up or after a USB resume)
Card Data:
1 = Card Data Available
MSR PAN:
1 = PAN Parsed from Card
EXPAN:
1 = External PAN Sent
Amt:
1 = Amount sent
Offset
Field Name
Value
2
Device Status
0x00 = OK. Otherwise, the possible values are listed below:
Bit 7 = Device Error Status:
1 = Device Error
Bit 6 = Authentication Status:
0 = Not Authenticated
1 = Authenticated
Offset
Field Name
Bit 7
6
5
4
3
2
1
0 = Certificate does not exist in the device
1 = Certificate exists in the device
This message occurs when the card status has changed.
Parameter
Description
obj
Byte array containing the data received from the device.
Offset
Field Name
Value
0
Operation Status
1
Card Status
This message occurs when the device sends card data.
Parameter
Description
obj
Byte array containing the data received from the device.
This message occurs when the device sends the response to a PIN request.
Parameter
Description
obj
Byte array containing the data received from the device.
Offset
Field Name
Value
0
Operation Status
1
PIN BLOCK
Format
This message occurs when the signature state has change.
Parameter
Description
obj
Byte array containing the data received from the device.
Offset
Field Name
Value
0
Operation Status
1
Reserved
This message occurs when the device sends the response to a signature request.
Parameter
Description
obj
Byte array containing the data received from the device.
Offset
Field Name
Value
0
Message
This Signature is an array of bytes.
This message occurs when the encrypted data state has changed.
Parameter
Description
obj
Byte array containing the data received from the device.
Offset
Field Name
Value
0
Operation Status
1
Reserved
This message occurs when the device returns encrypted data.
Parameter
Description
obj
Byte array containing the data received from the device.
Offset
Field Name
Value
0
Operation Status
1 - 10
KSN.
Parameter
Description
obj
Byte array 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 of the following data in bytes.
F8<len> /*container tag for encryption */
DFDF59(Encrypted Data Primitive)<len><Encrypted Data val (Decrypt data to read tags)>
DFDF56(Encrypted Transaction Data KSN)<len><val>
DFDF57(Encrypted Transaction Data Encryption Type)<val>
DFDF58(# of bytes of padding in DFDF59)<len><val>
FC<len> /*container tag for encrypted generic data */
F4<len>/* container tag for encrypted MSR data */
DFDF36 <EncT1status><len><val>
DFDF37 <EncT1data><len><val>
DFDF38 <EncT2status><len><val>
DFDF39 <EncT2data><len><val>
DFDF3A <EncT3status><len><val>
DFDF3B <EncT3data><len><val>
DFDF3C <Encrypted Magneprint Data><len><val>
DFDF43 <Magneprint Status Data><len><val>
DFDF50(MSR KSN Data)<len><val> /*sent in the clear*/
DFDF51(MSR EncryptionType)<len><val>Properties are used to provide information about the device and how to configure it. Secured properties are set at the factory or by an administrator using software tools supplied by MagTek. Property values take effect immediately unless specified otherwise.
Property Type:
String
Length:
Varies
Get Property:
This read-only property returns the main firmware part number, a dash, the major and minor revision number, followed by a dash and the firmware type. {main firmware part number}-{3 character rev}-{type}
This one-byte value (1-255) sets the device’s polling interval in milliseconds for the Interrupt in Endpoint. The device sends the value of this property as part of USB device enumeration to the host.
This value is also found on the product label. The property contains the 7-character MagTek device serial number. This value is used for USB device enumeration, data messages, and message security.
This is a maximum 7-byte read-only property that identifies the MagneSafe Feature Level supported on this device.
This property is defined as follows:
id = 0: Decodes standard ISO/ABA cards only
id = 1: Decodes AAMVA and 7-bit cards also
If the id flag is set to 0, only tracks that conform to the ISO card data format allowed for that track are decoded. If the track cannot be decoded by the ISO method, the device reports a decode error.
For each pair of track bits, valid values are as follows:
T# = 00: Track Disabled
T# = 01: Track Enabled
T# = 10: Track Enabled and Required (Generates error if track is blank)
This property specifies how the device should mask data on ISO/ABA type cards: Each byte in the sequence has the following meaning:
This property specifies the factors for masking data on AAMVA type cards. Each byte in the property has the following meaning:
This property represents the device’s current connection type.
Valid values for this property are:
0x00 = USB HID (HID Only)
0x01 = USB Keyboard Emulation (KB) (USB KB Only)
0x02 = iAP2
0xFF = One-Time Automatic (HID Only | iAP2 Only). When the property is set to this value and the device connects to a host, the device attempts to determine which interface type the host is using. After it successfully detects the interface type, it automatically sets this property to the value that corresponds to that interface type.
Configures Magneprint options.
The device sends the value of this property to the host before all other card data. For example, if the host software requires a set of keystrokes to begin the process of receiving card data, this property could be set to transmit that keystroke sequence.
The device sends the value of this property to the host at the end of the data message. For example, if the host software requires a set of keystrokes to end the process of receiving card data, this property could be set to transmit that keystroke sequence. If the value is 0, the device does not send a termination string.
0x0B = ICC Kernel Test
0x0C = EMV Transaction
0x0D = Show PAN
Bit 4 = Tamper:
0 = Normal
1 = Tamper Detected
Bits [3,2] = MSR Key Status:
00 = MSR Key OK
01 = MSR Key Exhausted
10 = No MSR Key
11 = MSR Key Not Bound
Bits [1,0] = PIN Key Status:
00 = PIN Key OK
01 = PIN Key Exhausted
10 = No PIN Key
11 = PIN Key Not Bound
0
1
Session State
Pwr Chg
RFU
RFU
RFU
Card Data
MSRP AN
EXPAN
Amt
0
3
Device Certificate Status
MSR CRL
PIN CRL
TLS (RSA)C
ert
Manufa cturer Unbind
MSR
Key Loader CA
Device CA
Device CA
2
Card Type
0000 0000 = ISO Format 0 (PAN Required)
0000 0001 = ISO Format 1 (No PAN Required)
0000 0011 = ISO Format 3 (PAN Required)
0000 0100 = ISO Format 4 (Not Supported)
2
PIN BLOCK
Encryption Type
0xxx xxxx = Fixed key
1xxx xxxx = DUKPT key
xx00 xxxx = TDES
xx01 xxxx = AES128
xx10 xxxx = AES256
xxxx xx00 = Data variant
xxxx xx01 = PIN variant
xxxx xx10 = MAC variant
3 - 14
PIN KSN.
PIN KSN.
If fixed PIN Key is used, KSN is all zeroes.
14 - 21
EPB
Encrypted PIN Block (EPB). If PIN entry was successful, this contains the PIN data, encrypted using the PIN variant of the current PIN DUKPT working key. Format after decryption depends on the PIN Option the host specified, and on the device’s Session State:
If the Session State indicates there is no PAN available (from card swipe or sent via command), the device creates the EPB using ISO Format 1.
If there is a PAN, the device creates the EPB using the PIN Option the host specified in the command.
2
Signature length (low byte)
3
Signature length (high byte)
2
Input Data length (low byte)
3
Input Data length (high byte)
KSN.
If fixed Key is used, KSN is all zeroes.
11 - n
Encrypted Input Data
The encrypted data encrypted using the DATA variant of the current DATA DUKPT working key.
Set Property:
Yes
Default Value:
0x01
Set Property:
No
Default Value:
N/A
Set Property:
No
Standard Value:
PCIV01
Set Property:
Yes
Default Value:
0x95
id
0
T3
T3
T2
T2
T1
T1
Set Property:
Yes
Default Value:
04040Y
1
This byte specifies whether the device applies Mod 10 Correction to the PAN. “Y” means Yes, “N” means No. This option is only effective if the Masking Character specified by this command is “0”.
1
This byte specifies whether the device applies Mod 10 Correction to the PAN. “Y” means Yes, “N” means No. This option is only effective if the Masking Character specified by this command is “0”.
Set Property:
Yes
Default Value:
04040Y
1
This byte specifies whether the device applies Mod 10 Correction to the DL/ID#. “Y” means Yes, “N” means No. This option is only effective if the masking character specified in this command is “0”.
1
This byte specifies whether the device applies Mod 10 Correction to the DL/ID#. “Y” means Yes, “N” means No. This option is only effective if the masking character specified in this command is “0”.
Set Property:
Yes (No for devices that switch connections automatically)
Default Value:
Dependent on device type:
Set Property:
Yes (Secure MAC)
Default Value:
0x00
0
0
0
0=Use SRED encrypt key
1=Use MP encrypt key
0=Normal Length MP
1=Extended Length MP
0
Set Property:
Yes
Default Value:
Null String
Set Property:
Yes
Default Value:
0x0D (carriage return)
Yes
Set Property:
No
Default Value:
Part number of installed firmware
Example
1000004854-AD9-PCI
Property ID:
0x02
Property Type:
Byte
Length:
1 byte
Get Property:
Yes
Property ID:
0x03
Property Type:
String
Length:
7
Get Property:
Yes
Property ID:
0x04
Property Type:
String
Length:
0 - 7 bytes
Get Property:
Yes
Property ID:
0x05
Property Type:
Byte
Length:
1 byte
Get Property:
Yes
Bit Position
7
6
5
4
3
2
1
0
Property ID:
0x07
Property Type:
String
Length:
6 bytes
Get Property:
Yes
Length
Description
2
These bytes are an ASCII representation of a decimal value that specifies how many of the leading characters of the PAN the device sends unmasked. The range is from “00” to “99”.
2
These bytes are an ASCII representation of a decimal value that specifies how many of the trailing characters of the PAN the device sends unmasked. The range is from “00” to “99”.
1
Masking Character. This byte specifies which character the device uses for masking. If this byte contains the uppercase letter ‘V’, the following rules apply:
The device masks the PAN using character ‘0’
The device leaves all data after the PAN unmasked, leaving Discretionary Data (“DD”) and other non-PAN data available for the host to read.
0x00 (NULL character) is not allowed.
Length
Description
2
These bytes are an ASCII representation of a decimal value that specifies how many of the leading characters of the PAN the device sends unmasked.
The leading character range is from “00” to “08” when the PAN length is greater than 15.
The leading character range is from “00” to “06” when the PAN length is 15 or less.
2
These bytes are an ASCII representation of a decimal value that specifies how many of the trailing characters of the PAN the device sends unmasked. The range is from “00” to “04”.
1
Masking Character. This byte specifies which character the device uses for masking.
The uppercase letter ‘V’ is not supported.
0x00 (NULL character) is not allowed.
Property ID:
0x08
Property Type:
String
Length:
6 bytes
Get Property:
Yes
Length
Description
2
These bytes are an ASCII representation of a decimal value that specifies how many of the leading characters of the Driver’s License/ID Number (DL/ID#) the device sends unmasked. The range is from “00” to “99”.
2
These bytes are an ASCII representation of a decimal value that specifies how many of the trailing characters of the DL/ID# sends unmasked. The range is from “00” to “99”.
1
Masking Character. This byte specifies which character the device uses for masking. If this byte contains the uppercase letter ‘V’, the following rules apply:
The device masks the PAN according to the rules of this property (Property 0x34 - Send AAMVA Card Data is ignored).
The device uses ‘0’ for masking the PAN.
The device sends all data after the PAN without masking.
0x00 (NULL character) is not allowed.
Length
Description
2
These bytes are an ASCII representation of a decimal value that specifies how many of the leading characters of the Driver’s License/ID Number (DL/ID#) the device sends unmasked. The range is from “00” to “99”.
2
These bytes are an ASCII representation of a decimal value that specifies how many of the trailing characters of the DL/ID# sends unmasked. The range is from “00” to “99”.
1
Masking Character. This byte specifies which character the device uses for masking.
The uppercase letter ‘V’ is not supported.
0x00 (NULL character) is not allowed.
Property ID:
0x10
Property Type:
Byte
Length:
1 byte
Get Property:
Yes
Property ID:
0x15
Property Type:
Byte
Length:
1 byte
Get Property:
Yes
7
6
5
4
3
Bit 2
Bit 1
Bit 0
0
Property ID:
0x1E
Property Type:
String
Length:
0-7 bytes
Get Property:
Yes
Property ID:
0x22
Property Type:
String
Length:
0-7 bytes
Get Property:
Yes
0
Feature / Product
cDynamo
DynaMAX
eDynamo
iDynamo 5
iDynamo 5 (Gen II)
iDynamoe 5 (Gen III)
iDynamo 6
tDynamo
uDynamo
Transaction Validation
N
N
N
N
N
N
N
N
N
N
N
Display
N
N
N
N
N
N
N
N
N
N
N
Multi-Language
N
N
Y
N
N
N
Y
Y
N
Y
N
Tamper
N
N
Y
N
N
Y
N
N
N
N
N
Extended Commands
N
N
Y
N
N
Y
Y
Y
N
Y
N
Extended Notifications
N
N
Y
N
N
Y
Y
Y
N
Y
N
Dual USB Ports
N
N
N
N
N
Y
Y
N
N
Y
N
Pairing Modes
N
N
Y
N
N
N
N
N
N
Y
N
Custom Advertising
N
N
Y
N
N
N
N
N
N
Y
N
Configurable Lightning FID
Y
N
N
N
Y
Y
Y
Y
N
N
N
Auxiliary Ports
N
N
N
N
N
N
N
N
N
N
N
External LED Control
N
N
N
N
N
Y
N
N
N
N
N
Encrypt Bulk Data (b)
120
24
24
120
N
Y
N
N
N
N
24
kDynamo
sDynamo
tDynamo
uDynamo
MSR Swipe
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
MSR Insert
N
N
N
N
N
N
N
N
N
N
N
MSR 3 Tracks
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
N
MSR Disable
Y
N
N
Y
N
N
N
N
N
N
N
MSR Swap Tracks 1/3
N
N
N
N
N
N
N
N
N
N
N
MSR Embedded V5 Head
N
N
N
N
Y
Y
Y
Y
Y
Y
N
MSR Configurabe MSR Variants
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
N
MSR Configurable MP Variants
N
Y
Y
N
N
Y
Y
Y
N
Y
N
MSR SureSwipe
N
Y
Y
N
N
N
N
N
N
N
N
MSR JIS Capable
Y
N
N
Y
N
N
N
N
Y
N
N
SHA-1
N
Y
Y
N
N
Y
N
N
N
N
N
SHA-256
N
N
N
N
N
Y
N
N
N
N
N
Configurable SHA
N
Y
Y
N
N
N
N
N
N
N
N
Configurable Encryption Algorithm
N
N
N
N
N
Y
Y
N
N
N
N
Set Mask Service Code
N
N
N
N
N
N
N
N
N
N
N
Never Mask Service Code
N
N
Y
Y
Y
Y
Y
Y
Y
Y
N
MagneSafe 2.0
N
N
Y
N
N
N
N
N
N
N
N
EMV Contact
N
N
Y
N
N
N
Y
Y
N
Y
N
EMV Contactless
N
N
N
N
N
N
Y
Y
N
Y
N
EMV Offline ODA
N
N
Y
N
N
N
N
N
N
N
N
EMV MSR Flow
N
N
N
N
N
N
Y
Y
N
Y
N
EMV Contact Quick Chip
N
N
Y
N
N
N
Y
Y
N
Y
N
EMV Contactless Quick Chip
N
N
N
N
N
N
Y
Y
N
Y
N
External PIN Accessory Support
N
N
N
N
N
N
Y
N
N
N
N
Keypad Entry
N
N
N
N
N
N
N
N
N
N
N
Fixed Key
N
N
N
N
N
Y
N
N
N
N
N
Secondary DUKPT Key
N
Y
Y
N
N
Y
N
N
N
N
Y
Power Mgt Scheme (PM#)
N
2
3
N
N
N
7
5
N
5
4
Battery-Backed RTC
N
N
Y
N
N
Y
N
N
N
N
N
OEM Features
N
N
N
N
N
N
N
N
N
N
N
Feature / Product
cDynamo
DynaMAX
eDynamo
iDynamo 5
iDynamo 5 (Gen II)
iDynamoe 5 (Gen III)
iDynamo 6
kDynamo
sDynamo
sDynamo
tDynamo
uDynamo
MSR Swipe
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
MSR Insert
N
N
N
N
N
N
N
N
N
N
N
MSR 3 Tracks
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
N
MSR Disable
Y
N
N
Y
N
N
N
N
N
N
N
MSR Swap Tracks 1/3
N
N
N
N
N
N
N
N
N
N
N
MSR Embedded V5 Head
N
N
N
N
Y
Y
Y
Y
Y
Y
N
MSR Configurable MSR Variants
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
N
MSR Configurable MP Variants
N
Y
Y
N
N
N
Y
Y
N
Y
N
MSR SureSwipe
N
Y
Y
N
N
Y
N
N
N
N
N
MSR JIS Capable
Y
N
N
Y
N
N
N
N
Y
N
N
SHA-1
N
Y
Y
N
N
N
N
N
N
N
N
SHA-256
N
N
N
N
N
N
N
N
N
N
N
Configurable SHA
N
Y
Y
N
N
N
N
N
N
N
N
Configurable Encryption Algorithm
N
N
N
N
N
Y
Y
N
N
N
N
Set Mask Service Code
N
N
N
N
N
N
N
N
N
N
N
Never Mask Service Code
N
N
Y
Y
Y
Y
Y
Y
Y
Y
N
MagneSafe 2.0
N
N
Y
N
N
N
N
N
N
N
N
EMV Contact
N
N
Y
N
N
N
Y
Y
N
Y
N
EMV Contactless
N
N
N
N
N
N
Y
Y
N
Y
N
EMV Offline ODA
N
N
Y
N
N
N
N
N
N
N
N
EMV MSR Flow
N
N
N
N
N
N
Y
Y
N
Y
N
EMV Contact Quick Chip
N
N
Y
N
N
N
Y
Y
N
Y
N
EMV Contactless Quick Chip
N
N
N
N
N
N
Y
Y
N
Y
N
External PIN Accessory Support
N
N
N
N
N
N
Y
N
N
N
N
Keypad Entry
N
N
N
N
N
N
N
N
N
N
N
Fixed Key
N
N
N
N
N
N
N
N
N
N
N
Secondary DUKPT Key
N
Y
Y
N
N
N
N
N
N
N
Y
Power Mgt Scheme (PM#)
N
2
3
N
N
N
7
5
N
5
4
Battery-Backed RTC
N
N
Y
N
N
N
N
N
N
N
N
OEM Features
N
N
N
N
N
N
N
N
N
N
N
Transaction Validation
N
N
N
N
N
N
N
N
N
N
N
Feature / Product
cDynamo
DynaMAX
eDynamo
iDynamo 5
iDynamo 5 (Gen II)
iDynamo 5 (Gen III)
iDynamo 6
kDynamo
Feature / Product
cDynamo
DynaMAX
eDynamo
iDynamo 5
iDynamo 5 (Gen II)
iDynamo 5 (Gen III)
iDynamo 6
kDynamo
sDynamo
tDynamo
uDynamo
MSR Swipe
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
MSR Insert
N
N
N
N
N
N
N
N
N
N
N
MSR 3 Tracks
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
N
MSR Disable
Y
N
N
Y
N
N
N
N
N
N
N
MSR Swap Tracks 1/3
N
N
N
N
N
N
N
N
N
N
N
MSR Embedded V5 Head
N
N
N
N
Y
Y
Y
Y
Y
Y
N
MSR Configurabe MSR Variants
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
N
MSR Configurable MP Variants
N
Y
Y
N
N
Y
Y
Y
N
Y
N
MSR SureSwipe
N
Y
Y
N
N
N
N
N
N
N
N
MSR JIS Capable
Y
N
N
Y
N
N
N
N
Y
N
N
SHA-1
N
Y
Y
N
N
Y
N
N
N
N
N
SHA-256
N
N
N
N
N
Y
N
N
N
N
N
Configurable SHA
N
Y
Y
N
N
N
N
N
N
N
N
Configurable Encryption Algorithm
N
N
N
N
N
Y
Y
N
N
N
N
Set Mask Service Code
N
N
N
N
N
N
N
N
N
N
N
Never Mask Service Code
N
N
Y
Y
Y
Y
Y
Y
Y
Y
N
MagneSafe 2.0
N
N
Y
N
N
N
N
N
N
N
N
EMV Contact
N
N
Y
N
N
N
Y
Y
N
Y
N
EMV Contactless
N
N
N
N
N
N
Y
Y
N
Y
N
EMV Offline ODA
N
N
Y
N
N
N
N
N
N
N
N
EMV MSR Flow
N
N
N
N
N
N
Y
Y
N
Y
N
EMV Contact Quick Chip
N
N
Y
N
N
N
Y
Y
N
Y
N
EMV Contactless Quick Chip
N
N
N
N
N
N
Y
Y
N
Y
N
External PIN Accessory Support
N
N
N
N
N
N
Y
N
N
N
N
Keypad Entry
N
N
N
N
N
N
N
N
N
N
N
Fixed Key
N
N
N
N
N
Y
N
N
N
N
N
Secondary DUKPT Key
N
Y
Y
N
N
Y
N
N
N
N
Y
Power Mgt Scheme (PM#)
N
2
3
N
N
N
7
5
N
5
4
Battery-Backed RTC
N
N
Y
N
N
Y
N
N
N
N
N
OEM Features
N
N
N
N
N
N
N
N
N
N
N
Feature / Product
cDynamo
DynaMAX
eDynamo
iDynamo 5
iDynamo 5 (Gen II)
iDynamoe 5 (Gen III)
iDynamo 6
kDynamo
Feature / Product
cDynamo
DynaMAX
eDynamo
iDynamo 5
iDynamo 5 (Gen II)
iDynamoe 5 (Gen III)
iDynamo 6
kDynamo
sDynamo
tDynamo
uDynamo
Display
N
N
N
N
N
N
N
N
N
N
N
Multi-Language
N
N
Y
N
N
N
Y
Y
N
Y
N
Tamper
N
N
Y
N
N
N
N
N
N
N
N
Extended Commands
N
N
Y
N
N
N
Y
Y
N
Y
N
Extended Notifications
N
N
Y
N
N
N
Y
Y
N
Y
N
Dual USB Ports
N
N
N
N
N
Y
Y
N
N
Y
N
Pairing Modes
N
N
Y
N
N
N
N
N
N
Y
N
Custom Advertising
N
N
Y
N
N
N
N
N
N
Y
N
Configurable Lightning FID
Y
N
N
N
Y
Y
Y
Y
N
N
N
Auxiliary Ports
N
N
N
N
N
N
N
N
N
N
N
External LED Control
N
N
N
N
N
N
N
N
N
N
N
Encrypt Bulk Data (b)
120
24
24
120
N
N
N
N
N
N
24
sDynamo
tDynamo
uDynamo
Transaction Validation
N
N
N
N
N
N
N
N
N
N
N
Display
N
N
N
N
N
N
N
N
N
N
N
Multi-Language
N
N
Y
N
N
N
Y
Y
N
Y
N
Tamper
N
N
Y
N
N
Y
N
N
N
N
N
Extended Commands
N
N
Y
N
N
Y
Y
Y
N
Y
N
Extended Notifications
N
N
Y
N
N
Y
Y
Y
N
Y
N
Dual USB Ports
N
N
N
N
N
Y
Y
N
N
Y
N
Pairing Modes
N
N
Y
N
N
N
N
N
N
Y
N
Custom Advertising
N
N
Y
N
N
N
N
N
N
Y
N
Configurable Lightning FID
Y
N
N
N
Y
Y
Y
Y
N
N
N
Auxiliary Ports
N
N
N
N
N
N
N
N
N
N
N
External LED Control
N
N
N
N
N
Y
N
N
N
N
N
Encrypt Bulk Data (b)
120
24
24
120
N
Y
N
N
N
N
24
Yes
Set Property:
Yes
Default Value:
0x01
This property controls the masking of the service code on ISO card tracks 1 and 2. If this property is set to 1, the device masks the service code. If this property is set to 0, the device does not mask the service code.
Property ID:
0x78
Property Type:
Binary
Length:
1 byte
Get Property:
Yes
The host can use this property to enable Selectable Card Data Encryption. Any of the bits in this property enables the SCDE with the corresponding data field included in the encrypted SCDE.
The M002 message is transmitted to the host instead of the M001 message when the following four conditions are met when a financial card is swiped.
Any of the defined property 0x78 bits are set to 1 (enabled)
Card Encode Type of the swiped card is ISO
Initial SCDE DUKPT Key was injected into the device
SCDE DUKPT future keys are available (not exhausted)
Bit Number
Description of Bit
Bit 0
Card Holder Name
0 = Disable (Default)
1 = Enable
Bit 1
PAN
0 = Disable (Default)
1 = Enable
Bit 2
Expiration Date
0 = Disable (Default)
1 = Enable
Property ID:
0x80
Property Type:
String
Length:
varies
Get Property:
Yes
Example
10PCI50U0BA
Property ID:
0x81
Property Type:
Byte
Length:
1 byte
Get Property:
Yes
Property ID:
0x82
Property Type:
Byte
Length:
2 bytes
Get Property:
Yes
For security purposes, the reader will reset itself once a day. You can choose what time this reset will occur by changing this property. Set the value to HHMM in Coordinated Universal Time (UTC). HH is one byte with a value of 0-23. MM is one byte with a value of 0-59 The new value takes effect after the next device reset or power cycle.
Length
Field Name
Value
1
Hour
Value from 0x00...0x17 (0-23)
1
Minute
Property ID:
0x83
Property Type:
Bytes
Length:
0-1023 bytes
Get Property:
Yes (Secure MAC)
This data is stored securely (encrypted by DDEK). The data gets sent out in encrypted form using DUKPT when the device is in QWANTUM Mode, the button is enabled, and the button is pressed.
Property ID:
0x84
Property Type:
String
Length:
varies
Get Property:
Yes
For PCI certified devices, this value will match the one found on the PCI website and the product label.
Property ID:
0x85
Property Type:
Binary
Length:
3 bytes
Get Property:
Yes
This property indicates whether the firmware was built to use production device keys (005454) or test device keys (000101).
Property ID:
0x86
Property Type:
Binary
Length:
4 bytes
Get Property:
Yes
Byte
Type
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
The primary functions of device states are to inform production software about completed steps and pending tasks. It serves as a checklist and can also assist with remote services and RMAs.
Bytes
Bits
Name
Settings
BYTE 1 – System State
Bit 7
Offline
0 = All bits in this property are set to 0
1 = Not all bits in this property are 0
Property ID:
0x87
Property Type:
Binary
Length:
8 bytes
Get Property:
Yes
If a key has been loaded into the device, then it’s bit indicator should be set to 1.
A fully loaded reader would return a keymap of: 7E 00 07 00 8C 00 00 00.
Byte
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Property ID:
0x88
Property Type:
Binary
Length:
1 byte
Get Property:
Yes
The host can use this property to adjust the device’s USB packet delay. The property can be set to 0 to have no delay, or it can be set to a specific value in the range of 1 to 255 ms.
Adjusting this value does not require security when the device is fully configured.
Adjusting this value does not affect the USB HOST POLL TIMEOUT, PROPERTY 0x52. In fact, it is mostly independent from the polling interval.
MagTek recommends the following values for various platforms:
Windows = 0x00 (0 ms)
Android = 0x19 (25 ms)
Linux = 0x32 (50 ms)
Property ID:
0x6E
Property Type:
Byte
Length:
1 byte
Get Property:
Note – Test firmware can only allow test keys to be injected.
Note that the device is considered offline (no card reading) until all 4 bytes are zero.
Set Property:
Yes (Secure MAC)
Default Value:
0x00
Bit 3
Service Code
0 = Disable (Default)
1 = Enable
Bit 4
T1 Discretionary Data
0 = Disable (Default)
1 = Enable
Bit 5
T2 Discretionary Data
0 = Disable (Default)
1 = Enable
Bit 6
Reserved
Bit 7
Reserved
Set Property:
No
Default Value:
N/A
Set Property:
Yes (Secure MAC)
Default Value:
0
• 0 = Normal Operation
• 1 = QWANTUM Mode
Set Property:
Yes (New value takes effect after reset)
Default Value:
0000 (UTC Midnight)
Value from 0x00...0x3B (0-59)
Set Property:
Yes (Secure MAC)
Default Value:
Length = 0
Set Property:
No
Standard Value:
'iDynamo 5 Gen III'
Set Property:
No (Value depends on firmware build type)
Default Value:
005454 (for PCI), 000101 (for Non-PCI)
Set Property:
No – values come from self-test and security status.
Default Value:
N/A
Bit 0
1
System State
Offline
0
0
Device Keys missing
RTC not active/set
Not Initialized
Security Inactive
Tampered
2
Self-Test failure
Data Integrity
Key Integrity
0
0
0
Registers
Crypto
RNG
3
PCI Info
0
0
0
0
0
HW ID Missing
Model Name Missing
Serial # Missing
4
Unmapped Data Types
0
0
0
0
0
0
0
0
Bit 6
Reserved
Always 0
Bit 5
Bit 4
Device Keys Missing
0 = Device keys present
1 = Device keys missing
NOTE: “Device Keys” refer to the keys that are injected during MfgCfg such as Transport Keys and MAC Keys. “Device Keys” do not include DUKPT keys (2007, 2002 and 2003). The DUKPT keys are “Financial Keys”.
Bit 3
RTC not Active/Set
0 = RTC active
1 = RTC inactive (not enabled)
Bit 2
Not Initialized
0 = Non-volatile storage initialized
1= Non-volatile storage not initialized
NOTE: “Initialized” means:
a. the master keys are generated internally.
b. the data & key storage area is initialized with an initialization indicator such as 0xAA55 and its integrity is known good.
Bit 1
Security Inactive
0 = Security activated
1= Security not activated
NOTE: “Security” means Tamper.
Bit 0
Tampered
0 = Device not tampered
1 = Device tampered
BYTE 2 – Self-Test Failure
Bit 7
Data Integrity
0 = Configuration data in NVS not corrupted
1 = Found data corruption in the configuration data
Bit 6
Key Integrity
0 = All fixed keys and injected keys are not corrupted
1 = Found key data for one or more keys is corrupted
Bit 5
Reserved
Always 0
Bit 4
Bit 3
Bit 2
Registers
0 = All hardware registers in uC required for normal operation of the device are initialized/ enabled/configured/ functional;
1 = Any one or more of those registers are not operating correctly
Bit 1
Crypto
0 = Passed test
1 = Failed test
NOTE: Enable Crypto engine in uC and test crypto functions and make sure it returns the expected results. (e.g. KAT – Known Answer Test)
Bit 0
RNG
0 = Passed test
1 = Failed test
NOTE: Enable RNG in uC and read RNG value a few times and make sure RNG returns different values for each read.
BYTE 3 – PCI Info
Bit 7
Reserved
Always 0
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
PCI HW ID Missing
0 = Found a valid PCI HW ID in Property 0x80
1 = PCI HW ID missing
Bit 1
Model Name Missing
0 = Found a valid model name in Property 0x84
1 = Model name missing
Bit 0
Serial # Missing
0 = Found a valid DSN in Property 0x03
1 = DSN missing
BYTE 4 – Unmapped Data Types
Bit 7
Reserved
Always 0
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Set Property:
No – values come from key injection.
Starting Value:
0 – if no keys loaded
1 – TK1
0
MKIFTK
MFGTK
PRODTK
FINTK
DEVTK
MTK
TMPTK
2 – TK2
0
0
0
0
0
0
0
0
3 – MK1
0
0
0
0
0
MFRQMK
MREQMK
FREQMK
4 – MK2
0
0
0
0
0
0
0
0
5 – DK1
DKPTM7
0
0
0
DKPTM3
DKPTM2
0
0
6 – DK2
0
0
0
0
0
0
0
0
7 – DK3
0
0
0
0
0
0
0
0
8 – DK4
DKPTM1F
0
0
0
0
0
0
0
Set Property:
Yes
Starting Value:
0x00 (0 ms)
Multi-byte values like command and data lengths are always big-endian.
Data Messages are formed in response to a cardholder event such as swiping a card or pressing a button. These messages are formatted as a block of ASCII text and compatible with all interfaces.
Commands consist of a 2-byte command, a 2-byte Parameter Data Length, and Parameter Data as needed.
Command
Parameter Data Len
Parameter Data
Responses consist of a 2-byte return code, a 2-byte response data length, and response data as needed.
Notifications consist of a 2-byte notification code, a 2-byte notification data length, and notification data when needed. They are sent asynchronously due to device events. They can also be used as delayed responses for commands that take longer to process.
Sentinels
Data for each card track is typically bracketed by a start and end sentinel. The sentinel characters can be changed by setting properties. The start sentinel can also indicate what format was used to encode the track.
[SS] Track Data [ES]
If a property value is set to 0, then no character will be sent.
Masking
The PAN field must always be partially masked. The device can be configured to expose the 0-8 leading characters and 0-4 trailing characters. The 8-digit limit for leading characters automatically drops to 6 for cards where the PAN length is less than 16 (e.g. American Express).
Properties 0x07 and 0x08 are used to configure PAN masking.
Data messages include DUKPT KEY information fields so the host can derive the correct decryption or MAC key.
Example:
Data messages will always be made up of ASCII text characters regardless of the interface for compatibility purposes. Text is used to address limitations when using keyboard emulation.
Any Field with no value will be empty between separator characters.
The device transmits an M002 message with three new data fields: Encrypted SCDE, KSN (SCDE) and DUKPT Key Info (SCDE) to the host instead of an M001 message when the following four conditions are satisfied. Selectable Card Data Encryption is enabled through Property 0x78.
Any of the defined property 0x78 bits are set to 1 (enabled),
Card Encode Type is ISO (a.k.a. financial card),
SCDE DUKPT key is injected or present in the device, and
If any one of the four conditions is not met, an M001 message will be returned to the host instead of an M002 message.
The encrypted SCDE field in the M002 message, [Encrypted SCDE], includes six data fields, field_1 ~ field_6. The six data fields are placed in a buffer prior to encryption. The selectable card data element starts with a field separator (FS) followed by a data field, and the last field separator is appended following the sixth data field (field_6) as shown below (total seven FS characters). The field separator used in the SCDE is the same FS used in the M001 or M002 message, which may be changed using Property 0x23.
Each data field in the SCDE is defined as follows.
The SCDE DUKPT key (DKPTM1F) is used to encrypt the six data fields (| field_1 | field_2 | field_3 | field_4 | field_5 | field_6 |)only. No other keys should be used for the SCDE.
The encrypted SCDE field in the M002 message is an encrypted blob holding six card data fields selected with Property 0x78 bits. If a defined bit is set to zero, the corresponding data field will be empty in the clear-text SCDE. The clear-text SCDE including enabled data fields will be encrypted with an SCDE DUKPT future key.
When all defined bits in the property 0x78 are set to zeros, the encrypted SCDE is disabled. As a result, the M001 message should be transmitted to the host instead of the M002 message.
Encrypt( | field_1 | field_2 | field_3 | field_4 | field_5 | field_6 | )
Field Separation
This device uses configurable properties to define characters that get inserted into the message for parsing purposes. The simplest option is to have characters for start of message (SOM), end of message (EOM), and field separation (FS) only.
This is the message format for Qwantum cards, or for any card when Qwantum Mode is on.
This message is used when the device sends out encrypted data from the Secure Buffer.
This message is used when the device sends out when Qwantum Secure Data is empty.
T2ISO
Tk2 SS if ISO
1
0x25
0x3B ‘;’
T3ISO
Tk3 SS if ISO
1
0x26
0x2B ‘+’
T3AMV
Tk3 SS if AAMVA
1
0x27
0x23 ‘#’
T27BT
Tk2 SS if 7bit
1
0x28
0x40 ‘@’
T37BT
Tk3 SS if 7bit
1
0x29
0x26 ‘&’
ES
End sentinel
1
0x2B
0x3F ‘?’
ISO Only:
Expiration Date masking
Always fully unmasked (4 digits).
Always masked with 5th character from Property 0x07.
ISO Only:
Service Code masking
Can be enabled or disabled using Property 0x6E (3 digits).
Always masked with 5th character from Property 0x07.
AAMVA Only:
Expiration Date and Birth Date
Always fully unmasked (12 digits).
Always masked with 5th character from Property 0x08.
Discretionary Data masking
Unmasked if error. Otherwise, masked with 5th character from Property 0x07 or 0x08.
Unmasked if error. Otherwise, masked with 5th character from Property 0x07 or 0x08.
2
1
For Data Item
0x01 – RFU
0x01 – Message MAC
0x02 – MSR Data
0x03 – MP Token
0x04 – Qwantum Token
0x05 – Qwantum Data
3
1
Using Mode/Operation
0x00 – RFU
0x01 – ENC-CBC-0
0x02 – ENC-CBC-SECURE
0x03 – ENC-CTR
0x10 – MAC-CBC-0
0x11 – CMAC
0x12 – HMAC
0x13 – GMAC
4
1
Derived Key Algorithm
0x00 – 2-key TDEA
0x01 – 3-key TDEA
0x02 – AES 128-bit
0x03 – AES 192 bit
0x04 – AES 256 bit
0x05 – HMAC
5-6
2
Generated Key Length (bits)
0x0100 – 256 bits
0x0080 – 128 bits
7-8
2
Derived Key Usage
0x2002 – MAC, both ways
0x3002 – Data Encryption, both ways
0xFF00 – Legacy PIN Variant
0xFF01 – Legacy MAC, both ways
0xFF02 – Legacy Data Encryption
AES DUKPT: Use “Legacy: FFnn”, which means “shift FF left nn bytes”.
Track 1 Masked Data
Clear
ASCII
var
Per masking configuration
Track 2 Masked Data
Clear
ASCII
var
Per masking configuration
Track 3 Masked Data
Clear
ASCII
var
Per masking configuration
Track 1 Data
Encrypt
HEX
var
Encrypted with MSR key.
Track 2 Data
Encrypt
HEX
var
Encrypted with MSR key.
Track 3 Data
Encrypt
HEX
var
Encrypted with MSR key.
MP Status Code
Clear
HEX
8
MP Token
Encrypt
HEX
var
Encrypted with MSR or MP key as configured (see Property 0x15).
Session ID
Encrypt
HEX
16/32
Encrypted with MSR key. Session ID = RTC value.
KSN (MSR)
Clear
HEX
20/24
DUKPT Key Info (MSR)
Clear
HEX
16
KSN (MP)
Clear
HEX
0/20/24
Empty when MSR key is used
DUKPT Key Info (MP)
Clear
HEX
16
Empty when MSR key is used
Device Serial Number
Clear
ASCII
7
Indicates valid range of each hex digit –
‘0’ ~ ‘9’ (0x30 ~ 0x39),
’A’ ~ ‘F’ (0x41 ~ 0x46)
DUKPT Key Info (MAC)
Clear
HEX
16
Using MSR Key
Message Length
Clear
HEX
4
Include all of message except for MAC. Length required for MAC security. High byte first.
MAC
Clear
HEX
16/32
MAC variant of MSR encryption key is used to calculate MAC.
CBC MAC if MSR DUKPT key is TDES
CMAC if MSR DUKPT key is AES
Track 1 Masked Data
Clear
ASCII
var
Per masking configuration
Track 2 Masked Data
Clear
ASCII
var
Per masking configuration
Track 3 Masked Data
Clear
ASCII
var
Per masking configuration
Track 1 Data
Encrypt
HEX
var
Encrypted with MSR key.
Track 2 Data
Encrypt
HEX
var
Encrypted with MSR key.
Track 3 Data
Encrypt
HEX
var
Encrypted with MSR key.
MP Status Code
Clear
HEX
8
MP Token
Encrypt
HEX
var
Encrypted with MSR or MP key as configured (see Property 0x15).
Session ID
Encrypt
HEX
16/32
Encrypted with MSR key. Session ID = RTC value.
KSN (MSR)
Clear
HEX
20/24
DUKPT Key Info (MSR)
Clear
HEX
16
KSN (MP)
Clear
HEX
0/20/24
Empty when MSR key is used
DUKPT Key Info (MP)
Clear
HEX
0/16
Empty when MSR key is used
Device Serial Number
Clear
ASCII
7
Indicates valid range of each hex digit – ‘0’ ~ ‘9’ (0x30 ~ 0x39), ‘A’ ~ ‘F’ (0x41 ~ 0x46)
DUKPT Key Info (MAC)
Clear
HEX
16
Using MSR Key
Message Length
Clear
HEX
4
Include all of message except for MAC. Length required for MAC security. High byte first.
MAC
Clear
HEX
16/32
MAC variant of MSR encryption key is used to calculate MAC.
CBC MAC if MSR DUKPT key is TDES
CMAC if MSR DUKPT key is AES
Encrypted SCDE
Encrypt
HEX
var
KSN (SCDE)
Clear
HEX
20/24
DUKPT Key Info (SCDE)
Clear
HEX
16
field_2
PAN from Track 1or Track 2 (padding nibble=F)
CN
var (max 19)
bit 1
field_3
Expiration Date from Track 1 or Track 2
4N
2
bit 2
field_4
Service Code from Track 1 or Track 2
3N
2
bit 3
field_5
T1 discretionary data
AN
var
bit 4
field_6
T2 discretionary data (padding nibble=F)
CN
var
bit 5
0
0
EOM
End of Message
0-7
0x22
‘\r’ (0x0D)
0
FS
Field Separator
1
0x23
‘|’ (0x7C)
0
KSN (Token)
Clear
HEX
20/24
TDES or AES
DUKPT Key Info (Token)
Clear
HEX
16
Qwantum Status
Clear
HEX
8
from ASIC
Qwantum Token
Encrypt
HEX
var
Encrypted with Qwantum Token Key
Padded with zeros
Session ID
Encrypt
HEX
16/32
Encrypted with MSR key. Session ID = RTC value
Qwantum Card ID
Clear
HEX
64
32-byte SHA256 hash of TK1 name, TK2 PAN and TK2 Expiration Date
Device Serial Number
Clear
ASCII
7
Indicates valid range of each hex digit – ‘0’ ~ ‘9’ (0x30 ~ 0x39), ‘A’ ~ ‘F’ (0x41 ~ 0x46)
DUKPT Key Info (MAC)
Clear
HEX
16
for Qwantum Token Key
Message Length
Clear
HEX
4
Includes all of message fields except for MAC (High byte first)
MAC
Clear
HEX
16/32
MAC variant of MSR encryption key is used to calculate MAC.
CBC MAC if MSR DUKPT key is TDES
CMAC if MSR DUKPT key is AES
KSN (Token)
Clear
HEX
20/24
TDES or AES
DUKPT Key Info (Token)
Clear
HEX
16
Session ID
Encrypt
HEX
16/32
Encrypted with MSR key. Session ID = RTC value
Qwantum Buffer
Encrypt
HEX
1-2K
Encrypted with Qwantum Token Key
Padded with pad length
Device Serial Number
Clear
ASCII
7
Indicates valid range of each hex digit – ‘0’ ~ ‘9’ (0x30 ~ 0x39), ‘A’ ~ ‘F’ (0x41 ~ 0x46)
DUKPT Key Info (MAC)
Clear
HEX
16
for Qwantum Token Key
Message Length
Clear
HEX
4
Includes all of message fields except for MAC (High byte first)
MAC
Clear
HEX
16/32
MAC variant of MSR encryption key is used to calculate MAC.
CBC MAC if MSR DUKPT key is TDES
CMAC if MSR DUKPT key is AES
Message Code
Clear
ASCII
2
Text characters indicating message code
Message
Clear
ASCII
36
Message for empty buffer
2-bytes
2-bytes
0…n bytes
Return Code
Response Data Len
Response Data
2-bytes
2-bytes
0...n bytes
Notification ID
Notification Data Len
Notification Data
2-bytes
2-bytes
0...n bytes
Name
Description
Length
Property
Default
T1ISO
Tk1 SS if ISO
1
0x24
M001/M002 Message
Non-PCI
PCI
PAN masking
Can be configured using Property 0x07 and 0x08.
Can be configured using Property 0x07 or 0x08 with the following exceptions.
· Masking Character, ‘V’, is not supported in Property 0x07/0x08.
· Not allowed to unmask leading PAN digits more than 6 digits when PAN length is 15 digits.
Name masking
Always fully unmasked.
Byte
Len
Description
Values
Notes
1
1
DUKPT Key Info Version
0x00 – Legacy DUKPT
0x01 – Current (AES) DUKPT
Field Description
Prot
Type
Txt Len
Notes
Message ID = “M001”
Clear
ASCII
4
Field Description
Prot
Type
Txt Len
Notes
Message ID = “M002”
Clear
ASCII
4
Description
Type
Length (bytes)
Property 0x78
field_1
Cardholder Name from Track 1
AN
var (max 26)
Name
Description
Length
Property
Default
To Disable
SOM
Start of Message
0-7
Description
Prot
Type
Txt Len
Notes
Message ID = “Q001”
Clear
ASCII
4
Description
Prot
Type
Txt Len
Notes
Message ID = “Q002”
Clear
ASCII
4
Description
Prot
Type
Txt Len
Notes
Message ID = “Q003”
Clear
ASCII
4
Note: PCI Requirement – SCR devices that can be used with consumer devices must fully mask cardholder name, expiration date, and service code with no exceptions.
Note: The description in this section is for non-PCI device case. The following table shows the difference between non-PCI device and PCI device masking rule.
Note: Derived key algorithm, length, and usage information will be needed to generate the correct AES-DUKPT decryption key.
Note: Text length may vary depending on the key type that is being used.
Note:
Text length may vary depending on the key type that is being used.
The three SCDE fields at the bottom of the message are not part of the MAC calculation.
Note: Portion in bold shows the data included in the output MAC calculations.
0x25 ‘%’
Always fully masked with ‘*’.
MSR Data Message
MSR Data Message
bit 0
0x1E
Qwantum Card message
Qwantum Buffer Message
Qwantum Buffer Message
00 02 01 00 0080 FF02 MSR encrypt CBC zero pad with legacy DUKPT 128-bit TDEA data variant.[SOM] M001
[FS] [Track 1 Masked Data]
[FS] [Track 2 Masked Data]
[FS] [Track 3 Masked Data]
[FS] [Track 1 Encrypted Data]
[FS] [Track 2 Encrypted Data]
[FS] [Track 3 Encrypted Data]
[FS] [MP Status]
[FS] [Encrypted MP Data]
[FS] [Encrypted Session ID]
[FS] [MSR DUKPT Key Serial Number]
[FS] [MSR DUKPT Key Info]
[FS] [MP DUKPT Key Serial Number]
[FS] [MP DUKPT Key Info]
[FS] [Device Serial Number]
[FS] [MAC DUKPT Key Info]
[FS] [MAC message length]
[FS] [MAC]
[EOM]
[FS] [MAC][EOM]
[SOM] M002
[FS] [Track 1 Masked Data]
[FS] [Track 2 Masked Data]
[FS] [Track 3 Masked Data]
[FS] [Track 1 Encrypted Data]
[FS] [Track 2 Encrypted Data]
[FS] [Track 3 Encrypted Data]
[FS] [MP Status]
[FS] [Encrypted MP Data]
[FS] [Encrypted Session ID]
[FS] [MSR DUKPT Key Serial Number]
[FS] [MSR DUKPT Key Info]
[FS] [MP DUKPT Key Serial Number]
[FS] [MP DUKPT Key Info]
[FS] [Device Serial Number]
[FS] [MAC DUKPT Key Info]
[FS] [MAC message length]
[FS] [MAC]
[FS] [Encrypted SCDE]
[FS] [SCDE DUKPT Key Serial Number]
[FS] [SCDE DUKPT Key Info]
[EOM]
[SOM] Q001
[FS] [Token DUKPT Key Serial Number]
[FS] [Token DUKPT Key Info]
[FS] [QWANTUM Status]
[FS] [QWANTUM Token]
[FS] [Encrypted Session ID]
[FS] [QWANTUM Card ID]
[FS] [Device Serial Number]
[FS] [MAC DUKPT Key Info]
[FS] [MAC message length]
[FS] [MAC]
[EOM]
[SOM] Q002
[FS] [Token DUKPT Key Serial Number]
[FS] [Token DUKPT Key Info]
[FS] [Encrypted Session ID]
[FS] [Encrypted Qwantum Data Buffer]
[FS] [Device Serial Number]
[FS] [MAC DUKPT Key Info]
[FS] [MAC message length]
[FS] [MAC]
[EOM]
[SOM] Q003
[FS] [Message Code]
[FS] [Message]
[EOM]Q003|01|No Data Stored. Nothing to Transmit.|