Skip to content

jsammarco/FlipperWalkPrint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WalkPrint

WalkPrint is a Flipper Zero external app for a WalkPrint / YHK-style thermal printer that can print typed messages, .txt files from the SD card, and 384px wide BMP images. It uses a single live path through an external ESP32 bridge instead of pretending the Flipper can talk to a Classic Bluetooth printer on its own.

Features Features
Print custom typed messages Print .txt files from the SD card
Print 384px BMP images from the SD card Discover nearby supported printers
Connect through the ESP32 Classic Bluetooth bridge Scan Wi-Fi from the bridge
Adjust density, font size, spacing, and font family Save printer address and print settings

The app talks to an ESP32-WROOM over Flipper USART at 115200 8N1, and the ESP32 handles:

  • Classic Bluetooth SPP printer discovery and connection
  • raw printer byte transport
  • Wi-Fi scan/status helpers

The build scripts prefer your local Momentum firmware checkout when it is present.

Current State

  • The Flipper app builds cleanly against Momentum and outputs dist/walkprint.fap.
  • The app UI now includes printer discovery, Wi-Fi scan, configurable message font size/family settings, .txt printing from the SD card, and BMP printing from the SD card.
  • The live transport in walkprint_transport_live.c uses Flipper header pins 13/14 (PB6/PB7) at 115200.
  • The ESP32 bridge sketch lives at esp32_bridge/walkprint_esp32_bridge/walkprint_esp32_bridge.ino.
  • The optional WalkPrint Bridge is a PC-side Python script under bridge/ for desktop helpers like image conversion and direct PC printing. It is not required for the Flipper Zero app.

ESP32 Bridge

The ESP32 bridge is the practical transport layer for this setup because it can own Classic Bluetooth SPP while the Flipper app stays on a supported UART link.

Hardware Photos

Flipper module printer 2 Flipper module printer
Inland ESP-32 Flipper module back

Files:

Wiring:

  • ESP32 GPIO17 TX -> Flipper PB7 RX
  • ESP32 GPIO16 RX -> Flipper PB6 TX
  • GND -> GND

Protocol examples:

  • PING
  • BT_SCAN
  • BT_CONNECT|25:00:35:00:03:57
  • BT_WRITE_HEX|...
  • WIFI_SCAN

Project Layout

.
|-- .gitignore
|-- README.md
|-- application.fam
|-- app_ui.c
|-- app_ui.h
|-- build.sh
|-- deploy.sh
|-- walkprint_app.c
|-- walkprint_app.h
|-- walkprint_config.h
|-- walkprint_debug.c
|-- walkprint_debug.h
|-- walkprint_protocol.c
|-- walkprint_protocol.h
|-- walkprint_transport.h
`-- walkprint_transport_live.c

What You Can Edit

Printer-specific placeholders live in walkprint_config.h.

Edit these first:

  • walkprint_config_init_frame
  • walkprint_config_start_print_frame
  • walkprint_config_end_print_frame
  • walkprint_config_feed_frame
  • walkprint_config_raw_frame
  • walkprint_demo_receipt_lines

Build

export FLIPPER_FW_PATH=/path/to/Momentum-Firmware
./build.sh

Optional:

./build.sh --fw-path /path/to/Momentum-Firmware
./build.sh --fw-path /path/to/Momentum-Firmware --copy

The Windows build script also works directly with your local checkout:

./build.ps1 -FirmwareDir C:\Users\jasammarco.ENG\Projects\Momentum-Firmware

Deploy

Mounted SD card:

./deploy.sh --mount /Volumes/FLIPPER

qFlipper CLI:

./deploy.sh

App Menu

  • Discover Printer
  • Connect
  • Print Message
  • Print TXT
  • Print BMP
  • Feed Paper
  • WiFi Scan
  • Settings
  • About

The app now shows:

  • connection state
  • the saved printer address, once discovery or manual entry sets it
  • the configured density placeholder
  • the configured font size from 1-10
  • the selected font family
  • the latest bridge discovery or Wi-Fi scan result
  • BMP print status for .bmp files selected from storage
  • TXT print status for .txt files selected from storage
  • persisted settings after the app closes, including printer MAC, message, BMP path, and print options

The desktop bridge now adds:

  • python bridge/walkprint_bridge.py image <path> to send an image directly
  • python bridge/walkprint_bridge.py convert-image <path> to generate the printer payload without sending
  • .\bridge\send_image.ps1 to select an image with a Windows file picker and send it
  • .\bridge\send_image.ps1 -BmpOnly to pick only .bmp files and send them at the default 384px print width

Notes

  • The Flipper talks to the printer through the ESP32 bridge over UART; it does not open the printer's Classic Bluetooth link on its own.
  • Print TXT reads a .txt file from the Flipper SD card, keeps line breaks, and prints it across as many text pages as needed. While a multi-page TXT job is running, Back cancels after the current page finishes.
  • The built-in text renderer is best for standard printable ASCII. If a text file uses Unicode art, block characters, or other extended symbols, convert it to an image and use Print BMP instead.
  • Print BMP expects a .bmp file on the Flipper SD card that is exactly 384px wide. Files with other widths are rejected by the app.
  • Use the Arduino IDE to compile and upload the ESP32 bridge sketch, and make sure the partition option matches the included partitions.csv setup.
  • Good next additions for the bridge would be printer status polling, Wi-Fi connect commands, and better paging for larger Bluetooth scan results.

About

Print to a bluetooth 2.0 classic pocket thermal receipt printer using a ESP-32 WROOM-DA as a UART bridge

Topics

Resources

License

Stars

Watchers

Forks

Packages