Brother TD-4100N User Manual
Page 74

<> Supplement What is the QR code linkage setting?
With QR codes, there are linkage settings.
A long character string can be partitioned into 2 to 16 partitions and printed.
With the ESC/P command, it is necessary to input only the number of partitions.
For example, if the print data is partitioned into 3 partitions, the bar code data is as
follows:
ESC i Q or q [1
st
parameter] [1
st
set of bar code data]
\\\
ESC i Q or q [2
nd
parameter] [2
nd
set of bar code data]
\\\
ESC i Q or q [3
rd
parameter] [3
rd
set of bar code data]
\\\
3. Linkage Setting: This determines whether or not the bar code data is partitioned with
the linkage setting. When not partitioned, input 0.
When not partitioning, the values of 4 (code number), 5 (number of partitions), and 6
(parity data) are ignored; therefore, input 0 as a dummy value for these parameters.
4. Code number: The code number shows which number the ESC/P command for that
QR code is.
For example, if there are four partitions, for the second ESC/P command, this is 2; for
the fourth ESC/P command, this is 4.
5. Number of partitions: For the number of partitions, input the number of existing
partitions.
6. Parity data is the value of exclusively OR’ing all the print data (print data before
partition) in bytes. The same value is input here as for the partitioned QR code
ESC/P command to show that these codes are linked.
What is exclusive OR’ing in bytes?
The data is exclusively OR’ed (XOR’ed) in bytes and in order.
For example, if the character string is put into hexadecimals, this gives 0x31, 0x32,
0x33, 0x34.
XOR of 0x31 and 0x32 0011 0001 ^= 0011 0010 Result: 0000 0011 (0x03)
XOR of 0x03 and 0x33 0000 0011 ^= 0011 0011 Result: 0011 0000 (0x30)
XOR of 0x30 and 0x34 0011 0000 ^= 0011 0100 Result: 0000 0100 (0x04)
Therefore, the parity is 0x04.
Note: If this parity value is incorrect, the correct QR code is not generated.
Summary
Printing the character string "123456789" with a cell size of 4 dots, Model 2, standard
error correction level, and automatic data input
・
No linkage
74
ESC i Q 0x04 0x02 0x00 0x00 0x00 0x00 0x02 0x00 “123456789”
\\\