probe remaining POS895 unknowns; add integration design spec
Closes every hardware question that was blocking the integration design, so the design now rests on measurements rather than assumptions. Probe results, all against the real printer: - GS I 1 returns 0x20, unique against 0x01/0x0D/0x13. This is what keeps the integration small: model identity stays a byte and the existing per-job identification flow works. Had it returned nothing or 0x01 the POS895 would have been indistinguishable from a TM-T30III by probe, and model identity would have had to come from discovery instead. - GS I 66 and 67 are blank, so the model-name fallback the work items proposed is useless here. GS I 68 returns the serial, and it matches the SPRT discovery serial exactly, which makes it a correlation key between a discovered printer and a connected one. - GS ( L prints nothing. ESC * 33 and GS v 0 both render correctly across the full 576 dots, so the adapter uses PrintImageBitModeAsync and the GS v 0 work item is dropped as redundant. - ESC t is honoured and index 18 really is CP852; 2 and 0 also render. That last one exposed a fleet-wide bug that is deliberately left out of scope: PrintTextAsync hardcodes CP852 for every printer, and CP852 cannot encode e-grave, a-grave, u-grave, e-circumflex, i-grave or o-grave, so French and Italian accents are dropped on the Epsons too. Now known to be fixable via ESC t 2, but it needs its own spec. The design spec covers discovery composition, the adapter, the three switch registrations, testing and risks. It calls out that the ReceiptConverterFactory WorkareaTicket switch defaults to 33 columns, so missing it yields a POS895 printing kitchen tickets at the narrow TM-U220 layout: wrong, but not obviously broken. Claude-Session: https://claude.ai/code/session_01E6N3P4nSZLtp4BC2LXVref
This commit is contained in:
@@ -100,10 +100,12 @@ Code pages: the SDK manual's code page table (TSPL section, but the same family)
|
||||
| DLE EOT 1..4 | status | **Confirmed.** Identical layout, `0x12` fixed bits set. |
|
||||
| GS ! n (`SetFontSizeAsync`) | magnification | **Confirmed** at width 1x/2x/3x, height 2x. |
|
||||
| ESC E (`SetEmphasized`) | bold | Standard, likely fine. SDK uses ESC ! bit 3 instead. |
|
||||
| ESC t 18 + CP852 | umlauts | Likely fine, see code pages above. |
|
||||
| ESC t 18 + CP852 | umlauts | **Confirmed.** ESC t honoured; 18=CP852, 2=CP850, 0=CP437 all render. |
|
||||
| ESC $ (`SetAbsolutePrintPosition`) | logo offset 100 | Unverified. SDK uses GS L margins instead. |
|
||||
| GS ( L fn 112 / fn 50 (`LoadImageAsync` + `PrintLoadedImage`) | logo | Probably unsupported. SDK never uses it. Fallbacks: ESC * 24-dot double density (`PrintImageBitModeAsync`, already implemented) or GS v 0 (not implemented). |
|
||||
| GS I 1 (`GetPrinterIdAsync`) | model byte | **Unknown.** SDK uses GS I 66 for a maker string instead. |
|
||||
| GS ( L fn 112 / fn 50 (`LoadImageAsync` + `PrintLoadedImage`) | logo | **Confirmed unsupported.** Prints nothing. |
|
||||
| ESC * 33 (`PrintImageBitModeAsync`) | logo | **Confirmed.** Full 576-dot width. Use this. |
|
||||
| GS v 0 | logo | **Confirmed** working too, but redundant. Do not implement. |
|
||||
| GS I 1 (`GetPrinterIdAsync`) | model byte | **Confirmed `0x20`.** No collision with 0x01/0x0D/0x13. |
|
||||
| ESC r (`SetRedColor`) | two-colour | Not applicable, monochrome printer. The T30III adapter ignores `IsRed` anyway. |
|
||||
|
||||
## SPRT discovery protocol
|
||||
@@ -159,7 +161,7 @@ step and cannot be folded into discovery.
|
||||
3. **Identification hardening in `EpsonPrinter`.** Shorter read timeout for GS I, fall back to the GS I 67 model-name string, or to a per-IP configured model, when the byte is missing or collides with an Epson ID.
|
||||
4. **Discovery for non-Epson printers.** Solved: the vendor SPRT protocol is documented above and reimplemented in `Pos895Test`, confirmed against the printer. Remaining work is a `SprtDiscoveryService` implementing `IDiscoveryService`, and a composite service that merges its results with ENPC. Both probes go to UDP 3289, so they can share a socket. `PrinterDiscoveryBackgroundTask` needs no change. Now well under the 1 to 2 days originally estimated.
|
||||
5. **Emulation and tests.** Add a 576 px `HtmlPrinter` entry with the new ID to the emulation dictionary in `PrintServerBootstrapper`, and EpsonTest cases, so receipt layouts can be checked without hardware.
|
||||
6. **GS v 0 raster** in `EpsonCommands`, only if the probe shows GS ( L is rejected.
|
||||
6. ~~**GS v 0 raster** in `EpsonCommands`~~ Not needed: `GS ( L` is rejected but `ESC *` works and is already implemented.
|
||||
7. **CLAUDE.md updates** once the adapter exists: printer ID byte, image width, discovery method.
|
||||
|
||||
## Answered on hardware, 2026-09-03
|
||||
@@ -177,13 +179,28 @@ discovery probe run on the printer's own segment. Tooling in `Pos895Test/`.
|
||||
so `SetFontSizeAsync` can pass magnification through without clamping.
|
||||
- **`ESC !`?** Selects Font A with `0x00`.
|
||||
- **`ESC d n`?** Appears to be ignored. Feed with literal LF bytes.
|
||||
- **`GS I` family?** `GS I 1` = `0x20`, unique. `GS I 2` = `0x02`,
|
||||
`GS I 3` = `0x64`, `GS I 65` = `"N-656 1.+0"`, `GS I 69` = `"_English"`.
|
||||
`GS I 66` (maker) and `GS I 67` (model name) are **blank**, so the model-name
|
||||
fallback the work items suggested is useless here. `GS I 68` returns the
|
||||
serial and it matches the SPRT discovery serial exactly, which makes it a
|
||||
usable correlation key between a discovered and a connected printer.
|
||||
- **Raster graphics?** `GS ( L` prints nothing. `ESC * 33` and `GS v 0` both
|
||||
render correctly across the full 576 dots. Use `PrintImageBitModeAsync`.
|
||||
- **Code pages?** `ESC t` is honoured and index 18 really is CP852. Index 2
|
||||
(CP850) and 0 (CP437) also render correctly.
|
||||
|
||||
Note CP852 has no `e`-grave, `a`-grave, `u`-grave, `e`-circumflex, `i`-grave
|
||||
or `o`-grave. `EpsonPrinter.PrintTextAsync` hardcodes CP852 for every printer,
|
||||
so French and Italian accents are already dropped fleet-wide, Epsons included.
|
||||
Now known to be fixable by selecting CP850, but that is a product-wide change
|
||||
with its own blast radius, not part of POS895 support.
|
||||
|
||||
## Open questions that only hardware can answer
|
||||
|
||||
- What does `GS I 1` return, if anything?
|
||||
- Does the firmware accept `GS ( L` raster graphics?
|
||||
- Is code page 18 really CP852 in ESC/POS mode?
|
||||
- Does DLE EOT 1 bit 3 go high on paper-out? The status queries answer, but
|
||||
paper-out was never induced.
|
||||
- Font B, and its claimed 64 columns.
|
||||
- Does the SPRT reply go to the sender's port, or is 9100 hard-coded?
|
||||
- Does the POS896 report the same `GS I 1` = `0x20`? Assumed yes, same spec
|
||||
sheet and same command set, but untested.
|
||||
|
||||
Reference in New Issue
Block a user