Skip to content
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

Auto-detect address and printer model #7

Open
AndBondStyle opened this issue Jan 19, 2024 · 1 comment
Open

Auto-detect address and printer model #7

AndBondStyle opened this issue Jan 19, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@AndBondStyle
Copy link
Owner

AndBondStyle commented Jan 19, 2024

As a quality of life update, we can detect printer model and connection address automatically. For USB initial guessing can be done with vendor/product ID, then using a 0x40 (GET_INFO) serial command. For bluetooth I'm not sure yet if the addresses are consistent, but we can also scan by name (e.g. B21 is always named like "B21-"), and then verify with the magic command again.

@MultiMote
Copy link

MultiMote commented Jul 26, 2024

You can get printer model by sending packet (0x40 - GetInfo, 0x08 - GetPrinterModel):

55 55 40 01 08 49 aa aa

For example, D110 returned this packet:

55 55 48 02 09 00 43 aa aa

0x0900 => 2304 (D110 printer id)

Here is a list of printers (simplified version of this)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants