Skip to content

aimdb-serial-connector — COBS-framed serial/UART transport (tokio-serial + embedded-io-async) #122

@lxsaah

Description

@lxsaah

Follow-up to #39 / doc 041. Its own PR, built on the merged Phase 6 foundation.

The headline embedded scenario: a sensor MCU dials a gateway over UART and mirrors a record (run_client on Embassy over a real serial link — Phase 5's stub-transport smoke promoted to a real transport).

Scope

  • New crate aimdb-serial-connector (tokio-runtime / embassy-runtime features, dual modules).
  • Transport triple with COBS framing in the Connection (lossy/unframed medium → self-synchronizing frames; payload stays the same compact AimX JSON).
  • Sugar: SerialClient (= SessionClientConnector<SerialDialer, AimxCodec>), SerialServer.
  • tokio half via tokio-serial; Embassy half via embedded-io-async UART.
  • Embassy client + cross-compile now; Embassy server half waits on no_std AimX server (dispatch) port — cross-cutting AnyRecord + RecordMetadataTracker de-std #120 (no_std AimxDispatch).
  • URL form serial:///dev/ttyUSB0?baud=115200.

Verification

  • COBS frame round-trip unit test (encode → wire → decode survives byte boundaries).
  • Embassy client-exit smoke: a node dials a gateway over a serial pair and mirrors one record.
  • make test-embedded: cargo check -p aimdb-serial-connector --target thumbv7em-none-eabihf --features embassy-runtime.

New workspace deps

  • tokio-serial (std half), a COBS crate (corncobs/cobs). embedded-io-async is already a workspace dep.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions