M39
Back to the Gcode Dictionary
M39: Report SD card information
Supported in ReprapFirmware 1.21 and later.
Parameters
- Pn SD slot number, default 0
- Sn Response format. S0 returns a plain text response, S2 returns a response in JSON format.
Examples:
- M39 ; report information for SD card 0 in plain text format
- M39 P1 S2 ; report information for SD card 1 in JSON format
This command returns information about the SD card in the specified slot in the requested format. At least the following is returned:
- Whether or not a usable card is present in the slot
- The capacity of the card in bytes (if a card is present)
- The amount of free space on the card in bytes (if a card is present)
The JSON response has the following format (this is provisional):
{"SDinfo":{"slot":0,"present":1,"capacity":4294967296,"free":2147485184,"speed":20971520}}
The capacity and free space are in bytes and the interface speed is in bytes/second.
0 Comments