8bit_byte
mode is targeted.In the case of a normal QR code, the header part of the data to be written has the following structure.
There are 1 to 40 versions of the QR code (= QR code size), and the data size that can be recorded in one QR code changes accordingly. (See here)
It seems that the version specification for the QR code is written in a place different from the header part, so I will omit it here.
The SS length is variable between 8 and 16 bits depending on the QR code version and encoding mode.
- | length | Contents to record |
---|---|---|
E | 4bit | Encoding mode(See table below) |
SS | (variable) | Record the length of data to be recorded in the QR code |
Encoding mode | Value representing the mode |
---|---|
numeric |
1 (0b0001) |
alpha_numeric | 2 (0b0010) |
8bit_byte |
4 (0b0100) |
8bit_byte
mode, record the header part as follows.- | length | Contents to record |
---|---|---|
3 | 4bit | Mode showing concatenated QR code(0b0011) |
N | 4bit | Sequence number of QR code to be concatenated(Serial number from 0 to 15) |
T | 4bit | Last sequence number of QR code(Serial number from 0 to 15) |
PP | 8bit | Parity value of all data(XOR value of all bytes) |
E | 4bit | Encoding mode(8bit_byte = 4) |
SS | (variable) | Record the length of data to be recorded in one QR code |
So, to get the concatenated QR code, follow the procedure below.
Determine the version (size) of the concatenated QR code. --The maximum number of connections is 16. ――In addition, it seems that the amount of data that can be recorded with a concatenated QR code is 2 bytes less than with a normal QR code. (I think the amount of data has increased by 20 bits, but for some reason it seems that it can record up to -2 bytes) ――It is necessary to decide the version in consideration of the above two points. --Usually all QR codes are made with the same version (size). (I haven't tried to concatenate QR codes with different versions, but it's safe to avoid it because some readers may not be able to read it.)
Calculate the parity from the data stored in the QR code. (XOR value of all bytes = 8bit)
Divide the data to fit in the QR code so that it fits in one QR code. (Capacity of each QR code-make sure it fits in 2 bytes)
Generate as many QR codes as you need and render each one. --Specify the same "parity value" and "last sequence number" for all QR codes. --Specify the "sequential number" and the data to be stored for each QR code.
The output of the concatenated QR code by actually modifying rqrcode is explained in Practice.
Laser barcode scanners are used in operations such as pharmacies. Since these are quite expensive, it is a little difficult to prepare equipment for operation verification. (I was also interested in it personally, so I got a second-hand item at Yahoo Auction at a low price. It seems that it is listed frequently unexpectedly.)
Therefore, until the final confirmation using the barcode scanner, we used a smartphone app that supports linked QR code reading to confirm the operation. (For iOS apps, [Iconit](https://apps.apple.com/jp/app/qr%E3%82%B3%E3%83%BC%E3%83%89%E3%83%AA% E3% 83% BC% E3% 83% 80% E3% 83% BC-% E3% 83% 90% E3% 83% BC% E3% 82% B3% E3% 83% BC% E3% 83% 89% E3 % 83% AA% E3% 83% BC% E3% 83% 80% E3% 83% BC-% E3% 82% A2% E3% 82% A4% E3% 82% B3% E3% 83% 8B% E3% 83% 83% E3% 83% 88 / id480090210) ・ [Pomera QR Code Reader](https://apps.apple.com/jp/app/%E3%83%9D%E3%83%A1%E3%83 % A9qr% E3% 82% B3% E3% 83% BC% E3% 83% 89% E3% 83% AA% E3% 83% BC% E3% 83% 80% E3% 83% BC / id371963393) · QRdeCODE I could only find 3 types)
However, the behavior of both the reader app and the ** barcode scanner ** may differ considerably depending on the product. --There seems to be some that have not confirmed whether the parity values match. (Although it is not a big problem in actual operation) --If you specify a concatenated QR code but there is only one QR code (not divided), there may be something that cannot be read. (If the amount of data is small, it seems better to output with a normal QR code) (Currently, details are being reconfirmed) --Some characters are garbled when the upper and lower bytes of Kanji (Shift JIS) straddle two QR codes. (This behavior is often seen in apps)
From the above, especially for business use, it is safer to prepare an operation check environment assuming the equipment actually used. ――For barcode scanners, it may be better to prepare several types, including slightly older models.
This article was written with reference to the following information.
Recommended Posts