• MC40 - product discontinued since March 21, 2019; support discontinued since March 31, 2022
• TC70 / TC75 - product discontinued since February 28, 2020; support discontinues on May 1, 2025
Overview
Magnetic Stripe Reader (MSR) Input is used to acquire data from a "mag-stripe" card such as a credit or debit card. The information stored on the black magnetic strip is transferred to the device when the card is "swiped" through the MSR. Information is encoded in an open format using the ANSI x4.16 standard and usually relates to the carrier's identity and/or financial institution. DataWedge can acquire and output the raw data from most cards that use the ANSI x4.16 format. For cards that also adhere to ISO/ABA specifications published by the ISO and American Bankers Association, developers can opt to enable Zebra encryption, which protects data immediately upon acquisition and at all times thereafter. Once enabled on a Zebra device, encryption cannot be disabled.
Under the ANSI magnetic stripe standard, data is stored on the card in three tracks. Unencrypted data can be acquired from any of the individual tracks or from all three at once. The same is true of data encrypted using Zebra's Enhanced Mode encryption. Zebra Original Mode encryption treats all three tracks as a single entity.
The three modes of MSR card encoding, two of which include encryption
Enabling Encryption
Enabling encryption on a device cannot be undone. Once a device has been configured to encrypt ISO/ABA data, it can never again be configured to output raw ISO/ABA data; switching between Original and Enhanced encryption modes is the only permitted change on such devices. Encryption applies only to ISO/ABA data; all other MSR-acquired data is output in unencrypted form using Non-ISO Mode.
To learn how to enable encryption and work with encrypted data, refer to the ID TECH SecureHead User Manual.
Compatible Zebra Devices
The following Zebra devices can use DataWedge to acquire (and optionally encrypt) MSR data:
- MC40 with MSR (model# MC40N0-SLK3RM1)
- TC70/TC75 with MSR snap-on module (part# MSR-TC7X-SNP1-01)
See all MC40 configuration options (.pdf).
MSR Input
To enable DataWedge to accept MSR input:
Check the "Enabled" box in the MSR Input section of the desired Profile(s):
MSR input enabled in the "DWDemo" Profile
Note: DataWedge also provides beep sounds and other feedback to indicate scanning results. See the Scan Params section for more information.
MSR Output
DataWedge outputs MSR data only through intents. This is true whether acquired data is open or encrypted. It is therefore necessary for the receiving application to be capable of accepting and processing data from an intent bundle. To help simplify the use of MSR data for application developers, DataWedge automatically parses acquired data, formats it for specific uses, and places the modified data into specific tags. For example, the code for printing a receipt might make use of one of the "Masked Data (ASCII)" tags, which displays all but the last four digits of the credit card number as asterisks.
For modifying the acquired data, DataWedge offers only the formatting options shown in the sections below. Options for formatting data beyond those shown can be found in the ID TECH SecureHead User Manual. Custom data formatting is the sole responsibility of the developer.
To get MSR data:
Intent.getStringtExtra()
The method call above returns all data readable from the card. The table below lists the data fields contained in the tag.
Non-ISO Mode
Non-ISO Mode is the default mode on any device on which encryption is not enabled. This mode outputs the data without encryption exactly as read form the card. Its three status tags (in the Mapping table below) indicate the presence of data in each of the corresponding tracks on the card.
On devices with encryption enabled, Non-ISO Mode is invoked only when reading a card that is not ISO/ABA compliant; data from such cards is otherwise encrypted using Original or Enhanced Mode and can never be configured otherwise.
MSR data from all three tracks is contained in the tag: com.symbol.datawedge.msr_data
Non-ISO Field-to-Tag Mapping
Card Data Field |
Maps to DataWedge Tag |
Track 1 Status | com.symbol.datawedge.msr_track1_status |
Track 2 Status | com.symbol.datawedge.msr_track2_status |
Track 3 Status | com.symbol.datawedge.msr_track3_status |
All MSR Data (see Fields Table, below) | com.symbol.datawedge.msr_data |
Non-ISO Fields
Field Number |
Description | Notes |
1 | STX |
|
2 | Length |
|
3 | Card Encoding Type |
|
4 | Track 1-3 Status |
|
5 | Track 1 Unencrypted Length | 0 = "No track 1 data present" |
6 | Track 2 Unencrypted Length | (always present) |
7 | Track 3 Unencrypted Length | 0 = "No track 3 data present" |
8 | Track 1 Data | (if present) |
9 | Track 2 Data | (always present) |
10 | Track 3 Data | (if present) |
11 | LRC |
|
12 | Checksum |
|
13 | ETX |
|
|
Enhanced Mode
Zebra Enhanced Mode encrypts data on each track separately, enabling data to from each track to be handled separately, if desired. Tags for obtaining the data are shown below.
MSR data from all three tracks is contained in the tag: com.symbol.datawedge.msr_data
The tag above returns all data readable from the card. The table below lists the data fields contained in the tag.
Enhanced Mode Field-to-Tag Mapping
Card Data Field | Maps to DataWedge Tag |
Track 1 Status | com.symbol.datawedge.msr_track1_status |
Track 2 Status | com.symbol.datawedge.msr_track2_status |
Track 3 Status | com.symbol.datawedge.msr_track3_status |
Track 1 Encrypted data present | com.symbol.datawedge.msr_track1_encrypted_status |
Track 2 Encrypted data present | com.symbol.datawedge.msr_track2_encrypted_status |
Track 3 Encrypted data present | com.symbol.datawedge.msr_track3_encrypted_status |
Track 1 Masked Data (ASCII) | com.symbol.datawedge.msr_track1 |
Track 2 Masked Data (ASCII) | com.symbol.datawedge.msr_track2 |
Track 3 Masked Data (ASCII) | com.symbol.datawedge.msr_track3 |
All MSR Data (see Field table for details) | com.symbol.datawedge.msr_data |
Track 1 Encrypted Data (HEX) | com.symbol.datawedge.msr_track1_encrypted |
Track 2 Encrypted Data (HEX) | com.symbol.datawedge.msr_track2_encrypted |
Track 3 Encrypted Data (HEX) | com.symbol.datawedge.msr_track3_encrypted |
Track 1 Hashed | com.symbol.datawedge.msr_track1_hashed |
Track 2 Hashed | com.symbol.datawedge.msr_track2_hashed |
Track 3 Hashed | com.symbol.datawedge.msr_track3_hashed |
DUKPT Serial Number (KSN) | com.symbol.datawedge.msr_ksn |
Enhanced Mode Fields
Field Number | Description | Notes |
1 | STX |
|
2 | Length |
|
3 | Card Encoding Type |
|
4 | Track 1-3 Status |
|
5 | Track 1 Unencrypted Length | 0 = "No track 1 data present" |
6 | Track 2 Unencrypted Length | (always present) |
7 | Track 3 Unencrypted Length | 0 = "No track 3 data present" |
8 | Clear/Masked Data Sent Status |
|
9 | Encrypted/Hashed Data Sent Status |
|
10 | Track 1 Masked | (if present) |
11 | Track 2 Masked | (always present) |
12 | Track 3 Masked | (if present) |
13 | Track 1 Encrypted | (if present) |
14 | Track 2 Encrypted | (always present) |
15 | Track 3 Encrypted | (if present) |
16 | Track 1 Hashed | (if present) |
17 | Track 2 Hashed | (always present) |
18 | Track 3 Hashed | (if present) |
19 | KSN (DUKPT Serial Number) |
|
20 | LRC |
|
21 | Checksum |
|
22 | ETX |
|
Original Mode
Zebra Original Mode encrypts data on the three tracks as a single entity, preventing track data from be handled separately except as contained in the tags described below, which Zebra created as a convenience according to the most common use cases. All readable data from all three tracks on the card is placed in the tag com.symbol.datawedge.msr_data
and can be parsed as desired by the developer.
The table below lists the data fields contained in the tag.
Original Mode Field-to-Tag Mapping
Card Data Field | Maps to DataWedge Tag |
Track 1 Status | com.symbol.datawedge.msr_track1_status |
Track 2 Status | com.symbol.datawedge.msr_track2_status |
Track 3 Status | com.symbol.datawedge.msr_track3_status |
Track 1 Masked Data (ASCII) | com.symbol.datawedge.msr_track1 |
Track 2 Masked Data (ASCII) | com.symbol.datawedge.msr_track2 |
Track 3 Masked Data (ASCII) | com.symbol.datawedge.msr_track3 |
All MSR Data (see Field table for details) | com.symbol.datawedge.msr_data |
Track 1 Encrypted Data (HEX) | com.symbol.datawedge.msr_track1_encrypted |
Track 2 Encrypted Data (HEX) | com.symbol.datawedge.msr_track2_encrypted |
Track 3 Encrypted Data (HEX) | com.symbol.datawedge.msr_track3_encrypted |
Track 1 Hashed | com.symbol.datawedge.msr_track1_hashed |
Track 2 Hashed | com.symbol.datawedge.msr_track2_hashed |
Track 3 Hashed | com.symbol.datawedge.msr_track3_hashed |
DUKPT Serial Number (KSN) | com.symbol.datawedge.msr_ksn |
Original Mode Fields
Field Number | Description | Notes |
1 | STX |
|
2 | Length |
|
3 | Card Encoding Type |
|
4 | Track 1-3 Status |
|
5 | Track 1 Unencrypted Length | 0 = "No track 1 data present" |
6 | Track 2 Unencrypted Length | (always present) |
7 | Track 3 Unencrypted Length | 0 = "No track 3 data present" |
8 | Track 1 Masked | (if present) |
9 | Track 2 Masked | (always present) |
10 | Track 3 Data | (if present) |
11 | Encrypted Data | Track 1 and Track 3 included only if present |
12 | Track 1 Hashed | (if present) |
13 | Track 2 Hashed | (always present) |
14 | KSN (DUKPT Serial Number) |
|
15 | LRC |
|
16 | Checksum |
|
17 | ETX |
|
|
Configuration
Programmatically configure MSR and retrieve the configuration:
Related guides:
- DataWedge Profiles - guides for all DataWedge input, processing and output options
- DataWedge APIs - usage specifications for all DataWedge-supported intents
- ID TECH SecureHead User Manual - Tech specs of the ID TECH read head used in Zebra MSR devices
- ANSI x9.24-2016 - Encryption key (DUKPT) specifications