Skip to content

Yiciyuan FJB-02/FJB-03: hardware-verified corrections and runtime control #954

Description

@xmsama

Scope

Hardware-verified corrections to the Yiciyuan support introduced in #917, with FJB-03 implementation updates relative to #888. Existing BLE UUIDs and packet-format documentation are unchanged unless noted below. YS-TD models are outside this proposal.

Hardware findings

Testing was performed on physical FJB-02 and FJB-03 devices.

  • FJB-02 capabilities: Device-info responses report motor A only, consistent with observed operation. Stroke and rotation are mechanically coupled under one control. Replace the inherited three-output configuration with one Oscillate output and battery input.
  • FJB-03 actuator mapping: A controls coupled stroke/rotation; B controls suction (Constrict); C controls independent vibration. These functions were verified on hardware.
  • FJB-03 direction encoding: Official-app hardware testing confirms opposite rotation directions on either side of its input midpoint. Combined with the signed-input encoding documented in Device support: Yiciyuan stroker family (FJB-03, YS-TD-01/02/03) #888, 1..20 and 21..40 represent opposite directions at corresponding amplitudes; 0 stops A. An unsigned 0..100 strength must not be linearly mapped across 0..40 as a single forward-speed range.
  • FJB-03 vibration: Independent vibration activation was verified using 35 11 04 N checksum, rather than the C field of the live 35 12 frame. The implementation exposes seven fixed modes; activation was hardware-tested, not every mode individually.

Proposed changes

PR A — Output scheduling and stop handling

  • Opt-in latest-state scheduling for FJB-02/03, with one hardware write in flight and coalescing of superseded pending state.
  • Stop barriers that cannot be overwritten by later nonzero input.
  • Bounded write timeouts; discard pending motion after write failure or disconnect.
  • Regression tests for slow writes, stop ordering, timeout handling, and disconnection.

PR B — FJB-02/FJB-03 support and runtime rotation modes

  • Correct FJB-02 capabilities and add FJB-03 model-specific control frames, checksum handling, actuator mapping, and fixed-mode vibration commands.
  • Add model-specific device-info queries and retain the FF42 notification subscription.
  • Add per-device forward, reverse, and alternating rotation modes without requiring changes to existing waveform clients.
  • Apply mode changes between write batches, cancel the previous timer, and use a zero-command/pause transition before resuming with the latest amplitude. Configuration changes must not restart a stopped output.
  • Include protocol and mode-transition tests. This implementation depends on PR A.

Validation and limitations

The local implementation passes 67 server tests and 871 device-protocol regression tests on Windows. These are suite totals, not counts of new tests. The latest runtime mode-switching implementation has passed software tests but has not yet been verified on physical hardware.

FJB-02 connection stability improved after the motherboard's external antenna was connected; that improvement is not attributed solely to software. Windows-specific connection-retry changes are excluded from these PRs.

Review requested

Approval of the two-PR scope and the server-side direction-mode design before PR submission. The companion proposal at intiface/intiface-central#287 covers configuration UI and persistence; the initial implementation remains local pending review.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions