Skip to content

Commit 955521a

Browse files
authored
Merge branch 'espressif:master' into main
2 parents baee3a9 + 1a42b87 commit 955521a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+466
-65
lines changed

.github/scripts/on-release.sh

+48-1
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,54 @@ if [ "$RELEASE_PRE" == "false" ]; then
421421
fi
422422
fi
423423

424-
# Upload package JSONs (temporary halted to fix json generation)
424+
# Test the package JSONs
425+
426+
echo "Installing arduino-cli ..."
427+
export PATH="/home/runner/bin:$PATH"
428+
source ./.github/scripts/install-arduino-cli.sh
429+
430+
echo "Testing $PACKAGE_JSON_DEV install ..."
431+
echo "Updating index ..."
432+
arduino-cli core update-index --additional-urls "file://$OUTPUT_DIR/$PACKAGE_JSON_DEV"
433+
if [ $? -ne 0 ]; then echo "ERROR: Failed to update index ($?)"; exit 1; fi
434+
435+
echo "Installing esp32 ..."
436+
arduino-cli core install esp32:esp32
437+
if [ $? -ne 0 ]; then echo "ERROR: Failed to install esp32 ($?)"; exit 1; fi
438+
439+
echo "Compiling example ..."
440+
arduino-cli compile --fqbn esp32:esp32:esp32 $GITHUB_WORKSPACE/libraries/ESP32/examples/CI/CIBoardsTest/CIBoardsTest.ino
441+
if [ $? -ne 0 ]; then echo "ERROR: Failed to compile example ($?)"; exit 1; fi
442+
443+
echo "Uninstalling esp32 ..."
444+
arduino-cli core uninstall esp32:esp32
445+
if [ $? -ne 0 ]; then echo "ERROR: Failed to uninstall esp32 ($?)"; exit 1; fi
446+
447+
echo "Test successful!"
448+
449+
if [ "$RELEASE_PRE" == "false" ]; then
450+
echo "Testing $PACKAGE_JSON_REL install ..."
451+
echo "Updating index ..."
452+
arduino-cli core update-index --additional-urls "file://$OUTPUT_DIR/$PACKAGE_JSON_REL"
453+
if [ $? -ne 0 ]; then echo "ERROR: Failed to update index ($?)"; exit 1; fi
454+
455+
echo "Installing esp32 ..."
456+
arduino-cli core install esp32:esp32
457+
if [ $? -ne 0 ]; then echo "ERROR: Failed to install esp32 ($?)"; exit 1; fi
458+
459+
echo "Compiling example ..."
460+
arduino-cli compile --fqbn esp32:esp32:esp32 $GITHUB_WORKSPACE/libraries/ESP32/examples/CI/CIBoardsTest/CIBoardsTest.ino
461+
if [ $? -ne 0 ]; then echo "ERROR: Failed to compile example ($?)"; exit 1; fi
462+
463+
echo "Uninstalling esp32 ..."
464+
arduino-cli core uninstall esp32:esp32
465+
if [ $? -ne 0 ]; then echo "ERROR: Failed to uninstall esp32 ($?)"; exit 1; fi
466+
467+
echo "Test successful!"
468+
fi
469+
470+
# Upload package JSONs
471+
425472
echo "Uploading $PACKAGE_JSON_DEV ..."
426473
echo "Download URL: "`git_safe_upload_asset "$OUTPUT_DIR/$PACKAGE_JSON_DEV"`
427474
echo "Pages URL: "`git_safe_upload_to_pages "$PACKAGE_JSON_DEV" "$OUTPUT_DIR/$PACKAGE_JSON_DEV"`

.github/workflows/release.yml

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
with:
1818
python-version: '3.x'
1919
- run: pip install packaging
20+
- run: pip install pyserial
2021
- name: Build Release
2122
env:
2223
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

cores/esp32/esp_arduino_version.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ extern "C" {
2323
/** Minor version number (x.X.x) */
2424
#define ESP_ARDUINO_VERSION_MINOR 0
2525
/** Patch version number (x.x.X) */
26-
#define ESP_ARDUINO_VERSION_PATCH 3
26+
#define ESP_ARDUINO_VERSION_PATCH 4
2727

2828
/**
2929
* Macro to convert ARDUINO version number into an integer

libraries/ArduinoOTA/library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=ArduinoOTA
2-
version=3.0.3
2+
version=3.0.4
33
author=Ivan Grokhotkov and Hristo Gochkov
44
maintainer=Hristo Gochkov <hristo@espressif.com>
55
sentence=Enables Over The Air upgrades, via wifi and espota.py UDP request/TCP download.

libraries/AsyncUDP/library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=ESP32 Async UDP
2-
version=3.0.3
2+
version=3.0.4
33
author=Me-No-Dev
44
maintainer=Me-No-Dev
55
sentence=Async UDP Library for ESP32

libraries/BLE/library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=BLE
2-
version=3.0.3
2+
version=3.0.4
33
author=Neil Kolban <kolban1@kolban.com>
44
maintainer=Dariusz Krempa <esp32@esp32.eu.org>
55
sentence=BLE functions for ESP32

libraries/BluetoothSerial/library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=BluetoothSerial
2-
version=3.0.3
2+
version=3.0.4
33
author=Evandro Copercini
44
maintainer=Evandro Copercini
55
sentence=Simple UART to Classical Bluetooth bridge for ESP32

libraries/DNSServer/library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=DNSServer
2-
version=3.0.3
2+
version=3.0.4
33
author=Kristijan Novoselić
44
maintainer=Kristijan Novoselić, <kristijan.novoselic@gmail.com>
55
sentence=A simple DNS server for ESP32.

libraries/EEPROM/library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=EEPROM
2-
version=3.0.3
2+
version=3.0.4
33
author=Ivan Grokhotkov
44
maintainer=Paolo Becchi <pbecchi@aerobusiness.it>
55
sentence=Enables reading and writing data a sequential, addressable FLASH storage

libraries/ESP32/library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=ESP32
2-
version=3.0.3
2+
version=3.0.4
33
author=Hristo Gochkov, Ivan Grokhtkov
44
maintainer=Hristo Gochkov <hristo@espressif.com>
55
sentence=ESP32 sketches examples

libraries/ESP_I2S/library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=ESP_I2S
2-
version=3.0.3
2+
version=3.0.4
33
author=me-no-dev
44
maintainer=me-no-dev
55
sentence=Library for ESP I2S communication

libraries/ESP_NOW/library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=ESP_NOW
2-
version=3.0.3
2+
version=3.0.4
33
author=me-no-dev
44
maintainer=P-R-O-C-H-Y
55
sentence=Library for ESP_NOW

libraries/ESP_NOW/src/ESP32_NOW.cpp

+11-1
Original file line numberDiff line numberDiff line change
@@ -190,13 +190,19 @@ bool ESP_NOW_Class::end() {
190190
if (!_esp_now_has_begun) {
191191
return true;
192192
}
193-
//remove all peers?
193+
//remove all peers
194+
for (uint8_t i = 0; i < ESP_NOW_MAX_TOTAL_PEER_NUM; i++) {
195+
if (_esp_now_peers[i] != NULL) {
196+
removePeer(*_esp_now_peers[i]);
197+
}
198+
}
194199
esp_err_t err = esp_now_deinit();
195200
if (err != ESP_OK) {
196201
log_e("esp_now_deinit failed! 0x%x", err);
197202
return false;
198203
}
199204
_esp_now_has_begun = false;
205+
//clear the peer list
200206
memset(_esp_now_peers, 0, sizeof(ESP_NOW_Peer *) * ESP_NOW_MAX_TOTAL_PEER_NUM);
201207
return true;
202208
}
@@ -262,6 +268,10 @@ void ESP_NOW_Class::onNewPeer(void (*cb)(const esp_now_recv_info_t *info, const
262268
new_arg = arg;
263269
}
264270

271+
bool ESP_NOW_Class::removePeer(ESP_NOW_Peer &peer) {
272+
return peer.remove();
273+
}
274+
265275
ESP_NOW_Class ESP_NOW;
266276

267277
/*

libraries/ESP_NOW/src/ESP32_NOW.h

+26-21
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,31 @@
66
#include "esp32-hal-log.h"
77
#include "esp_mac.h"
88

9+
class ESP_NOW_Peer; //forward declaration for friend function
10+
11+
class ESP_NOW_Class : public Print {
12+
public:
13+
const uint8_t BROADCAST_ADDR[6] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
14+
15+
ESP_NOW_Class();
16+
~ESP_NOW_Class();
17+
18+
bool begin(const uint8_t *pmk = NULL /* 16 bytes */);
19+
bool end();
20+
21+
int getTotalPeerCount();
22+
int getEncryptedPeerCount();
23+
24+
int availableForWrite();
25+
size_t write(const uint8_t *data, size_t len);
26+
size_t write(uint8_t data) {
27+
return write(&data, 1);
28+
}
29+
30+
void onNewPeer(void (*cb)(const esp_now_recv_info_t *info, const uint8_t *data, int len, void *arg), void *arg);
31+
bool removePeer(ESP_NOW_Peer &peer);
32+
};
33+
934
class ESP_NOW_Peer {
1035
private:
1136
uint8_t mac[6];
@@ -47,28 +72,8 @@ class ESP_NOW_Peer {
4772
virtual void onSent(bool success) {
4873
log_i("Message transmission to peer " MACSTR " %s", MAC2STR(mac), success ? "successful" : "failed");
4974
}
50-
};
51-
52-
class ESP_NOW_Class : public Print {
53-
public:
54-
const uint8_t BROADCAST_ADDR[6] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
55-
56-
ESP_NOW_Class();
57-
~ESP_NOW_Class();
58-
59-
bool begin(const uint8_t *pmk = NULL /* 16 bytes */);
60-
bool end();
61-
62-
int getTotalPeerCount();
63-
int getEncryptedPeerCount();
64-
65-
int availableForWrite();
66-
size_t write(const uint8_t *data, size_t len);
67-
size_t write(uint8_t data) {
68-
return write(&data, 1);
69-
}
7075

71-
void onNewPeer(void (*cb)(const esp_now_recv_info_t *info, const uint8_t *data, int len, void *arg), void *arg);
76+
friend bool ESP_NOW_Class::removePeer(ESP_NOW_Peer &);
7277
};
7378

7479
extern ESP_NOW_Class ESP_NOW;

libraries/ESP_SR/library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=ESP_SR
2-
version=3.0.3
2+
version=3.0.4
33
author=me-no-dev
44
maintainer=me-no-dev
55
sentence=Library for ESP Sound Recognition

libraries/ESPmDNS/library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=ESPmDNS
2-
version=3.0.3
2+
version=3.0.4
33
author=Hristo Gochkov, Ivan Grokhtkov
44
maintainer=Hristo Gochkov <hristo@espressif.com>
55
sentence=ESP32 mDNS Library
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
#include <WiFi.h>
2+
#include <ETH.h>
3+
#include <SPI.h>
4+
5+
#define ETH_TYPE ETH_PHY_W5500
6+
#define ETH_ADDR 1
7+
#define ETH_CS 15
8+
#define ETH_IRQ 4
9+
#define ETH_RST 5
10+
#define ETH_SPI_SCK 14
11+
#define ETH_SPI_MISO 12
12+
#define ETH_SPI_MOSI 13
13+
14+
#define AP_SSID "ESP32-ETH-WIFI-BRIDGE"
15+
#define AP_PASS "password"
16+
17+
IPAddress ap_ip(192, 168, 4, 1);
18+
IPAddress ap_mask(255, 255, 255, 0);
19+
IPAddress ap_leaseStart(192, 168, 4, 2);
20+
IPAddress ap_dns(8, 8, 4, 4);
21+
22+
void setup() {
23+
Serial.begin(115200);
24+
Serial.setDebugOutput(true);
25+
Network.onEvent(onEvent);
26+
27+
WiFi.AP.begin();
28+
WiFi.AP.config(ap_ip, ap_ip, ap_mask, ap_leaseStart, ap_dns);
29+
WiFi.AP.create(AP_SSID, AP_PASS);
30+
if (!WiFi.AP.waitStatusBits(ESP_NETIF_STARTED_BIT, 1000)) {
31+
Serial.println("Failed to start AP!");
32+
return;
33+
}
34+
delay(100);
35+
36+
SPI.begin(ETH_SPI_SCK, ETH_SPI_MISO, ETH_SPI_MOSI);
37+
ETH.begin(ETH_TYPE, ETH_ADDR, ETH_CS, ETH_IRQ, ETH_RST, SPI);
38+
}
39+
40+
void loop() {
41+
delay(20000);
42+
}
43+
44+
void onEvent(arduino_event_id_t event, arduino_event_info_t info) {
45+
switch (event) {
46+
case ARDUINO_EVENT_ETH_START: Serial.println("ETH Started"); break;
47+
case ARDUINO_EVENT_ETH_CONNECTED: Serial.println("ETH Connected"); break;
48+
case ARDUINO_EVENT_ETH_GOT_IP:
49+
Serial.println("ETH Got IP");
50+
Serial.println(ETH);
51+
WiFi.AP.enableNAPT(true);
52+
break;
53+
case ARDUINO_EVENT_ETH_LOST_IP:
54+
Serial.println("ETH Lost IP");
55+
WiFi.AP.enableNAPT(false);
56+
break;
57+
case ARDUINO_EVENT_ETH_DISCONNECTED:
58+
Serial.println("ETH Disconnected");
59+
WiFi.AP.enableNAPT(false);
60+
break;
61+
case ARDUINO_EVENT_ETH_STOP: Serial.println("ETH Stopped"); break;
62+
63+
case ARDUINO_EVENT_WIFI_AP_START:
64+
Serial.println("AP Started");
65+
Serial.println(WiFi.AP);
66+
break;
67+
case ARDUINO_EVENT_WIFI_AP_STACONNECTED: Serial.println("AP STA Connected"); break;
68+
case ARDUINO_EVENT_WIFI_AP_STADISCONNECTED: Serial.println("AP STA Disconnected"); break;
69+
case ARDUINO_EVENT_WIFI_AP_STAIPASSIGNED:
70+
Serial.print("AP STA IP Assigned: ");
71+
Serial.println(IPAddress(info.wifi_ap_staipassigned.ip.addr));
72+
break;
73+
case ARDUINO_EVENT_WIFI_AP_PROBEREQRECVED: Serial.println("AP Probe Request Received"); break;
74+
case ARDUINO_EVENT_WIFI_AP_STOP: Serial.println("AP Stopped"); break;
75+
76+
default: break;
77+
}
78+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"targets": {
3+
"esp32h2": false
4+
}
5+
}

libraries/Ethernet/library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=Ethernet
2-
version=3.0.3
2+
version=3.0.4
33
author=Hristo Gochkov
44
maintainer=Hristo Gochkov <hristo@espressif.com>
55
sentence=Enables network connection (local and Internet) using the ESP32 Ethernet.

libraries/FFat/library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=FFat
2-
version=3.0.3
2+
version=3.0.4
33
author=Hristo Gochkov, Ivan Grokhtkov, Larry Bernstone
44
maintainer=Hristo Gochkov <hristo@espressif.com>
55
sentence=ESP32 FAT on Flash File System

libraries/FS/library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=FS
2-
version=3.0.3
2+
version=3.0.4
33
author=Hristo Gochkov, Ivan Grokhtkov
44
maintainer=Hristo Gochkov <hristo@espressif.com>
55
sentence=ESP32 File System

libraries/HTTPClient/library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=HTTPClient
2-
version=3.0.3
2+
version=3.0.4
33
author=Markus Sattler
44
maintainer=Markus Sattler
55
sentence=HTTP Client for ESP32

libraries/HTTPUpdate/library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=HTTPUpdate
2-
version=3.0.3
2+
version=3.0.4
33
author=Markus Sattler
44
maintainer=Markus Sattler
55
sentence=Http Update for ESP32

libraries/HTTPUpdateServer/library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=HTTPUpdateServer
2-
version=3.0.3
2+
version=3.0.4
33
author=Hristo Kapanakov
44
maintainer=
55
sentence=Simple HTTP Update server based on the WebServer

libraries/Insights/library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=ESP Insights
2-
version=3.0.3
2+
version=3.0.4
33
author=Sanket Wadekar <sanket.wadekar@espressif.com>
44
maintainer=Sanket Wadekar <sanket.wadekar@espressif.com>
55
sentence=ESP Insights

libraries/LittleFS/library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=LittleFS
2-
version=3.0.3
2+
version=3.0.4
33
author=
44
maintainer=
55
sentence=LittleFS for esp32

libraries/NetBIOS/library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=NetBIOS
2-
version=3.0.3
2+
version=3.0.4
33
author=Pablo@xpablo.cz
44
maintainer=Hristo Gochkov<hristo@espressif.com>
55
sentence=Enables NBNS (NetBIOS) name resolution.

libraries/Network/library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=Networking
2-
version=3.0.3
2+
version=3.0.4
33
author=Hristo Gochkov
44
maintainer=Hristo Gochkov <hristo@espressif.com>
55
sentence=General network management library.

0 commit comments

Comments
 (0)