1
0
Fork 0
mirror of https://github.com/maziggy/bambuddy.git synced 2026-05-09 08:25:54 +02:00

[GH-ISSUE #984] [Bug]: Respect both BL spool tags #687

Open
opened 2026-05-07 00:12:46 +02:00 by BreizhHardware · 10 comments

Originally created by @maziggy on GitHub (Apr 15, 2026).
Original GitHub issue: https://github.com/maziggy/bambuddy/issues/984

Bug Description

BL spool have 2 tags each, with unique tag UIDs. The actual identifier for the spool, tray UID, has the same value stored in both tags (usually it's one of the two tags UIDs with 8 chars of padding). Currently, Spoolbuddy doesnt even read the tray UID block 9, at all.

So for example, let's say that the AMS reports the tray UID A6EA1BC600000100 for a spool, and it gets saved in inventory as it's the first time you use it. What Spoolbuddy actually reads for that spool is the material info (block 4+5), gets a bunch of gibberish, and falls back to tag_uid for matching. So if you flip it one side and read on tag UID, that is A6EA1BC6 (just 8 chars), you're lucky, and the spool gets correctly matched. But if you read the other side, the tag UID is different (), and the spool is not resolved in inventory, and therefore marked as new. You could also get lucky and have a fuzzy match of blocks 4+5 against the tray UUID.
My solution so far was to read block 9 and use that to match in inventory.

Expected Behavior

.

Steps to Reproduce

.

Printer Model

Not printer-related

Bambuddy Version

latest

Printer Firmware Version

latest

Installation Method

Manual (git clone)

Operating System

Linux (Ubuntu/Debian)

Relevant Logs / Support Package

No response

Screenshots

No response

Additional Context

No response

Checklist

  • I have searched existing issues to ensure this bug hasn't already been reported
  • I am using the latest version of Bambuddy
  • My printer is set to LAN Only mode
  • My printer has Developer Mode enabled
Originally created by @maziggy on GitHub (Apr 15, 2026). Original GitHub issue: https://github.com/maziggy/bambuddy/issues/984 ### Bug Description BL spool have 2 tags each, with unique tag UIDs. The actual identifier for the spool, tray UID, has the same value stored in both tags (usually it's one of the two tags UIDs with 8 chars of padding). Currently, Spoolbuddy doesnt even read the tray UID block 9, at all. So for example, let's say that the AMS reports the tray UID A6EA1BC600000100 for a spool, and it gets saved in inventory as it's the first time you use it. What Spoolbuddy actually reads for that spool is the material info (block 4+5), gets a bunch of gibberish, and falls back to tag_uid for matching. So if you flip it one side and read on tag UID, that is A6EA1BC6 (just 8 chars), you're lucky, and the spool gets correctly matched. But if you read the other side, the tag UID is different (), and the spool is not resolved in inventory, and therefore marked as new. You could also get lucky and have a fuzzy match of blocks 4+5 against the tray UUID. My solution so far was to read block 9 and use that to match in inventory. ### Expected Behavior . ### Steps to Reproduce . ### Printer Model Not printer-related ### Bambuddy Version latest ### Printer Firmware Version latest ### Installation Method Manual (git clone) ### Operating System Linux (Ubuntu/Debian) ### Relevant Logs / Support Package _No response_ ### Screenshots _No response_ ### Additional Context _No response_ ### Checklist - [x] I have searched existing issues to ensure this bug hasn't already been reported - [x] I am using the latest version of Bambuddy - [x] My printer is set to LAN Only mode - [x] My printer has Developer Mode enabled
Author
Owner

@Keybored02 commented on GitHub (Apr 15, 2026):

I haven't checked the code for what is already implemented, but here's how I would go on to fix this:

  1. Us the tray_UUID as the spool identifier, as it is the real unique ID. BL spool should use that for matching in inventory and all identifications/AMS recognition.
  2. Create a migration path that assigns tray_UUID to existing spools to keep compatibility. Tag UID can stay, but not as the sole identifier.
  3. Allow tag_UIDs to accept two values, mostly for future use.
  4. Separate the DB entries for BL spools from Opentag/DIY solutions (that use completely different memory maps). Custom spools should have a dedicated path, withouth trying to reuse existing DB fileds (e.g. no tag UID identification for them).
  5. (Optional) Add a "Full read flow" to Spoolbuddy, that reads the tray_UUID and both tag UIDs (asking the user to rotate the spool).
<!-- gh-comment-id:4251000395 --> @Keybored02 commented on GitHub (Apr 15, 2026): I haven't checked the code for what is already implemented, but here's how I would go on to fix this: 1. Us the tray_UUID as the spool identifier, as it is the real unique ID. BL spool should use that for matching in inventory and all identifications/AMS recognition. 2. Create a migration path that assigns tray_UUID to existing spools to keep compatibility. Tag UID can stay, but not as the sole identifier. 3. Allow tag_UIDs to accept two values, mostly for future use. 4. Separate the DB entries for BL spools from Opentag/DIY solutions (that use completely different memory maps). Custom spools should have a dedicated path, withouth trying to reuse existing DB fileds (e.g. no tag UID identification for them). 5. (Optional) Add a "Full read flow" to Spoolbuddy, that reads the tray_UUID and both tag UIDs (asking the user to rotate the spool).
Author
Owner

@maziggy commented on GitHub (Apr 15, 2026):

Please wait. I would also like to have a look but I'm currently quite busy.

<!-- gh-comment-id:4251077859 --> @maziggy commented on GitHub (Apr 15, 2026): Please wait. I would also like to have a look but I'm currently quite busy.
Author
Owner

@Keybored02 commented on GitHub (Apr 15, 2026):

Sure, I haven't the time to PR this.

<!-- gh-comment-id:4251084897 --> @Keybored02 commented on GitHub (Apr 15, 2026): Sure, I haven't the time to PR this.
Author
Owner

@maziggy commented on GitHub (Apr 15, 2026):

Just checked briefly....so what do you think is different for the two tags on a spool? When scanning the tag with Spoolbuddy I cannot see any differences.

BTW: What should be the purpose of having two different tags on a spool?

<!-- gh-comment-id:4252101351 --> @maziggy commented on GitHub (Apr 15, 2026): Just checked briefly....so what do you think is different for the two tags on a spool? When scanning the tag with Spoolbuddy I cannot see any differences. BTW: What should be the purpose of having two different tags on a spool?
Author
Owner

@Keybored02 commented on GitHub (Apr 15, 2026):

The tag UIDs are different, as those are set by the tag manufacturer and not BL. You can see the difference: if you scan/run the tag diagnostic on both sides, you'll get different tag UIDs, but the same tray UUID (assuming you are reading it from block 9 correctly, which the current code isn't).

BTW: What should be the purpose of having two different tags on a spool?

AMS has only 2 readers. It cannot read a single side in all slots. You can check this by placing a spool in tray 1, then in tray 4, and compare the MQTT dumps.

<!-- gh-comment-id:4252577789 --> @Keybored02 commented on GitHub (Apr 15, 2026): The tag UIDs are different, as those are set by the tag manufacturer and not BL. You can see the difference: if you scan/run the tag diagnostic on both sides, you'll get different tag UIDs, but the same tray UUID (assuming you are reading it from block 9 correctly, which the current code isn't). > BTW: What should be the purpose of having two different tags on a spool? AMS has only 2 readers. It cannot read a single side in all slots. You can check this by placing a spool in tray 1, then in tray 4, and compare the MQTT dumps.
Author
Owner

@maziggy commented on GitHub (Apr 16, 2026):

The question was more, why the two tags are different.

<!-- gh-comment-id:4257706195 --> @maziggy commented on GitHub (Apr 16, 2026): The question was more, why the two tags are different.
Author
Owner

@Keybored02 commented on GitHub (Apr 16, 2026):

The tags contain the same spool info (material, colour, tray uuid). Each tag has a unique tag UID set by the manufacturer of the tag, not BL.

<!-- gh-comment-id:4257808786 --> @Keybored02 commented on GitHub (Apr 16, 2026): The tags contain the same spool info (material, colour, tray uuid). Each tag has a unique tag UID set by the manufacturer of the tag, not BL.
Author
Owner

@maziggy commented on GitHub (Apr 16, 2026):

Now I also got it :)

<!-- gh-comment-id:4258363923 --> @maziggy commented on GitHub (Apr 16, 2026): Now I also got it :)
Author
Owner

@Keybored02 commented on GitHub (May 2, 2026):

@maziggy Any update on this topic?

<!-- gh-comment-id:4363379357 --> @Keybored02 commented on GitHub (May 2, 2026): @maziggy Any update on this topic?
Author
Owner

@maziggy commented on GitHub (May 2, 2026):

Nope, too much ongoing stuff.

<!-- gh-comment-id:4363393248 --> @maziggy commented on GitHub (May 2, 2026): Nope, too much ongoing stuff.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/bambuddy-maziggy-1#687
No description provided.