LX-D02 thermal mini printer working on Windows
The Bluetooth printer's phone app (React Native/Hermes) was reversed with REA so the printer could be driven from Windows.
Credits
Earliest dated source:
The full story
The LX-D02 is a small Bluetooth thermal printer that normally only works with the "Funny Print" phone app. Starting from REA, the owner found that an existing open-source driver connected but printed nothing, because the printer rejected its fixed handshake.
The phone app turned out to be React Native, with its logic in a Hermes JavaScript bundle rather than native code. Decompiling it with hermes-dec showed readable function names, and from those the challenge-and-response check: a CRC calculated over a random byte and the printer's address. It matched captured traffic byte for byte. The result, picoprint, makes the printer a normal Windows printer that works from any app with Ctrl+P. The fix was also sent to the original driver project.
How it was done
Tools
Themes
Loading themes…
Sources
From the maker's own write-up or code. We summarise what they report; we haven't tested it ourselves.
- REA community: Show and tell: LX-D02 thermal printer on Windows (React Native/Hermes app reversed)Repository account: morlutoPublished
The show-and-tell: the failed handshake, the Hermes decompile, the fix, and links to the code and write-up.