> For the complete documentation index, see [llms.txt](https://developer.magtek.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.magtek.com/products/card-readers/magnetic-stripe-readers/idynamo-5-gen-iii/documentation/developers-manuals/programmers-manual-ios/mtscra-functions/mtscra-functions-41-50.md).

# MTSCRA Functions - 41 - 50

#### getTrackDecodeStatus

This function retrieves the track decode status after a cardholder swipes a card.

```
(NSString *) getTrackDecodeStatus
```

Parameters: None&#x20;

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
* “01” = Error or not decodable
* “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.

#### getBatteryLevel <a href="#id-4.42_getbatterylevel" id="id-4.42_getbatterylevel"></a>

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.

```
(long) getBatteryLevel
```

Parameters: None

Return Value: Long value between 0 and 100

#### getDevicePartNumber <a href="#id-4.43_getdevicepartnumber" id="id-4.43_getdevicepartnumber"></a>

This function returns the currently opened device’s part number.

```
(NSString *) getDevicePartNumber
```

Parameters: None

Return Value: String containing the device part number.

#### getCardStatus <a href="#id-4.44_getcardstatus" id="id-4.44_getcardstatus"></a>

Retrieves the Card Status&#x20;

```
(NSString *) getCardStatus 
```

Parameters: None

Return Value: Card Status, which depends on the device.

#### getTagValue \[aDynamo/uDynamo Only]

This function retrieves individual TLV tag values. Only supported on aDynamo/UDynamo.

```
(NSString *) getTagValue:(UInt32)tag
```

Parameters:

Tag = An MTSCRATransactionData type (see section D.5 MTSCRATransactionData).&#x20;

Return Value: String containing the value of the specified tag.

#### getDeviceStatus <a href="#id-4.46_getdevicestatus" id="id-4.46_getdevicestatus"></a>

This function gets the status of the currently connected device.

```
(NSString *) getDeviceStatus
```

Parameters: None

Return Value: Return device status of swipe count and battery level.

#### getOperationStatus <a href="#id-4.47_getoperationstatus" id="id-4.47_getoperationstatus"></a>

This function gets the status of the current operation.

```
(NSString *) getOperationStatus
```

Parameters: None

Return Value: Operation Status

#### getTLVVersion <a href="#id-4.48_gettlvversion" id="id-4.48_gettlvversion"></a>

This function returns the version of the tag-length-value (TLV) format supported by the device.

```
(NSString *) getTLVVersion
```

Parameters: None

Return Value: String containing the firmware TLV version.

#### setDeviceProtocolString \[iDynamo Only] <a href="#id-4.49_setdeviceprotocolstring_-idynamo_on" id="id-4.49_setdeviceprotocolstring_-idynamo_on"></a>

This function sets the protocol string the SDK will use to communicate with the device. See example in

Open Device code example.

```
(void) setDeviceProtocolString:(NSString *)pData
```

Parameters: Protocol String&#x20;

Return Value: None

#### getResponseType <a href="#id-4.50_getresponsetype" id="id-4.50_getresponsetype"></a>

This function gets the response type.&#x20;

```
(NSString *) getResponseType 
```

Parameters: None

Return Value: Response Type


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.magtek.com/products/card-readers/magnetic-stripe-readers/idynamo-5-gen-iii/documentation/developers-manuals/programmers-manual-ios/mtscra-functions/mtscra-functions-41-50.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
