Skip to content

v0.6.0

Choose a tag to compare

@github-actions github-actions released this 30 Nov 19:21
· 8 commits to main since this release
da44dca

Kotlin Multiplatform SDK for Meshtastic radios over BLE, TCP, USB-serial and WebSocket,
on Android, JVM and iOS, with JS and Wasm targets for the core, testing and WebSocket modules.

implementation(platform("org.meshtastic:sdk-bom:0.6.0"))
implementation("org.meshtastic:sdk-core")

Added

  • BleScanQuota models Android's silent BLE scan quota (a scan is refused once 5 have stopped
    within 30 seconds): withScan(scan) runs a scan against it and retryAfter() says when the next
    one is admitted. A scan the model refuses fails at once with the new
    BleScanQuotaExceededException, a MeshtasticException.Transport carrying retryAfter. The
    model counts this process's scans only, so after a crash, restart or reinstall Android can still
    silence a scan it admits.
  • LocalConfig.toConfigSections(), LocalModuleConfig.toModuleConfigSections(),
    List<Config>.toLocalConfig() and List<ModuleConfig>.toLocalModuleConfig() are public, for
    converting between a DeviceProfile's config shape and the per-section admin writes.
  • RetryAfterHint lets a transport's connect failure, or an exception in its cause chain, say
    when a retry can succeed. Auto-reconnect waits at least its retryAfter, capped at the longer of
    maxBackoff and 60 seconds, and the refused attempt neither counts toward maxAttempts nor
    advances the backoff; a refused first connect counts as none and the next attempt is still
    Reconnecting(attempt = 1). A zero or negative retryAfter is an ordinary failure.
    BleScanQuotaExceededException implements it, so an unbonded radio no longer reaches Failed on
    scan quota refusals alone.

Changed

  • On Android, BleScanner.scan() and the address scan in BleTransport(address) count against
    BleScanQuota. A scan the quota model refuses now fails with BleScanQuotaExceededException
    instead of waiting with no results, and a connect by address skips the scan for a bonded radio
    and fails at once for an unbonded one, rather than reporting it out of range.

Fixed

  • An editSettings or batch block open across an automatic reconnect no longer writes to the
    new link without a begin_edit_settings: its next write fails with NodeUnreachable and no
    commit is sent, as across a fresh connect(). A write acked on a link that then dropped, a
    restart-class command among them, is no longer mirrored into the SDK's state; the next session's
    handshake reports the device's state instead.
  • installDeviceProfile writes the fixed position inside the settings transaction, after the
    position config, instead of after the commit, where firmware had already dropped Bluetooth and
    scheduled a reboot. A fixed position at latitude and longitude 0 is no longer written.
  • installDeviceProfile drops secondary channels with a blank name and an empty PSK from the
    profile's channel URL before the eight-slot check, so a padded URL no longer fails.
  • WebSocketTransport connect failures, the desktop BleTransport(address) scan timeout and
    AndroidUsbSerialPorts.open(context, deviceName) no longer put the host and port, BLE MAC or USB
    device path in their exception text; they name the transport kind and a digest, as
    TransportIdentity.forLog() does.
  • WebSocketTransport connect, send and drop failures and USB serial connect and send failures name
    the platform cause by its type instead of appending its message, which can carry an address; the
    cause stays attached.