Changelog
4.2.0 (2026-11-08)
No breaking API changes: Rust and JS code written for 4.x keeps compiling and the
invoke payloads are unchanged. New things are new serialplugin-core (0.2.0) API.
Behaviour notes (visible to 4.x code)
close()now delivers what the hub still holds (the pending watch batch, a parser's remainder) to the watch before it returns, in order, with nodisconnect; 4.x dropped the unflushed batch.- Port-list events: within one poll all
removedcome before alladded(4.x:addedfirst), each sorted by path. A different device on the same path between two polls (type, vid, pid or serial number changed) isremoved+added; late-filled manufacturer / product strings are not. - CMUX: SABM is resent per the T1 / N2 given in the
AT+CMUXcommand (the defaultenableMuxcommand gives T1 = 10, N2 = 2); with neither, one SABM as in 4.x. During modem flow control (FCoff, MSC FC) channel writes wait, and fail after their write timeout. ble://<name>(desktop / iOS) waits 1.5 s after the first match before taking a name, and fails if two devices share it.- After a disconnect the core releases the device handles (no hub restart on a dead fd), but the path keeps its 4.x behaviour until
close():managedPorts()lists it, a newwatchgets thedisconnect, other calls fail with the disconnect reason,close()succeeds once. - Rust:
port::list_monitor::diff_portsreports a path that now holds another device in both lists and returns them sorted.
Features (serialplugin-core 0.2.0)
CoreErrorwithErrorKind(NotFound,PermissionDenied,Busy,Disconnected,Timeout,Cancelled,Other; platform error assource(), converts to the 4.xErrorwith the same text) from new methodsopen_core,close_core,write_core,exchange_core,at_core. A port that is listed but cannot be opened (flock, Windows "Access is denied" in any language) isBusy. The 4.x methods and errors are unchanged.watch_core/unwatch_core: any number ofCoreEventstreams per port, each with its own parser androuteUrc; URCs caught duringat()go to everyrouteUrcstream.subscribe_core/unsubscribe_core: port opened / disconnected (kindDisconnectedand the reason) / closed, CMUX channels included. Each core receiver runs on its own delivery thread behind a bounded queue (set_core_queue_capacity, default 4 MiB): a slow one never stalls RX,at()orclose(); on overflow it getsCoreEvent::Overflowand is unsubscribed; a sink returningfalseis removed.Disconnectreaches each stream once (also on Android).insert_port(manage anySerialPort, e.g. a fake),supports_modem_lines(path)(falsefortcp://,ble://and CMUX channels),available_ports_detailed()(typedPortDetails: u16 vid/pid, Linux/dev/seriallinks; USB interface number and location with the new featureusb-port-details, off by default). Featureslog(logs through thelogcrate) andtest-util.- The old
watchkeeps the 4.x timing: its sink runs on the RX side, nothing is lost and nothing arrives afterunwatch()/close()returns. The watch registry belongs to eachSerialManager(two managers may watch the same path; a watch id stays unique across managers); "one watch per port" applies to the oldwatchonly, with the 4.x error text. - Unix local serial ports: writes and control calls use a cloned handle (no wait for the RX hub's read);
open(timeout)/set_timeoutapply to writes, and a write longer on the wire gets twice its wire time. - CMUX (27.010 basic option): MSC (RTC/RTR/DV) after each data DLC is established; known control commands echoed, unknown ones answered with NSC; DISC or DM from the modem on an open DLC closes that channel (
Disconnecton its path, writes fail, re-open withopenMuxChannel); DISC / DM on DLCI 0 or CLD from the modem ends the session and the port is plain again; FCoff and MSC FC hold writes as above;disableMux/ closing the physical port waits up to T2 for the CLD response without holding the manager's lock; CMUX writes get a timeout from the wire time. Core:CmuxSession::for_command,CmuxTimers,CmuxPhysicalIo::write_timeout. - TCP: keepalive (10 s idle, 5 s interval, 3 probes; Windows keeps its 10) on
tcp://sockets, best effort, so a bridge that vanished without a FIN ends inDisconnect; on Unix a keepaliveETIMEDOUTread is a disconnect. Optional allowlist for webviewopen():plugins."serialplugin-config".tcpAllowlistintauri.conf.json(exacthost:portstrings); without the key nothing changes, Rust callers are not restricted. - BLE (desktop / iOS): each write is bounded by 5 s (a timed-out write drops the link); a name shared by several devices is an error listing their ids.
- The port-list monitor sends events outside its lock and none after
unwatch_ports/unsubscribereturns.
Fixes
- The first
ExchangeWaiterresult wins (a late cancel no longer replaces a completed reply);clear_buffer(Input)also drops bytes buffered in the hub;bytes_to_readno longer reports 0 while the hub holds the port;write/write_binaryonpath#dlci=Ngo out as CMUX UIH frames. - CMUX:
enableMuxwaits 100 ms after theAT+CMUXOK before the first SABM (a frame inside the modem's switch window was lost and the Quectel M26 then ignored SABM for ~2 s, soopen→enableMuxfailed with "no UA") and sends CLD if the control channel does not open; closing a channel waits up to T1 for the UA to its DISC, sodisableMuxgets the CLD response at once instead of waiting out T2. - Windows: the full USB serial number is found among every device instance with that COM name.
- android-usb-serial 0.1.4: no panic when a driver is used before
openor a control-IN reply is short (CP21xx modem status, CH34x status / break, PL2303 status, FTDI modem status).
4.1.0 (2026-11-08)
No breaking API changes: Rust and JS code written for 4.0.0 keeps compiling and the invoke payloads are unchanged; the API additions and the behaviour changes are below.
Behaviour changes (AT parser)
- URCs are no longer de-duplicated: two identical URCs in one read are both reported.
- V.250 numeric result codes (
ATV0mode:0,3,4, …) are recognised as final results; result codes match case-insensitively. - Verbose
+CME ERROR:/+CMS ERROR:texts are mapped to their numeric codes ("+CME ERROR: SIM busy"givescode: 14);codeisnullonly for text the parser does not know. - Trailing lines after the final result code no longer hide it and are reported as URCs; a final
OKglued to a following+CUSD:is split; quoted multi-line+CUSDis one URC. - Two-line
+CMT/+CDS/+CBMURCs keep their PDU line;+CMGS:in the PDU phase ofsend_sms_pduis treated as solicited; text-mode SMS bodies stay data. ATV0replies whose result code ends with CR only (V.250 §5.7.1) complete instead of timing out; echo and result are no longer glued into one line.- Basic commands in front of an extended one (
ATE1+CSQ,AT&F+CSQ) no longer turn the reply line into a URC; withATE0the lines of a known command (AT+CLAC) are body. CONNECTorOKfollowed by data in the same read (PPP, CMUX) completes the exchange.- A reply without a final result keeps its last line in
solicitedBody. - The non-standard
COMMAND NOT SUPPORTline is no longer a final result (only V.250, 27.007 and 27.005 codes are;SEND OK/SEND FAILstay for compatibility).
Features
- New
serialplugin-corecrate (crates/serialplugin-core): the plugin's whole serial core (RX hub, watch with parsers, exchange / AT / SMS PDU, CMUX, TCP, BLE, Android USB) without Tauri.SerialManagertakes closure sinks (EventSink,PortListSink) instead of IPC channels, so headless Rust apps can drive many ports directly. The plugin is now a thin layer over it:api::SerialPort<R>keeps its 4.0.0 methods (delegating toSerialManager, which it also derefs to) and the moved modules are re-exported at their old paths (state,events,error,at,hub, …). - New
serial-codeccrate (crates/serial-codec, MPL-2.0), usable without Tauri:framing(Node serialport parser parity: delimiter, readline, byteLength, interByteTimeout, packetLength, ready, regex, startEnd, SLIP, ccTalk),at(AT response parsing),args(V.250 / 27.007 argument splitting),urc(typed 27.007 / 27.005 information lines and URCs, e.g.+CSQ,+CREG),sms(SMS PDU decode/encode, GSM 7-bit with national shift tables, UCS-2, concatenated SMS reassembly),ussd(+CUSDparsing, USSD 7-bit packing, CBS DCS) andcmux(27.010 basic-mode frames). watch({ parser })(RustSerialPort::watch_framed/SerialManager::watch_framed; the parser is a top-levelparserargument of thewatchcommand): native framing, each complete frame is onedataevent with no batching; time-based parsers fire without further bytes; the buffered remainder is emitted on unwatch, close or disconnect. Works on every transport and on CMUX channels, and survives auto-reconnect. See the parsers guide.- JS: new exported types
BlePortInfo(scanBlePorts()results withrssi) andExchangeCompletionMode. - Documentation site: https://s00d.github.io/tauri-plugin-serialplugin/ (guides, platform notes, and an API reference generated from the sources).
- Android BLE:
ble://<MAC or name>ports andscanBlePorts()now work on Android (featureble) through a KotlinBluetoothGattbridge: Nordic UART Service, MTU 247, serialized chunked writes, notifications as read data, link loss asonDisconnect, one retry on GATT 133/62/129. Runtime permission is requested on first use (Nearby devices on Android 12+, location on 11 and older). GATT callbacks complete only the step that waits for them (a peripheral-initiated MTU exchange or a late callback no longer finishes the wrong step); a MAC not seen before is found by a short address scan (random static addresses); names are cached and Android's 5-scans-per-30 s limit is a clear error; Bluetooth switched off ends open ports withonDisconnect; Location services off (Android 11 and older) is a clear error; pairing-protected devices are paired and retried once; one 20 s budget covers the wholeopen(); partial writes return the bytes sent; the RX queue is capped at 1 MiB and counted bybytesToRead(). The Bluetooth permissions are not in the library manifest (its merge would have changed apps' own location /BLUETOOTH_SCANdeclarations): withble,build.rswrites them into the app's generatedAndroidManifest.xml, leaving out any the app declares itself. Apps withoutbleget no new permissions (see BLE).
Bug Fixes
- watch/URC: URCs found while draining RX before an exchange were judged per read
chunk, so a
+CMT:/+CDS:header could go out without its PDU line; they are now emitted when the drain completes, over the whole drained buffer. A URC that arrives during the pre-exchange drain is therefore delayed by up to the drain window (drainIdleMsafter the last byte, at mostdrainMaxMs, default 200 ms), and still reaches the watch when the drain ends with an error (read error, close, USB error). - watch:
unwatch/closeracing the RX thread could drop frames the parser had already decoded and deliver the later remainder; events now keep their sink from the moment they are decoded, and the remainder always comes after them (also on CMUX channels, where it could arrive first). - core: the watch sink is never called under a manager, hub, drain or CMUX lock, so
a sink may call back into
SerialManager(unwatch, the parser remainder on unwatch/close/re-watch and drain URCs used to run under them and could deadlock). The sink runs on the RX thread, except the last events of a watch (remainder on unwatch / close), which may run on the caller's thread; one call at a time, in order. - CMUX: the receive limit is the N1 from the
AT+CMUX=command (4th parameter), at least 1509 bytes; frames up to N1 bytes are no longer dropped as corrupt when N1 is above 1509 (the default command keeps N1 = 31). - CMUX: a physical disconnect now flushes channel watches too: their parser
remainder, then
disconnectwith the channel's path. - watch: time-based parsers (
interByteTimeout, ccTalk) and the batch timer kept running only outside a pre-exchange drain; they now fire during it. - core:
watchids handed out bySerialManager::watch/watch_portsskip ids already taken by plugin channels, and a duplicate id is rejected instead of silently replacing the other watch.force_closejoins the RX thread outside the port map lock. - watch: unknown keys inside
watch({ parser })failwatch(a typo would fall back to a default); the parsers are linear on input without delimiters (startEnd and regex rescanned their whole buffer per read), andpacketLengthgainedmaxBufferSizeand rejects options that could overflow. Exchanges judge each reply line once (a long reply re-ran completion over the whole buffer per read). - BLE: chunks are capped at 512 bytes (Android 14+ and some desktops negotiate
MTU 517+);
ble://<name>lookups scan without the service filter (boards that do not advertise the NUS UUID); every 8th chunk is written with response when the device allows it. Desktop / iOS:open()times out after 20 s instead of waiting forever on macOS, one Bluetooth adapter is shared and waited for until powered on, notifications sent right after subscribing are kept, Linux ports areble://<MAC>and MACs match in any case, the RX queue is capped at 1 MiB like on Android. Android: bonded devices get 1.6 s before service discovery, a stale GATT cache is refreshed once, Service Changed ends the port, high connection priority, indicate-only TX characteristics work.
4.0.0 (2026-11-08)
Full audit release. See the migration guide for the breaking changes.
⚠ Breaking changes
- Rust
commands::*port I/O functions areasync(they ran on the main thread and areadwaiting for data froze the UI). Add.await. MSRV 1.79 → 1.90. - npm
exportssplit intoimport/requirewith separate types (index.d.cts);guest-js/sources and thedevelopmentcondition are no longer published. read()decodes bytes in JS (portencoding, streaming);watch()no longer uses the read timeout as its batch window (default ~20 ms, plus flush atsize).- Android
device_filter.xmlno longer matches every USB device.
Features
- Serial over TCP:
tcp://host:porton every platform (ser2net, ESP-Link, device servers). - The plugin builds for iOS (it did not compile there at all); TCP is the transport.
dtr/rtsoptions on open (new SerialPort({ dtr: false, … }), Rustcommands::open(…, dtr, rts)/SerialPort::open_with_lines):dtr: falsestops Arduino-style boards resetting on every open. Android still asserts both by default.- Serial over Bluetooth LE (Nordic UART Service):
ble://<id>paths andSerialPort.scanBlePorts(), behind theblecargo feature (desktop + iOS).
Bug Fixes
- exchange/AT:
cancel_exchangewedged the port's transaction queue for good (the next exchange waited forever). - exchange/AT: a late reply left in the buffer completed the next default exchange, shifting all later responses by one.
- exchange/AT: SMS prompt
"\r\n> "(no LF) was never detected, sosend_sms_pdualways timed out;+CMS ERROR/ERRORafterAT+CMGSwaited for the timeout; a non-UTF-8 byte or a URC right afterOKstalled completion;"AT\r"lost its CR. - exchange/AT: a cancel between
at_phases/send_sms_pduphases was wiped and the SMS was sent anyway; URCs after the echo were swallowed; the URC demux of the previous exchange was reused. - CMUX: frames used HDLC-style 0x7E stuffing with a CRC-16 instead of 27.010 basic
mode, so no modem understood them; no SABM/UA or CLD; stream flush deadlocked the RX
thread; DLCI was not range-checked;
enable_muxignoredERROR; virtual channels survived their physical port. - watch: with
routeUrcdata lost its line terminators and lines split across reads were not joined; on Windows an unplugged adapter never produceddisconnect; EINTR silently stopped the RX thread. - ports:
unwatch_portscould deadlock the app; re-opening a port (webview reload) left the old watch registered; a failed open could leave anOpeningentry or a running hub thread; ports are closed on app exit; large or slow writes failed after a fixed 100 ms timeout. - guest-js:
handle.unwatch()did not free the port for a newwatch();close()after a disconnect did not stop auto-reconnect;set*changes were lost on reconnect;open()failing inconfigureAtSessionleft the port open; auto-reconnect gave up when the re-watch failed; concurrentwatch()started two native watches;sendAtPhasessent binary phases as objects;onReconnectalways reported attempt 0. - android: PL2303 and FTDI chip detection read the wrong descriptor; FTDI baud 0
panicked;
device_filter.xmlhad unparsable ids (wildcards) and wrong STM32/Arduino ids; a 30 s USB permission wait held the device lock the detach handler needed; the fd leaked when an open failed part way; detach teardown ran on the UI thread. - android: USB Ethernet / RNDIS devices (a CDC data interface without an ACM
control interface) were listed as serial ports; an out-of-range CDC port index
silently opened another port; a CDC notification error was reported only once;
clear(Input)left chunks the reader had already queued; a write that timed out half-way (flow control) reported nothing sent, sowrite_allresent it; a USB chunk bigger than the read buffer lost its tail. FTDI latency timer is set to 1 ms (chip default 16 ms per short reply). CH34x gains RTS/CTS flow control and the 307200 baud divisor; PL2303 no longer sends rates older chips reject; FT4232H counts 4 ports. (Compared against usb-serial-for-android 3.11 / master.) - windows: full USB serial numbers come from the registry instead of
wmic, which is gone from Windows 11 24H2+ and flashed a console window on every port-list poll. - docs: six permission identifiers in the README did not exist.
Build
- guest-js: Vite 8 library build (ESM + CJS), TypeScript 6, vitest 5; publint, arethetypeswrong and a CJS/ESM smoke check run on every build. Rollup, Jest and tslib removed.
- Android library: compileSdk 36, AGP 8.11, Kotlin 2.2
compilerOptions; unused appcompat/material/gson dependencies removed. - CI on Linux, macOS and Windows (Windows test binaries embed a Common-Controls v6 manifest), MSRV job, Android and iOS checks.
- android-usb-serial 0.1.3.
3.0.9 (2026-10-14)
3.0.8 (2026-10-14)
Bug Fixes
- android: lint at build time and pick a Gradle-compatible JDK (0cae84a)
- android: prevent app crashes when USB devices disconnect (#43) (70371fc)
- ci: stop android-integration from installing removed SDK tools (e032bbf)
Unreleased
- Clear pending Java exceptions on failed USB JNI operations before detaching native threads, preventing an Android crash when reconnecting an unplugged dongle.
3.0.7 (2026-09-11)
Bug Fixes
- android: cache UsbNative class in nativeInit (#42) (46797ec)
- android: clear aarch64 --all-targets clippy/test noise (532b334)
- android: surface UsbNative class-cache init failures (b331bc9), references #42
- android: wire FakeTransport RX hub and AT modem sim (7f19bf8)
3.0.6 (2026-09-10)
Bug Fixes
- ci: align playground Tauri 2.6; skip Win node_modules cache (4b09e59)
- ci: restore serialport-test Cargo.lock for Android (2c4d1f9)
- release: publish via publish-branch=main (56d1c8e)
- release: stage Cargo.lock after version bump (04e2362)
- watch: keep idle RX bytes raw by default (e5df565), closes #41
3.0.5 (2026-09-06)
Bug Fixes
- ABBA deadlock between RxHubShared read/drain slot and its done mutex (#38) (e252491), closes #2
- cdc-acm: expose serial state notifications (#37) (0f5a944)
- cdc-acm: skip bad serial-state frames (4a47cd6)
- clippy: drop redundant borrow in format! arg (f15973f)
- hub: take whole read/drain slot on complete (#39) (8851d6b)
- npm: ship guest-js in published package (0f1e3ff), closes #36
All notable changes to this project will be documented in this file. See standard-version for commit guidelines.
3.0.4 (2026-09-05)
Bug Fixes
- hub: take the whole read/drain slot on complete (no emptied-
Somerace with timeout reclaim); drain timeout reclaim mirrors read and preserves posted errors; do not drop RX when the drain slot is reclaimed mid-read (#39)
3.0.3 (2026-09-05)
Bug Fixes
- hub: fix ABBA deadlock between
RxHubSharedread/drain slot and itsdonemutex; recover a completion posted during the timeout reclaim race instead of reporting a spurious timeout (#38)
3.0.2 (2026-07-31)
Bug Fixes
- android / cdc-acm: expose serial-state notifications (DCD/DSR/RI) and skip malformed interrupt frames so the notification reader stays alive (#37)
- deps: bump
android-usb-serialto0.1.1
3.0.1 (2026-07-17)
Bug Fixes
- include
guest-jsin the published npm package so Vite can resolve thedevelopmentexport (#36)
3.0.0 (2026-07-08)
Major v3 release: Channel-based watch() API, native AT exchange / FIFO queue, unified RX hub on desktop and Android, and a hard cut from vendored Java usb-serial-for-android to the pure-Rust android-usb-serial crate (nusb).
Breaking Changes
- Streaming API:
startListening()/listen()/disconnected()/cancelListen()removed. Usewatch({ onData, onDisconnect?, onError?, onUrc? })→SerialEventover TauriChannel(desktop + Android). - Capabilities:
SerialPort.getCapabilities()(transport,platform,version); commandscapabilities,watch,unwatchreplacestart_listening/stop_listening. - Removed:
available_ports_direct— useavailable_ports(). - Removed
AtCommandQueue/port.at: UsesendAt(),sendAtPhases(),sendSmsPdu(),cancelAt(),configureAtSession(). onUrcremoved fromAtSessionOptions: Usewatch({ onUrc })for live URC lines.exchange()returnsExchangeResponse, notUint8Array. Use.rawfor bytes.clearRx: truemaps topurge; default is nowdrainwhen unset.- Android USB stack: Vendored
android/usbserialJava tree removed. Kotlin no longer runs serial I/O commands on the main thread — onlyUsbFdBridge(enumerate, permission, fd). All drivers and bulk I/O live in Rust (android-usb-serial+ nusb). - Rust module layout: Removed compat top-level modules (
desktop_api,mobile_api,port_rx_hub,exchange_runtime, …). Useapi::serial,hub,exchange,port,state,android. - guest-js:
AtCommandResult.raw/ExchangeResponse.rawareUint8Array;timedOutis a nativeboolean. rust-version: 1.79 minimum.
Migration (v2 → v3)
| v2 | v3 |
|---|---|
startListening() + listen(fn) | watch({ onData: fn }) |
disconnected(fn) | pass onDisconnect: fn into the same watch({ ... }) |
cancelListen() / stopListening() | handle.unwatch() |
port.at.enable() / enqueue() | sendAt() / sendAtPhases() |
Kotlin UsbBridge + Java drivers | UsbFdBridge fd → Rust driver_host |
Android app requirements: uses-feature android.hardware.usb.host, device_filter.xml, runtime USB permission before openDevice(). Do not claimInterface() in Kotlin before handing fd to Rust. See crates/android-usb-serial/README.md.
Features
android-usb-serialcrate: Pure Rust USB serial on Android via nusb; 567 golden parity fixtures; drivers for FTDI, CP21xx, CH34x, PL2303, CDC-ACM, GSM modem, Chrome CCD (20b54c0).UsbFdBridge: Kotlin provides USB fd only; Rustdriver_hostowns probe, claim, drivers, RX reader, and I/O.- Unified
api::serial: Singleserialport::SerialPortfacade on desktop and Android;PortRxHubpoll-loop on both platforms (4071ff6). - Rust-first Android JNI (29faa29): bulk-IN reader thread, chunked write, CMUX virtual paths through Rust session.
- Unified RX hub (desktop + Android): Single consumer per port;
watch,exchange,read, and drain share one hub (7024fc0, caa5700). take_idle_bytes: Stale RX in the hub idle buffer is replayed into the nextexchangeafter write.- Native FIFO queue (Rust + Android): All
exchange/ AT jobs on one port serialize in FIFO order; parallel invokes wait instead of"Exchange already in progress"(e1eb63f). - Native
exchange/cancel_exchange: Write + read-until terminators, idle silence, wall timeout, max response size; structuredExchangeResponse(status,lines,solicitedBody,urcLines,raw). - Line-framed AT completion: Final line
OK/ERROR/+CME ERROR/+CMS ERROR;completionMode: 'substring'for legacy/binary. rxPrepare: Defaultdrain;purgeopt-in;noneunchanged.watchAvailablePorts()/watch_ports: Hotplug via Channel —snapshot, thenadded/removed(desktop poll; Android USB attach/detach).open()canonical path: Returns session key (Android device path /device#Nfor multi-port).- CMUX virtual
exchange: Pathsphysical#dlci=Nrouted through Rust CMUX session like desktop. usb-driver-tester: Standalone hardware self-test app underexamples/usb-driver-tester/.- guest-js: Modular v3 SDK; auto-reconnect restores
open()+watch()after disconnect. - macOS:
available_ports({ singlePortPerDevice: true })— one path per device (prefers/dev/cu.*). - Extended AT grammar: Vendor prefixes, V.250 finals,
derive_solicited_prefixes(command);ExchangeDemuxfor live URC before echo. pauseWatchdefaultfalse— watch stays on during AT; passpauseWatch: truefor legacy behavior.
Bug Fixes
- Android CH340 / weak OTG: Bulk IN reader starts after line/DTR setup; in-flight URBs reduced to 2; clearer detach reason in logs.
- Android enumerate: Kotlin exports
interfaces[]; Rust expands multi-port paths (device#N) viaProbeTablewithout opening fd. - Android write after listen:
EndpointPair::writeno longer re-opens bulk IN owned bySerialReader(endpoint already in use). - Android Kotlin fd bridge: Removed pre-
claimInterface(fixesio interface is busywith nusbdetach_and_claim). - Android logcat: Rust plugin logs use tag
SerialPluginvia__android_log_write. - Android: USB permission
PendingIntentusesFLAG_MUTABLEon API 31+; detach + IO errors →SerialEvent::Disconnecton Channel (#27). - Android:
cancel_exchangewakes hub waiter; CMUX virtual cancel clears DLCI TX queue (c6c94dd). - Android: JNI exceptions, session path re-key, teardown leaks (e9fc307).
- Android: Serialize fail/shutdown on dedicated usb-io thread (cd74b84).
- desktop:
write/write_binaryflush viawrite_all(#29). - desktop: Unblock hub drain when watch is active (55f1cb3).
- desktop: Lock order, Opening-state open, async
enable_mux(3a4bd88). - desktop (Windows): Enrich truncated USB
serial_numberfrom WMI (#23). - Hub / watch:
lock_or_recoverin watch_registry and hub channel paths (2071e15); panic/poison hardening (8672de9). - TX queue: Errors no longer halt the port queue until reopen (e1eb63f).
- guest-js:
readBinaryrequires open port; watch-preservingchange()(9b22af7).
Build / CI / Docs
- CI:
cargo fmt,clippy,pnpm check/build, Windowscargo check, Android integration emulator job (1aa1682, 2e70ecf). - Tests: Kotlin↔JNI↔Rust instrumented integration tests with
FakeTransport(412b4a5, be77e2a); Jest v3 lifecycle + Rust contract tests. - Docs: v3 migration guide, Android bridge docs,
examples/serialport-test/ANDROID.md,android-usb-serialAndroid usage (c2d1e23, b3cc7d2). - Workspace:
android-test-harnessfeature wiresFakeTransportfor instrumented tests.
2.24.1 (2026-07-08)
2.24.0 (2026-07-08)
Features
- android: buffered emit, USB serial hardening, Gradle tests (efa35ec)
- js: open/close guards, mocks; update Jest tests (2e56cad)
Bug Fixes
- android: run port IO commands off the main thread (#34) (bcd1aa2)
- desktop: write_all, timeout, Android serialport split (f33ea91)
2.23.0 (2026-07-02)
Bug Fixes
- desktop:
write/write_binarynow flush the full buffer viawrite_all(retries partial kernel writes instead of returning after the firstwritesyscall). Mitigates truncated sends on Windows and slow links (#29). - desktop: Default open/read/write timeout raised from 200 ms to 1000 ms (
DEFAULT_SERIAL_TIMEOUT_MSin JS and Rust). - desktop:
start_listeninglistener read-poll timeout fixed: was capped at 1 ms (.min(1)regression); now clamped to 1–100 ms while the user timeout still controls buffer coalescing.
Features
- guest-js: Export
DEFAULT_SERIAL_TIMEOUT_MS; documenttimeoutonSerialportOptions; clarifywrite/writeBinaryreturn value vs payload length.
Build / Android
- Rust:
serialportis a desktop-only dependency (cfg(not(android/ios))); Android builds no longer link the unused crate. Desktop-only state (ConnectedPort,PortState, …) andFrom<serialport::Error>are gated accordingly.
2.22.0 (2026-03-21)
Android / USB
- Lifecycle:
SerialPluginregistersApplication.ActivityLifecycleCallbacksand runsSerialPortManager.cleanup()when the hostActivityis destroyed (close USB ports, unregister permission receiver, shut down IO executor). - Listening: Incoming data is coalesced in
BufferedEmitter/SerialByteAccumulatorbeforeserialDataevents; flush interval viaserialDataFlushIntervalMs(native clamp typically 10–2000 ms). - USB serial (usb-serial-for-android): Read/write use configured timeouts;
clearBuffermaps topurgeHwBufferswhen supported;setFlowControl(RTS/CTS, XON/XOFF);SerialInputOutputManagererrors triggerserialErrorand port cleanup. bytesToRead/bytesToWrite(Android): With activewatch,bytesToReadis the plugin-side buffer before the next Channel flush;bytesToWriteis typically0.- Tooling: Gradle wrapper and
android/settings for local./gradlew test; JVM unit tests use a realorg.jsonartifact (Android JSON stubs breakJSONObject.putin tests). Kotlin tests cover models, JSON helpers, emit pipeline,BufferedEmitter.
Features
- guest-js: Stricter
SerialportOptions/Optionstyping (removed open index signatures);Record<string, PortInfo>foravailable_portsmaps.
2.21.1 (2025-11-05)
2.21.0 (2025-10-11)
Features
- serial: emit disconnection events on serial port closure (9870d1f)
2.20.0 (2025-10-11)
Features
- logger: add centralized logging functionality for the serial plugin (887dcf9)
- logging: add centralized logging module with adjustable log levels (6cb8a51)
- logging: add centralized logging module with adjustable log levels (7a7eacd)
Bug Fixes
- readme: correct indentation and enhance serial port listening example (6e997b5)
- readme: correct indentation and enhance serial port listening example (df46965)
2.19.0 (2025-08-26)
Features
- serialplugin: add logging for serial port operations and cleanup (e474046)
- serialport-manager: add custom prober for unknown USB devices (74b3915)
Bug Fixes
- android: require USB host feature in AndroidManifest.xml (2227513)
- serial: correct minimum timeout value for serial port (dd83ded)
2.17.1 (2025-07-02)
2.17.0 (2025-07-02)
Features
- serial: update listen method to return unlisten function (98e881d)
Bug Fixes
- listener-manager: handle errors in unlisten functions (30c5445)
2.16.0 (2025-07-01)
Features
- serial: update listen method to return unlisten function (f7090e0)
- serial: update listen method to return unlisten function (0ac67ac)
2.15.0 (2025-07-01)
Features
- listener-manager: implement listener management for serial events (b32b01c)
2.14.0 (2025-07-01)
Features
- serial: enhance error handling in serial port functions (1403b77)
2.13.0 (2025-07-01)
Features
- api-iife: update event listener management in serial plugin (81f4522)
2.12.1 (2025-06-19)
Bug Fixes
- deps: update tauri-plugin-serialplugin to version 2.12.0 (07e7526)
- mobile_api: correct port opening error handling logic (33f43c7)
2.12.0 (2025-06-12)
Features
- serialport: add test mode for simulating serial port behavior (22356b5)
- serialport: add test mode for simulating serial port behavior (287ab53)
- serialport: improve error handling and add port configuration (5844e2d)
- tests: add comprehensive tests for serial port functionality (614901e)
2.11.1 (2025-05-25)
2.11.0 (2025-04-04)
Features
- serial: set a default timeout for serial port connection (c252883)
Bug Fixes
- deps: update dependencies to latest versions (0d857bb)
- deps: update dependencies to latest versions (c8dc8f1)
2.10.2 (2025-03-27)
2.10.1 (2025-03-13)
Bug Fixes
- serialport: update USB permission handling for Android 33+ (b9b0e70)
- serialport: update USB permission handling for Android 33+ (8034668)
2.10.0 (2025-03-02)
Features
- serialport-test: refactor app structure and enhance port management (22b0e7a)
Bug Fixes
- serialport: update USB permission handling for Android 33+ (e71cca9)
2.9.0 (2025-02-05)
Features
- android: enable hardware acceleration in AndroidManifest.xml (2f16b06)
- serialport: register USB receiver in SerialPortManager (5f32352)
Bug Fixes
- device_filter: remove outdated USB device entries (3236183)
2.8.2 (2025-02-02)
Bug Fixes
- serialport: improve timeout handling and error messages (de2233c)
2.8.1 (2025-02-02)
Bug Fixes
- permissions: add read-binary command permissions (76262b1)
2.8.0 (2025-01-30)
Features
- serial: add
read_binarycommand to read binary data from serial port (1a17f99) - serial: add
read_binarycommand to read binary data from serial port (83a873d) - serial: add
read_binarycommand to read binary data from serial port (09e6a32) - serial: add readBinary method for reading binary data (5a62544)
2.7.0 (2025-01-27)
Features
- mobile_api: update managed_ports to return a list of port names (77e6799)
2.6.1 (2025-01-27)
2.6.0 (2025-01-14)
Features
- app: add managed ports functionality and UI integration (a3465ce)
- build: add managed_ports command to the serial plugin (6a79bbb)
- permissions: add managed_ports command permissions (634b713)
- permissions: add managed_ports permissions and update documentation (9714453)
- README: add documentation for managed ports feature (b241c13)
- schemas: add commands for webview and window background color (67b9670)
- serial: add managed_ports command to list open serial ports (7eb727d)
- serialplugin: add managedPorts command to retrieve active ports (378ee2a)
- serialplugin: add method to list all managed serial ports (d04b991)
2.4.13 (2024-12-24)
Bug Fixes
- package: update version numbers in package files to 2.4.12 (323a1f9)
2.4.11 (2024-11-29)
2.4.10 (2024-11-29)
2.4.9 (2024-11-29)
2.4.7 (2024-11-29)
2.4.6 (2024-11-29)
2.4.4 (2024-11-29)
2.4.5 (2024-11-29)
2.4.4 (2024-11-29)
Bug Fixes
- size and timeout settings not working. (e49197d)
2.3.1 - 2024-11-10
Added
- Automatic cleanup of existing listeners before starting new ones
2.3.0 - 2024-11-10
Added
- New
startListeningcommand for explicit port monitoring control - New
stopListeningcommand for manual monitoring termination
2.2.0 - 2024-11-10
Added
- Automatic port listening on connection
- Background thread management for port monitoring
Changed
- Refactored read operation to be synchronous instead of event-based
- Improved port cleanup on close
- Modified TypeScript interface to return string data directly from read operation
- Changed port reading logic to use direct synchronous reads
- Added automatic port monitoring on connection
2.1.0 - 2024-11-01
Added
- New serial port control methods:
set_baud_rate: Set the baud rateset_data_bits: Set the data bits configurationset_flow_control: Set the flow control modeset_parity: Set the parity checking modeset_stop_bits: Set the stop bits configurationset_timeout: Set the timeout durationwrite_request_to_send: Set RTS control signalwrite_data_terminal_ready: Set DTR control signalread_clear_to_send: Read CTS signal stateread_data_set_ready: Read DSR signal stateread_ring_indicator: Read RI signal stateread_carrier_detect: Read CD signal statebytes_to_read: Get available bytes to readbytes_to_write: Get bytes waiting to be writtenclear_buffer: Clear input/output buffersset_break: Start break signalclear_break: Stop break signal
- New permissions for all added methods
- Enhanced error handling for serial port operations
Changed
- Improved error handling system
- Enhanced documentation for all methods
- Updated TypeScript definitions with JSDoc comments
Fixed
- Error conversion between serialport and internal errors
- Type conversion issues in serial port operations
2.0.2 - 2023-12-20
Added
- Support for direct port scanning on Windows, Linux, and macOS
Changed
- Updated dependencies to latest versions
- Improved error messages
Fixed
- Port detection issues on various platforms
2.0.1 - 2023-12-10
Changed
- Updated dependencies
- Improved available_ports_direct logic
- Updated test UI
2.0.0-rc.3 - 2023-12-01
Added
- Initial implementation of available_ports_direct