Skip to content

Support Bitcrane RP2040 bridge control quirks#1

Open
benjamin-wilson wants to merge 3 commits into
skot:s19jpro-bitcranev3from
benjamin-wilson:fix/bitcrane-rp2040-control-compat
Open

Support Bitcrane RP2040 bridge control quirks#1
benjamin-wilson wants to merge 3 commits into
skot:s19jpro-bitcranev3from
benjamin-wilson:fix/bitcrane-rp2040-control-compat

Conversation

@benjamin-wilson

@benjamin-wilson benjamin-wilson commented Mar 9, 2026

Copy link
Copy Markdown

Summary

This PR makes the s19jpro-bitcranev3 path work against the current Bitcrane v3 RP2040 bridge firmware and improves runtime visibility for the S19j Pro bring-up.

It includes:

  • USB identity compatibility for the flashed OSMU/bitcrane3 device
  • tolerance for the bridge firmware's legacy malformed control-error frames
  • API exposure for S19j Pro frequency, APW12 voltage, hashboard count, active hashboard count, per-hashboard state, per-hashboard hashrate, and aggregate miner hashrate
  • real nonce-derived hashrate reporting instead of static estimates
  • non-blocking scheduler source-command handling so share submission backpressure cannot wedge the scheduler
  • serialized BM13xx cold-start initialization across S19j Pro hashboards so bring-up stays reliable while the scheduler remains responsive

Why

Before these changes, Mujina could detect the Bitcrane board but was not reliable end-to-end with the currently flashed RP2040 firmware:

  • the board identity did not match the branch's USB matcher
  • legacy bridge control responses could break management traffic
  • share submission could stall the scheduler under load
  • making thread assignment asynchronous exposed shared-PSU/shared-control contention during simultaneous three-board cold-start
  • S19j Pro monitoring did not expose the values needed to confirm which hashboards were really active

Validation

Validated locally against a connected Bitcrane v3 / S19j Pro setup.

Code-level validation:

  • cargo check -p mujina-miner
  • cargo test -p mujina-miner mgmt_protocol::bitaxe_raw::
  • cargo test -p mujina-miner api::server::tests::
  • cargo test -p mujina-miner asic::bm13xx::thread_v2::tests:: -- --nocapture
  • cargo test -p mujina-miner scheduler::tests::
  • cargo test -p mujina-miner job_source::stratum_v1::tests::

Live validation:

  • board registration through the Bitcrane RP2040 bridge
  • APW12 PSU control and telemetry
  • three-hashboard detection and staged bring-up
  • accepted pool-share submission to public-pool.io:3333
  • live API reporting with real per-hashboard and aggregate hashrate
  • PID fan control keeping board temperatures below 70 C during bring-up and mining

Representative live state after the fix:

  • 3/3 hashboards active
  • aggregate hashrate around 70.57 TH/s
  • submitted shares increasing
  • temperatures roughly 39 C to 49 C during steady operation

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.

1 participant