From e475160089d7eac6b40f1bc50f751fc035be529b Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Tue, 2 May 2023 10:32:13 -0400 Subject: [PATCH] hiti: Update error code list and other documentation --- backend_hiti.c | 62 +++++++++++++++++++++++++++++-------------- backend_shinkos2145.c | 2 +- 2 files changed, 43 insertions(+), 21 deletions(-) diff --git a/backend_hiti.c b/backend_hiti.c index ab7592c..8739912 100644 --- a/backend_hiti.c +++ b/backend_hiti.c @@ -56,8 +56,7 @@ struct hiti_cmd { // 0x03 Seen with RDC_RS on p461 // Errors -// 0x08 Seen with EFM_RD on p51x, EFD_CHS on p6525 -// 0x0a Seen with ERDC_RRVC on p461 (due to no ribbon?) +// 0x08 Seen with EFM_RD on p51x, EFD_CHS on p525, ERDC_RRVC on p461 // 0x0b Seen with ESD_SEHT2 on p51x /* Request Device Characteristics */ @@ -101,12 +100,8 @@ struct hiti_cmd { #define CMD_ERDC_UNKF 0x800D /* XX Unknown (1 arg) */ #define CMD_ERDC_RTLV 0x800E /* Request T/L Voltage */ #define CMD_ERDC_RRVC 0x800F /* Read Ribbon Vendor Code */ -#define CMD_ERDC_UNK0 0x8010 /* XX Unknown Query RE */ -#define CMD_ERDC_UNK1 0x8011 /* Unknown Query RE, 1 arg? */ -#define CMD_ERDC_UNK2 0x8012 /* Unknown Query RE */ -#define CMD_ERDC_UNK3 0x8013 /* Unknown Query RE */ -#define CMD_ERDC_UNK4 0x8014 /* Unknown Query RE */ -#define CMD_ERDC_UNK5 0x8015 /* Unknown Query RE */ +#define CMD_ERDC_UNK0 0x8010 /* Used when printer doesn't support RRVC? */ +#define CMD_ERDC_UNK1 0x8011 /* Unknown Query RE, 1 arg == QUALITY? */ #define CMD_ERDC_RHA 0x801C /* Read Highlight Adjustment (6 resp) RE */ // 8008 seen in Windows Comm @ 3211 (0 len response) @@ -169,7 +164,7 @@ struct hiti_cmd { /* Extended Debug Mode */ #define CMD_EDM_CVD 0xE002 /* Common Voltage Drop Values (n arg) */ #define CMD_EDM_CPP 0xE023 /* Clean Paper Path (1 arg) XX */ -#define CMD_EDM_UNK 0xE028 /* XX No idea */ +#define CMD_EDM_UNK 0xE028 /* XX Called if ERC_RTCV is supported. */ #define CMD_EDM_C_MC2CES 0xE02E /* CS Move card to Contact Encoder Station */ #define CMD_EDM_C_MC2MES 0xE02F /* CS Move card to Mag Encoder Station */ #define CMD_EDM_C_MC2CLES 0xE030 /* CS Move card to ContactLess Encoder Station */ @@ -824,17 +819,32 @@ static const char *hiti_errors(uint32_t code) { switch(code) { case 0x00000000: return "None"; + +#if 0 + /* Not sure about these, might be driver-generated? */ + case 0x00000001: return "Processing data"; + case 0x00000002: return "Sending data"; + case 0x00000003: return "Printing"; + case 0x00000004: return "End page"; + case 0x00000005: return "??"; + case 0x00000006: return "Starting job"; + case 0x00000008: return "Tray missing"; + + case 0x000000A1: return "Sending Y"; + case 0x000000A2: return "Sending M"; + case 0x000000A3: return "Sending C"; + case 0x000000A4: return "Sending O"; +#endif /* Warning Alerts */ - case 0x000100FE: return "Paper roll mismatch"; + case 0x000100FE: return "Paper type mismatch"; case 0x000300FE: return "Buffer underrun when printing"; case 0x000301FE: return "Command sequence error"; case 0x000302FE: return "NAND flash unformatted"; case 0x000303FE: return "NAND flash space insufficient"; case 0x000304FE: return "Heating parameter table incompatible"; - case 0x000502FE: return "Dust box needs cleaning"; /* Device Service Required Alerts */ case 0x00030001: return "SRAM error"; - case 0x00030101: return "Cutter error"; + case 0x00030101: return "SDRAM error"; case 0x00030201: return "ADC error"; case 0x00030301: return "NVRAM R/W error"; case 0x00030302: return "SDRAM checksum error"; @@ -845,7 +855,7 @@ static const char *hiti_errors(uint32_t code) case 0x00030602: return "SRAM checksum error"; case 0x00030701: return "Firmware write error"; case 0x00030702: return "Flash checksum error"; - case 0x00030802: return "Wrong firmware checksum error"; + case 0x00030802: return "Heating table checksum error"; case 0x00030901: return "ADC error in slave printer"; case 0x00030A01: return "Cam Platen error in slave printer"; case 0x00030B01: return "NVRAM R/W error in slave printer"; @@ -860,6 +870,7 @@ static const char *hiti_errors(uint32_t code) /* Operator Intervention Required Alerts */ case 0x00050001: return "Cover open"; // XXX or no ribbon loaded on P461? case 0x00050101: return "Cover open"; + case 0x000502FE: return "Dust box needs cleaning"; /* Supplies Alerts */ case 0x00080004: return "Ribbon missing"; case 0x00080007: return "Ribbon newly inserted"; @@ -919,7 +930,6 @@ static const char *hiti_errors(uint32_t code) case 0x00001300: return "FW Check Error"; case 0x00001500: return "Cutter error"; -#if 0 // XXX these seem inappropriate case 0x00007538: return "Device attached to printer"; case 0x00007539: return "Printer is in mobile mode"; case 0x00007540: return "Printer is in standalone mode"; @@ -928,11 +938,22 @@ static const char *hiti_errors(uint32_t code) case 0x00007544: return "Firmware too old for Matte mode"; case 0x00007545: return "Firmware too old"; case 0x00007546: return "Firmware too old"; -#endif + case 0x00008000: return "Paper out or feeding error"; case 0x00008008: return "Paper box missing"; - case 0x00008010: return "Paper roll mismatch"; - case 0x00080200: return "Ribbon type mismatch"; + case 0x00008010: return "Paper tray/roll mismatch"; + case 0x00008011: return "Paper tray mismatch (need photo tray)"; + case 0x00008012: return "Paper tray mismatch (need sticker 4/2/4 tray)"; + case 0x00008013: return "Paper tray mismatch (need sticker 4x4 tray)"; + case 0x00008014: return "Paper tray mismatch (need sticker 1x1 tray)"; + case 0x00008015: return "Paper tray mismatch (need PVC tray)"; + case 0x00080200: return "Unsupported ribbon type"; + case 0x00080201: return "Ribbon type mismatch (need YMCO)"; + case 0x00080203: return "Ribbon type mismatch (need KO)"; + case 0x00080230: return "Ribbon type mismatch (need KO)"; + case 0x00080240: return "Ribbon type mismatch (need 4x6)"; + case 0x00080250: return "Ribbon type mismatch (need 5x7)"; + case 0x00080260: return "Ribbon type mismatch (need 6x8)"; // case 0x10008000: return "Paper out or paper low"; /* XXX this won't work, high byte is cleared */ default: return "Unknown"; @@ -3259,12 +3280,13 @@ const struct dyesub_backend hiti_backend = { - Start research into M610, P910L (Do they have HiTi firmware?) - Incorporate changes for CS-series card printers - More "Matrix table" decoding work - - Start working on "sheet type" models - - P110S - - Others? ("P4x6" 1280*1818 on P310W/P320W, 1248*1836 on P110S) + - Start working on other "sheet type" models + - P110S ("P4x6" 1248x1836) + - Others? ("P4x6" 1280*1818 on P310W/P320W) - More work on P461 Prinhome (need Windows print dumps) - Matte mode - Quality mode + - Any way to determine media type/vendor? - Pull in updated heat tables & LUTs from windows drivers - Figure out what to send from v2 heattables - Appears to depend on proprietary library, bah. diff --git a/backend_shinkos2145.c b/backend_shinkos2145.c index 7b3ffe5..292c3aa 100644 --- a/backend_shinkos2145.c +++ b/backend_shinkos2145.c @@ -1238,7 +1238,7 @@ const struct dyesub_backend shinkos2145_backend = { { 0x10ce, 0x000e, P_SHINKO_S2145, NULL, "shinko-chcs2145"}, { 0x10ce, 0x000e, P_SHINKO_S2145, NULL, "sinfonia-chcs2145"}, /* Duplicate */ { 0x10ce, 0x0011, P_SHINKO_S2145, NULL, "olmec-op1000"}, -// { 0x0d16, 0xXXXX, P_SHINKO_S2145, NULL, "hiti-p720l"}, +// { 0x0d16, 0xXXXX, P_SHINKO_S2145, NULL, "hiti-p710l"}, { 0, 0, 0, NULL, NULL} } };