1. WiFiProv.ino sketch is added that allows arduino users to do provisioning via SoftAP or BLE. WiFi.beginProvision( ) API is designed for provisioning in Arduino.
2. In WiFiProv.h provisioning class is defined.
3. WiFiProv.cpp contains implementation for provisioning class.
4. README.md file is added which contains detail information for working.
The boundary delimiter (_STREAM_BOUNDARY) needs to be send before the
body part (_STREAM_PART) too follow RFC2046. This caused ffplay/ffmpeg
to fail to open the MJPEG stream.
* std::shared_ptr Memory Leak
clientSocketHande and _rxBuffer are std::shared_ptr, the stop() call was not correctly releasing them and the operator= had similar problems fix for #3679
* operator= second attempt
* operator= third time
WiFiClient.connected() was hanging thinking there was still a connection when the remote had already closed. The one-liner in this patch addresses recv() returning 0 and errno==128. I couldn't find the corresponding errno for 128 but its caught by the case statement which includes EPIPE, ENOTCONN, ECONNRESET and ECONNABORTED so I assume its one of those. Broken pipe maybe?
```c
[D][WiFiClient.cpp:511] connected(): Disconnected: RES: 0, ERR: 128
```
EDIT: added comment to reflect that recv() can set errno when it returns 0.
* Fix flush
flush should not flush the read buffer, it should wait till all output is drained from the write buffer.
* Update BluetoothSerial.cpp
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
fixed the connected() function so that it only checks errno if recv returns a value of -1.
"in the even of an error, errno is set to indicate the error" --manpage
This fixes the ESP32 Webserver when dealing with a modern webserver with a slow SD card.
* Updated BLERemoteCharacteristic to exposre esp_gatt_auth_req_t parameter for readValue and writeValue.
* Updated BLERemoteCharacteristic/Descriptor to expose a setAuth method to allow tweaking the authentication request type for that remotecharacteristic/descriptor without the need to add auth on each read/write.
If two headers with overlapping names are added while replace == true, like in:
```cpp
http.addHeader("api_token", "pMXFOLpinQqajaRQJYMeWObg2XYmcX1");
http.addHeader("token", "1234");
```
then replacing went wrong. This is fixed with this PR.
This event name was missing in the list:
d5e2bb12ca/tools/sdk/include/esp32/esp_event_legacy.h (L43)
E.g., it was giving
[D][WiFiGeneric.cpp:337] _eventCallback(): Event: 24 - ETH_GOT_IP
When it should have been
[D][WiFiGeneric.cpp:337] _eventCallback(): Event: 24 - ETH_DISCONNECTED
Especially if the user wants to use the library as component in IDF,
there are some pitfalls while doing make menuconfig. One is this missing
dependency which will now fail with a better error message with a hint to
the user how to fix it.
refs #2154#3215
This changes all SPI functions that take data pointers which are
not modified so that the declaration is const. This allows them
to be used with const data (i.e. held in flash). No functional
changes are required.
The defnitions of spiWrite() and spiTransferBytes() in
esp-hal-spi.h/c have been updated to be consistent.
Tests:
- Build a simple sketch using SPI.writePattern() and
SPI.transferBytes() which uses const data and verify that the
attached device functions as expected.
I compiled the sample "WebServer -> HttpAdvancedAuth". But the right username and password can not login in. I found the file "Webserver.h" may be have some problem. So I fix it. Please check it.
* 20190916 - initial: support for Master mode, Pin and SSP
* 20190916 - initial: Add example app for Master mode
* 20190916 - initial: Force another build
* 20190916 - connect would use resolved address as preference and remove now redundant _remote_address
* 20190916 - rework set/reset/default pin logic
* 20190916 - cleanup: remove static vars, add/use constants, fix typos
* 20190916 - fix build issues and implement geoup events for status verification.
* 20190916 - remove extra lines,misc
* 20190916 - rework ESP_BT_GAP_DISC_RES_EVT, added SPP_DISCONNECTED bit for disconnect event. + timeout for disconnect()
* 20190916 - Small log change to improve log sequencing
* 20190916 - remove static from local vars
* 20190916 - Limited scope and duration for the scan, log device address during scan in info mode as it is very difficult to find out sometimes. Fixed get_name_from_eir() not resetting the name when called.
* 20190916 - break property for loop during scan when name matches.
* 20190916 - misc
* 20190916 - SPP_DISCONNECT state updates
* 20190916 - formatting, remove some strange syntax from initiator code
* 20190916 - Add comments to the example about connect(...) usage and timeouts
* 20190916 - fix disconnect() without timeout
* 20190916 - Add example comment to view BT address and name during connect(name)
* 20190916 - wording in example comments
* 20190916 - rework connect() and disconnect() methods to help with concurrency and more authoritative status returned back to caller. Automatic disconnect in connect() methods
* 20190916 - optimize code
* 20190916 - optimize code - more
* 20190916 - add timeout for pin set
* 20190916 - change scan mode to ESP_BT_SCAN_MODE_CONNECTABLE_DISCOVERABLE
* 20190916 - update example code slightly
* 20190916 - increase READY_TIMEOUT to 10 secs
* 20190916 - typo in example and move waitForConnect() to static area
* 20190916 - update example comments
* 20190916 - update example comments
* 20190916 - update example comments
* 20190916 - add new example to remove paired devices from ESP32
* 20190916 - correct typo in example
* 20190916 - update example comment, add remove_bond_device() method for convenience.
* 20190916 - reword example comment.
* 20190916 - rename remove_bond_device()
* 20190916 - rename removePairedDevice() to unpairDevice()
* 20190916 - code review changes
* 20190916 - fix return value in setup() od example
* Add Added unimplemented getCharacteristicsByHandle function
Defined in BLERemoteService.h
But, Not included in BLERemoteService.cpp
* Delete log output
Pretty sure this was a typo as the deinit doesn't actually allow for reinit if that is an ifndef. Changed in my local copy and can now deinit and reinit just fine. Also, not sure why we are checking for the architecture here. Just curious.