Skip to content

Building an Access Point

Skip Hansen edited this page Feb 22, 2025 · 47 revisions

Overview

See https://openepaperlink.org/aps for a quick summary of AP options.

Access Points

Important

Release 2.75 was the last release that supported ESP32-S2 based APs or ESP32-S3 APs with less than 16Mb flash and 8MB RAM.

An OpenEpaperLink installation consists of different epaper tags, wirelessly connected to one or more Access Points. An access point is made of an esp32-family MCU and some device that can talk IEEE 802.15.4. This can be a ZBS243-based tag, or better, an esp32-C6. You can build one of the different access points models yourself, or you can order a kit or even a ready made one.

If you want to ONLY use BLE based displays, you can use a single ESP32S3-N16R8 (Hanshow displays are NOT compatible with BLE only APs at the moment).

AP Comparison table

The following build environments are available. If you build one of these APs, you can easily upload the firmware to your MCU via https://install.openepaperlink.de, and update new firmware releases over the air via the web interface of the AP, without having to install Platform.io and Visual Studio Code. Also, you will find binaries of the firmware in the releases.

name BLE only AP Mini AP v2 Nano AP Nano AP V2 Yellow AP Mini AP v3 /
Mini AP v4
AP and flasher LilyGo
T-Panel S3
based on esp32-s3 esp32-s2 esp32-s2 esp32-s3 esp32-s3 esp32-s3 esp32-s3 esp32-s3
radio built in Segmented tag 1.54” tag esp32-c6 esp32-c6 esp32-c6 1.54” tag esp32-h2
psram 8MB 2MB 2MB 8MB 8MB 8MB 8MB 8 MB
flash size 16MB 4MB 4MB 16MB 16MB 16MB 16MB 16 MB
extras no display segmented display 1.54” display no display TFT display TFT display 1.54” display 4” display
Maximum amount of tags a few hundred About 30 About 30 a few hundred a few hundred a few hundred a few hundred a few hundred
maximum tag size all BLE sizes any size any size any size any size any size any size any size
BLE display support yes, only no no yes yes yes yes yes
design by jelmer atc1441 atc1441 atc1441 nic jelmer LilyGo
link/PCB/case design more info more info more info case design PCB design case design PCB design more info more info more info
note only supports BLE-based tags Not recommended, last supported by release 2.75. Not recommended, last supported by release 2.75. v4 includes interface to flash tags Includes interface to flash tags Off the shelf commercial product

"Spaghetti AP" (DIY clone of the Yellow AP)

See AP Beginners Guide aka "Spaghetti AP" for details.

Designing your own AP

If you design your own AP, there are a few points to keep in mind: If you use the same components as an existing AP, try to use the same pinout if you want to have OTA. When using an ESP32-C6 as an AP, please copy the pinout of the Mini AP v3 or Yellow AP to be able to flash the ESP32-C6 via the other ESP32. Use a 16MB flash and 8MB ram ESP32-S3 module, other configurations are really hard to get working and will not get OTA. For the ESP32-C6, 4MB flash will do. The pinouts for the different build environments are listed on this page

Can I use an ESP-S2 ?

We have come a long way in the last couple of years. The ESP-S2 used by the Nano-AP-V2 and similar APs is no longer supported.

Why do I need an ESP32-S3 and a ESP32-C6?

You would think the ESP32-C6 can do IEEE 802.15.4 as well as WiFi, but the catch is... not at the same time! Because the AP has to receive unsolicited messages from the tags, it needs to listen in IEEE 802.15.4 mode continuously. There's no way to do WiFi communication in parallel to this. (This section does not apply to the BLE only AP)

Can I use a Raspberry Pi and a CC2530 module

In theory, it's possible to skip the esp32 entirely and use a Raspberry Pi and a CC2530. But you will miss out on most the the cool features that are built in on the esp32-based APs, like Zero-config Multi-APs (to extend the reach using multiple access points) and JSON templates. A rudimentary implementation of the protocol is here. But it's much easier to use one of the esp32-flavours for the access point, so you can just push jpg's or JSON templates.

Primary ESP32 AP PlatformIO build configurations

It is essential that the correct environment be selected when building and flashing the ESP32 code.

Please refer to the following table to find the correct environment for your AP.

name Platform IO Environment based on psram flash size
Mini AP v2 OpenEPaperLink_Mini_AP esp32-s2 2MB 4 MB
Nano AP OpenEPaperLink_Nano_AP esp32-s2 2MB 4 MB
Yellow AP ESP32_S3_16_8_YELLOW_AP esp32-s3 8MB 16 MB
Mini AP v3 ESP32_S3_16_8_YELLOW_AP esp32-s3 8MB 16 MB
Mini AP v4 OpenEPaperLink_Mini_AP_v4 esp32-s3 8MB 16 MB
AP and flasher OpenEPaperLink_AP_and_Flasher esp32-s3 8MB 16 MB

Building the Primary ESP32 firmware from source

It is only necessary to build the firmware from source if you want to modify it. Otherwise https://install.openepaperlink.de is the way to go!

The code for an AP's ESP32 processor is located in the ESP32_AP-Flasher/subdirectory.

The ESP32 code is a PlatformIO project. If this doesn't mean anything to you see https://platformio.org/install for more information and instruction on how to install it.

NB: If you run Ubuntu do NOT be tempted to install PlatformIO using apt-get, if you do a prehistoric version will be installed and nothing good will happen.

Once you have PlatformIO installed you can build the desired image by running

pio run -e <environment>

Note: This command is run automatically by the upload target.

Building and Flashing the Primary ESP32 file system

If you have not previously flashed your AP using https://install.openepaperlink.de you will need to flash both the file system as well as the firmware image.

Once flashed you should NOT flash it again unless you want to clear the data.

You can build and flash the file system by running

pio run -e <environment> -t uploadfs

NB: If you modify any of the files under .../ESP32_AP-Flasher/wwwroot you must run gzip_wwwfiles.py prior to uploading the filesystem to update the compressed versions of the files in the .../ESP32_AP-Flasher/data subdirectory.

skip@Dell-7040:~/esl/OpenEPaperLink/ESP32_AP-Flasher$ python gzip_wwwfiles.py
Gzipping: upload-demo.html
Gzipping: index.html
Gzipping: edit.html
Gzipping: ota.js
Gzipping: favicon.ico
Gzipping: flash.js
Gzipping: setup.html
Gzipping: main.js
Gzipping: main.css
Gzipping: setup.js
Gzipping: painter.js
Gzipping: variables-demo.html
Gzipping: content_cards.json
Gzipping: jsontemplate-demo.html
skip@Dell-7040:~/esl/OpenEPaperLink/ESP32_AP-Flasher$

Flashing the Primary ESP32 firmware built from source

You can build and flash the Primary ESP32 firmware by running

pio run -e <environment> -t upload

Building the ESP32-C6 Radio firmware from source

Some APs use an esp32-c6 for a radio instead of a segmented tag.

It is only necessary to build the esp32-c6 firmware from the source if you want to modify it.

There are two versions of the C6 radio firmware, a ESP-IDF (Espressif IoT Development Framework) based located in the ARM_Tag_FW/OpenEPaperLink_esp32_C6_AP subdirectory and an Arduino based project located in the ARM_Tag_FW/Arduino_OpenEPaperLink_C6_AP directory.

Building the ESP32-C6 Radio ESP-IDF firmware from source

OpenEPaperLink_esp32_C6_AP is an ESP-IDF (Espressif IoT Development Framework) project. If this doesn't mean anything to you see https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/#

When running the install script select the esp32c6 processor.

Once you have IDF in your path you build the code by running idf.py build.

Flashing the ESP32-C6 Radio firmware

If your AP does not have a separate serial port for the C6 then the C6 must be flashed using the Web GUI's firmware update tab, see flashing the esp32-c6 for details. Otherwise the C6 can be flashed by running idf.py -p <Serial_Port> flash.

During development, some flashing time can be saved by running idf.py -p <Serial_Port> app-flash.

Finally, the debug serial port may be monitored by running idf.py -p <Serial_Port> monitor.

Multiple commands are given to idf.py at one time.

For example to build the image, flash it and start monitoring the debug output:

skip@Dell-7040:~/esl/OpenEPaperLink/ARM_Tag_FW/OpenEPaperLink_esp32_C6_AP$ idf.py -p /dev/ttyACM0 build app-flash monitor
Executing action: all (aliases: build)
Running ninja in directory /home/skip/esl/OpenEPaperLink/ARM_Tag_FW/OpenEPaperLink_esp32_C6_AP/build
Executing "ninja all"...

[deleted]

Bootloader binary size 0x5830 bytes. 0x27d0 bytes (31%) free.
Executing action: app-flash

[deleted]

Executing action: monitor
Running idf_monitor in directory /home/skip/esl/OpenEPaperLink/ARM_Tag_FW/OpenEPaperLink_esp32_C6_AP
Executing "/home/skip/.espressif/python_env/idf5.3_py3.8_env/bin/python /home/skip/esp/esp-idf/tools/idf_monitor.py -p /dev/ttyACM0 -b 115200 --toolchain-prefix riscv32-esp-elf- --target esp32c6 --revision 0 --decode-panic backtrace /home/skip/esl/OpenEPaperLink/ARM_Tag_FW/OpenEPaperLink_esp32_C6_AP/build/OpenEPaperLink_esp32_C6.elf -m '/home/skip/.espressif/python_env/idf5.3_py3.8_env/bin/python' '/home/skip/esp/esp-idf/tools/idf.py' '-p' '/dev/ttyACM0'"...
--- esp-idf-monitor 1.3.4 on /dev/ttyACM0 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
2mI ESP-ROM:esp32c6-20220919
Build:Sep 19 2022
rst:0x15 (USB_UART_HPSYS),boot:0x4c (SPI_FAST_FLASH_BOOT)
Saved PC:0x40022d86
0x40022d86: uart_tx_one_char3 in ROM
...
Clone this wiki locally