56 lines
1.8 KiB
Bash
56 lines
1.8 KiB
Bash
#!/usr/bin/bash
|
|
#
|
|
#
|
|
#
|
|
# Gate 2F Life Field Acceptance If_4_lines 30 seconds
|
|
# zerodev1 CPP Command clump START
|
|
date
|
|
cd /usr/local/src/ble-reticulum/
|
|
chronyc tracking
|
|
chronyc sources -v
|
|
echo .
|
|
|
|
cd migration/protocol_core
|
|
python3 setup.py build_ext --inplace
|
|
cd ../..
|
|
|
|
PYTHONPATH=src:migration/protocol_core \
|
|
BLE_RETICULUM_SESSION_BACKEND=cpp \
|
|
BLE_RETICULUM_FRAGMENTATION_BACKEND=cpp \
|
|
python3 - <<'PY'
|
|
import os, sys
|
|
print("PYTHON:", sys.executable)
|
|
print("PYTHONPATH:", os.environ.get("PYTHONPATH"))
|
|
print("BLE_RETICULUM_SESSION_BACKEND:", os.environ.get("BLE_RETICULUM_SESSION_BACKEND"))
|
|
print("BLE_RETICULUM_FRAGMENTATION_BACKEND:", os.environ.get("BLE_RETICULUM_FRAGMENTATION_BACKEND"))
|
|
import ble_protocol_core_cpp
|
|
print("ble_protocol_core_cpp:", ble_protocol_core_cpp.__file__)
|
|
from ble_reticulum.BLEFragmentationBackend import BACKEND as FRAG_BACKEND
|
|
from ble_reticulum.BLESessionBackend import BACKEND as SESSION_BACKEND
|
|
print("fragmentation backend:", FRAG_BACKEND)
|
|
print("session backend:", SESSION_BACKEND)
|
|
if FRAG_BACKEND != "cpp":
|
|
raise SystemExit(f"ERROR: expected fragmentation backend cpp, got {FRAG_BACKEND!r}")
|
|
if SESSION_BACKEND != "cpp":
|
|
raise SystemExit(f"ERROR: expected session backend cpp, got {SESSION_BACKEND!r}")
|
|
print("CPP backend preflight: OK")
|
|
PY
|
|
|
|
echo .
|
|
|
|
PYTHONPATH=src:migration/protocol_core \
|
|
BLE_RETICULUM_SESSION_BACKEND=cpp \
|
|
BLE_RETICULUM_FRAGMENTATION_BACKEND=cpp \
|
|
BLE_RETICULUM_FRAGMENTATION_BACKEND_REPORT=1 \
|
|
timeout 30 python3 examples/ble_dual_node_echo.py \
|
|
--ble-role peripheral \
|
|
--message-file /usr/local/src/ble-reticulum/samples/If.txt \
|
|
--message-chunk-size 900 \
|
|
--announce-only-when-disconnected \
|
|
--verbosity debug
|
|
|
|
echo .
|
|
chronyc tracking
|
|
chronyc sources -v
|
|
# zerodev1 Command clump END for Gate 2F Life Field Acceptance If_4_lines 30 seconds
|
|
|