Building an Access Point
An OpenEpaperLink installation consists of different epaper tags, wirelessly connected to one or more Access Points. An access point is made of a 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).
The following build environments are available. If you build one of these AP's, you can easily upload the firmware to your MCU via https://install.openepaperlink.de, and update new firmware releases over the air via the webinterface 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 | Yellow AP | Mini AP v3 / Mini AP v4 |
AP and flasher |
---|---|---|---|---|---|---|
based on | esp32-s3 | esp32-s2 | esp32-s2 | esp32-s3 | esp32-s3 | esp32-s3 |
radio | built in | Segmented tag | 1.54” tag | esp32-c6 | esp32-c6 | 1.54” tag |
psram | 8MB | 2MB | 2MB | 8MB | 8MB | 8MB |
flash size | 16MB | 4MB | 4MB | 16MB | 16MB | 16MB |
extras | no display | segmented display | 1.54” display | TFT display | TFT display | 1.54” display |
Maximum amount of tags | a few hundred | About 30 | About 30 | 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 |
BLE display support | yes, only | no | no | yes | yes | yes |
design by | jelmer | atc1441 | atc1441 | nic | jelmer | |
link/pcb/case design | more info | more info | more info | more info | more info | more info |
note | only supports BLE based tags | Not recommended because of the low amount of flash and ram | Not recommended because of the low amount of flash and ram | available ready made or as DIY kit on Tindie | Includes interface to flash tags |
This video shows you step by step and in seperate sections how to start from scratch:
- Flash a custom firmware on the ZBS243 based E-Paper Price tags
- How to connect such a display to an ESP32 as Access point
- How to flash this Access Point
- How to use the OpenEPaperLink firmware to drive displays wireless and simple
You can skip many of the steps in the video if you buy tags with pre-flashed firmware, and a ready made access point.
If you want to make your own AP without using one of the available ready-made options, you can do this by soldering some wires to a segmented tag
Simplified circuit diagram
A video showing how to build the mini AP (v1 or v2) kit: https://www.youtube.com/watch?v=R-WRH9hXSpI
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 a 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
You would think the ESP32-C6 can do IEEE 801.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 need to listen in IEEE 801.15.4 mode continuesly. There's no way to do WiFi communication in parallel to this.(This section does not apply to the BLE only AP)
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 build in on the esp32-based AP's, like Zero-config Multi-AP's (to extend the reach using multiple access points) and json templates. A rudimentory 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.
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 |
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://https://platformio.org/install for more information and instruction on now to install it.
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.
If you have not previously flashed your AP using https://install.openepaperlink.de you will need to flash both the file system as will as the firmware image.
Once flashed the 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$
You can build and flash the Primary ESP32 firmware by running
pio run -e <environment> -t upload
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 source if you want to modify it. Otherwise https://install.openepaperlink.de is the way to go!
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.
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/#
Once you have IDF in your path you build the code by running idf.py build.
The image is flash to the C6 via the serial port 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 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
...