SX1262 Raspberry Pi 5 LoRaWAN C/C++ package

This directory keeps only the native C/C++ LoRaWAN program and the files
needed to rebuild it on Raspberry Pi 5. Python, web console, and serial bridge
files are intentionally not included.

Build:
  cd ~/lora/lorawan1138
  ./build.sh

Default run:
  ./build/pi_lorawan

  Default behavior:
    - Send Raspberry Pi time as HEX every 10 seconds.
    - Format is YYYYMMDDHHMMSS.
    - Example: 2026-06-06 12:01:47 -> HEX 20260606120147
    - Listen in RX1/RX2 after every uplink.
    - Stop automatically when an application downlink payload is received.
    - Empty MAC-only downlinks do not stop the program.

Run custom ASCII continuously:
  ./build/pi_lorawan --msg "hello" --port 10 --interval 10

Send HEX continuously:
  ./build/pi_lorawan --hex 05201314 --port 10 --interval 10

Explicitly send Raspberry Pi time as HEX continuously:
  ./build/pi_lorawan --time-hex --port 10 --interval 10

Keep sending even after an application downlink payload:
  ./build/pi_lorawan --keep-sending

Send once:
  ./build/pi_lorawan --hex 05201314 --port 10 --once

Startup behavior:
  By default, the program stops old pi_lorawan / pi_lorawan_py.py /
  lorawan_web.py processes before it starts, then removes old lock files.
  Use --no-kill-old only if you intentionally want to keep another instance.

Important:
  Run as user pi, not with sudo.
  lorawan_nonces.bin and lorawan_session.bin preserve LoRaWAN state.
  Do not delete them unless the ChirpStack device is deleted/re-created.
