M21
Back to the Gcode Dictionary
M21: Initialize SD card
Parameters
- This command can be used without any additional parameters.
- Pnnn SD card number (default 0)
Examples
- M21
- M21 P1
The specified SD card is initialized. If an SD card is loaded when the machine is switched on, this will happen by default. SD card must be initialized for the other SD functions to work.
In SBC mode and v3.4 or newer this code may be used to mount block devices or remote endpoints using the mount command. Note that this requires the DuetPiManagementPlugin to be running.
Parameters
- Pnnn Device node or remote endpoint
- Snnn Local directory to mount to (e.g. `0:/gcodes/remote`, optional if the device node is already present in /etc/fstab)
- Tnnn Mount type (-t flag, e.g. nfs)
- Onnn Mount options (-o flag)
Examples
- M21 P"192.168.1.222:3D" S"0:/gcodes/remote" T"nfs"
- M21 P"//192.168.1.222/3D" S"0:/gcodes/remote" T"cifs" O"user=myUser,password=myPass"
- M21 P"curlftpfs#ftp://192.168.1.222:/3D" S"0:/gcodes/remote" T"fuse" O"user=myUser:myPass" ; requires curlftpfs package
0 Comments