From 1342ec3bb2063ebe390f5f65dfe15ae5eaf425ec Mon Sep 17 00:00:00 2001 From: mendix-nleimer <93211773+mendix-nleimer@users.noreply.github.com> Date: Tue, 4 Nov 2025 12:08:39 +0100 Subject: [PATCH 1/6] Example test for file device --- content/en/docs/workstation/wks-message-syntax.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/content/en/docs/workstation/wks-message-syntax.md b/content/en/docs/workstation/wks-message-syntax.md index 7429ec8a341..1efdab43b68 100644 --- a/content/en/docs/workstation/wks-message-syntax.md +++ b/content/en/docs/workstation/wks-message-syntax.md @@ -44,6 +44,19 @@ This device type requires the following message and response: * `E#Error` - `Error` message from operating system * `S#{0,1,2,3}#directory` - The command `{0,1,2,3}` on `directory` was successful. +### Example Test + +1. Create a new Workspace in the Workstation Management. +2. Create a new Station. +3. Add a `File Device` with the following configuration to this Station: + * "Device Name": `Write files to test folder` + * "Allowed Folder": `C:\MyTestFolder` (assuming test on a Windows computer) + * "Allow reading files": `Yes` + * "Allow writing files": `Yes` +4. Register the Station to your computer (assumping the Workstation Client is installed). +5. In your Workspace, navigate to **Test Your Station** and click on the configured file device. +6. Enter `3#test.txt#Hello from Mendix` in the "Send Message" field and press **Send Message**. It should show a response `S#3#C:\MyTestFolder\test.txt` to indicate that the text file `test.txt` was succesfully written to `MyTestFolder`. Go to `C:\MyTestFolder`. It should contain the text file. Open the file. It should contain `Hello from Mendix`. + ## Smart Cards This device type requires the following message and response: From 9ae93b1592c700006506c72c26b3b292fcca8b98 Mon Sep 17 00:00:00 2001 From: mendix-nleimer <93211773+mendix-nleimer@users.noreply.github.com> Date: Tue, 4 Nov 2025 12:21:22 +0100 Subject: [PATCH 2/6] Changing title of Message Syntax page for better clarity Changing to "Device syntax" so it's clear from the nav that this is where people find more information about devices (not just any messages) --- content/en/docs/workstation/wks-message-syntax.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/en/docs/workstation/wks-message-syntax.md b/content/en/docs/workstation/wks-message-syntax.md index 1efdab43b68..598efe79c2f 100644 --- a/content/en/docs/workstation/wks-message-syntax.md +++ b/content/en/docs/workstation/wks-message-syntax.md @@ -1,7 +1,7 @@ --- title: "Message Syntax for File, Smart Card, and Bluetooth Devices" -linktitle: "Message Syntax" -url: /mendix-workstation/message-syntax/ +linktitle: "Device Syntax" +url: /mendix-workstation/device-syntax/ description: "Provides information about the message syntax required for different device types." weight: 40 --- From a73b7b3c9bfab6752c92b2fe2002bfc5b8d118f7 Mon Sep 17 00:00:00 2001 From: mendix-nleimer <93211773+mendix-nleimer@users.noreply.github.com> Date: Tue, 4 Nov 2025 12:36:11 +0100 Subject: [PATCH 3/6] Removing wrong spaces from file message syntax --- content/en/docs/workstation/wks-message-syntax.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/en/docs/workstation/wks-message-syntax.md b/content/en/docs/workstation/wks-message-syntax.md index 598efe79c2f..05d78bbf1d9 100644 --- a/content/en/docs/workstation/wks-message-syntax.md +++ b/content/en/docs/workstation/wks-message-syntax.md @@ -31,10 +31,10 @@ This device type requires the following message and response:   ### Message -* `0# Directory` - Watch for changes in `Directory`. If `Directory` is a file path, then watch for changes in the file. `Directory` is relative to the folder configured in Workspace management. Environment variables (for example, `%public%`) are supported. -* `1# Directory` - Stop watching for changes in `Directory`.   -* `2# File path` - Read file at `File path`. -* `3# File path # Data # flag` - Write to file at `File path`. The `flag` can be `w` for overwrite, `a` for append If left blank, the value defaults to `w`. +* `0#Directory` - Watch for changes in `Directory`. If `Directory` is a file path, then watch for changes in the file. `Directory` is relative to the folder configured in Workspace management. Environment variables (for example, `%public%`) are supported. +* `1#Directory` - Stop watching for changes in `Directory`.   +* `2#File path` - Read file at `File path`. +* `3#File path#Data#flag` - Write to file at `File path`. The `flag` can be `w` for overwrite, `a` for append If left blank, the value defaults to `w`. ### Response From 2dc90ed557514966140757e4abb4513e1d70d3df Mon Sep 17 00:00:00 2001 From: mendix-nleimer <93211773+mendix-nleimer@users.noreply.github.com> Date: Tue, 4 Nov 2025 12:43:12 +0100 Subject: [PATCH 4/6] Updating device cfg for test example --- content/en/docs/workstation/wks-message-syntax.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/workstation/wks-message-syntax.md b/content/en/docs/workstation/wks-message-syntax.md index 05d78bbf1d9..9e1e0bb0d41 100644 --- a/content/en/docs/workstation/wks-message-syntax.md +++ b/content/en/docs/workstation/wks-message-syntax.md @@ -51,8 +51,8 @@ This device type requires the following message and response: 3. Add a `File Device` with the following configuration to this Station: * "Device Name": `Write files to test folder` * "Allowed Folder": `C:\MyTestFolder` (assuming test on a Windows computer) - * "Allow reading files": `Yes` * "Allow writing files": `Yes` + * Use the default values for everything else 4. Register the Station to your computer (assumping the Workstation Client is installed). 5. In your Workspace, navigate to **Test Your Station** and click on the configured file device. 6. Enter `3#test.txt#Hello from Mendix` in the "Send Message" field and press **Send Message**. It should show a response `S#3#C:\MyTestFolder\test.txt` to indicate that the text file `test.txt` was succesfully written to `MyTestFolder`. Go to `C:\MyTestFolder`. It should contain the text file. Open the file. It should contain `Hello from Mendix`. From e93c40e6654f743ce7220527f4b969029bd39556 Mon Sep 17 00:00:00 2001 From: katarzyna-koltun-mx <108737161+katarzyna-koltun-mx@users.noreply.github.com> Date: Tue, 4 Nov 2025 16:09:15 +0100 Subject: [PATCH 5/6] Update wks-message-syntax.md --- .../en/docs/workstation/wks-message-syntax.md | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/content/en/docs/workstation/wks-message-syntax.md b/content/en/docs/workstation/wks-message-syntax.md index 9e1e0bb0d41..39e0b2d7094 100644 --- a/content/en/docs/workstation/wks-message-syntax.md +++ b/content/en/docs/workstation/wks-message-syntax.md @@ -44,18 +44,25 @@ This device type requires the following message and response: * `E#Error` - `Error` message from operating system * `S#{0,1,2,3}#directory` - The command `{0,1,2,3}` on `directory` was successful. -### Example Test +### Example Test + +The section below shows a sample test that you can run to verify the configuration. 1. Create a new Workspace in the Workstation Management. 2. Create a new Station. 3. Add a `File Device` with the following configuration to this Station: - * "Device Name": `Write files to test folder` - * "Allowed Folder": `C:\MyTestFolder` (assuming test on a Windows computer) - * "Allow writing files": `Yes` + * **Device Name** - *Write files to test folder* + * **Allowed Folder** - For example, on a Windows computer you can use a path like `C:\MyTestFolder` + * **Allow writing files** - **Yes** * Use the default values for everything else -4. Register the Station to your computer (assumping the Workstation Client is installed). +4. Register the Station to your computer (assuming the Workstation Client is installed there). 5. In your Workspace, navigate to **Test Your Station** and click on the configured file device. -6. Enter `3#test.txt#Hello from Mendix` in the "Send Message" field and press **Send Message**. It should show a response `S#3#C:\MyTestFolder\test.txt` to indicate that the text file `test.txt` was succesfully written to `MyTestFolder`. Go to `C:\MyTestFolder`. It should contain the text file. Open the file. It should contain `Hello from Mendix`. +6. Enter `3#test.txt#Hello from Mendix` in the **Send Message** field, and then press **Send Message**. + + The test should show a response like `S#3#C:\MyTestFolder\test.txt` to indicate that the text file *test.txt* was succesfully written to *MyTestFolder*. + +7. Go to *C:\MyTestFolder* and verify that it contains the text file. +8. Open the test file and verify that it contains the text *Hello from Mendix*. ## Smart Cards From 0d4f9ab6ec9a54d2bb63c8206438212cbd2de71d Mon Sep 17 00:00:00 2001 From: katarzyna_koltun Date: Tue, 4 Nov 2025 16:22:06 +0100 Subject: [PATCH 6/6] Fixed links --- content/en/docs/workstation/wks-build-app.md | 2 +- content/en/docs/workstation/wks-installation.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/content/en/docs/workstation/wks-build-app.md b/content/en/docs/workstation/wks-build-app.md index fecfe247904..8a6ba81e4fb 100644 --- a/content/en/docs/workstation/wks-build-app.md +++ b/content/en/docs/workstation/wks-build-app.md @@ -81,7 +81,7 @@ To change a user's role, or remove them from the workspace, click the three dot Now that you are ready to start using Mendix Workstation Client, you can implement your own custom logic for interacting with devices. The following nanoflows and Java actions are essential for establishing connections, sending or receiving messages, and managing device interactions: * **GetStation** - Retrieves the computer information connected to the Client. -* **SendMessage** - Sends data or commands to the connected device. For more information about the supported message syntax, see [Message Syntax for File, Smart Card, and Bluetooth Devices](/mendix-workstation/message-syntax/). +* **SendMessage** - Sends data or commands to the connected device. For more information about the supported message syntax, see [Message Syntax for File, Smart Card, and Bluetooth Devices](/mendix-workstation/device-syntax/). * **SubscribeToMessages** - Subscribe a nanoflow to be called when the device is sending a message. * **SubscribeToErrors** - Subscribe a nanoflow to be called on device connection errors. * **Unsubscribe** - End the subscription to device messages or errors. diff --git a/content/en/docs/workstation/wks-installation.md b/content/en/docs/workstation/wks-installation.md index 1b4d2ca9d9f..030a0033228 100644 --- a/content/en/docs/workstation/wks-installation.md +++ b/content/en/docs/workstation/wks-installation.md @@ -143,7 +143,7 @@ After configuring the server and client pair, test their connectivity by perform 8. In the same way, send a message from the **Test Server** to the **Test Client** device. {{% alert color="info" %}} -Different device types have different requirements for the message syntax. For more information, see [Message Syntax for File, Smart Card, and Bluetooth Devices](/mendix-workstation/message-syntax/). +Different device types have different requirements for the message syntax. For more information, see [Message Syntax for File, Smart Card, and Bluetooth Devices](/mendix-workstation/device-syntax/). {{% /alert %}} ## Quitting the Workstation Client