Skip to content

Flashforge: strip URL scheme from print_host before connecting - #668

Open
sellauth wants to merge 1 commit into
CrealityOfficial:masterfrom
sellauth:fix/flashforge-host-url
Open

sellauth wants to merge 1 commit into
CrealityOfficial:masterfrom
sellauth:fix/flashforge-host-url

Conversation

@sellauth

@sellauth sellauth commented Nov 24, 2026 •

Copy link
Copy Markdown

Description

Fixes #667

Printers added from the device page are saved with an http:// prefix in print_host. The Flashforge host talks plain TCP on port 8899 and passed that string to TCPConsole, so the resolver always failed with "No such host is known" and Test showed "The operation completed successfully".

This strips the scheme and any path in the Flashforge constructor, so test() and upload() both connect to the bare host. Printers that were already saved with the prefix work as well. Other host types aren't touched.

Screenshots/Recordings/Graphs

N/A

Tests

I couldn't build the whole app (the prebuilt deps in extract_deps.bat are on an internal server), so I built the unmodified TCPConsole.cpp against Boost 1.84 with MSVC 2022 (Boost.Log stubbed out) together with the new get_console_host(), and ran it against an Adventurer 5M Pro (fw v5.1.7) on my network:

  • With http://192.168.100.138, run_queue() fails with the same resolve: No such host is known log line and "The operation completed successfully" message as the app.
  • With get_console_host() the host is 192.168.100.138 and ~M601 S1 returns ok. The upload handshake (~M601 S1, ~M640, ~M119) goes through too.
  • The helper compiles clean with /W4 /WX /permissive-.

Not tested: an actual file upload (the printer was mid-print), and Linux/macOS builds.

Printers added from the device page get "http://" prepended to
print_host. The Flashforge host uses a plain TCP console on port 8899
and passed print_host straight to the resolver, which fails with
"No such host is known", so testing and uploading never worked.

Only pass the host part to TCPConsole.

Fixes CrealityOfficial#667
@sellauth
sellauth force-pushed the fix/flashforge-host-url branch from 7f6a9c7 to 6808181 Compare November 24, 2026 22:23
@sellauth sellauth changed the title Flashforge: strip URL scheme from print_host before TCP resolve Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant