Commit Graph

1260 Commits

Author SHA1 Message Date
Me No Dev
f4b17b3033
Allow releases from different branches 2021-02-17 14:06:30 +02:00
Michael
1ab550f6f2
Changed BLE notify_callback from raw function pointer to std::function (#4737) 2021-02-16 22:10:04 +02:00
Emanuel Posescu
9be784f69b
Improve cleanup in BLEClient (#4742)
- Remove client from the list of devices in case registration fails
- Filter other events not related to registration during registration phase
- Cleanup if connect fails
- Reset if after disconnect
- Disconnect callback *after* cleanup is done so object can be deleted

This fixes some of the issues I had like:
- `BLEClient::connect` hangs up and never recovered because registration failed
- `BLEClient` could not be deleted after disconnect or deletion creating ghost events https://github.com/espressif/arduino-esp32/issues/4047
- `BLEClient` could not be properly reused after a connection was attempted (successful or not) 

* Cleanup in case of registration and connect failure.
Cleanup before calling disconnect callback for safe delete.
Reject other events during registration.
Adresses #4047, #4055

* Clear if after unregister #4047
2021-02-16 11:21:45 +02:00
Markus Frey
7cdfb8bc7c
Refactor BLEAdvertisedDevice (#4739)
fixes #4596

* Prevent possible undefined behaviour by get methods not taking an index as parameter
* Add methods to get the count of service data UUIDs and service UUIDs
* Various code improvements
2021-02-16 11:02:58 +02:00
me-no-dev
8134a42162 Fix leak of memory and possible crashes in AsyncUDP 2021-02-16 10:26:37 +02:00
Andre Lorbach
f13ff65691
AsyncUDP: Added lastErr helper variable (#4789)
The variable is useful when debugging AsyncUDP send problems.
The upper application can read and analyze the error reason.
2021-02-16 02:21:53 +02:00
ushiboy
e831680a41
Fixed a memory leak in BLE (issue #4753) (#4761)
* Fixed crash on delete after disconnect

* Fixed memory leak when getting characteristics

* Removed guard

Co-authored-by: ushiboy <ushiboy.dev@gmail.com>
2021-02-16 01:50:24 +02:00
Szymon Zmilczak
d964873840
Added more inclusive CORS policy (#4767) 2021-02-16 01:49:30 +02:00
Mitch Bradley
7e8993fc83
Speed up upload by a factor of 17 (#4787)
* Speed up upload by a factor of 17

Uploads are very slow because of an unnecessary "client.connected()" check in _uploadReadByte().

Here is what happens:
client.connected() is called for every byte read.  WiFiClient::connected() calls recv(fd(), &dummy, 0, MSG_DONTWAIT); which takes a relatively long time, so the optimized path of returning a buffered byte via client.read() is effectively nullified.

Removing the one line changed the upload speed for a 2 MB file (discarding the received data) from 22 KB/sec (before) to 367 KB/sec (after).

The change is safe in the face of disconnects because client.read(), when it no longer has buffered data, calls (WiFiClient)  fillBuffer(), which calls recv(), so the disconnection will be detected in due course.

* Move disconnect check into the timeout loop
2021-02-16 01:47:01 +02:00
Me No Dev
15bae92a72
Idf release/v3.3 d8082b7f3
* Update IDF to d8082b7f3
2021-02-16 01:37:37 +02:00
me-no-dev
6f23cd5988 Make sure that HTTPClient disconnects from the old server if redirecting to new one
Fixes: https://github.com/espressif/arduino-esp32/issues/4763
2021-02-04 02:42:44 +02:00
me-no-dev
ad4cf1461b Rework setHostname for WiFi STA
Fixes: https://github.com/espressif/arduino-esp32/issues/2537
2021-02-03 13:17:49 +02:00
me-no-dev
5de03a3918 Fix WiFi STA config IP to INADDR_NONE results in 255.255.255.255
Fixes: https://github.com/espressif/arduino-esp32/issues/4732
2021-02-03 11:47:35 +02:00
Valerii Koval
4b385690bc
Move default Arduino partitions to a separate section (#4747) 2021-01-27 13:52:39 +02:00
Me No Dev
dd513df124
Add arm64 support for mkspiffs 2021-01-21 14:42:31 +02:00
Me No Dev
cee659563d
IDF release/v3.3 7e63061fa (#4726)
Co-authored-by: me-no-dev <me-no-dev@github.com>
2021-01-21 14:33:55 +02:00
estshorter
55442a05a4
Remove an unused variable 'channel' (#4725) 2021-01-21 14:31:25 +02:00
Emanuel Posescu
c9b3e512dd
Make BLERemoteCharacteristic::getRemoteService() public #3367 (#4735) 2021-01-21 14:30:33 +02:00
bot1131357
8d0e68db4f
Added parameter to Preferences::begin to select non-default NVS partition (#4718) 2021-01-15 19:06:51 +02:00
Me No Dev
d2530850a3
Copy platformio-build.py in the release package 2021-01-14 11:17:21 +02:00
me-no-dev
7ecbb483da Update toolchain and move files to github 2021-01-12 17:53:49 +02:00
Me No Dev
b0e896e9ae
IDF release/v3.3 cd59d107b (#4708)
Co-authored-by: me-no-dev <me-no-dev@github.com>
2021-01-12 15:24:34 +02:00
Me No Dev
08f4665775
Change fetch depth for release so that history can be fetched 2021-01-12 15:09:28 +02:00
Me No Dev
2452c1fb53
IDF release/v3.3 71df1f742
esp-face: master 420fc7e
esp32-camera: master 0107093
2021-01-11 14:20:02 +02:00
Keegan Morrow
5f98370707
Add IP101 support (#4620) 2021-01-11 12:00:35 +02:00
richardclli
81b9130d8d
BluetoothSerial SSP Authentication with callbacks (#4634)
Added authentication callbacks and example, resolves #4622.
2021-01-11 11:58:15 +02:00
Andrew
434d02c49f
BLERemoteCharacteristic::registerForNotify: Permit event registration without updating descriptor. (#4659) 2021-01-11 11:44:38 +02:00
drmpf
15db297130
availableForWrite (#4664)
added availableForWrite to Print.h to make compatible with Arduino Print.h
2021-01-11 11:43:10 +02:00
Verkehrsrot
fe093a5e35
Sanitize compiler warning in BLERemoteService.cpp (issue #4660) (#4669)
Compiler complains on unused parameter pCharacteristicMap:

framework-arduinoespressif32\libraries\BLE\src\BLERemoteService.cpp: In member function 'void BLERemoteService::getCharacteristics(std::map<short unsigned int, BLERemoteCharacteristic*>*)':
\framework-arduinoespressif32\libraries\BLE\src\BLERemoteService.cpp:246:89: warning: parameter 'pCharacteristicMap' set but not used [-Wunused-but-set-parameter]
 void BLERemoteService::getCharacteristics(std::map<uint16_t, BLERemoteCharacteristic*>* pCharacteristicMap) {
2021-01-11 11:42:32 +02:00
kabir-plod
a0ef17a9dd
Use non-deprecated DPORT values in SPI HAL (#4682) 2021-01-11 11:40:18 +02:00
Nikhil Choudhary
be77bd4e27
Resolve crash with timer interrupt functions called from ISR (#4684) 2021-01-11 11:39:39 +02:00
Me No Dev
ef99cd7fe7
Add WiFiClientSecure::setInsecure() to equalize API with ESP8266 (#4648) 2020-12-21 01:09:37 +02:00
me-no-dev
b05bdf6904 Update esptool for Big Sur 2020-12-07 10:19:55 +02:00
Me No Dev
442c63a4c6
IDF release/v3.3 b4c075169 (#4604)
esp-face: master 420fc7e
esp32-camera: master 0107093
2020-12-07 10:03:16 +02:00
Me No Dev
d1a4b3b822
Add loop task stack size config to Kconfig
Follow up for https://github.com/espressif/arduino-esp32/pull/4564
2020-12-02 11:56:45 +02:00
coylen
7d5bf9e385
[1.0.5] Make looptask stack size configurable (#4564)
Added guarded define to set the stacksize on the main looptask.
Advantage of this is that build_flags can be used to provide a different value for the stack size should it be neccessary
default behaviour is unaffected
2020-12-02 11:52:04 +02:00
Aaron.Lee
aac26a4d1e
[1.0.5] Update Heltec ESP32 series boards definition (#4577) 2020-12-02 11:50:12 +02:00
me-no-dev
804c221499 Update .gitignore 2020-12-01 22:20:06 +02:00
Clemens Kirchgatterer
3236358ded
Update WiFiClient.cpp (#4573)
Replace (depricated) bzero, bcopy with memset and memcpy.
2020-12-01 16:35:12 +02:00
Clemens Kirchgatterer
82e71f9b50
Update ssl_client.cpp (#4574)
Replace (depricated) bzero with memset.
2020-12-01 16:34:36 +02:00
Me No Dev
2e12392721
IDF release/v3.3 c33fc7821
esp-face: master 420fc7e
esp32-camera: master 0107093
2020-12-01 16:22:18 +02:00
Marc J
6b0114366b
Fix logic in SPIClass::setHwCs. (#4559)
Fixes #4558
2020-11-23 14:22:43 +02:00
FedericoBusero
18832bb418
M5TimerCam: add LED_BUILTIN & SS/MOSI/MISO/SCK (#4560) 2020-11-23 14:21:58 +02:00
Mike Dunston
97dcea2b99
Update library.properties (#4563)
Set the category to silence this warning in the Arduino IDE:
```
WARNING: Category '' in library WiFiProv is not valid. Setting to 'Uncategorized'
```
2020-11-23 14:21:34 +02:00
Sweety
dcff2e9774
Separate Provisioning library from WiFi library (#4547) 2020-11-19 00:12:16 +02:00
Me No Dev
6d256b6454
IDF release/v3.3 68b237fe5 with Disable IRAM optimisation for WiFi 2020-11-16 13:06:50 +02:00
me-no-dev
f6bf0f7aa2 IDF release/v3.3 68b237fe5 2020-11-16 12:44:07 +02:00
Me No Dev
a59eb5d51e
Merge branch 'master' into idf-release/v3.3 2020-11-16 12:09:23 +02:00
Me No Dev
adafd9d7c0
Merge pull request #4538 from loick111/feature/custom_variants_dir
The goal is to allow custom configuration for `variants_dir` to define our own board variant directly in the project.

With this functionnality, we are now allowed to define in our projects a custom board **AND** a custom variant.
https://docs.platformio.org/en/latest/platforms/creating_board.html#custom-embedded-boards

Here is an example of how to define a custom board with custom variant:
```
my_project
├── boards
│   └── custom_esp32dev.json
└── variants
    └── custom-esp32dev
        └── pins_arduino.h
```

custom_esp32dev.json
```json
{
  "build": {
    "arduino":{
      "ldscript": "esp32_out.ld"
    },
    "core": "esp32",
    "extra_flags": "-DARDUINO_ESP32_DEV",
    "f_cpu": "240000000L",
    "f_flash": "40000000L",
    "flash_mode": "dio",
    "mcu": "esp32",
    "variants_dir": "variants",
    "variant": "custom-esp32dev"
  },
  "connectivity": [
    "wifi",
    "bluetooth",
    "ethernet",
    "can"
  ],
  "debug": {
    "openocd_board": "esp-wroom-32.cfg"
  },
  "frameworks": [
    "arduino",
    "espidf"
  ],
  "name": "My Custom Espressif ESP32 Dev Module",
  "upload": {
    "flash_size": "4MB",
    "maximum_ram_size": 327680,
    "maximum_size": 4194304,
    "require_upload_port": true,
    "speed": 460800
  },
  "url": "https://en.wikipedia.org/wiki/ESP32",
  "vendor": "Espressif"
}
```
2020-11-15 20:43:43 +02:00
Loick MAHIEUX
ac9fdeffe4 Allow custom variants directory 2020-11-15 16:20:02 +01:00