Hardware & tools

Wireless Paper API: HTTP to LoRa, with a screen attached

Use a Heltec board as a two-way HTTP-to-LoRa adapter, with saved or per-request modem settings, a browser canvas, and a setup hotspot.

Ramazan Yavuz
Ramazan Yavuz ·

A program can post a message to a small Heltec board over HTTP, and that board can send it over LoRa. Another board receives the radio packet and makes it available through its own HTTP API. Wireless Paper API now does that in both directions. I checked the exchange with a Wireless Paper and a Wireless Tracker on the desk, comparing the received bytes with the submitted messages.

This makes the board useful as a radio adapter for a computer, phone, or script. The screen is another way to use the same hardware: it can show text, a picture, or a drawing made in the browser. Both functions are available from one web page on port 80, with an API reference served by the device itself at /api.


The radio interface exposes the operations a small application needs. POST /api/lora/config saves modem settings, POST /api/lora/activate starts or stops the radio, and POST /api/lora/send transmits text or hexadecimal bytes. GET /api/lora/messages returns a rolling log of received and sent packets. Received entries include signal strength and signal-to-noise measurements.

Both ends need matching radio settings. For an example using two suitable boards, replace BOARD_A and BOARD_B with their addresses. The frequency must suit the hardware and the installation's location. Apply the configuration to both boards, then send from A and read on B:

curl http://BOARD_A/api/lora/config -H 'Content-Type: application/json' \
  -d '{"enabled":true,"frequency_mhz":868.1,"bandwidth_khz":125,"spreading_factor":7,"coding_rate":5,"sync_word":18,"power_dbm":-9,"preamble":8,"crc":true,"tx_enabled":true}'

curl http://BOARD_B/api/lora/config -H 'Content-Type: application/json' \
  -d '{"enabled":true,"frequency_mhz":868.1,"bandwidth_khz":125,"spreading_factor":7,"coding_rate":5,"sync_word":18,"power_dbm":-9,"preamble":8,"crc":true,"tx_enabled":true}'

curl http://BOARD_A/api/lora/send -H 'Content-Type: application/json' \
  -d '{"text":"Hello from A"}'

curl 'http://BOARD_B/api/lora/messages?after=0'

Swap A and B to reply. The application can keep the returned latest_id and use it as the next after cursor. The browser offers the same send controls and refreshes the packet log while its LoRa section is open. The log holds the latest 16 packets in memory and resets when the board restarts.

The implementation exchanges raw LoRa packets. It does not join a Meshtastic mesh or a LoRaWAN network. Those systems add addressing, framing, and other protocol rules. Another device can exchange bytes with this adapter when its modem and packet format match. The board also leaves received packets available to the HTTP client without retransmitting them over radio.


A single request can use different radio settings without replacing the saved configuration. Add a radio object to the send request. Fields left out of that object inherit the configured values:

curl http://BOARD_A/api/lora/send -H 'Content-Type: application/json' \
  -d '{"text":"Another profile","radio":{"enabled":true,"frequency_mhz":868.1,"bandwidth_khz":250,"spreading_factor":8,"tx_enabled":true}}'

The board applies those settings for the transmission and restores its configured receiver afterward. The response includes the transmit settings, restored receive settings, and receiver state. This is useful when a script talks to devices that use different modem profiles. It does not leave the receiver listening on the temporary profile. Replies must match the saved receive configuration, or the application must configure that receiver first.

Transmission is disabled in a fresh build until configured and enabled. An airtime guard spaces out transmissions, with a default setting of one percent. A caller that sends too soon receives HTTP 429 and a Retry-After value. That guard is a practical pacing measure; it does not establish compliance with local radio rules.


The two builds share the API and use drivers for their own screens. Wireless Paper V1.1 has a 250 by 122 pixel monochrome e-paper display. Wireless Tracker V1.1 has a 160 by 80 pixel TFT. The Tracker build uses the same black-and-white drawing format, so existing text and drawing commands work on either board. The device status reports its screen dimensions and frame size.

The default PlatformIO environment is paper. The Tracker uses pio run -e tracker and its own USB port for upload. The manufacturer's Paper panel revision notes and Tracker TFT pin mapping help explain why those builds need separate screen support. The Tracker's GNSS receiver and full TFT color are outside this firmware's scope.

The repository also includes ./install.sh for an interactive installation on Linux or macOS. It creates the local Python environment, asks which board and serial port to use, and offers the current Wi-Fi network name when available. Password entry is hidden. The script writes an ignored private configuration file, builds the selected firmware, offers a flash backup, and asks before uploading. That removes several setup commands while keeping the target and private settings visible to the person installing it.

The browser canvas has a black pen, a white eraser, brush sizes, and undo and redo. A person can draw with a mouse or finger, import a picture, or load the last completed screen image. Pressing Show canvas submits the drawing. Text has controls for size, position, wrapping, ink, and background. Picture conversion and dithering happen in the browser.

Example drawing on the Wireless Paper browser canvas, with pen, eraser, and undo controls
The browser canvas sends a monochrome frame sized for the connected board.

A script can send the same content to POST /api/display or upload a full bitmap to POST /api/frame. Display writes return a job number, and the status endpoint reports completion. The Python helper can also split a display command into checked LoRa fragments for a remote screen running this firmware. A Paper bitmap takes 18 packets; a Tracker bitmap takes eight. Full image transfers can be slow with airtime pacing.


The startup screen gives someone standing next to the board a way to reach it. It shows the setup hotspot name, http://192.168.4.1/, and the selected hotspot policy. The default setup window lasts 60 minutes from power-on. If a client is still connected at the end of the hour, the hotspot remains on until the last client leaves.

The web page also offers an always-on setting, which survives restarts. Restarting opens a fresh setup window. The normal connection to the configured Wi-Fi network continues after the hotspot closes. A local hostname helps find the board on that network, while a router reservation remains the reliable way to guarantee a fixed LAN address.

The public source uses placeholder Wi-Fi configuration. Real network names and passwords belong in an ignored local file. A private firmware build or original flash backup can contain those details and must stay private. The hotspot and HTTP API are open, and the raw radio protocol is unauthenticated. They are intended for a trusted local setup. The security notes describe that boundary.


The air-link checks went beyond the sender reporting success. With both boards using 868.1 MHz, 125 kHz bandwidth, spreading factor 7, and coding rate 4/5, messages sent through one board's HTTP API appeared as exact received payloads on the other. The tests included replies, binary data containing zero bytes, and a 255-byte payload. A temporary 250 kHz, spreading-factor-8 transmission also arrived at the peer configured for it.

The project includes a repeatable two-board test and a validation record. This proves a local exchange between these two boards with these settings. It does not establish outdoor range, compatibility with a different radio network, battery life, or reliable delivery without application-level acknowledgments. A successful local send result alone is still not a receipt from the other board.

The firmware runs the processor at 80 MHz, leaves the status LED off, and requests Wi-Fi modem power saving. Paper sleeps its display controller after refresh. Tracker keeps its TFT and backlight powered and holds the unused GNSS chip in reset. Current consumption has not been measured. Keeping HTTP or radio reception available costs power; whole-device deep sleep would prevent an ordinary HTTP request from reaching it.

A small application can now use either board as its radio connection, while the display remains useful for a note, status message, or drawing. The API handles the modem and panel details, and the client can stay a short script or a browser page.