ME310G1/ME910G1/ML865G1 AT Commands Reference Guide
80617ST10991A Rev.4 Page 502 of 545 2020-04-15
3.21.8. AT#M2MWRITE - M2M Write a File
This command stores a file in the file system.
AT#M2MWRITE=<file_name>,<size>[,<binToMod>]
Execution command stores a generic file in the folder specified by <file_name> parameter. The file
should be sent using RAW ASCII file transfer, and hardware flow control should be used. After
command line is terminated with <CR>, the module prompts the following five-character sequence:
<CR>,<LF>,<greater_than><greater_than><greater_than> (see IRA 13, 10, 62, 62, 62)
then a file sized <size> bytes can be sent from TE.
The operations complete when all bytes are received. If writing ends successfully the response is
OK, otherwise, an error code is reported.
Parameters:
can be:
• full file name path starting with "/"
• relative file name path
• file name (in current directory)
if <file_name> is provided as filename with ".bin"
extension, using <binToMod> set to 1, force the file to be
automatically written on "/mod" folder whichever is the
current directory.
Maximum full path length is 128 chars, maximum folder or file name is 64 chars. Overall
max full file path is 128 + 64 = 192 chars.
If the file <file_name> or its path is not present an error code is reported.
<file_name> can be equivalently enclosed on quote or not.
<file_name> and its path are case sensitive.
AT#M2MWRITE=?
Test commands returns OK result code.