Bambu Lab X1 Specific G-Code

Right now there’s no documentation from Bambu around what standard and non-standard G-code commands can be used on the X1 series of printers.

This will be a constantly evolving thread to document these. Some things are certain, some things may be guesses/assumptions, so use the commands below at your own risk.

If you know any codes, or have any assumptions, please discuss these below and I’ll add them to this first message.

Hardware Control

Lamp Control Codes

Code Description
M960 S0 P0/1 Calibration lasers, and calibration head white LEDs off/on
M960 S1 P0/1 Calibration Y axis IR 808nm laser (vertical) off/on
M960 S2 P0/1 Calibration X axis 405nm laser (horizontal) off/on
M960 S3 P0/1 Appears to be nothing at all, or I haven’t found what it is
M960 S4 P0/1 Calibration unit white LEDs off/on
M960 S5 P0/1 Bambu Lab toolhead logo light off/on

Example code:
M960 S5 P1 ; Switch Bambu Lab printhead logo light on

Fan Control Codes

Code Description
M106 P1 S0-255 Part cooling fan off-full
M106 P2 S0-255 Aux fan off-full
M106 P3 S0-255 Chamber fan off-full

Example code:
M106 P3 S180 ; Switch chamber fan on at 70%


Display Message Codes

These commands cause messages to be displayed on printer’s LCD screen, and trigger the corresponding messages to be displayed within the app/slicer.

Code LCD Message Displayed
M1002 gcode_claim_action : 0 (Clear screen of messages?)
M1002 gcode_claim_action : 1 Auto bed levelling
M1002 gcode_claim_action : 2 Heatbed preheating
M1002 gcode_claim_action : 3 Sweeping XY mech mode
M1002 gcode_claim_action : 4 Changing filament
M1002 gcode_claim_action : 5 M400 pause
M1002 gcode_claim_action : 6 Paused due to filament runout
M1002 gcode_claim_action : 7 Heating hotend
M1002 gcode_claim_action : 8 Calibrating extrusion
M1002 gcode_claim_action : 9 Scanning bed surface
M1002 gcode_claim_action : 10 Inspecting first layer
M1002 gcode_claim_action : 11 Identifying build plate type
M1002 gcode_claim_action : 12 Calibrating Micro Lidar
M1002 gcode_claim_action : 13 Homing toolhead
M1002 gcode_claim_action : 14 Cleaning nozzle tip
M1002 gcode_claim_action : 15 Checking extruder temperature
M1002 gcode_claim_action : 16 Paused by the user
M1002 gcode_claim_action : 17 Pause due to the falling off of the tool head’s front cover
M1002 gcode_claim_action : 18 Calibrating the micro lidar
M1002 gcode_claim_action : 19 Calibrating extruder flow
M1002 gcode_claim_action : 20 Paused due to nozzle temperature malfunction
M1002 gcode_claim_action : 21 Paused due to heat bed temperature malfunction

@Ciprian, could you enable the option for regular users to post as wiki? That way (1) the community can contribute together on these guides and (2) if the original author should ever leave, other community members can still edit the post since it is a wiki. Refer to below:

In the meantime, could you convert @Mowcius’s post (if he’s okay with that) to a wiki?

The post has been converted.
We will consider the possibility of users creating Wiki posts, and apply the change if it’s decided.
Thanks for the suggestion.

1 Like

@Ciprian contribution is already mentioned in the Wiki itself Home | Bambu Lab Wiki

1 Like

I apologize if I wasn’t clear. I wasn’t referring to the Bambu Lab wiki. I was referring to converting the post type of this thread to a wiki. It’s a feature that the forum software allows that I was pointing out to Ciprian.