Skip to content

✨ M550 CONFIGURABLE_MACHINE_NAME #27731

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

thinkyhead
Copy link
Member

This is a basic implementation of M550 as requested in #21653.

@thisiskeithb thisiskeithb linked an issue Mar 9, 2025 that may be closed by this pull request
thinkyhead added a commit to MarlinFirmware/Configurations that referenced this pull request Mar 9, 2025
@thinkyhead thinkyhead force-pushed the bf2_bored_so_add_M550_PR branch 2 times, most recently from a5dfdde to 96d4c84 Compare March 9, 2025 22:50
@@ -4507,6 +4507,10 @@ static_assert(WITHIN(MULTISTEPPING_LIMIT, 1, 128) && IS_POWER_OF_2(MULTISTEPPING
#error "Only enable ULTIPANEL_FEEDMULTIPLY or ULTIPANEL_FLOWPERCENT, but not both."
#endif

#if ENABLED(CONFIGURABLE_MACHINE_NAME) && DISABLED(GCODE_QUOTED_STRINGS)
#error "CONFIGURABLE_MACHINE_NAME requires GCODE_QUOTED_STRINGS."
Copy link

@crossan007 crossan007 Mar 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be nice to add this requirement to the base configuration.h

I just tried building and got this:

                 from Marlin/src/HAL/STM32/sdio.cpp:27:
Marlin/src/HAL/STM32/../../inc/SanityCheck.h:4516:4: error: #error "CONFIGURABLE_MACHINE_NAME requires GCODE_QUOTED_STRINGS."
 4516 |   #error "CONFIGURABLE_MACHINE_NAME requires GCODE_QUOTED_STRINGS."
      |    
      
      

(not looking for help, just sharing for search indexing)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can add a comment to that effect. But since GCODE_QUOTED_STRINGS (Configuration_adv.h) follows CONFIGURABLE_MACHINE_NAME (Configuration.h) it won't be enforced with an #if in Configuration.h.

@crossan007
Copy link

Somewhat tangential to this, but having a "true" UUID would be nice as well without needing to re-compile the firmware

@crossan007
Copy link

crossan007 commented Mar 10, 2025

I flashed this patch on two Creality Ender 3 Pro boards: #define MOTHERBOARD BOARD_CREALITY_V427

And, since this board has no distinct identifiers over USB, I and wrote a little Python script to handle mapping /dev/ttyUSB* to "named devices" so I can more easily direct my OctoPrint jobs to the appropriate printer:

https://gist.github.com/crossan007/8949c5ef0f5a637e7339b776ea72455f

2025-03-10 00:58:36 - Running printer mapping
2025-03-10 00:58:36 - Verifying existing printer mappings...
2025-03-10 00:58:38 - Received: RepRap name: DWIGHT
2025-03-10 00:58:38 - Raw M550 response from /dev/ttyUSB1: RepRap name: DWIGHT

2025-03-10 00:58:38 - VALID: /dev/printers/dwight -> /dev/ttyUSB1 (M550 confirmed: dwight)
2025-03-10 00:58:40 - Received: RepRap name: MICHAEL
2025-03-10 00:58:40 - Raw M550 response from /dev/ttyUSB0: RepRap name: MICHAEL

2025-03-10 00:58:40 - VALID: /dev/printers/michael -> /dev/ttyUSB0 (M550 confirmed: michael)
2025-03-10 00:58:40 - 
--- Printer Mapping Summary ---
2025-03-10 00:58:40 - dwight -> /dev/ttyUSB1
2025-03-10 00:58:40 - michael -> /dev/ttyUSB0
2025-03-10 00:58:40 - 
--- End of Summary ---

There may be more work to do on this merge request for "polishing it up," but it's working for my purposes.

@thinkyhead thinkyhead force-pushed the bf2_bored_so_add_M550_PR branch 8 times, most recently from 7ff91bc to 8abba83 Compare March 10, 2025 02:56
@ellensp
Copy link
Contributor

ellensp commented Mar 10, 2025

@thinkyhead thinkyhead force-pushed the bf2_bored_so_add_M550_PR branch from 8abba83 to 4075e42 Compare March 10, 2025 03:13
@thinkyhead
Copy link
Member Author

What of marlinfw.org/docs/gcode/M016.html ?

Oh yeah, that's an important one to include in the first iteration.

@thinkyhead thinkyhead force-pushed the bf2_bored_so_add_M550_PR branch from 23cbbc7 to 6b34658 Compare March 10, 2025 05:09
@thinkyhead thinkyhead force-pushed the bf2_bored_so_add_M550_PR branch from 6b34658 to a3b36b9 Compare March 10, 2025 06:33
@thinkyhead thinkyhead merged commit b954959 into MarlinFirmware:bugfix-2.1.x Mar 16, 2025
65 checks passed
@thinkyhead thinkyhead deleted the bf2_bored_so_add_M550_PR branch March 16, 2025 08:24
thinkyhead added a commit to MarlinFirmware/MarlinDocumentation that referenced this pull request Mar 29, 2025
EvilGremlin pushed a commit to EvilGremlin/Marlin that referenced this pull request May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FR] Set Printer Name / M550 support
3 participants