Managing the file system on the XBee 3 BLU device involves organizing and maintaining the scripts and other data stored in the module. This is important when you want to run custom code directly on the XBee or store certificates that the device uses during operation.

Use cases of this feature include:

  • Deploying code: You can store and run MicroPython scripts directly on the XBee 3 BLU device. This is useful in hostless or hybrid architectures where you require on-device logic, automation, or direct control of connected sensors and actuators.

  • Logging and Diagnostics: Also in hostless or hybrid architectures, you can store log files that record operational data, errors, or events. This is particularly helpful for diagnosing issues, debugging applications, or monitoring the performance of the device over time.

  • Certificate management: For applications involving secure communication, you can store and manage certificates and keys.

Depending on your use case or status in the development cycle, you can manage the file system of your XBee 3 BLU device with either of the following approaches:

The first time you use the file system you may be asked to format it. To do that, open the XBee File System feature of XBee Studio and click the Format the XBee file system button on the top toolbar of the page.

Using XBee Studio

XBee Studio allows you to manage the file system of your XBee 3 BLU device connected to your PC through the serial interface.

Normally, you would use XBee Studio to set up the file system of your device during the early stages of development, such as when prototyping your solution, to test how the device handles it.

To manage the file system of your XBee 3 BLU serially using XBee Studio:

  1. Connect your device to a PC where XBee Studio is installed.

    This section assumes that you know how to connect the XBee 3 BLU device to a PC. For more information on how to connect an XBee device to a PC, see the Step 2 - Set up the hardware page from the getting started section.
  2. Open XBee Studio.

  3. Wait for your device to be discovered.
    A module that’s never been configured should be discovered automatically, but if you have problems discovering your local device, see the Device discovery tools section of XBee Studio User Guide to learn how to do it manually.

  4. Click on the device. The Dashboard page appears. It contains the device information, connection interface and a list of quick actions.

  5. Click the XBee File System item in the sidebar of the tab. It is located within the Development section.

    XBee Studio File System

    As you can see, you have the local file system of your PC on the left, and the XBee’s file system on the right. You can drag and drop files and folders from one side to the other, as well as execute other operations with the file system of your device.

    The contents of the file system of your XBee 3 BLU device are read automatically when the file system page is opened. Also, whenever you navigate through the folders of the device, their contents are also fetched automatically.
  6. Upload a file from your PC to the XBee device by dragging it from the left pane and dropping it into the right one. After a while the file will be uploaded to the XBee 3 BLU device.

    XBee devices have limited memory, so pay close attention to the available space on your device’s file system. You can see the remaining free space left in your device in the bottom-right corner of the File System page of XBee Studio.
See the XBee File System section of the XBee Studio User Guide for more information.

Using Command mode

In addition to using the File System tool from XBee Studio, you can manually interact with the file system of your XBee 3 BLU device through other methods, which can be particularly useful when working with microcontrollers or custom setups.

You can use any terminal or console application (such as PuTTY or Tera Term) to manage the file system of your XBee 3 BLU device via UART. This is an alternative to using XBee Studio and is essential for use cases where direct communication is necessary.

XBee Studio itself manages the file system of the devices connected to it using AT commands in Command mode behind the scenes. However, for a more hands-on approach, it offers a built-in XBee console tool, which allows you to directly interact with the file system as if you were using a different tool.

This section assumes that you know how to connect the XBee 3 BLU device to a PC. For more information on how to connect an XBee device to a PC, see the Step 2 - Set up the hardware page from the getting started section.

To manage the file system of the XBee 3 BLU serially using Command mode:

  1. Open a console application of your choosing. It must support serial connections, like the XBee Console of XBee Studio, PuTTY or Tera Term.

  2. If you are using XBee Studio, match the serial port parameters of the serial console application to those of the device so you can connect to it.

    You can find the serial port configuration of your device in the device’s dashboard page of XBee Studio.
  3. To enter command mode:

    1. Wait a full second without sending anything through the serial interface.

    2. Type the character sequence +++.

      Do NOT press Enter or Return.
    3. Wait another full second without sending anything through the serial interface.

    4. After this, you should receive an OK.

  4. List the available the file system operations by sending the ATFS command.

  5. Press Enter to send the command and get the response. This returns the list of operations available in your device, for example: ATFS commands: PUT GET PWD CD LS MD RM HASH INFO FORMAT

  6. To list the contents of the root folder of the file system, run: ATFS LS It returns something like this:

ATFS LS
  <DIR> ./
  <DIR> ../
  <DIR> lib/
To learn more about the available AT commands to manage the file system in command mode, see File System commands.

Using MicroPython

You can also manage the file system programmatically through a MicroPython application running on the XBee 3 BLU device. This application can control various features of the device, including reading, writing, adding and removing files within the file system.

Managing the file system in this manner is especially valuable once the module is deployed, as it enables your XBee 3 BLU device to autonomously store received data, as well as log events and errors related to its operations.

In order to learn how to use MicroPython with your XBee 3 BLU device, see MicroPython application development.