Thermal_Printer icon indicating copy to clipboard operation
Thermal_Printer copied to clipboard

Unable to connect to MTP-II

Open zejtin opened this issue 2 years ago • 7 comments

Hello!

I have an MTP-II printer which should be fine. Name on bluetooth is MTP-II_BC6A I am trying to scan it with tpScane((char *)"MTP-II_BC6A", 15); to no avail, tpScan returns false but printer changes led color to blue like when it is connected when running tpScan.

Any info on this?

Thanks in advance

zejtin avatar Aug 02 '23 13:08 zejtin

use library version 1.1.2. It should work when you scan tpScan((char *)"MTP-II_BC6A", 15);

MYCAMEL222 avatar Aug 02 '23 14:08 MYCAMEL222

Tried it just now, it still doesn't find it, difference with 1.1.2 is printer doesn't show there is connection as with the latest one

zejtin avatar Aug 03 '23 06:08 zejtin

Your code line in the above post reads "tpScane((char *)"MTP-II_BC6A", 15);".........It should be "tpScan....".

MYCAMEL222 avatar Aug 03 '23 13:08 MYCAMEL222

My bad on that, it is tpScan otherwise it wouldn't compile

zejtin avatar Aug 03 '23 13:08 zejtin

I ended up writing my own code without the Thermal_Printer library. I used arduinoBLE library and scanned for UUID. Everything works fine that way, but you'll have to hard code the esc/pos commands.

Sorry I can't help more.

MYCAMEL222 avatar Aug 03 '23 14:08 MYCAMEL222

Do you maybe have some repo or example how you did it?

zejtin avatar Aug 04 '23 08:08 zejtin

To add a new printer name, truncate it to 9 chars and add it to szPrinterIDs[].

tpFindPrinterName() truncates the advertised printer name to 9 characters or less before looking for a match in szPrinterIDs.

controllercustom avatar Aug 08 '23 19:08 controllercustom