Commit Graph

59 Commits

Author SHA1 Message Date
Rahul Tank
d86afd82c1 Wifi Prov: Disabled the default support for BLE Encrpytion on characteristics read /write
By default, disabled the BLE Encrpyption requirement for provisioning characteristic.
With this flag enabled, when remote attempts to read and if the ACL link is not encrypted,
ESP device will return Insufficient Authentication. It is remote device responsibility to go
for link encryption which may result in pairing.

Some devices do not proceed for any pairing and just show failure pop-up. Also, user needs
to remove bonding on remote phone manually and then try again. This is causing bad user experience.

End user can enable it as per their use case.
2022-11-25 14:18:15 +05:30
Harshit Malpani
04e24078d9
wifi_provisioning: fix error codes for wifi connect retry
Closes: https://github.com/espressif/esp-idf/issues/9399
2022-10-21 11:33:12 +05:30
Isha Pardikar
eb490dc18e Merge branch 'feature/rainmaker_BT_configurable' into 'release/v4.4'
Doc: Made bluetooth configurable after wifi provisioning is completed

See merge request espressif/esp-idf!19263
2022-07-27 12:24:50 +05:30
Jiang Jiang Jian
7c28a05c69 Merge branch 'bugfix/configure_link_encryption_for_charac_v4.4' into 'release/v4.4'
WifiProv: Add configuration support for forcing link encryption (v4.4)

See merge request espressif/esp-idf!18660
2022-06-30 16:49:26 +08:00
Rahul Tank
7a01fe7a71 WifiProv: Extended support for configuring if link encryption is needed
when attempting to read / write characteristic to bluedroid stack
2022-06-23 17:44:38 +05:30
Laukik Hase
279ab23244
wifi_prov: Added support for WPA3_PSK and WPA2_WPA3_PSK APs 2022-06-21 11:17:09 +05:30
Laukik Hase
0ca9ad5249
wifi_provisioning: Regenerated proto-c and python with protobuf compiler v3.21.0 2022-06-07 15:59:40 +05:30
Rodrigo Garcia
9359c61fea
provisioning: Fix include for Arduino INADDR_NONE 2022-05-18 19:44:05 +02:00
yuanjm
a706a482c6 feat(wifi_provisioning): Optimize memory for wifi scan ap number 2022-05-16 14:07:19 +08:00
Isha Pardikar
916533ef92 Merge branch 'bugfix/wifi_prov_mgr_conn_issue' into 'release/v4.4'
NimBLE: Fixed device disconnection issue of wifi prov mgr

Closes IDF-4655

See merge request espressif/esp-idf!17618
2022-03-28 11:49:09 +05:30
Laukik Hase
b7c1c4913e wifi_prov_mgr: Fix provisioning not stopping in release mode
- For the wifi_prov_mgr example in release mode (with NDEBUG defined -
  assertions disabled), the task to stop provisioning is never started
  as it is voided by the assert function it is called in.

Closes https://github.com/espressif/esp-idf/issues/8309
2022-02-01 09:49:45 +05:30
Laukik Hase
474ff3e38f wifi_prov_mgr: Added check for passphrase length in softAP scheme
Closes https://github.com/espressif/esp-idf/issues/8063
2021-12-28 18:13:40 +05:30
Zhang Jun Hao
f490adf800 esp_wifi: support station only mode for code size down 2021-12-06 17:34:56 +08:00
isha pardikar
09800028e1 Wifi_prov_mgr:Fix for ios device needs to do forget device 2021-10-06 17:46:22 +08:00
Harshit Malpani
baa2faa94b provisioning: fix wifi warning in wifi_prov_mgr application
Scan configuration parameters should not modify in co-existence mode.
2021-08-11 09:54:37 +05:30
Prasad Alatkar
c8f4153d4f Provisioning BLE: Add API to set manufacturer data in scan response
- Add `wifi_prov_scheme_ble_set_mfg_data` API to set custom manufacturer data
  in BLE advertisements.
- Run format.sh script on modified files.
- Fix few typos in `protocomm_nimble.c`.

- Incorporate suggestion to remove extra check on protocomm_ble_mfg_data_len

- Remove few unnecessary comments.
2021-07-14 11:56:04 +05:30
Shubham Kulkarni
f06d1cdc75 wifi_provisioning: Add check for WIFI_REASON_MIC_FAILURE error code in wifi_prov_mgr_event_handler_internal 2021-06-07 12:23:28 +00:00
Shubham Kulkarni
34bdbf9ee2 wifi_provisioning: Add API to reset state if provisioning fails 2021-06-07 12:23:28 +00:00
yuanjm
06ae78b531 provisioning: Fix WiFi credentials not saved to NVS due to wifi_prov_mgr_start_provisioning change the WiFi storage to RAM
Closes https://github.com/espressif/esp-idf/issues/5178
2021-03-30 11:15:05 +00:00
yuanjm
49f3fba14d wifi_provisioning: Add an API for resetting provisioning config 2021-02-23 14:21:06 +08:00
Fu Hanxi
0146f258d7 style: format python files with isort and double-quote-string-fixer 2021-01-26 10:49:01 +08:00
Jiang Jiang Jian
1614cefd4f Merge branch 'bugfix/wpa_supplicant_coverity_issue_fixes' into 'master'
Fix some issues raised by Coverity static Analyzer.

Closes WIFI-3251

See merge request espressif/esp-idf!11918
2021-01-25 15:52:21 +08:00
aditi_lonkar
da313b691d wifi_provisioning: Fix some memory leak issues by coverity static analyzer. 2021-01-25 03:37:47 +00:00
xiehang
dffbce9813 esp_wifi: Modify ESP_IF_WIFI_AP to WIFI_IF_AP 2021-01-19 11:58:04 +08:00
xiehang
b8a8fe3f54 esp_wifi: Modify ESP_IF_WIFI_STA to WIFI_IF_STA 2021-01-19 11:55:44 +08:00
Jiang Jiang Jian
8b33695495 Merge branch 'feature/support_esp32c3_s3_ble_5.0_and_bug_fix' into 'master'
Feature/support esp32c3 s3 ble 5.0 and bug fix

See merge request espressif/esp-idf!12007
2021-01-17 17:06:12 +08:00
zwj
7c1c669799 component/bt: add BLE v5.0 feature for bluedroid host 2021-01-15 17:55:12 +08:00
Piyush Shah
388f4fd7ef wifi_provisioning: Add a check for number of scanned networks while allocating memory
If number of scanned networks is zero, while getting the list, since we try
to allocate zero bytes, we get a NULL pointer in response. This is considered
as an error and the provisioning worflow breaks there.
Adding a check before allocation resolves the issue.
2021-01-15 05:01:35 +00:00
Mahavir Jain
ccf89cd4bf wifi_provisioning: fix build warnings due to incorrect event handler argument type 2021-01-14 10:47:35 +05:30
Mahavir Jain
533c124280 wifi_provisioning: enable component build for ESP32-C3 2021-01-14 10:47:35 +05:30
morris
753a929525 global: fix sign-compare warnings 2021-01-12 14:05:08 +08:00
Marius Vikhammer
68608f804c esp32c3: Misc fixes needed to build & run 2020-12-31 15:20:05 +11:00
Angus Gratton
66fb5a29bb Whitespace: Automated whitespace fixes (large commit)
Apply the pre-commit hook whitespace fixes to all files in the repo.

(Line endings, blank lines at end of file, trailing whitespace)
2020-11-11 07:36:35 +00:00
Bruno Binet
adabe5a76e wifi_provisioning: release lock on scan start failure
Signed-off-by: Shubham Kulkarni <shubham.kulkarni@espressif.com>

Merges: https://github.com/espressif/esp-idf/pull/6019
2020-10-30 13:16:56 +05:30
Mahavir Jain
6a3d50c952 provisioning: use memcpy instead of strncpy for copying SSID
Per WiFi library requirement, SSID can be non-null terminated string
if its length goes to 32 bytes (maximum). Use of strncpy in this case,
along with compiler optimization level -O2 results in some warnings
for potential use of non-null terminated strings.

Fix here ensures use of memcpy to copy SSID string upto appropriate
desired length. This helps to avoid compiler specific workaround
flags added earlier.

Closes https://github.com/espressif/esp-idf/issues/5866
Closes IDFGH-3983
2020-09-17 12:59:22 +05:30
Piyush Shah
4b030420a1 wifi_provisioning: Catch the Wi-Fi events even after Connection errors
It was observed that after sending credentials, if the first
Wi-Fi conection attempt fails, the Wi-Fi provisioning managager
ignores subsequent Wi-Fi events. So, even if the device eventually
connects to the AP, the provisioning stays on indefinitely.

Changing a check so that subsequent events are also captured and
provisioning finishes successfully.
2020-03-21 06:02:55 +00:00
Prasad Alatkar
8419aa85a9 Wifi_provisioning_ble: Change service_uuid to non standard 128 bit UUID
- Modifies UUIDs in scheme_ble, manager example and esp_prov tool to custom 128
  bit UUID
2020-03-16 08:20:37 +00:00
Konstantin Kondrashov
739eb05bb9 esp32: add implementation of esp_timer based on TG0 LAC timer
Closes: IDF-979
2020-02-06 14:00:18 +08:00
Piyush Shah
868f317c19 wifi_prov_manager: Delay the Wi-Fi connect call
For SoftAP provisioning, if we start Wi-Fi connection as soon as the
apply config request is received, it has been observed that the clients
(Phone apps mostly) do not get the response for this as we switch the
Wi-Fi channel, causing a momentary disconnection.

Delaying the connection calls helps mitigate the issue.

Signed-off-by: Piyush Shah <piyush@espressif.com>
2020-01-07 09:51:54 +00:00
Piyush Shah
c4fb524d03 wifi_prov_manager: Change the name of an internal timer handle to better reflect the purpose
Signed-off-by: Piyush Shah <piyush@espressif.com>
2020-01-07 09:51:54 +00:00
Piyush Shah
f9ec0a7172 wifi_provisioning_softap: Allow applications to start webserver externally
If an application wants to use webserver, instead of creating another
webserver instance, the wifi provisioning manager can re-use the same.
The webserver handle can be passed using this new API.

Signed-off-by: Piyush Shah <piyush@espressif.com>
2019-11-27 18:42:43 +05:30
David Cermak
ffe043b1a8 esp_netif: Introduction of esp-netif component as a replacement of tcpip_adpter
- provides object oriented access to network intefaces
- not limited to default netifs
- more generic abstraction to network input output functions
- event handler registration removed from component responsibility
- backward compatibility layer for legacy tcpip_apapter APIs

Closes IDF-39
2019-11-13 12:36:25 +01:00
Andrew
4fdaeb6b6e cmake: Add new compiler optimization levels definitions
Rename and add multiple kconfig compiler options. New compiler options
COMPILER_OPTIMIZATION_PERF and COMPILER_OPTIMIZATION_NONE have been added.
Optimize "Debug" and "Release" options to "Default" and "Size" respectively.
This commit also does the following:

- The COMPILER_OPTIMIZATION_PERF option introduced multiple bug.
This commit fixes those bugs.
- build.yml also updated to test for the new optimization options.
2019-09-06 17:37:19 +08:00
liu zhifu
003a9872b7 esp_wifi: wifi support new event mechanism
1. WiFi support new event mechanism
2. Update examples to use new event mechanism
2019-08-20 09:39:51 +00:00
Anurag Kar
0e07b85d2f wifi_prov_mgr : Added missing esp_event_post() for WIFI_PROV_END events 2019-07-13 15:48:23 +05:30
Mahavir Jain
74140b0cfb Merge branch 'feature/cmake_proto_build' into 'master'
cmake : Add CMakeLists.txt and update READMEs for re-compilation of proto files

Closes IDF-725

See merge request espressif/esp-idf!5442
2019-07-08 19:13:32 +08:00
Anurag Kar
98cf38ca9c cmake : Add CMakeLists.txt and update READMEs for re-compilation of proto files 2019-07-05 18:20:15 +05:30
Anurag Kar
703e98eb98 wifi_prov_mgr : Updated the set of WIFI_REASON_ codes used for setting WIFI_PROV_STA_AUTH_ERROR 2019-07-05 08:41:27 +00:00
Anurag Kar
9f1033862d wifi_prov_mgr : Free memory allocated by cJSON_Print 2019-07-05 08:41:27 +00:00
Anurag Kar
69ade757e2 Wi-Fi Provisioning : Manager now uses esp_event to catch system events and emit provisioning events to the default event loop
List of changes:
* Deprecated public API wifi_prov_mgr_event_handler() and added private function wifi_prov_mgr_event_handler_internal(), registered with the default event loop for catching WIFI and IP system events
2019-07-05 08:41:27 +00:00