{"id":13576696,"url":"https://github.com/Ankermgmt/ankermake-m5-protocol","last_synced_at":"2025-04-05T08:32:52.966Z","repository":{"id":140215666,"uuid":"610957643","full_name":"Ankermgmt/ankermake-m5-protocol","owner":"Ankermgmt","description":"Ankermake M5 protocol specifications and libraries *NOT AFFILIATED WITH ANKER*","archived":false,"fork":false,"pushed_at":"2024-07-11T17:54:48.000Z","size":2172,"stargazers_count":163,"open_issues_count":51,"forks_count":35,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-11-05T13:41:12.606Z","etag":null,"topics":["3d-printing","ankermake","ankermake-m5","mqtt","pppp","python","reverse-engineering"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ankermgmt.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-03-07T20:28:03.000Z","updated_at":"2024-10-23T15:03:10.000Z","dependencies_parsed_at":"2024-01-29T08:07:34.367Z","dependency_job_id":null,"html_url":"https://github.com/Ankermgmt/ankermake-m5-protocol","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ankermgmt%2Fankermake-m5-protocol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ankermgmt%2Fankermake-m5-protocol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ankermgmt%2Fankermake-m5-protocol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ankermgmt%2Fankermake-m5-protocol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ankermgmt","download_url":"https://codeload.github.com/Ankermgmt/ankermake-m5-protocol/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247311977,"owners_count":20918340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d-printing","ankermake","ankermake-m5","mqtt","pppp","python","reverse-engineering"],"created_at":"2024-08-01T15:01:12.967Z","updated_at":"2025-04-05T08:32:52.935Z","avatar_url":"https://github.com/Ankermgmt.png","language":"Python","funding_links":[],"categories":["reverse-engineering"],"sub_categories":[],"readme":"# AnkerMake M5 Protocol\n\nWelcome! This repository contains `ankerctl`, a command-line interface and web UI for monitoring, controlling and interfacing with AnkerMake M5 3D printers.\n\n**NOTE:** This is our first major release and while we have tested thoroughly there may be bugs. If you encounter one please open a [Github Issue](https://github.com/Ankermgmt/ankermake-m5-protocol/issues/new/choose)\n\nThe `ankerctl` program uses [`libflagship`](documentation/developer-docs/libflagship.md), a library for communicating with the numerous different protocols required for connecting to an AnkerMake M5 printer. The `libflagship` library is also maintained in this repo, under [`libflagship/`](libflagship/).\n\n![Screenshot of ankerctl](/documentation/web-interface.png \"Screenshot of ankerctl web interface\")\n\n## Features\n\n### Current Features\n\n - Print directly from PrusaSlicer and its derivatives (SuperSlicer, Bamboo Studio, OrcaSlicer, etc.)\n\n - Connect to AnkerMake M5 and AnkerMake APIs without using closed-source Anker software.\n\n - Send raw gcode commands to the printer (and see the response).\n\n - Low-level access to MQTT, PPPP and HTTPS APIs.\n\n - Send print jobs (gcode files) to the printer.\n\n - Stream camera image/video to your computer.\n\n - Easily monitor print status.\n\n### Upcoming and Planned Features\n\n - Integration into other software. Home Assistant? Cura plugin?\n\nLet us know what you want to see; Pull requests always welcome! :smile:\n\n## Installation\n\nThere are currently two ways to do an install of ankerctl. You can install directly from git utilizing python on your Operating System or you can install from Docker which will install ankerctl in a containerized environment. Only one installation method should be chosen. \n\nOrder of Operations for Success:\n- Choose installation method: [Docker](documentation/install-from-docker.md) or [Git](documentation/install-from-git.md)\n- Follow the installation intructions for the install method\n- Import the login.json file\n- Have fun! Either run `ankerctl` from CLI or launch the webserver\n\n\u003e **Note**\n\u003e Minimum version of Python required is 3.10\n\n\u003e **Warning**\n\u003e Docker Installation ONLY works on Linux at this time\n\nFollow the instructions for a [git install](documentation/install-from-git.md) (recommended), or [docker install](documentation/install-from-docker.md).\n\n## Importing configuration\n\n1. Import your AnkerMake account data by opening a terminal window in the folder you placed ankerctl in and running the following command:\n\n   ```sh\n   python3 ankerctl.py config import\n   ```\n\n   When run without filename on Windows and MacOS, the default location of `login.json` will be tried if no filename is specified.\n\n   Otherwise, you can specify the file path for `login.json`. Example for Linux:\n   ```sh\n   ./ankerctl.py config import ~/.wine/drive_c/users/username/AppData/Local/AnkerMake/AnkerMake_64bit_fp/login.json\n   ```\n   MacOS\n   ```sh\n   ./ankerctl.py config import $HOME/Library/Application\\ Support/AnkerMake/AnkerMake_64bit_fp/login.json\n   ```\n   Windows\n   ```sh\n   python3 ankerctl.py config import %APPDATA%\\AnkerMake\\AnkerMake_64bit_fp\\login.json\n   ```\n\n   Type `ankerctl.py config import -h` for more details on the import options. Support for logging in with username and password is not yet supported. To learn more about the method used to extract the login information and add printers, see the [MQTT Overview](documentation/developer-docs/mqtt-overview.md) and [Example Files](documentation/developer-docs/example-file-usage) documentation.\n\n   The output when successfully importing a config is similar to this:\n\n   ```sh\n   [*] Loading cache..\n   [*] Initializing API..\n   [*] Requesting profile data..\n   [*] Requesting printer list..\n   [*] Requesting pppp keys..\n   [*] Adding printer [AK7ABC0123401234]\n   [*] Finished import\n   ```\n\n   At this point, your config is saved to a configuration file managed by `ankerctl`. To see an overview of the stored data, use `config show`:\n\n   ```sh\n   ./ankerctl.py config show\n   [*] Account:\n       user_id: 01234567890abcdef012...\u003cREDACTED\u003e\n       email:   bob@example.org\n       region:  eu\n   \n   [*] Printers:\n       sn: AK7ABC0123401234\n       duid: EUPRAKM-001234-ABCDE\n   ```\n\n\u003e **NOTE:** \n\u003e The cached login info contains sensitive details. In particular, the `user_id` field is used when connecting to MQTT servers, and essentially works as a password. Thus, the end of the value is redacted when printed to screen, to avoid accidentally disclosing sensitive information.\n\n2. Now that the printer information is known to `ankerctl`, the tool is ready to use. There’s a lot of available commands and utilities, use a command followed by `-h` to learn what your options are and get more in specific usage instructions.\n\n\u003e **NOTE:**\n\u003e As an alternative to using \"config import\" on the command line, it is possible to upload `login.json` through the web interface. Either method will work fine.\n\n## Usage\n\n### Web Interface\n\n1. Start the webserver by running one of the following commands in the folder you placed ankerctl in. You’ll need to have this running whenever you want to use the web interface or send jobs to the printer via a slicer:\n\n   Docker Installation Method:\n\n   ```sh\n   docker compose up\n   ```\n\n   Git Installation Method Using Python:\n\n   ```sh\n   ./ankerctl.py webserver run\n   ```\n\n2. Navigate to [http://localhost:4470](http://localhost:4470) in your browser of choice on the same computer the webserver is running on. \n \n \u003e **Important**\n \u003e If your `login.json` file was not automatically found, you’ll be prompted to upload your `login.json` file and the given the default path it should be found in your corresponding Operating System. \n   Once the `login.json` has been uploaded, the page will refresh and the web interface is usable.\n\n### Printing Directly from PrusaSlicer\n\nankerctl can allow slicers like PrusaSlicer (and its derivatives) to send print jobs to the printer using the slicer’s built in communications tools. The web server must be running in order to send jobs to the printer. \n\nCurrently there’s no way to store the jobs for later printing on the printer, so you’re limited to using the “Send and Print” option only to immediately start the print once it’s been transmitted. \n\nAdditional instructions can be found in the web interface.\n\n![Screenshot of prusa slicer](/static/img/setup/prusaslicer-2.png \"Screenshot of prusa slicer\")\n\n### Command-line tools\n\nSome examples:\n\n```sh\n# run the webserver to control over webgui\n./ankerctl.py webserver run\n\n# attempt to detect printers on local network\n./ankerctl.py pppp lan-search\n\n# monitor mqtt events\n./ankerctl.py mqtt monitor\n\n# start gcode prompt\n./ankerctl.py mqtt gcode\n\n# set printer name\n./ankerctl.py mqtt rename-printer BoatyMcBoatFace\n\n# print boaty.gcode\n./ankerctl.py pppp print-file boaty.gcode\n\n# capture 4mb of video from camera\n./ankerctl.py pppp capture-video -m 4mb output.h264\n\n# select printer to use when you have multiple\n./ankerctl.py -p \u003cindex\u003e # index starts at 0 and goes up to the number of printers you have\n```\n\n## Legal\n\nThis project is **\u003cu\u003eNOT\u003c/u\u003e** endorsed, affiliated with, or supported by AnkerMake. All information found herein is gathered entirely from reverse engineering using publicly available knowledge and resources.\n\nThe goal of this project is to make the AnkerMake M5 usable and accessible using only Free and Open Source Software (FOSS).\n\nThis project is [licensed under the GNU GPLv3](LICENSE), and copyright © 2023 Christian Iversen.\n\nSome icons from [IconFinder](https://www.iconfinder.com/iconsets/3d-printing-line), and licensed under [Creative Commons](https://creativecommons.org/licenses/by/3.0/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAnkermgmt%2Fankermake-m5-protocol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAnkermgmt%2Fankermake-m5-protocol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAnkermgmt%2Fankermake-m5-protocol/lists"}