# MTSCRA Delegate Methods 1-10

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.

#### trackDataReadyNotification <a href="#id-5.1_trackdatareadynotification" id="id-5.1_trackdatareadynotification"></a>

The SDK sends this notification when card data is available from the device.

#### &#x20;devConnectionNotification <a href="#id-5.2_devconnectionnotification" id="id-5.2_devconnectionnotification"></a>

The SDK sends this notification when the connection status of the device changes.

#### onDataReceived <a href="#id-5.3_ondatareceived" id="id-5.3_ondatareceived"></a>

Return a card object type with card swipe data.

<table data-header-hidden><thead><tr><th width="150.66668701171875" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Parameter</td><td valign="top">Description</td></tr><tr><td valign="top">cardDataObj</td><td valign="top">MTCardData object</td></tr><tr><td valign="top">instance</td><td valign="top">Instance ID</td></tr></tbody></table>

#### cardSwipeDidStart <a href="#id-5.4_cardswipedidstart" id="id-5.4_cardswipedidstart"></a>

Card swipe has started.

<table data-header-hidden><thead><tr><th width="154" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Parameter</td><td valign="top">Description</td></tr><tr><td valign="top">instance</td><td valign="top">Instance ID</td></tr></tbody></table>

#### cardSwipeDidGetTransError <a href="#id-5.5_cardswipedidgettranserror" id="id-5.5_cardswipedidgettranserror"></a>

Card swipe got an error during transmission.

#### onDeviceConnectionDidChange <a href="#id-5.6_ondeviceconnectiondidchange" id="id-5.6_ondeviceconnectiondidchange"></a>

Device connection changed whether from close to open or vice versa.

<table data-header-hidden><thead><tr><th width="159.3333740234375" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Parameter</td><td valign="top">Description</td></tr><tr><td valign="top">deviceType</td><td valign="top">MTSCRADeviceType object</td></tr><tr><td valign="top"><p> </p><p>connected</p></td><td valign="top"><p>Boolean for connection state. True = Connected</p><p>False = Not connected</p></td></tr><tr><td valign="top">instance</td><td valign="top">Instance ID</td></tr></tbody></table>

#### bleReaderConnected <a href="#id-5.7_blereaderconnected" id="id-5.7_blereaderconnected"></a>

Bluetooth LE Reader was connected.

<table data-header-hidden><thead><tr><th width="152" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Parameter</td><td valign="top">Description</td></tr><tr><td valign="top">peripheral</td><td valign="top">CBPeripheral object</td></tr></tbody></table>

#### bleReaderDidDisconnected <a href="#id-5.8_blereaderdiddisconnected" id="id-5.8_blereaderdiddisconnected"></a>

Bluetooth LE Reader was disconnected.

<table data-header-hidden><thead><tr><th width="160" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Parameter</td><td valign="top">Description</td></tr><tr><td valign="top">connectionInfo</td><td valign="top">MTConnectionInfo object</td></tr></tbody></table>

#### bleReaderDidDiscoverPeripheral <a href="#id-5.9_blereaderdiddiscoverperipheral" id="id-5.9_blereaderdiddiscoverperipheral"></a>

Bluetooth LE Reader was discovered.

#### bleReaderStateUpdated <a href="#id-5.10_blereaderstateupdated" id="id-5.10_blereaderstateupdated"></a>

Bluetooth LE state changed. Enumerated possible values that would arrive via this delegate are:

<table data-header-hidden><thead><tr><th width="147.33331298828125" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Parameter</td><td valign="top">Description</td></tr><tr><td valign="top">state</td><td valign="top">MTSCRABLEState</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.magtek.com/hardware/card-readers/magnetic-stripe-readers/idynamo-5-gen-iii/documentation/developers-manuals/programmers-manual-ios/mtscra-delegate-methods/mtscra-delegate-methods-1-10.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
