> 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/hardware/card-readers/mms-dyna-devices/dynaflex-ii-go/documents/user-manuals/web-hid-mqtt-wss-demo-app-user-guide/essential-configuration-connecting-your-device.md).

# Essential Configuration: Connecting Your Device

For devices using MQTT or WebSocket (WSS), configuring your host application and provisioning the device itself is mandatory to establish a successful secure connection. If connecting via USB HID, all steps listed in section 2 can be skipped.

Before using MQTT or WebSocket (WSS), configuration is required. From the Demo Application Home Page, select Misc. → Configuration for the Demos.

<figure><img src="/files/kSIxNKtsDznF57hGYHQf" alt=""><figcaption></figcaption></figure>

<p align="center"><strong>Figure 2 - Miscellaneous Configuration and Documentation Pages</strong></p>

### Configuring the Demo and Provisioning Your Device

#### Step 1: Configure Host Application Settings

Configure the Demo Application by supplying the necessary API keys and server addresses.

* From the Home Page, select Misc. → Configuration for the Demos.
* Enter and save the required settings.
  * RMS Options: Enter the Magensa API key and service URL
  * WebSocket Options: Provide the WebSocket server address.
  * MQTT Options: Specify the Org Node, broker address, client ID, and user credentials.
  * Contactless Options: Adjust timing parameters for NFC operations.

{% hint style="info" %}
**Note:** Configuration values must be entered and saved prior to establishing a secure session. Connection attempts without proper configuration will fail.
{% endhint %}

#### &#x20;Step 2: Provision Device for MQTT

The separate MQTT Configuration page is used to provision your physical device with its Wi-Fi credentials and MQTT broker details.

* Connect your device via USB HID.
* Open the MQTT Configuration demo page.
* Select Open to connect to your device.
* Use the Wi-Fi Settings section to enter the device's SSID Name and SSID Password.
* Use the MQTT Credentials section to enter the MQTT User, Password, and Org Node.
* Select Save Config.
* The device will record these settings, allowing it to connect to your broker over the network.

{% hint style="info" %}
**Note:** Configuration values must be entered and saved prior to establishing a secure session. Connection attempts without proper configuration will fail.
{% endhint %}

### Use the WebHID Demo to Connect Your Device via WebSocket <a href="#bookmark8" id="bookmark8"></a>

* Connect the host PC to the same wireless network that your DynaFlex II PED device will be connected to.
* Open this page using a Chromium Browser <https://rms.magensa.net/TEST/demo/index.html>
* Plug in the device via USB cable
* Click Misc and click WSS Certificate and Trust Config

<figure><img src="/files/BzhbTwV8p42jlJbJOIE3" alt=""><figcaption></figcaption></figure>

* Click Open button

<figure><img src="/files/NlHeu8rQK0eAQKw8RWun" alt=""><figcaption></figcaption></figure>

* Select DynaFlex II PED and Click Connect.

<figure><img src="/files/087UzPmDfnuZf9Y3YXtU" alt=""><figcaption></figcaption></figure>

* Enter Wireless Network SSID and password, then click Set SSID

<figure><img src="/files/cdvbOxTVXrk48WB8tLWn" alt=""><figcaption></figcaption></figure>

* If you want to connect via non-secure TLS connection, press Load NoTLS Trust, and press Reset Device

<figure><img src="/files/4w3Px5g6ASng02pZdnse" alt=""><figcaption></figcaption></figure>

* If you want to configure via secure TLS, press Load TLS Trust, then press Get & Sign CSR, then Press Reset Device

<figure><img src="/files/FNqG1TgYsbeDjW53LgAj" alt=""><figcaption></figcaption></figure>

* By clicking on the MAGTEK Logo on the top of the page, go back to the Miscm Menu and press Configuration for the Demos option

<figure><img src="/files/MGUwcjIsB5f53efzbXR8" alt=""><figcaption></figcaption></figure>

* Enter device host name under WebSocket Options, for Non-secure TLS, just put ws\://device-hostname, for TLS secure connections, enter wss\://device-hostname (example wss\://df-1234567)

{% hint style="info" %}
**NOTE:** The device hostname must be resolvable to an address using either DNS name resolution or creating a host file entry.  See section below providing some options on resolvable DNS name.
{% endhint %}

<figure><img src="/files/ZwYnkkEpBbmCVrOPHpqU" alt=""><figcaption></figcaption></figure>

* Click Save

<figure><img src="/files/lspCDA6mrvr9Niz0TOAi" alt=""><figcaption></figcaption></figure>

* Go back to home page and press MMS Devices for EMV, NFC, BCR and PIN, then press WSS Device Demo

<figure><img src="/files/HmyQYAUGpyoVmUBJzXSS" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/tqO1EzWLG9R81mWYqKrX" alt=""><figcaption></figcaption></figure>

* Allow other devices on your local network

<figure><img src="/files/aOcxwReWJ46xZQ1Ydf0P" alt=""><figcaption></figcaption></figure>

* Click on Open which will all open the connection to the device:

<figure><img src="/files/bdZgbN1ftOsYeVYhdndm" alt=""><figcaption></figcaption></figure>

* The terminal should display a green dot indicating successful connection:

<figure><img src="/files/hpAp3iWUnymbLeE7ZFjQ" alt=""><figcaption></figcaption></figure>


---

# 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/hardware/card-readers/mms-dyna-devices/dynaflex-ii-go/documents/user-manuals/web-hid-mqtt-wss-demo-app-user-guide/essential-configuration-connecting-your-device.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.
