PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV Mobile 2024 → Android Print image on bluetooth printer
Android Print image on bluetooth printer
Iniciado por Jonathan, 21,sep. 2022 19:31 - 1 respuesta
Publicado el 21,septiembre 2022 - 19:31
How to print QR image on bluetooth thermal printer
Miembro registrado
6 mensajes
Publicado el 28,octubre 2022 - 07:00
Turns out there's nothing wrong with my ESC/POS codes. After tracing around and finding the point where the software prints, i ran my own test and sent it to the serial port, producing a QR code.
Here's what i used for reference:

uint8_t myEscTst[] = { 0x1B, 0x40, 0x1B, 0x21, 0x00, 'H', 'e', 'l', 'l', 'o', ',', ' ', 't', 'h', 'e', 'r', 'm', 'a', 'l', ' ', 'w', 'o', 'r', 'l', 'd', '!', 0x1B, 0x64, 0x03 };
write(serialFD, myEscTst, sizeof(myEscTst));

uint8_t qrEsc165[] = { 0x1D, 0x28, 0x6B, 0x04, 0x00, 0x31, 0x41, 0x32, 0x00 };
write(serialFD, qrEsc165, sizeof(qrEsc165));

uint8_t qrEsc167[] = { 0x1D, 0x28, 0x6B, 0x03, 0x00, 0x31, 0x43, 0x08 };
write(serialFD, qrEsc167, sizeof(qrEsc167));

uint8_t qrEsc169[] = { 0x1D, 0x28, 0x6B, 0x03, 0x00, 0x31, 0x45, 0x31 };
write(serialFD, qrEsc169, sizeof(qrEsc169));

uint8_t qrEsc180[] = { 0x1D, 0x28, 0x6B, 0x0E, 0x00, 0x31, 0x50, 0x30, 'i', ' ', 'a', 'm', ' ', 'a', ' ', 't', 'e', 's', 't' };
write(serialFD, qrEsc180, sizeof(qrEsc180));

uint8_t qrEsc181[] = { 0x1D, 0x28, 0x6B, 0x03, 0x00, 0x31, 0x51, 0x30 };
write(serialFD, qrEsc181, sizeof(qrEsc181));

uint8_t qrEsc182[] = { 0x1D, 0x28, 0x6B, 0x03, 0x00, 0x31, 0x52, 0x30 };
write(serialFD, qrEsc182, sizeof(qrEsc182));

uint8_t qrEscLn3[] = { 0x1B, 0x64, 0x03 };
write(serialFD, qrEscLn3, sizeof(qrEscLn3));

this links will help you:
https://parzibyte.me/blog/en/2019/11/25/print-qr-codes-thermal-printer/https://echat.date