
File system API frames
Local File System Request - 0x3B
Digi XBee® 3 Cellular LTE-M/NB-IoT Global Smart Modem User Guide
290
Notes
n
Multiple commands take a 16-bit Path ID, which allows the use of relative pathnames (using
"/" as the path separator and using ".." to refer to a parent directory) as command
parameters. The default of 0x0000 refers to the root directory (/). See the
command for details on creation and use of temporary values in order to use relative
pathnames.
n
For the
and
commands, using an empty Pathname field is
equivalent to using "." – both refer to the directory designated by the Path ID.
n
and
describe the frame contents starting with the
File System
Command
field (and excluding the
Checksum
field).
n
lists the fields following the
Status
byte when 0 (indicating a successful
operation), and is only listed for commands with additional fields after the
Status
byte.
n
See
Local File System Response - 0xBB
for non-zero (error)
Status
values in the
Response
.
n
Variable-length names are NOT null terminated. The frame length determines the length of the
field.
File Open - 0x01
Description
Open a file for reading and/or writing.
n
Requests must have at least READ or WRITE bit set in the
Options
field.
n
Use the SECURE bit (0x80) of the
Options
byte to upload a write-only file (one that cannot be
downloaded or viewed). This is useful for protecting MicroPython source code on the device.
n
The SECURE bit is only valid when also setting the WRITE bit and either creating a new file
( EXCLUSIVE) or replacing an existing file (TRUNCATE).
Request
Offset
Size
Frame Field
Description
5
8-bit
File System Command
File Open - 0x01
6
16-bit
Path ID
See
for a description.