Parcel-Locker Serial Protocol Scratchpad
Overview
A small JavaScript scratchpad for building the byte-level command framing used to drive Kerong CU48B parcel-locker controller boards. It builds raw command frames, SOH/STX delimiters, address bytes, and a BCC/CRC checksum, and prints the resulting buffers.
Why It Exists
Before wiring locker control into a production REST service, the wire protocol’s framing and checksum had to be understood and verified in isolation. A throwaway script is the fastest way to confirm the exact bytes a controller board expects.
What We Built
A couple of tiny Node scripts (frame.js, test.js) that implement a checksum (crc/BCC) routine and assemble command frames as byte arrays, emitting them as Node Buffers for inspection. The only dependency is axios. This work fed directly into the production locker controller (see related repo).
Technologies & Approach
Plain Node.js with manual Buffer construction, deliberately dependency-light to keep the focus on getting the protocol bytes exactly right before promoting the logic into a real service.
Outcome / Impact
Validated the CU48B command-framing and checksum scheme, de-risking the integration that became the smart parcel-locker REST controller. Scratch build; archived once the protocol was confirmed.
Capabilities Demonstrated
- Low-level serial / hardware protocol reverse-engineering
- Command framing and checksum (CRC/BCC) encoding
- De-risking hardware integrations with isolated builds