diff --git a/migration/zerodev1_command_clump_Gate2F_If.sh b/migration/zerodev1_command_clump_Gate2F_If.sh new file mode 100644 index 0000000..f60ead1 --- /dev/null +++ b/migration/zerodev1_command_clump_Gate2F_If.sh @@ -0,0 +1,56 @@ +#!/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 + diff --git a/migration/zerodev2_command_clump_Gate2F_If.sh b/migration/zerodev2_command_clump_Gate2F_If.sh new file mode 100644 index 0000000..1b313ac --- /dev/null +++ b/migration/zerodev2_command_clump_Gate2F_If.sh @@ -0,0 +1,56 @@ +#!/usr/bin/bash +# +# +# + +# Gate 2F Life Field Acceptance If_4_lines 30 seconds +# zerodev2 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 both \ + --message-file /usr/local/src/ble-reticulum/samples/If.txt \ + --peer 926e6d3b35b7d5940be7edeb47c41b78 \ + --announce-only-when-disconnected \ + --verbosity debug + +echo . +chronyc tracking +chronyc sources -v +# zerodev2 Command clump END