-
Notifications
You must be signed in to change notification settings - Fork 3
Adventurer 5M Series
The Adventurer 5M series (5M and 5M Pro) represents FlashForge's modern printer lineup with HTTP REST API as the primary control interface.
| Protocol | Port | Purpose |
|---|---|---|
| HTTP REST | 8898 | Primary control and status |
| TCP Control | 8899 | Low-level G/M code fallback |
| Camera HTTP | 8080 | MJPEG video streaming (Pro only) |
Primary validated firmware: 3.2.7
All HTTP endpoints require authentication:
{
"serialNumber": "SNADVA5MXXXXX",
"checkCode": "12345"
}See Authentication for complete details.
| Endpoint | Method | Description |
|---|---|---|
/detail |
POST | Comprehensive printer status |
/product |
POST | Feature availability flags |
/control |
POST | Send control commands |
/gcodeList |
POST | List recent files |
/gcodeThumb |
POST | Get file thumbnail |
/printGcode |
POST | Start local file print |
/uploadGcode |
POST | Upload and optionally print file |
| Endpoint | Method | Description |
|---|---|---|
/checkCode |
POST | Validate credentials |
/notifyWanBind |
POST | Cloud binding notification |
/getThum |
GET | Get thumbnail image |
The /control endpoint accepts various command payloads.
| Command | Description | Parameters |
|---|---|---|
lightControl_cmd |
LED on/off | status: "open"/"close" |
jobCtl_cmd |
Job control | action: "pause"/"continue"/"cancel" |
printerCtl_cmd |
Print settings | speed, zAxisCompensation, chamberFan, coolingFan, coolingLeftFan (int %; fan sentinel -200=no change) |
temperatureCtl_cmd |
Temperature control | rightNozzle, leftNozzle, platform, chamber (int; -100=off, -200=no change) |
stateCtrl_cmd |
State control | action: "setClearPlatform" |
reName_cmd |
Rename printer | name: string |
delayClose_cmd |
Auto shutdown | automaticShutdown: "open"/"close", shutdownAfterTime: int (minutes) |
calibration_cmd |
Calibration | Various |
Note: temperatureCtl_cmd is accepted by the firmware over HTTP, but on the base Adventurer 5M, nozzle/bed temperatures are typically driven over TCP via M-codes (M104/M140); reserve temperatureCtl_cmd for HTTP-only models.
Note: For printerCtl_cmd, chamberFan and coolingFan are fan-speed percentages where the sentinel -200 means "no change" (omit the field or send -200 to leave a fan unchanged). coolingLeftFan targets the left part-cooling fan on dual-fan setups (e.g. 5M Pro / AD5X); single-fan machines ignore it.
POST http://10.0.0.42:8898/control
Content-Type: application/json
{
"serialNumber": "SNADVA5MXXXXX",
"checkCode": "12345",
"payload": {
"cmd": "jobCtl_cmd",
"args": {
"jobID": "",
"action": "pause"
}
}
}POST http://10.0.0.42:8898/control
Content-Type: application/json
{
"serialNumber": "SNADVA5MXXXXX",
"checkCode": "12345",
"payload": {
"cmd": "printerCtl_cmd",
"args": {
"speed": 120
}
}
}Note: Only include fields you want to change. Omitted fields are ignored. Do not send 0 or default values for fields you do not intend to change.
| Feature | Status |
|---|---|
| HTTP API | Yes |
| TCP Fallback | Yes |
| Built-in Camera | No |
| Factory LEDs | No |
| Air Filtration | No |
| TVOC Sensor | No |
| Feature | Status |
|---|---|
| HTTP API | Yes |
| TCP Fallback | Yes |
| Built-in Camera | Yes (port 8080) |
| Factory LEDs | Yes |
| Air Filtration | Yes (internal + external) |
| TVOC Sensor | Yes |
See 5M Pro Features for Pro-specific documentation.
POST http://10.0.0.42:8898/product
Content-Type: application/json
{
"serialNumber": "SNADVA5MXXXXX",
"checkCode": "12345"
}Response:
{
"code": 0,
"message": "Success",
"product": {
"internalFanCtrlState": 1, // Pro: filtration available
"externalFanCtrlState": 1, // Pro: exhaust available
"lightCtrlState": 1, // LEDs available
"nozzleTempCtrlState": 1,
"chamberTempCtrlState": 1, // Pro: heated chamber available
"platformTempCtrlState": 1
}
}Detecting Capabilities — the reliable approach:
The /product *CtrlState flags (internalFanCtrlState, externalFanCtrlState, lightCtrlState, chamberTempCtrlState, etc.) are not a reliable source of truth for which hardware is present. Across models and firmware versions FlashForge firmware may report 1 for absent hardware (over-report) or 0 for hardware that is actually present (under-report). Do not use them to decide whether a feature exists.
Use this approach instead:
- Identify the model from
/detailpid. It is a hex string — parse it base-16 to a decimal, then look it up in the Printer PIDs table. - Map that model to its capabilities using a hardcoded Capability Matrix.
- Treat the
/product*CtrlStateflags as a secondary hint only — never the source of truth.
pid_hex = detail.pid # e.g. "0024"
pid = int(pid_hex, 16) # 36 -> Adventurer 5M Pro
caps = CAPABILITY_MATRIX[pid] # { filtration: true, camera: true, led: true, ... }
# /product CtrlState is only a corroborating hint, not authoritative
Known quirks (hints, not detection methods):
-
Aftermarket LEDs: if
lightCtrlStatereads0yetlightControl_cmdstill toggles the light, the machine has aftermarket LEDs installed. -
Filtration hint: if you do inspect fan state, filtration requires both
internalFanCtrlStateandexternalFanCtrlStateto read1(AND, not OR) — and even a matching pair is only a hint, not proof.
Check these fields:
-
cameraStreamUrl: Present on Pro, absent on base 5M -
tvoc: Reports values on Pro, absent on base 5M -
nameorfirmwareVersion: May contain "Pro" identifier (less reliable)
POST http://10.0.0.42:8898/uploadGcode
Content-Type: multipart/form-data
serialNumber: SNADVA5MXXXXX
checkCode: 12345
fileSize: 1234567
printNow: "false"
levelingBeforePrint: "true"
[gcodeFile form data with binary content]The request body format changed at firmware 3.1.3. Firmware 3.1.3 and newer (including 3.2.7, which these specs target) requires the extended body — sending the legacy minimal body will be rejected or misbehave on 3.1.3+. Send the request body that matches the printer's firmware version.
Pre-3.1.3 (legacy) — minimal body:
POST http://10.0.0.42:8898/printGcode
Content-Type: application/json
{
"serialNumber": "SNADVA5MXXXXX",
"checkCode": "12345",
"fileName": "Benchy.gcode",
"levelingBeforePrint": true
}3.1.3+ (modern, current) — extended body:
For single-color / non-material-station prints the extra fields are sent disabled (empty):
POST http://10.0.0.42:8898/printGcode
Content-Type: application/json
{
"serialNumber": "SNADVA5MXXXXX",
"checkCode": "12345",
"fileName": "Benchy.gcode",
"levelingBeforePrint": true,
"flowCalibration": false,
"useMatlStation": false,
"gcodeToolCnt": 0,
"materialMappings": []
}For operations not available via HTTP, use TCP port 8899:
- Direct G-code commands (motion, positioning)
- Homing operations
- Manual extrusion
- Low-level status queries
- Debugging/troubleshooting
Connect to 10.0.0.42:8899
Send: ~M601 S1
Send: ~G28
Send: ~M602
Close connection
- Discover printer via UDP
- Authenticate with
/detailto verify credentials - Query
/productfor feature detection - Cache feature flags for session
Poll /detail every 1-2 seconds for:
- Print progress
- Temperatures
- Machine state
- Job information
All standard user actions via /control:
- Start/pause/cancel prints
- Temperature changes
- LED control
- Settings adjustments
Use TCP only when HTTP is insufficient:
- Direct motion control
- Homing sequences
- Manual extrusion
| Field | Type | Description |
|---|---|---|
| status | string | Machine state |
| printProgress | float | Progress (0.0-1.0) |
| printLayer | int | Current layer |
| printFileName | string | Active file name |
| platTemp | float | Bed temperature |
| platTargetTemp | float | Bed target |
| leftTemp/rightTemp | float | Extruder temperatures |
| lightStatus | string | LED state |
| tvoc | int | TVOC level (Pro only) |
| Status | Description |
|---|---|
| ready | Idle, ready for jobs |
| busy | Performing operation |
| heating | Warming up |
| printing | Actively printing |
| pausing | Transitioning to pause |
| paused | Job paused |
| cancel | Job cancelled |
| completed | Job finished |
| error | Error state |
The 5M base model supports aftermarket additions:
- OEM or third-party cameras can be installed
- Camera becomes available on port 8080
- May require enabling in printer settings
- Aftermarket LEDs can be controlled via
lightControl_cmd - Works even if
lightCtrlStatereports 0 - Use standard LED control commands
- Verify serialNumber and checkCode from printer settings
- Check for typos in credentials
- Ensure headers are correct for
/uploadGcode
- Check
/productfor feature availability - Verify printer is in correct state (not busy/printing)
- Some commands only work when idle
- Include all required headers
- Verify file size matches actual file
- Ensure multipart boundary is correct