ESP32 Bit Pirate home
  • LoRa
  • Intermediate
  • 12 min
  • LittleFS

Recipe · Intermediate · LoRa

How to record and load a LoRa packet

Capture one packet with its complete radio context, archive the versioned file and use it for a controlled one-shot transmit test.

SX1262 LoRa module and chirp waveform.
A useful capture preserves both payload bytes and the modem profile required to interpret them.

Capture only a known authorized packet

Use your own transmitter or an approved lab source. A saved packet can be transmitted later by load, so treat every .lora file as an active RF test asset rather than a passive screenshot.

  • Confirm the receiver profile and antenna first.
  • Send one distinctive, non-sensitive test payload.
  • Download important captures before reflashing or changing partitions.
Step 1

Verify receive mode and storage

Receive one packet normally before recording it. The record workflow mounts LittleFS and requires at least 2 KB free.

Press Enter to leave continuous receive after the controlled packet appears.

Step 2

Record exactly one packet

Run record, transmit the known payload from the peer and enter a simple filename. The firmware appends .lora when needed.

Stopping before a packet is safe

Press Enter while waiting to cancel. The command reports No packet saved and includes an RX error count when errors occurred.

Know what the file preserves

GroupSaved fieldsPurpose
FormatESP32-Bit-Pirate LoRa, version 1Reject incompatible or incomplete files.
ModemFrequency, BW, SF, CR, power, preambleReconstruct the radio profile used for capture.
Packet optionsSync word, TCXO voltage, CRC, invert IQPreserve settings that can prevent decoding even when frequency matches.
Capture metricsRSSI and SNRKeep signal context; these values are metadata and are not recreated on TX.
PayloadLength and hexadecimal bytesValidate and reproduce the exact packet content.
Step 3

Archive or inspect the capture

Use the firmware Web UI Files panel to download the new file. Keep the extension and contents unchanged if you plan to load it again.

  1. Open the firmware Web UI and its Files panel.
  2. Find lab_probe_01.lora and check that its size is non-zero.
  3. Download a copy with the test date, peer identity and authorization context in your project notes.
Step 4

Load for one controlled transmission

Start receive on the authorized peer first. Then run load, select the capture and confirm the file summary. Selecting the file triggers one transmission.

The saved profile is temporary

load applies the file frequency and modem profile, sends once, then attempts to restore the complete profile that was active before the command. Treat Load: profile restore failed as a stop condition and re-run configuration before further RF work.

Step 5

Confirm profile restoration

Compare the result with the status snapshot taken before loading. The saved RSSI and SNR belong to the original capture; the peer’s new receive metrics describe the loaded transmission.

Troubleshooting

  • LittleFS full: free space until at least 2 KB is available, then run record again.
  • No packet saved: confirm the peer profile and send only after record reports that it is waiting.
  • No .lora files: check the Files panel and exact .lora extension.
  • Invalid file size: the selected file must be non-empty and no larger than 8 KB.
  • Invalid .lora file: do not hand-edit required fields unless every value and payload length remains valid for version 1.
  • Profile restore failed: stop and rebuild the intended profile with config before sending or receiving again.

Next steps

  • Build a small library of clearly named test vectors from your own lab devices.
  • Compare capture-time RSSI/SNR with the receiver metrics from a later controlled load.
  • Use the Web UI to archive or delete files instead of leaving unidentified RF assets on the device.

LoRa file FAQ

What is stored in a .lora file?

The complete supported modem profile, capture RSSI/SNR, payload length and exact hexadecimal payload bytes in a versioned text format.

Does load permanently replace my profile?

No. It applies the file profile for one send and then attempts to restore the frequency and complete modem profile that were active before load.

Can I rename or edit the file?

You can use a simple .lora filename, but the contents must pass strict version, field, range and payload-length validation.

Go deeper