- Client: change passive BLE scan to active scan (setActiveScan(true)) Server puts name/UUID in scan response; passive scan never received them, so isAdvertisingService() and getName() failed. - Server: add INPUT_PULLUP on touch pins to prevent floating triggers when sensors disconnected - Server: update BLE UUID characteristic in SET_ID handler (pUuidChar->setValue) so reconnecting clients see correct UUID - Server: touch logic changed from t1Active/t2Active to !t1Active/!t2Active (door closed = relay ON) - Android: flushReadBuffer before VERSION? to discard stale boot log output; use Regex for BUILD_NR parsing - copy_firmware.sh: copy to firmware/server/ and firmware/client/ subdirectories to match EspFlasher.assetPath() - version.txt: server=20 client=5
29 lines
No EOL
864 B
Shell
Executable file
29 lines
No EOL
864 B
Shell
Executable file
#!/bin/bash
|
|
set -e
|
|
|
|
PROJECT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
|
ASSETS_BASE="$PROJECT_DIR/android/app/src/main/assets/firmware"
|
|
|
|
copy_binaries() {
|
|
local BINARY_DIR="$1"
|
|
local ASSETS_DIR="$2"
|
|
|
|
mkdir -p "$ASSETS_DIR"
|
|
cp "$BINARY_DIR/bootloader.bin" "$ASSETS_DIR/"
|
|
cp "$BINARY_DIR/partitions.bin" "$ASSETS_DIR/"
|
|
cp "$BINARY_DIR/firmware.bin" "$ASSETS_DIR/"
|
|
|
|
BOOT_APP0=$(find ~/.platformio/packages/framework-arduinoespressif32 -name "boot_app0.bin" 2>/dev/null | head -1)
|
|
if [ -n "$BOOT_APP0" ]; then
|
|
cp "$BOOT_APP0" "$ASSETS_DIR/"
|
|
else
|
|
echo "ERROR: boot_app0.bin not found"
|
|
exit 1
|
|
fi
|
|
|
|
echo "Copied to $ASSETS_DIR:"
|
|
ls -la "$ASSETS_DIR"
|
|
}
|
|
|
|
copy_binaries "$PROJECT_DIR/.pio/build/s3lite-server" "$ASSETS_BASE/server"
|
|
copy_binaries "$PROJECT_DIR/.pio/build/s3lite-client" "$ASSETS_BASE/client" |