Skip to content

feat(devices): add Yiciyuan YCY-FJB-01 / FJB-02 stroker support#917

Open
SanJerry007 wants to merge 1 commit into
buttplugio:masterfrom
SanJerry007:yiciyuan-fjb-support
Open

feat(devices): add Yiciyuan YCY-FJB-01 / FJB-02 stroker support#917
SanJerry007 wants to merge 1 commit into
buttplugio:masterfrom
SanJerry007:yiciyuan-fjb-support

Conversation

@SanJerry007

Copy link
Copy Markdown

Closes #887. Supersedes #901 (which I closed to tidy up); the product-link and oscillate-vs-vibrate questions from that thread are addressed below.

Adds device support for the Yiciyuan (役次元) YCY-FJB-01 stroker (and its identical-protocol sibling FJB-02), built on a JieLi SoC. Protocol was reverse-engineered independently and verified against hardware reporting firmware 02 07 07. This addresses the vendor left unsupported when #688 was closed for inactivity, answering each of that reviewer's open questions (oscillate vs vibrate, product link, full test coverage).

Device

  • FJB-01 — hardware-verified. Oscillating linear actuator (stroke) + 2 vibration motors + battery read.
  • FJB-02 — added on the same config/impl path; the official app's code for both models is byte-identical (same vuex namespace, UUIDs, 16-byte frame). Trivial to drop if you'd prefer to wait for an FJB-02 owner to confirm.

Product link (login needed for access): https://detail.tmall.com/item.htm?id=846192335019 · official X account: https://x.com/YCYYICIYUAN

Protocol (GATT 0xFF40, write 0xFF41, notify 0xFF42)

16-byte control frame: 35 12 <stroke> <vibe> <axis_c> 00.., each axis 0..=0x14. Battery arrives unprompted on notify as 35 13 01 <pct>; 35 14 .. uptime ticks are prefix-filtered.

Buttplug v4 mapping

Oscillate (stroke) + Vibrate ×2 + Input::Battery (Read) — same shape as Galaku G317 / TFF1, so the data model is already proven in tree.

Changes

  • device-config/protocols/yiciyuan.yml + regenerated buttplug-device-config-v5.json (version 5.6)
  • protocol_impl/yiciyuan.rs — atomic per-axis state, single 16-byte frame per call, prefix-filtered battery read
  • Device test cases registered across all v0–v4 × embedded/json slots; Scalar/Stop gated on v3+ (v0–v2 single-axis Vibrate doesn't map cleanly to a multi-actuator device)

Verification

  • Rebased on current master; config regenerated against the v5 schema
  • cargo build clean (no new warnings)
  • cargo test -p buttplug_tests --test test_device_protocols828 passed, 0 failed
  • CLA signed

Out of scope / follow-up (see #888)

FJB-03 (different packet + checksum), YS-TD family, pumps, lock, and e-stim variants are documented in #888 and deferred to separate PRs.

The Yiciyuan FJB-01 / FJB-02 (役次元) are JieLi-SoC BLE strokers
advertising as "YCY-FJB-01" and "YCY-FJB-02" with three independent
actuators:
  - stroke axis (linear oscillation)
  - vibe axis (vibration motor)
  - axis_c (third haptic motor driven in app-recorded patterns)

Each axis takes an unsigned 0..=0x14 level; the 16-byte control packet
is sent to characteristic ff41 under service ff40 as:

  [0x35, 0x12, stroke, vibe, axis_c, 0x00 x11]

Battery push arrives on the same notify characteristic as a
`35 13 01 <pct>` frame mixed with 10Hz uptime ticks (`35 14 ..`); the
handler filters by prefix.

FJB-01 is verified against physical hardware. FJB-02 is its successor
in the same product line; the official app routes both through an
identical code path (same vuex state, same hex-stringed motor frame,
same BLE service/characteristic UUIDs), so the same protocol module
covers it. Hardware verification welcome.

Adds:
  * buttplug_server_device_config/device-config/protocols/yiciyuan.yml
  * buttplug_server/src/device/protocol_impl/yiciyuan.rs
  * tests/.../test_yiciyuan_protocol.yaml (FJB-01)
  * tests/.../test_yiciyuan_protocol_fjb02.yaml (FJB-02)
  * regenerated buttplug-device-config-v5.json (version 5.6)

Test commands gated on protocol v3+ since v0-v2 single-axis Vibrate
semantics don't map cleanly to a multi-actuator device.

All 828 device protocol tests pass on debug build.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Device support: Yiciyuan YCY-FJB-01 (cup, JieLi SoC)

1 participant