The baud rate is printed on the unit
9600 on the receipt printer, 115200 on the label printer. Both numbers are on a sticker on the back, and getting one wrong fills the paper with symbols nobody ordered.
The number is on the machine
Serial has no way to work out the speed for itself. Both ends agree in advance or nothing legible crosses, and these two printers do not use the same number:
- Receipt printer: 9600. Its sticker reads
TTL:9600 N-8-1 9V. - Label printer: 115200. Its sticker reads
TTL 115200 N-8-1 9V.
N-8-1 is the rest of the setting — no parity, eight data bits, one stop bit —
and it is the default in every Arduino serial library, so you will not normally
type it.
The interesting case is the near miss. A rate that is out by a factor of two still lets some characters through, which reads as a hardware fault and sends people hunting for a loose wire. Partial output is evidence of a wrong number, not of a dying printer.
If you are not sure
Load paper and hold the printer's button down. It prints its own configuration,
including the line Baudrate: and the rate it is set to. That page beats every
other source, including this one — a printer that has been reconfigured at some
point will say so there and nowhere else.
In the sketch
On an ESP32-S3, with the printer on UART2:
printerSerial.begin(9600, SERIAL_8N1, 16, 17); // receipt printer
printerSerial.begin(115200, SERIAL_8N1, 16, 17); // label printerOn an Arduino Uno, SoftwareSerial takes the rate on its own begin. That
works comfortably at 9600 for the receipt printer. At 115200 for the label
printer it is being asked for more than a software UART on a 16 MHz chip
reliably gives, and a board with a spare hardware port is the honest answer.
When it does not work
That is a baud rate that is close but wrong, usually off by a factor of two — 57600 against 115200, or 4800 against 9600. It looks like a failing print head or a loose wire, and it is neither. Set the sketch to the number on the sticker.
Hold the button on the printer down with paper loaded. It prints a self-test page which states its own baud rate, usually as a line reading Baudrate: followed by the number and N,8,1. That page is the source of truth, ahead of any sticker or README.
The baud rate is the first of two reasons. The receipt sketches open the port at 9600 and the label printer listens at 115200. The second reason is that the command sets are different, so even at the right speed the receipt printer's ESC/POS bytes mean nothing to a label printer.
SoftwareSerial bit-bangs the port in software, and 115200 on a 16 MHz AVR is at the very edge of what it can do — sending mostly works, receiving usually does not. If a label printer on an Uno drops bytes, move to a board with a spare hardware UART such as an ESP32-S3 or a Mega.
The five bytes that print one line, and the one at the end that does the printing.
Text on a receipt →Edit this page — content/books/thermal-printer/baud-is-printed-on-the-unit.mdx
Questions about this product
See what other owners have asked, and read their solutions.
This page covers several products. Choose yours to see the right discussions.
Discuss this article
Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.