Skip to main content

Errors and test vectors

Processing categories

Command result codes describe device behavior. The categories below describe where the server parser or workflow stopped.

CategoryMeaningDefault handling
FRAME_INCOMPLETEStart or end boundary is missingReject and retain transport evidence
FIELD_COUNT_INVALIDField count does not match the command/profileReject before business handling
FIELD_VALUE_INVALIDType, case, length or range is invalidReject with a redacted field pointer
INTEGRITY_FAILEDCRC does not matchReject; do not execute the command
VERSION_UNSUPPORTEDCommand or field shape is outside the cabinet profileQuarantine and request profile review
DUPLICATE_OBSERVEDMessage/order/return was already acceptedReturn the idempotent prior result
STATE_CONFLICTFrame is valid but conflicts with accepted rental/payment/return stateHold for reconciliation
DEPENDENCY_UNAVAILABLEDevice, payment or provider evidence is unavailablePreserve UNKNOWN; retry by policy

Device result codes

  • Rental/release 0/1/2/100/110: see Rental and return.
  • Return 0/1/2 and abnormal return 2/4: see RS/FR.
  • Maintenance acceptance 0/1: see Device management.
  • OTA 1/10 progress/success and >=200 failure: see OT.
  • Slot/battery health 0/1/2/3/201/202/203: see AE.

Do not interpret the same numeric value across unrelated commands without the command context.

Downloadable vectors

The test-vector JSON contains:

  • The standard CRC16/MODBUS check value 123456789 -> 4B37.
  • Valid CQ, CN, AC, BW, BR, FB and RS frames.
  • Exact CRC input strings showing where the test PW suffix is appended.
  • Wrong CRC, missing marker, lowercase command and duplicate-order negatives.

The vectors use test-only PW DEMO00. Never replace it with a production PW in a public file or browser bundle.

Local verification

import {verifyFrame} from './protocol-v151.mjs';

const result = verifyFrame('{CQ,17000000,0,6F75}', 'DEMO00');
if (!result.valid) throw new Error('CRC verification failed');

Conformance requires both parser vectors and physical UAT. A parser can prove that a frame is well formed; it cannot prove that a lock opened, a power bank was removed, payment succeeded or a return was physically seated.