Add new AP hardware support OpenEPaperLink_ESP32-PoE-ISO_AP (#431)

* Fix filesystem mutex handling

This fixes the re-initialization of the filesystem mutex when the dyn storage
module is reinitialized. Using xSemaphoreCreateMutex would cause a memory leak
when the begin function is called multiple times and a semaphore leakage could
be caused by the re-initialization of the global fsMutex variable while the
semaphore is taken.

The fsMutex should not be taken while the logLine function is called as this
would cause a nested take of the fsMutex, which causes a deadlock.

Signed-off-by: Frank Kunz <mailinglists@kunz-im-inter.net>

* Fix hard coded littlefs in json upload

Signed-off-by: Frank Kunz <mailinglists@kunz-im-inter.net>

* Add new AP hardware support OpenEPaperLink_ESP32-PoE-ISO_AP

This is based on Olimex ESP32-PoE-ISO
https://www.olimex.com/Products/IoT/ESP32/ESP32-POE-ISO/open-source-hardware

It has a SD Card slot that is used to store all filesystem data on SD.
Use the prepare_sdcard.sh script to copy all needed data to an empty
SD card that is formatted with FAT filesystem. The AP firmware will format
the SD if an unformatted or from formatted card is used. This can be used
to intially prepare an empty SD card for usage.

For tag communication a ESP32-C6-WROOM-1(U) is used with the following
connection scheme:

ESP32-PoE-ISO  |  ESP32-C6-WROOM-1
---------------+------------------
  GPIO5        |    EN
  GPIO13       |    GPIO9
  GPIO36       |    GPIO3
  GPIO4        |    GPIO2
  GPIO33       |    GPIO24
  GPIO32       |    GPIO25
               |    GPIO8 pullup 5.1k

Signed-off-by: Frank Kunz <mailinglists@kunz-im-inter.net>

* Avoid error message log print when parsers.json is missing

Signed-off-by: Frank Kunz <mailinglists@kunz-im-inter.net>

* Workaround for IEEE802.15.4 modem stuck issue

The ESP32-C6 esp-idf based modem firmware can run into a case where it
does not receive data anymore from the tags. This can be detected when
it starts to print

"receive buffer full, drop the current frame"

and does not recover from that. In such a case a modem reset is triggered.

Signed-off-by: Frank Kunz <mailinglists@kunz-im-inter.net>

* Add OpenEPaperLink_ESP32-PoE-ISO_AP to release build

Signed-off-by: Frank Kunz <mailinglists@kunz-im-inter.net>

* Add OpenEPaperLink_ESP32-PoE-ISO_AP to condidional build

Signed-off-by: Frank Kunz <mailinglists@kunz-im-inter.net>

* Add Ethernet support

The ethernet support allows to make the network/internet connection
via LAN cable instead of WiFi. LAN is preferred, if a LAN cable is
connected and a valid IP configuration via DHCP can be obtained, WiFi
is switched off. If the LAN cable is disconnected, a fall back to
WiFi is done.

Use those defines in platform.ini for PHY settings:
ETHERNET_PHY_POWER: IO pin where the PHY can be switched of/on, can be
                    -1 if not used.
ETHERNET_CLK_MODE: PHY clock mode, see eth_clock_mode_t in ETH.h
ETHERNET_PHY_MDC: PHY MDC pin
ETHERNET_PHY_MDIO: PHY MDIO pin
ETHERNET_PHY_TYPE: PHY type, see eth_phy_type_t in ETH.h

Limitations:
- only DHCP is supported, no static IP configuration for LAN so far.
- If GPIO0 is used for one of the ETHERNET_CLK_MODE modes, then GPIO0
  cannot be used to clear the WiFi configuration.

Signed-off-by: Frank Kunz <mailinglists@kunz-im-inter.net>

---------

Signed-off-by: Frank Kunz <mailinglists@kunz-im-inter.net>
Co-authored-by: Frank Kunz <mailinglists@kunz-im-inter.net>
This commit is contained in:
Frank Kunz
2025-03-27 00:48:05 +01:00
committed by GitHub
parent c3e729744a
commit f311239c9c
19 changed files with 479 additions and 109 deletions

View File

@@ -70,16 +70,22 @@ jobs:
#- OpenEPaperLink_AP_and_Flasher
- ESP32_S3_16_8_YELLOW_AP
- OpenEPaperLink_Mini_AP_v4
- OpenEPaperLink_ESP32-PoE-ISO_AP
runs-on: ubuntu-22.04
steps:
- name: Checkout Code
uses: actions/checkout@v4
- uses: ./.github/actions/setup-pio
- name: Build ${{ matrix.environment }}
- name: Build ${{ matrix.environment }} binary
run: |
cd ESP32_AP-Flasher
pio run --environment ${{ matrix.environment }}
- name: Build ${{ matrix.environment }} filesystem
if: ${{ matrix.environment != 'OpenEPaperLink_ESP32-PoE-ISO_AP' }}
run: |
cd ESP32_AP-Flasher
pio run --target buildfs --environment ${{ matrix.environment }}

View File

@@ -26,14 +26,14 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: '3.9'
# - name: Commit zipped files
# - name: Commit zipped files
# run: |
# git config --global user.name 'Bot'
# git config --global user.email "bot@openepaperlink.de"
# git commit -am "Zipped web files"
# git push origin HEAD:master
- name: Install PlatformIO Core
run: pip install --upgrade platformio
@@ -80,10 +80,10 @@ jobs:
cp /home/runner/work/OpenEPaperLink/OpenEPaperLink//binaries/ESP32-H2/firmware_H2.json espbinaries
# - name: Zip web files
# run: |
# run: |
# cd /home/runner/work/OpenEPaperLink/OpenEPaperLink/ESP32_AP-Flasher
# python gzip_wwwfiles.py
- name: Build firmware for OpenEPaperLink_Mini_AP
if: ${{ env.INCLUDE_MINI_AP == 'true' }}
run: |
@@ -102,7 +102,7 @@ jobs:
cd /home/runner/work/OpenEPaperLink/OpenEPaperLink
cp OpenEPaperLink_Mini_AP/firmware.bin espbinaries/OpenEPaperLink_Mini_AP.bin
cp OpenEPaperLink_Mini_AP/merged-firmware.bin espbinaries/OpenEPaperLink_Mini_AP_full.bin
- name: Build firmware for OpenEPaperLink_Nano_AP
if: ${{ env.INCLUDE_Nano_AP == 'true' }}
run: |
@@ -124,7 +124,7 @@ jobs:
# - name: move files for big APs
# run: |
# cp -a binaries/ESP32-C6/. ESP32_AP-Flasher/data/
- name: Build firmware for OpenEPaperLink_AP_and_Flasher
run: |
cd ESP32_AP-Flasher
@@ -213,7 +213,7 @@ jobs:
cd /home/runner/work/OpenEPaperLink/OpenEPaperLink
cp OpenEPaperLink_Nano_TLSR/firmware.bin espbinaries/OpenEPaperLink_Nano_TLSR.bin
cp OpenEPaperLink_Nano_TLSR/merged-firmware.bin espbinaries/OpenEPaperLink_Nano_TLSR_full.bin
- name: Build firmware for OpenEPaperLink_PoE_AP
run: |
cd ESP32_AP-Flasher
@@ -267,6 +267,29 @@ jobs:
cd /home/runner/work/OpenEPaperLink/OpenEPaperLink
cp BLE_ONLY_AP/firmware.bin espbinaries/BLE_ONLY_AP.bin
cp BLE_ONLY_AP/merged-firmware.bin espbinaries/BLE_ONLY_AP_full.bin
- name: Build firmware for OpenEPaperLink_ESP32-PoE-ISO_AP
run: |
cd ESP32_AP-Flasher
export PLATFORMIO_BUILD_FLAGS="-D BUILD_VERSION=${{ github.ref_name }} -D SHA=$GITHUB_SHA"
pio run --environment OpenEPaperLink_ESP32-PoE-ISO_AP
mv data data.bak
mkdir data
pio run --target buildfs --environment OpenEPaperLink_ESP32-PoE-ISO_AP
rmdir data
mv data.bak data
mkdir /home/runner/work/OpenEPaperLink/OpenEPaperLink/OpenEPaperLink_ESP32-PoE-ISO_AP
cp ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin /home/runner/work/OpenEPaperLink/OpenEPaperLink/OpenEPaperLink_ESP32-PoE-ISO_AP/boot_app0.bin
cp .pio/build/OpenEPaperLink_ESP32-PoE-ISO_AP/firmware.bin /home/runner/work/OpenEPaperLink/OpenEPaperLink/OpenEPaperLink_ESP32-PoE-ISO_AP/firmware.bin
cp .pio/build/OpenEPaperLink_ESP32-PoE-ISO_AP/bootloader.bin /home/runner/work/OpenEPaperLink/OpenEPaperLink/OpenEPaperLink_ESP32-PoE-ISO_AP/bootloader.bin
cp .pio/build/OpenEPaperLink_ESP32-PoE-ISO_AP/partitions.bin /home/runner/work/OpenEPaperLink/OpenEPaperLink/OpenEPaperLink_ESP32-PoE-ISO_AP/partitions.bin
cp .pio/build/OpenEPaperLink_ESP32-PoE-ISO_AP/littlefs.bin /home/runner/work/OpenEPaperLink/OpenEPaperLink/OpenEPaperLink_ESP32-PoE-ISO_AP/littlefs.bin
cd /home/runner/work/OpenEPaperLink/OpenEPaperLink/OpenEPaperLink_ESP32-PoE-ISO_AP
esptool.py --chip esp32 merge_bin -o merged-firmware.bin --flash_mode qio --flash_freq 80m --flash_size 4MB 0x0000 bootloader.bin 0x8000 partitions.bin 0xD000 boot_app0.bin 0x10000 firmware.bin 0x3D0000 littlefs.bin
cd /home/runner/work/OpenEPaperLink/OpenEPaperLink
cp OpenEPaperLink_ESP32-PoE-ISO_AP/firmware.bin espbinaries/OpenEPaperLink_ESP32-PoE-ISO_AP.bin
cp OpenEPaperLink_ESP32-PoE-ISO_AP/merged-firmware.bin espbinaries/BLE_ONLY_AP_full.bin
- name: generate release json file
run: |
mkdir jsonfiles
@@ -280,7 +303,7 @@ jobs:
tag: ${{ github.ref }}
file_glob: true
overwrite: true
# this is down here intentionally to be able to modify the binary folder before adding it to the Tag_Flasher later (ota binaries can be removed)
- name: Build firmware for Tag_Flasher