Message Syntax for File, Smart Card, and Bluetooth Devices
Last modified: August 20, 2025
Introduction
To communicate with your devices, you must ensure that the messages you send have the correct syntax. This syntax varies depending on the type of device. The following sections show the required syntax for file system, smart card, and Bluetooth devices.
Bluetooth
This device type requires the following message and response:
Message
0#ServiceUUID#CharacteristicUUID
- Subscribe to characteristicCharacteristicUUID
from serviceServiceUUID
.1#ServiceUUID#CharacteristicUUID
- Unsubscribe from characteristicCharacteristicUUID
from serviceServiceUUID
.2#ServiceUUID#CharacteristicUUID
- Read characteristicCharacteristicUUID
from serviceServiceUUID
.3#ServiceUUID#CharacteristicUUID
- Write to characteristicCharacteristicUUID
from serviceServiceUUID
.
Response
CharacteristicUUID#Response
File System
This device type requires the following message and response:
Message
0# Directory
- Watch for changes inDirectory
. IfDirectory
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 inDirectory
.2# File path
- Read file atFile path
.3# File path # Data # flag
- Write to file atFile path
. Theflag
can bew
for overwrite,a
for append If left blank, the value defaults tow
.
Response
R#File name
-File name
was renamed (also triggered when file is created and deleted)C#File name
-File name
was changedD#Data
-Data
from file readE#Error
-Error
message from operating systemS#{0,1,2,3}#directory
- The command{0,1,2,3}
ondirectory
was successful.
Smart Cards
This device type requires the following message and response:
Message
Send instruction in hexadecimal as a string, for example, FFCA000000. The messages exchanged with the smart card are APDU messages. For more information, refer to the documentation of the APDU command for your smart card reader.
Response
0#
- Card connected1#
- Card disconnected2# Response
- Response from device as raw hexadecimal.3# Error
- Error message from device.