> 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/services/reader-management-system/documentation/linux-sample-code-manual/rms-mms-sample-code.md).

# RMS MMS Sample Code

## Configuration Update

{% stepper %}
{% step %}
Go to the folder: `rms_mms` and open a terminal.
{% endstep %}

{% step %}
Connect the reader to a USB port.
{% endstep %}

{% step %}
Enter command below. Enter password if prompted. This is for device port access.

```bash
$ sudo ./rms_mms_config_update
```

{% endstep %}

{% step %}
A list of available configurations is returned. List depends on the firmware ID and RMS Profile. Example:

```
Device Serial Number:B568DAF
Main Firmware ID:1000009714-AB3-PCI Response Code:200
ResultCode: 0 Result: Success
Configurations Available: 3
1: Mask4Zero4
2: SCDEEnableNameExpirationDateServiceCode
3: Mask8Asterisk4_DynaFlex
Enter '1'...'3' to update configuration.
To force update configuration, enter '*' before the number ('*1'...'3').
Enter '0' to exit:
```

{% endstep %}

{% step %}
At the prompt, select a configuration by entering its number listed to its left. A sequence of commands are downloaded from RMS and sent to the reader. Status of the configuration is shown as updated or failed and the end of the sequence.

```
Selected Configuration 1 Updating Configuration... Configuration: Mask4Zero4 CommandsToDevice (1)
Name: LeadingUnmaskedCharacters Command:
SENDCOMMAND,AA0081040110D111841BD11181072B06010401F609850101890BE109E2 07E205E103C30104
CommandsToDevice (2)
Name: PANMaskedCharacter
.
.
.
Configuration Mask4Zero4 has been updated.
```

{% endstep %}

{% step %}
Whenever a configuration reports is up to date, it may be redone by entering `*N`, where `N` is the configuration. Example: `*1`
{% endstep %}
{% endstepper %}

## EMV Tags/CAPKs Update

{% stepper %}
{% step %}
Go to the folder: `rms_mms` and open a terminal.
{% endstep %}

{% step %}
Connect the reader to a USB port.
{% endstep %}

{% step %}
Enter command below. Enter password if prompted. This is for device port access.

```bash
$ sudo ./rms_mms_firmware_update
```

{% endstep %}

{% step %}
The parameters for the firmware update is as follows:

```
rms_mms_firmware_update TYPE
    TYPE (type of firmware): MAIN|BOOT1|BLE|WLAN
```

{% endstep %}

{% step %}
Example for updating MAIN firmware.

```bash
$ sudo ./rms_mms_firmware_update MAIN
```

{% endstep %}

{% step %}
If an update is available, the change note for the update is shown. Below that, a confirmation to update is shown. Enter `y` to update.

```
Firmware update is available.
New Firmware: FIRMWARE, DYNAFLEX II GO MAIN APP PCI (COMMON KERNEL),
Version AB3
.
.
.
Do you want to update the MAIN firmware? (y/N)
```

{% endstep %}

{% step %}
A sequence of commands are downloaded from RMS and sent to the reader. Status of the update is shown as finished or failed and the end of the sequence.

```
Updating MAIN firmware...
Beginning DYNAFLEX II GO MAIN APP PCI (COMMON KERNEL)
Updating firmware... [1%]
.
.
.
[100%]
result (0)
Firmware update done.
Saving Firmware Image - Please Wait... Wait for 30000 ms...
Done waiting. Detecting device...
Detecting Device: GetDeviceList Detecting Device: GetDeviceList > 0 Detecting Device: Found USB Device Device detected.
Finished DYNAFLEX II GO MAIN APP PCI (COMMON KERNEL)
```

{% endstep %}
{% endstepper %}


---

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.magtek.com/services/reader-management-system/documentation/linux-sample-code-manual/rms-mms-sample-code.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
