mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-05-09 08:25:54 +02:00
[PR #1107] [CLOSED] fix(spoolman): stop syncing third-party spools via synthetic AMS tag_uid #1167
Labels
No labels
A1
automated
automated
bug
bug
Closed due to inactivity
contrib
dependencies
dependencies
duplicate
enhancement
feedback
hold
invalid
Notes
P1S
pull-request
security
ThumbsUp
user-report
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/bambuddy-maziggy-1#1167
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/maziggy/bambuddy/pull/1107
Author: @netscout2001
Created: 4/23/2026
Status: ❌ Closed
Base:
dev← Head:fix/spoolman-synthetic-uid-detection📝 Commits (2)
4b21e02fix(spoolman): reject synthetic AMS tag_uid as Bambu Lab spool indicatord8d52a0Merge branch 'dev' into fix/spoolman-synthetic-uid-detection📊 Changes
4 files changed (+52 additions, -57 deletions)
View changed files
📝
backend/app/api/routes/spoolman.py(+8 -16)📝
backend/app/services/spoolman.py(+10 -21)📝
backend/tests/unit/services/test_spoolman_service.py(+31 -8)📝
frontend/src/pages/PrintersPage.tsx(+3 -12)📄 Description
Description
Bambu printer firmware synthesises a 16-char
tag_uidvalue(
serial_hash[4B] + slot[4B]) for every AMS slot that contains a spoolwithout an NFC chip. The previous
is_bambu_lab_spool()fallbackaccepted any non-zero 16-char hex
tag_uidas evidence of a Bambu LabRFID tag, causing third-party spools (SUNLU, Polymaker, etc.) to be
auto-created in Spoolman with the synthetic UID written into
extra.tag.Only
tray_uuid(32-char hex, read from the real NFC chip) is a reliableindicator. The
tag_uidfallback is removed entirely.Related Issue
Fixes #1068
Documentation
user-visible config or API change
Type of Change
Changes Made
services/spoolman.py— removetag_uid(16-char) fallback fromis_bambu_lab_spool();tag_uidandtray_info_idxparams kept forAPI compatibility but are now ignored; docstring updated
api/routes/spoolman.py— simplify twocurrent_tray_uuidstrackingblocks that became dead code after the gate change (both after the
is_bambu_lab_spool()guard, sotray_uuidis always present)frontend/src/pages/PrintersPage.tsx— alignisBambuLabSpool()withbackend: check only
tray_uuid, drop thetag_uidbranch that wasshowing third-party spools as "Bambu Lab" in the AMS vendor label
tests/unit/services/test_spoolman_service.py— fliptest_valid_tag_uid_returns_true→test_synthetic_ams_uid_returns_false;add SUNLU exact UIDs from issue report (
6319B70A0000000{0-3}),tag_uid+ preset combo case, and NTAG215 (14-char) edge caseTesting
TestIsBambuLabSpool/TestSpoolmanClientpasstest_spoolman_api.pypassruff check+ruff formatcleantsc -b && vite build) cleanAdditional Notes
The
tag_uidfallback was introduced in upstream commitf9b47282("BL spool detection fix") with the intent to handle RFID readers that
return shorter UIDs. In practice, Bambu Lab NFC chips always produce a
32-char
tray_uuid; the 16-char value is only ever the firmware-generatedsynthetic identifier for chipless spools. The fix closes the false-positive
path without affecting any legitimate Bambu Lab spool detection.
link_spool(manual user linking) and the SpoolBuddy NFC write-resultpath are not affected — both accept tags of any valid length as
explicit user actions.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.