# MTSCRA Function - 4.51 - 4.60

#### 4.51 getBluetoothRSSI

This function will return the signal strength of Bluetooth LE devices.

```
(int)getBluetoothRSSI;
```

#### 4.52 setUUIDString \[DynaMAX/eDynamo Only] <a href="#id-4.52_setuuidstring_-dynamax-edynamo_only" id="id-4.52_setuuidstring_-dynamax-edynamo_only"></a>

This function sets the UUIDString for the Bluetooth LE connection.&#x20;

```
(void) setUUIDString:(NSString *)uuidString 
```

Parameters: UUID String of the device

Return Value: None&#x20;

#### 4.53 getConnectedPeripheral \[DynaMAX/eDynamo Only] <a href="#id-4.53_getconnectedperipheral_-dynamax-edy" id="id-4.53_getconnectedperipheral_-dynamax-edy"></a>

This function gets the current connected peripheral (device).

```
(NSString *) getConnectedPeripheral
```

Parameters: None

Return value: Current connected device

#### 4.54 getDiscoveredPeripherals \[DynaMAX/eDynamo Only] <a href="#id-4.54_getdiscoveredperipherals_-dynamax-e" id="id-4.54_getdiscoveredperipherals_-dynamax-e"></a>

This function gets an array of DynaMAX/eDynamo devices connected to the host.

```
(NSMutableArray *) getDiscoveredPeripherals
```

Parameters: None

Return Value: Array of DynaMAX/eDynamo devices.

#### 4.55 startTransaction (EMV Device Only) <a href="#id-4.55_starttransaction_-emv_device_only" id="id-4.55_starttransaction_-emv_device_only"></a>

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.&#x20;

* 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.&#x20;
* 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:&#x20;

(Byte)timeLimit cardType:

(Byte)cardType option:

(Byte)option amount:

(Byte\*)amount transactionType:

(Byte)transactionType cashBack:

(Byte\*)cashBack currencyCode:

(Byte\*)currencyCode reportingOption:

(Byte)reportingOption

Parameters:

<table data-header-hidden><thead><tr><th width="118.54547119140625" 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"><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p>timeLimit</p></td><td valign="top"><p>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.</p><p> </p><p>Values:</p><p>0 = no timeout, infinite. To cancel before a payment method is presented, use cancelTransaction().</p><p>(1 to 255) seconds. Use 255 for the longest time limit for devices that do not support 0.</p><p> </p><p>Device                         Time Limit</p><p>=========                =========</p><p>DynaMAX                   n/a</p><p>aDynamo                     n/a</p><p>cDynamo                     n/a</p><p>iDynamo 5/(GENII)      n/a sDynamo                      n/a</p><p>uDynamo                     n/a</p><p>eDynamo                     1 to 255</p><p>iDynamo 6                   0 to 255</p><p>kDynamo                     1 to 255</p><p>tDynamo                      0 to 255</p></td></tr><tr><td valign="top"><p> </p><p> </p><p> </p><p> </p><p> </p><p>cardType</p></td><td valign="top"><p>Card Type to Read:</p><p>0x01 = Magnetic Stripe (as alternative to EMV L2, card swipe causes abort of EMV L2)</p><p>0x02 = Contact chip card</p><p>0x03 = Magnetic Stripe and Contact chip Card. 0x04 = Contactless chip card</p><p>0x05 = Magnetic Stripe and Contactless chip card. 0x06 = Contact chip card and Contactless chip card.</p><p>0x07 = Magnetic Stripe, Contact chip card, Contactless chip card.</p><p>Refer to Appendix C for supported devices.</p></td></tr></tbody></table>

<table data-header-hidden><thead><tr><th width="150.3636474609375" 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"><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p>option</p></td><td valign="top"><p>0x00 = Normal 0x01 = Bypass PIN 0x02 = Force Online</p><p>0x04 = Acquirer not available (Note: prevents long timeout on waiting for host approval) (causes “decline” to be generated internally if ARQC is generated)</p><p> </p><p>To use Quick Chip mode, set the most significant bit to ‘1’.</p><p>0x80 = Quick Chip, Normal 0x81 = Quick Chip, Bypass PIN 0x82 = Quick Chip, Force Online</p><p> </p><p>Refer to Appendix C for supported devices.</p></td></tr><tr><td valign="top">amount</td><td valign="top">Amount Authorized (EMV Tag 9F02, format n12, 6 bytes) in hex string For example: “000000000999”, means 9.99 dollars.</td></tr><tr><td valign="top"><p> </p><p> </p><p> </p><p> </p><p>transactionType</p></td><td valign="top"><p>Valid values:</p><p>0x00 = Purchase (listed as “Payment” on ICS)</p><p>0x01 = Cash Advance (not supported for this reader)</p><p>0x02 or 0x09 = Cash back (0x09 only supported when using contactless) 0x04 = Goods (Purchase)</p><p>0x08 = Services (Purchase)</p><p>0x10 = International Goods (Purchase) 0x20 = Refund</p><p>0x40 = International Cash Advance or Cash Back 0x80 = Domestic Cash Advance or Cash Back</p></td></tr><tr><td valign="top"><p> </p><p>cashBack</p></td><td valign="top"><p>Cash back Amount (if non-zero, EMV Tag 9F03, format n12, 6 bytes) in hex string.</p><p>For example: “000000001000”, means 10.00 dollars.</p></td></tr><tr><td valign="top"><p> </p><p> </p><p>currencyCode</p></td><td valign="top"><p>Transaction Currency Code (EMV Tag 5F2A, format n4, 2 bytes) Sample Valid values:</p><p>0x0840 – US Dollar 0x0978 – Euro 0x0826 – UK Pound</p></td></tr><tr><td valign="top"><p> </p><p> </p><p> </p><p>reportingOption</p></td><td valign="top"><p>This single byte field indicates the level of Transaction Status notifications the host desires to receive during the course of this transaction.</p><p>0x00 = Termination Status only (normal termination, card error, timeout, host cancel)</p><p>0x01 = Major Status changes (terminations plus card insertions and waiting on user)</p><p>0x02 = All Status changes (documents the entire transaction flow)</p></td></tr></tbody></table>

Return Value:

* 0 = Success
* 9 = Error
* 15 = Busy

#### 4.56 setUserSelectionResult (EMV Only) <a href="#id-4.56_setuserselectionresult_-emv_only" id="id-4.56_setuserselectionresult_-emv_only"></a>

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.

```
(int) setUserSelectionResult:(Byte)status selection:(Byte)selection;
```

Parameters:

<table data-header-hidden><thead><tr><th width="141.27276611328125" 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"><p> </p><p>status</p></td><td valign="top"><p>Indicates the status of User Selection:</p><p>0x00 – User Selection Request completed, see Selection Result 0x01 – User Selection Request aborted, cancelled by user</p><p>0x02 – User Selection Request aborted, timeout</p></td></tr><tr><td valign="top">selection</td><td valign="top">Indicates the menu item selected by the user. This is a single byte zero based binary value.</td></tr></tbody></table>

Return Value:

* 0 = Success
* 9 = Error
* 15 = Busy

#### 4.57 cancelTransaction <a href="#id-4.57_canceltransaction" id="id-4.57_canceltransaction"></a>

This function cancels a transaction while waiting for the user to insert a card.

```
(int) cancelTransaction
```

Return Value:

* 0 = Success&#x20;
* 9 = Error
* 15 = Busy

The library returns the status of this function in the delegate method onEMVCommandResult (EMV Device Only).

Parameters:

<table data-header-hidden><thead><tr><th 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"><p> </p><p>status</p></td><td valign="top"><p>Result codes:</p><p>0x0000 = Success, the transaction was cancelled 0x038D = Failure, no transaction currently in progress</p><p>0x038F = Failure, transaction in progress, card already inserted</p></td></tr></tbody></table>

#### 4.58 setAcquirerResponse (EMV Device Only) <a href="#id-4.58_setacquirerresponse_-emv_device_onl" id="id-4.58_setacquirerresponse_-emv_device_onl"></a>

This function informs EMV device to process transaction decision from acquirer.

```
(int) setAcquirerResponse:(Byte*)response length:(int)length
```

Parameters:

<table data-header-hidden><thead><tr><th 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"><p> </p><p>response</p></td><td valign="top">Hex string for the response data following TLV response message. For details about the ARQC format, see the <em>Programmer's Manual (COMMANDS)</em> for the specific device with which you are communicating.</td></tr><tr><td valign="top">length</td><td valign="top">Two byte binary, most significant byte first. This gives the total length of the Acquirer Response message that follows.</td></tr></tbody></table>

Return Value:

* 0 = Success
* 9 = Error
* 15 = Busy

#### 4.59 sendExtendedCommand (EMV Device and iDynamo 5 Gen III Only) <a href="#id-4.59_sendextendedcommand_-emv_device_and" id="id-4.59_sendextendedcommand_-emv_device_and"></a>

Send extended command to device. Command response is returned in the event message onDeviceExtendedResponseReceived.

```
(int) sendExtendedCommand:(NSString *)Command
```

Parameters:

<table data-header-hidden><thead><tr><th 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"><p> </p><p>Command</p></td><td valign="top">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.</td></tr></tbody></table>

Return Value:&#x20;

* 0 = Success
* 9 = Error
* 15 = Busy

#### 4.60 sendCommandSync <a href="#id-4.60_sendcommandsync" id="id-4.60_sendcommandsync"></a>

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

```
(NSString) sendCommandSync:(NSString *)Command
```

Parameters:

<table data-header-hidden><thead><tr><th 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">Command</td><td valign="top">Hexadecimal string of the byte array for the command.</td></tr></tbody></table>

Return Value: String containing the response data of the command.


---

# 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/secure-card-reader-authenticators-sdk-programmers-manual-ios/mtscra-functions/mtscra-function-4.51-4.60.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.
