Move to mathieucarbou/Async TCP @ ^3.0.0 for Arduino 3 / ESP-IDF 5 compatibility

This commit is contained in:
Mathieu Carbou
2024-04-20 00:41:49 +02:00
parent 2d2da0733d
commit 6670c2e4e4
5 changed files with 37 additions and 17 deletions

View File

@@ -23,7 +23,12 @@ jobs:
board: esp32:esp32:esp32 board: esp32:esp32:esp32
eeprom: true eeprom: true
softwareserial: false softwareserial: false
index_url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json index_url: https://espressif.github.io/arduino-esp32/package_esp32_index.json
- core: esp32:esp32
board: esp32:esp32:esp32
eeprom: true
softwareserial: false
index_url: https://espressif.github.io/arduino-esp32/package_esp32_dev_index.json
- core: esp8266:esp8266 - core: esp8266:esp8266
board: esp8266:esp8266:huzzah board: esp8266:esp8266:huzzah
eeprom: true eeprom: true
@@ -49,10 +54,10 @@ jobs:
run: arduino-cli core install --additional-urls "${{ matrix.index_url }}" ${{ matrix.core }} run: arduino-cli core install --additional-urls "${{ matrix.index_url }}" ${{ matrix.core }}
- name: Install AsyncTCP-esphome - name: Install AsyncTCP-esphome
run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/mathieucarbou/esphome-AsyncTCP#v2.1.3 run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/mathieucarbou/AsyncTCP#v3.0.0
- name: Install ESPAsyncTCP-esphome - name: Install ESPAsyncTCP-esphome
run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/mathieucarbou/ESPAsyncTCP-esphome#v2.0.0 run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/mathieucarbou/esphome-ESPAsyncTCP#v2.0.0
- name: Build CaptivePortal - name: Build CaptivePortal
run: arduino-cli compile --library . --warnings none -b ${{ matrix.board }} "examples/CaptivePortal/CaptivePortal.ino" run: arduino-cli compile --library . --warnings none -b ${{ matrix.board }} "examples/CaptivePortal/CaptivePortal.ino"
@@ -75,10 +80,10 @@ jobs:
opts: opts:
- platform: espressif32 - platform: espressif32
board: esp32dev board: esp32dev
opts: "--project-option 'platform_packages=platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.0-alpha3, platform_packages=platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/esp32-arduino-libs.git#idf-release/v5.1'" opts: "--project-option 'platform_packages=platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.0-rc1, platform_packages=platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/esp32-arduino-libs.git#idf-release/v5.1'"
- platform: espressif8266 - platform: espressif8266
board: huzzah board: huzzah
opts: "--project-option 'platform_packages=platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.0-alpha3, platform_packages=platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/esp32-arduino-libs.git#idf-release/v5.1'" opts: "--project-option 'platform_packages=platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.0-rc1, platform_packages=platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/esp32-arduino-libs.git#idf-release/v5.1'"
steps: steps:
- name: Checkout - name: Checkout

View File

@@ -6,5 +6,10 @@
"cSpell.words": [ "cSpell.words": [
"YASOLR" "YASOLR"
], ],
"cmake.configureOnOpen": false "cmake.configureOnOpen": false,
"files.associations": {
"*.cps": "javascript",
"*.config": "cpp",
"compare": "cpp"
}
} }

View File

@@ -34,8 +34,15 @@ public:
void setup(){ void setup(){
//your other setup stuff... Serial.begin(115200);
WiFi.softAP("esp-captive"); Serial.println();
Serial.println("Configuring access point...");
if (!WiFi.softAP("esp-captive")) {
Serial.println("Soft AP creation failed.");
while (1);
}
dnsServer.start(53, "*", WiFi.softAPIP()); dnsServer.start(53, "*", WiFi.softAPIP());
server.addHandler(new CaptiveRequestHandler()).setFilter(ON_AP_FILTER);//only when requested from AP server.addHandler(new CaptiveRequestHandler()).setFilter(ON_AP_FILTER);//only when requested from AP
//more handlers... //more handlers...

View File

@@ -25,9 +25,9 @@
], ],
"dependencies": [ "dependencies": [
{ {
"owner": "esphome", "owner": "mathieucarbou",
"name": "AsyncTCP-esphome", "name": "Async TCP",
"version": "^2.1.3", "version": "^3.0.0",
"platforms": "espressif32" "platforms": "espressif32"
}, },
{ {

View File

@@ -1,11 +1,10 @@
[env] [env]
framework = arduino framework = arduino
platform_packages= build_flags =
platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.0-alpha3 -Wall -Wextra
platform_packages=platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/esp32-arduino-libs.git#idf-release/v5.1 -D CONFIG_ARDUHAL_LOG_COLORS
-D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
build_flags = -Wall -Wextra
upload_protocol = esptool upload_protocol = esptool
upload_port = /dev/cu.usbserial-0001 upload_port = /dev/cu.usbserial-0001
@@ -21,11 +20,15 @@ src_dir = examples/CaptivePortal
; src_dir = examples/SimpleServer ; src_dir = examples/SimpleServer
[env:esp32] [env:esp32]
; platform = espressif32@6.6.0
platform = espressif32 platform = espressif32
platform_packages=
platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.0-rc1
platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/esp32-arduino-libs.git#idf-release/v5.1
board = esp32dev board = esp32dev
lib_deps = lib_deps =
bblanchon/ArduinoJson @ 7.0.4 bblanchon/ArduinoJson @ 7.0.4
esphome/AsyncTCP-esphome @ 2.1.3 mathieucarbou/Async TCP @ ^3.0.0
[env:esp8266] [env:esp8266]
platform = espressif8266 platform = espressif8266