Skip to content

v1.30.0

Choose a tag to compare

@robdobsn robdobsn released this 25 Oct 22:05
· 17 commits to main since this release
4ee6e1b

RaftCLI v1.30.0

raft new: new questions and better defaults

  • Hardware. Choose how to describe it:

    • detect it from a connected board;
    • pick a dev board preset (with its I2C connector pins);
    • give an Espressif module's ordering code, e.g. ESP32-S3-WROOM-1-N8R2 (pins the module uses itself are refused for I2C);
    • or give the chip only, or say you don't know, and get safe defaults (4 MB flash, no PSRAM).

    Flash size and PSRAM are set to match: the partition table is sized for the flash, and PSRAM is set in sdkconfig.defaults again.

  • Questions:

    • connectivity: WiFi + BLE, WiFi, BLE or none. Leaving out WiFi saves about 700 KB of app size, and needs RaftCore 1.64.0 and RaftSysMods 1.28.0 or later;
    • BLE role and web server;
    • OTA updates: with them, the flash holds two app slots; without them, one larger slot;
    • I2C and sensors: RaftCore's common set (the default) or its extended set, all device types, I2C without built-in types, or no I2C;
    • decoding for sensors added later.
  • Advanced questions. The SysType name, SysMod name, main task core and ESP-IDF version are now only asked with --advanced.

  • Before anything is written, a summary shows the partition table and an estimated app size.

  • Defaults in new apps:

    • the WiFi access point gets a random password instead of raftpassword;
    • ESP32 and ESP32-S3 apps run the CPU at 240 MHz instead of 160 MHz;
    • apps for a dev board preset or a module use QIO flash, which halved the main loop time on an ESP32-S3-WROOM-1-N8R2;
    • apps use RaftSysMods' default BLE service (aa76677e-...), which raftjs looks for first.
  • Saved answers. The answers are saved in .raftnew.json:

    • raft new --answers <file> makes the same app again;
    • raft update-project --set key=value changes an answer and updates the generated files you haven't edited. A file you have edited gets a <file>.raftnew copy beside it to merge by hand.
  • --set keys from earlier versions still work.

New command: raft detect

Reads the chip, flash size and PSRAM from a connected board. --json gives machine-readable output.

raft fs and raft devtypes over serial, WebSocket and BLE

Device commands used to need HTTP. The device can now be given as any of:

  • an IP address, hostname or http://host[:port];
  • ws://host[:port][/path];
  • serial:<port>[@baud], sharing the port with the log (--show-log shows the log);
  • ble:<name, name prefix or address>. raft ble scan lists devices in range.

You can also give the device with -d/--device or the RAFT_DEVICE environment variable. Under WSL, serial and BLE commands are handed to the Windows raft.exe.

BLE support is a cargo feature, ble, on by default. On Linux it needs libdbus-1-dev. BLE has been tested on Windows only.

File uploads

  • An upload now sends the file's CRC16. Firmware with RaftCore 1.64.0 or later checks the file against it, and RaftCLI then skips the separate filehash request, which saves a round trip per upload. With older firmware, uploads are checked with filehash as before.
  • raft fs cat now handles binary files.
  • HTTP connections time out after 5 s and are retried, instead of hanging for about 2 minutes.