eculocate

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 68a564d3eb201f1b912b229a9fc381335d2223b3
parent b9d02b07b57c200da8b160b02ddc0416f247101f
Author: Daniel Barlow <dan@telent.net>
Date:   Mon, 19 Jan 2026 21:11:06 +0000

send ota.bin in otaclient.rb

Diffstat:
AMakefile | 2++
Motaclient.rb | 7+++++--
2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile @@ -0,0 +1,2 @@ +ota.bin: ./target/riscv32imc-unknown-none-elf/release/ecu-esp32 + espflash save-image --chip esp32c3 $< $@ diff --git a/otaclient.rb b/otaclient.rb @@ -2,9 +2,12 @@ require 'socket' sock = TCPSocket.new("eculocate.local", 5000) -image_len = (rand* 64_000).to_i +rom_image = File.read("ota.bin", mode: "rb") -payload = "ROM0" + ("z" * 64) + [image_len].pack("L>") + ("i" * image_len) +image_len = rom_image.size + + +payload = "ROM0" + ("z" * 64) + [image_len].pack("L>") + rom_image sock.write(payload)