> 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/api-and-command-reference/scra-dynafamily-programmers-manual/commands/device-control-command-group-0x1fnn/extend-session-session-management-only-command-0x1f03.md).

# Extend Session (Session Management Only) - Command 0x1F03

The host can use this command to extend a session for open protocol interfaces, such as the WLAN interface, which require session management to meet PCI requirements.

The sequence of events is as follows:

{% stepper %}
{% step %}

### Session start

The host establishes a session with the device on a given interface. For the WLAN interface, a session starts when the host establishes a TLS websocket connection with the device.
{% endstep %}

{% step %}

### Device session timer

The device starts a countdown timer for a 30 minute session timeout period.
{% endstep %}

{% step %}

### Session expiring notifications

Five minutes before the session timeout period expires, the device starts repeatedly (every minute) sending **Device Information Update - Notification 0x1001** to report **Session Management / Session Expiring Soon**.
{% endstep %}

{% step %}

### Host may extend the session

The host may extend the session multiple times, until the device automatically resets to meet PCI’s 24 hour self-test requirement, by sending any command request using the same interface before the timeout occurs. Upon receiving the command, the device resets the session countdown timer to 30 minutes. This helps prevent the session from expiring while the host is actively using the device, including when the device is performing a transaction.

If the host wants to extend the session but does not need to send another command, it may follow these steps at any time during the session:

{% stepper %}
{% step %}

### Construct command request

The host constructs the command request in the format below.
{% endstep %}

{% step %}

### Send command request

The host sends the command request to the device.
{% endstep %}

{% step %}

### Device responds

The device sends a response in the format below to the host.
{% endstep %}

{% step %}

### Timer reset

The device resets the session countdown timer to 30 minutes.
{% endstep %}
{% endstepper %}
{% endstep %}

{% step %}

### Session expiration

When the session expires, the device closes the websocket connection.
{% endstep %}
{% endstepper %}

For the WLAN interface, if the device is configured to allow connections to more than one client at the same time with **Maximum Client Connections - Property 1.2.2.1.1.A** and more than one client is connected, then the following applies. There is always only a single session and it applies to all clients. There is not a separate session for each client. The session starts when the first client connects. Only one client needs to send a command on its connection to extend the session. The other clients do not need to send any commands. When the session expires, all clients will be disconnected.

## Table ESSM-1 - Extend Session (Session Management Only) - Request Data for Command 0x1F03

<table><thead><tr><th>Tag</th><th width="72">Len</th><th width="125.66668701171875">Value / Description</th><th width="75">Typ</th><th width="75.66668701171875">Req</th><th width="99.3333740234375">Default</th></tr></thead><tbody><tr><td>Beginning of any wrappers, at minimum including <strong>Request Message</strong> </td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>1F03 = <strong>Extend Session (Session Management Only) - Command 0x1F03</strong></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>End of any wrappers, at minimum including <strong>Request Message</strong></td><td></td><td></td><td></td><td></td><td></td></tr></tbody></table>

## Table ESSM-2 - Extend Session (Session Management Only) - Response Data for Command 0x1F03&#x20;

<table><thead><tr><th>Tag</th><th width="73.33331298828125">Len</th><th width="122.33331298828125">Value / Description</th><th width="72.66668701171875">Typ</th><th width="74.6666259765625">Req</th><th width="97.333251953125">Default</th></tr></thead><tbody><tr><td>Beginning of any wrappers, at minimum including <strong>Response Message</strong></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>1F03 = <strong>Extend Session (Session Management Only) - Command 0x1F03</strong></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>No parameters.</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>End of any wrappers, at minimum including <strong>Response Message</strong> </td><td></td><td></td><td></td><td></td><td></td></tr></tbody></table>

## Table ESSM-3 - Request Example

{% code title="Request (Hex)" %}

```
AA00 810401551F03 8402 1F03
```

{% endcode %}

## Table ESSM-4 - Response Example

{% code title="Response (Hex)" %}

```
AA00 810482551F03 820400000000 8402 1F03
```

{% endcode %}


---

# 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 dynamically by asking a question.

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

```
GET https://developer.magtek.com/api-and-command-reference/scra-dynafamily-programmers-manual/commands/device-control-command-group-0x1fnn/extend-session-session-management-only-command-0x1f03.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
