Skip to content

Commit 67fa719

Browse files
authored
Merge branch 'master' into ci/style_check
2 parents 7bb7270 + 0596733 commit 67fa719

File tree

20 files changed

+225
-46
lines changed

20 files changed

+225
-46
lines changed

libraries/BLE/examples/BLE5_extended_scan/BLE5_extended_scan.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ uint32_t scanTime = 100; //In 10ms (1000ms)
2020
BLEScan* pBLEScan;
2121

2222
class MyBLEExtAdvertisingCallbacks: public BLEExtAdvertisingCallbacks {
23-
void onResult(esp_ble_gap_ext_adv_reprot_t report) {
23+
void onResult(esp_ble_gap_ext_adv_report_t report) {
2424
if(report.event_type & ESP_BLE_GAP_SET_EXT_ADV_PROP_LEGACY){
2525
// here we can receive regular advertising data from BLE4.x devices
2626
Serial.println("BLE4.2");

libraries/BLE/examples/BLE5_periodic_sync/BLE5_periodic_sync.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ static esp_ble_gap_periodic_adv_sync_params_t periodic_adv_sync_params = {
2828

2929
class MyBLEExtAdvertisingCallbacks : public BLEExtAdvertisingCallbacks
3030
{
31-
void onResult(esp_ble_gap_ext_adv_reprot_t params)
31+
void onResult(esp_ble_gap_ext_adv_report_t params)
3232
{
3333
uint8_t *adv_name = NULL;
3434
uint8_t adv_name_len = 0;

libraries/BLE/src/BLEAdvertisedDevice.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ class BLEExtAdvertisingCallbacks {
145145
* As we are scanning, we will find new devices. When found, this call back is invoked with a reference to the
146146
* device that was found. During any individual scan, a device will only be detected one time.
147147
*/
148-
virtual void onResult(esp_ble_gap_ext_adv_reprot_t report) = 0;
148+
virtual void onResult(esp_ble_gap_ext_adv_report_t report) = 0;
149149
};
150150
#endif // SOC_BLE_50_SUPPORTED
151151

libraries/ESP32/examples/HWSerial_Events/HWSerial_Events.ino renamed to libraries/ESP32/examples/HWCDC_Events/HWCDC_Events.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ const char* HWCDC_Status() {
6363
}
6464

6565
void setup() {
66+
HWCDCSerial.onEvent(usbEventCallback);
67+
HWCDCSerial.begin();
68+
6669
Serial0.begin(115200);
6770
Serial0.setDebugOutput(true);
68-
69-
HWCDCSerial.begin();
70-
HWCDCSerial.onEvent(usbEventCallback);
7171
Serial0.println("Starting...");
7272
}
7373

libraries/Ethernet/src/ETH.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,8 @@ bool ETHClass::begin(eth_phy_type_t type, int32_t phy_addr, int mdc, int mdio, i
287287
/* attach to receive events */
288288
initNetif((Network_Interface_ID)(ESP_NETIF_ID_ETH+_eth_index));
289289

290+
Network.onSysEvent(onEthConnected, ARDUINO_EVENT_ETH_CONNECTED);
291+
290292
ret = esp_eth_start(_eth_handle);
291293
if(ret != ESP_OK){
292294
log_e("esp_eth_start failed: %d", ret);
@@ -308,8 +310,6 @@ bool ETHClass::begin(eth_phy_type_t type, int32_t phy_addr, int mdc, int mdio, i
308310
if(!perimanSetPinBus(_pin_power, ESP32_BUS_TYPE_ETHERNET_PWR, (void *)(this), -1, -1)){ goto err; }
309311
}
310312

311-
Network.onSysEvent(onEthConnected, ARDUINO_EVENT_ETH_CONNECTED);
312-
313313
// holds a few milliseconds to let DHCP start and enter into a good state
314314
// FIX ME -- adresses issue https://github.com/espressif/arduino-esp32/issues/5733
315315
delay(50);

libraries/Network/src/NetworkManager.cpp

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,32 @@ int NetworkManager::hostByName(const char* aHostname, IPAddress& aResult)
8888

8989
struct addrinfo hints;
9090
memset(&hints, 0, sizeof(hints));
91-
hints.ai_family = AF_UNSPEC;
9291
hints.ai_socktype = SOCK_STREAM;
9392

93+
// **Workaround**
94+
// LWIP AF_UNSPEC always prefers IPv4 and doesn't check what network is
95+
// available. See https://github.com/espressif/esp-idf/issues/13255
96+
// Until that is fixed, as a work around if we have a global scope IPv6,
97+
// then we check IPv6 only first.
98+
if (hasGlobalV6) {
99+
hints.ai_family = AF_INET6;
100+
err = lwip_getaddrinfo(aHostname, servname, &hints, &res);
101+
102+
if (err == ERR_OK)
103+
{
104+
struct sockaddr_in6 *ipv6 = (struct sockaddr_in6 *)res->ai_addr;
105+
// As an array of u8_t
106+
aResult = IPAddress(IPv6, ipv6->sin6_addr.s6_addr);
107+
log_d("DNS found IPv6 first %s", aResult.toString().c_str());
108+
lwip_freeaddrinfo(res);
109+
return 1;
110+
}
111+
}
112+
// **End Workaround**
113+
114+
hints.ai_family = AF_UNSPEC;
94115
err = lwip_getaddrinfo(aHostname, servname, &hints, &res);
116+
95117
if (err == ERR_OK)
96118
{
97119
if (res->ai_family == AF_INET6)

libraries/Update/src/Updater.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ bool UpdateClass::setCryptMode(const int cryptMode){
228228
if(cryptMode >= U_AES_DECRYPT_NONE && cryptMode <= U_AES_DECRYPT_ON){
229229
_cryptMode = cryptMode;
230230
}else{
231-
log_e("bad crypt mode arguement %i", cryptMode);
231+
log_e("bad crypt mode argument %i", cryptMode);
232232
return false;
233233
}
234234
return true;

libraries/WebServer/examples/UploadHugeFile/.skip.esp32h2

Whitespace-only changes.

0 commit comments

Comments
 (0)