Skip to content

Firmware‐Installation

Cifer edited this page Jun 18, 2025 · 2 revisions

The nRFBOX requires firmware or code to unlock its wireless capabilities. This guide covers three methods to upload firmware: SD Card, Flash Download Tool, and Arduino IDE. These methods suit both beginners and advanced users.

Important

Always download firmware and sketches from the nRFBOX GitHub repository.

Method 1: Update Firmware via OTA or SD Card

If your nRFBOX is running its main firmware, use the built-in update feature via SD card. This method is ideal for quick, computer-free updates.

What You’ll Need

  • Working with the nRFBOX main firmware.
  • MicroSD card (FAT32 formatted) for SD card updates.
  • .bin firmware file from the repository.

Steps for SD Card Update

  1. Prepare the SD Card:

    • Format a microSD card to FAT32.
    • Download the latest .bin file from the nRFBOX GitHub repository and rename it to firmware.bin.
    • Place firmware.bin in the SD card’s root directory and eject safely.
  2. Insert the SD Card:

    • Power off the nRFBOX and insert the SD card.
  3. Run the SD Card Update:

    • Power on, go to Setting, and select Firmware Update.
    • The device reboots after flashing.

Tip

  • SD Card: Use a reliable microSD card. Power off before inserting/removing.
  • Troubleshooting: Verify the .bin file, ensure FAT32 format, or check Serial Monitor for errors.

Method 2: Flash a .bin File with Flash Download Tool

Use the Espressif Flash Download Tool to upload firmware via USB. This is great for initial setups or restoring a non-working device.

What You’ll Need

Steps

  1. Prepare the Firmware File:

    • Download the .bin file from the repository.
    • Download the .partitions file from the repository.
  2. Install the Flash Download Tool:

    • Download and install the tool. Run as an administrator on Windows.
  3. Connect the nRFBOX:

    • Connect via USB and enter Download Mode:
      • Hold BOOT button, press RESET briefly, release both.
    • Select the correct COM port in the tool.
  4. Configure Flash Settings:

    • Select ESP32 chip type and Developer Mode or Download Mode.
    • Load the .bin file, set flash offset to 0x10000.
    • Load the .partitions file, set flash offset to 0x8000.
    • Set SPI Speed to 40 MHz, SPI Mode to DIO.
    • Check the .bin and .partitions file boxes.
  5. Flash the Firmware:

    • Click START. Wait for “FINISH” or “Download Complete” (1-2 minutes).
  6. Reset and Verify:

    • Power cycle the nRFBOX. Check the Oled display or Serial Monitor for the new firmware version.
    • If it fails, verify COM port, offset, or Download Mode.

Tip

  • Install USB-to-serial drivers (e.g., CP2102, CH340) if needed.
  • Verify the .bin file matches your hardware.
  • Try a different USB cable/port or lower SPI Speed (20 MHz) if flashing fails.

Method 3: Upload Sketch via Arduino IDE

Compile and upload the nRFBOX sketch for customization.

What You’ll Need

Steps

  1. Install Arduino IDE and ESP32 Board Package:

    • Install the Arduino IDE.
    • Go to Tools > Board > Boards Manager, search “esp32,” and install esp32 by Espressif Systems (version 2.0.10).
  2. Replace platform.txt:

    • Download platform.txt from the repository.
    • Replace the file in:
      • Windows: C:\Users\<YOUR_USERNAME>\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.10
      • macOS: ~/Library/Arduino15/packages/esp32/hardware/esp32\2.0.10
      • Linux: ~/.arduino15/packages/esp32/hardware/esp32\2.0.10
    • Back up the original.
  3. Download and Open Sketch:

    • Download the .ino sketch from the repository and open it in the IDE.
  4. Configure Arduino IDE Settings:

    • Connect the nRFBOX via USB.
    • Select Tools > Board > ESP32 Dev Module and the correct Port.
    • Configure based on flash size:
      • Partition Scheme: Minimal SPIFFS.
      • Flash Size: 4MB.
    • Optional: Set Upload Speed to 921600, CPU Frequency to 240 MHz.
  5. Compile and Upload:

    • Click Verify to compile. Fix any errors.
    • Click Upload. Enter Download Mode if prompted (hold BOOT, press RESET, release both).
    • Wait for “Done uploading.”
  6. Verify Upload:

    • Check the Oled display or Serial Monitor (115200 baud).
    • If it fails, verify settings, port, or Download Mode.

Clone this wiki locally