UDP packet on port 8001 with payload Zortrax to your broadcast.
You will reveive a response on the same port if there is compatible hardware present.
| Field | Size (bytes) | Description |
|---|---|---|
| Hardware Id | 1 | Each hardware has its distinct Id |
| Serial Number | 9 (variable) | Serial number of the device |
| Dec | Hex | Hardware |
|---|---|---|
| 40 | 0x28 | Zortrax Inkspire |
| 24 | 0x18 | Zotrax M200+ |
Zotrax M200 Plus printer exposed protocol endpoint on port 8002.
The first two bytes are defining the payload length. Little Endian.
The rest is the payload.
| Field | Size (bytes) | Description |
|---|---|---|
| Payload Size | 2 | Size in bytes of the Query field. Little endian order |
| Query | variable |
The payload is a json formatted query.
{
"commands": [
{
"fields": ["<field1>", "<field2>", ...],
"type": "<commandType>"
}
]
}commands: An array of command objects.fields: A list of field names (strings) that the query requests data for.type: The type of the command being issued (e.g.,version,printStatus,status). The known mapping is given in later secion.
{
"responses": [
{
"fields": [
{
"name": "<fieldName>",
"value": <fieldValue>
},
...
],
"status": "<statusCode>",
"type": "<responseType>"
}
]
}responses: An array of response objects.fields: A list of field objects returned in response to the query.name: The name of the field.value: The value of the field. It can be a string, number, or another type depending on the field.
status: A status code as a string indicating the result of the command (e.g.,1for success,2for failure or incomplete response - maybe (need more data)).type: The type of the response corresponding to thetypein the query.
| Command | Fields | Other | Details |
|---|---|---|---|
getSetting |
lights, buzzer, sleep, nozzleDiameter |
N/A | |
printStatus |
progress, metadata, userSettings, filename |
N/A | |
status |
printerStatus, storageBytesFree, storageBytesTotal, currentMaterialId, serialNumber, printingInProgress, failsafeAlertReason, failsafeAlertSource |
N/A | |
version |
protocol, firmware, software, hardware |
N/A | |
getCameraPreview |
N/A | quality |
No fields required. |
printFromStorage |
N/A | forced, path |
Query:
{
"commands": [
{
"fields": ["protocol", "firmware", "software", "hardware"],
"type": "version"
}
]
}Response:
{
"responses": [
{
"fields": [
{"name": "protocol", "value": 1},
{"name": "firmware", "value": "2.6.15"},
{"name": "software", "value": 23727},
{"name": "hardware", "value": 24}
],
"status": "1",
"type": "version"
}
]
}Query:
{
"commands": [
{
"fields": ["progress", "metadata", "userSettings", "filename"],
"type": "printStatus"
}
]
}Response:
If currently not printing status is 2.
{
"responses": [
{
"status": "2",
"type": "printStatus"
}
]
}If print started (after heating phase) then the status is 1.
{
"responses": [
{
"fields": [
{
"name": "progress",
"value": 5
},
{
"name": "metadata",
"value": "<base64 metadata on the zcodex2 file>"
},
{
"name": "userSettings",
"value": ""
},
{
"name": "filename",
"value": "CurrentlyPrintedFilename.zcodex2"
}
],
"status": "1",
"type": "printStatus"
}
]
}Query:
{
"commands": [
{
"fields": [
"printerStatus", "storageBytesFree", "storageBytesTotal",
"currentMaterialId", "serialNumber", "printingInProgress",
"failsafeAlertReason", "failsafeAlertSource"
],
"type": "status"
}
]
}Response:
{
"responses": [
{
"fields": [
{"name": "printerStatus", "value": "printing_complete"},
{"name": "storageBytesFree", "value": 15289991168},
{"name": "storageBytesTotal", "value": 15367913472},
{"name": "currentMaterialId", "value": 128},
{"name": "serialNumber", "value": "ZXXXFYYYY"},
{"name": "printingInProgress", "value": 1},
{"name": "failsafeAlertReason", "value": 5},
{"name": "failsafeAlertSource", "value": 5}
],
"status": "1",
"type": "status"
}
]
}printerStatus might be in: busy printing heating printing_complete idle
{
"commands": [
{
"path": "PathToYourFile.zcodex2",
"forced": false,
"type": "printFromStorage"
}
]
}Response:
{
"responses": [
{
"status": "1",
"type": "printFromStorage"
}
]
}./query_file.sh -q camera.json -i MY_PRINTER_IP -p 8002 ./query_file.sh | jq -r ".responses[0].cameraPreviewData" | base64 -d > out.jpegThe M200 Plus printer serves an FTP server on port 8003. Credentials are user: zortrax, password: zortrax.
A file failInformation.txt appears in some cases in the printer files. Apparently its encrypted.