# Appendix A: Troubleshooting

#### Set Date and Time Extended Command 0x030C

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.

<table data-header-hidden><thead><tr><th width="107" valign="top"></th><th width="196" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Offset</td><td valign="top">Field Name</td><td valign="top">Value</td></tr><tr><td valign="top">0</td><td valign="top">Type of MAC</td><td valign="top"><p>MAC algorithm designator</p><p>0x00 = ISO 9797 MAC Algorithm 3, Padding Method 1.</p></td></tr><tr><td valign="top">1..16</td><td valign="top">Device Serial Number</td><td valign="top"><p>16 Bytes Device Serial Number.</p><p>The host can set this field to all zeroes.</p></td></tr><tr><td valign="top">17</td><td valign="top">Month</td><td valign="top">Value from 0x01..0x0C</td></tr><tr><td valign="top">18</td><td valign="top">Day</td><td valign="top">Value from 0x01..0x1F (less depending on month)</td></tr><tr><td valign="top">19</td><td valign="top">Hour</td><td valign="top">Value from 0x00..0x17</td></tr><tr><td valign="top">20</td><td valign="top">Minute</td><td valign="top">Value from 0x00..0x3B</td></tr><tr><td valign="top">21</td><td valign="top">Second</td><td valign="top">Value from 0x00..0x3B</td></tr><tr><td valign="top">22</td><td valign="top">Unused</td><td valign="top">Value from 0x00..0x06</td></tr><tr><td valign="top"><p> </p><p>23</p></td><td valign="top"><p> </p><p>Year</p></td><td valign="top"><p>Value from 0x00 (2008)..0x44 (2076) Example:</p><p>Year 2023 = 15 (0x0F) = 20023 – 2008</p></td></tr><tr><td valign="top">24..27</td><td valign="top">MAC</td><td valign="top">MAC computed over all preceding fields except Type of MAC. The host can set this field to all zeroes.</td></tr></tbody></table>

Example:

For 5:00 PM January 01, 2023 030C001800000000000000000000000000000000000101110000000F

```
NSString *DateTime = 
@“030C001800000000000000000000000000000000000101110000000F”; 
[self.mtSCRALib sendExtendedCommandSync:DateTime];
```

#### Set MSR Head Always On 0x58 <a href="#a.2_set_msr_head_always_on_0x58" id="a.2_set_msr_head_always_on_0x58"></a>

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.

<table data-header-hidden><thead><tr><th width="118.33331298828125" valign="top"></th><th width="142" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Offset</td><td valign="top">Field Name</td><td valign="top">Value</td></tr><tr><td valign="top"><p> </p><p>0</p></td><td valign="top"><p> </p><p>State</p></td><td valign="top"><p>One byte specifying what the state should be: 0x00 = Off When Idle</p><p>0x01 = Always On</p></td></tr></tbody></table>

&#x20;

Result codes: 0x00 = Success

Example Request (Hex):

```
NSString *SetMSRAlwaysOn = @“580101”; 
[self.mtSCRALib sendCommandSync:SetMSRAlwaysOn];
```

```
NSString *SetMSROffWhenIdle = @“580100”; 
[self.mtSCRALib sendCommandSync:SetMSROffWhenIdle];
```


---

# 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/appendix-a-troubleshooting.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.
