Repository navigation
v0.6.0
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
BleScanQuotamodels Android's silent BLE scan quota (a scan is refused once 5 have stopped
within 30 seconds):withScan(scan)runs a scan against it andretryAfter()says when the next
one is admitted. A scan the model refuses fails at once with the new
BleScanQuotaExceededException, aMeshtasticException.TransportcarryingretryAfter. 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()andList<ModuleConfig>.toLocalModuleConfig()are public, for
converting between aDeviceProfile's config shape and the per-section admin writes.RetryAfterHintlets a transport's connect failure, or an exception in its cause chain, say
when a retry can succeed. Auto-reconnect waits at least itsretryAfter, capped at the longer of
maxBackoffand 60 seconds, and the refused attempt neither counts towardmaxAttemptsnor
advances the backoff; a refused first connect counts as none and the next attempt is still
Reconnecting(attempt = 1). A zero or negativeretryAfteris an ordinary failure.
BleScanQuotaExceededExceptionimplements it, so an unbonded radio no longer reachesFailedon
scan quota refusals alone.
Changed
- On Android,
BleScanner.scan()and the address scan inBleTransport(address)count against
BleScanQuota. A scan the quota model refuses now fails withBleScanQuotaExceededException
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
editSettingsorbatchblock open across an automatic reconnect no longer writes to the
new link without abegin_edit_settings: its next write fails withNodeUnreachableand no
commit is sent, as across a freshconnect(). 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. installDeviceProfilewrites 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.installDeviceProfiledrops 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.WebSocketTransportconnect failures, the desktopBleTransport(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.WebSocketTransportconnect, 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.