Cannot connect to printer #179
Unanswered
quanghoath
asked this question in
Q&A
Replies: 1 comment 3 replies
-
@quanghoath do you connect the right device? target should be tcp/bt:mac address |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
i use version 4.2.0 but it doesn't connect to the printer. it hangs at tryToConnectUntil.
Here is my code.
const printerInstance = new Printer({
target: "192.168.1.230",
deviceName: "TM-T82",
});
const res = await printerInstance.addQueueTask(async () => {
await Printer.tryToConnectUntil(
printerInstance,
(status) => status.online.statusCode === PrinterConstants.TRUE
);
await printerInstance.addText("DUDE!");
await printerInstance.addFeedLine();
await printerInstance.addCut();
const result = await printerInstance.sendData();
await printerInstance.disconnect();
return result;
});
Beta Was this translation helpful? Give feedback.
All reactions