Wykres commitów

40 Commity (813044c6dba1d8ba26c327d1e22c7b0a2936fa4e)

Autor SHA1 Wiadomość Data
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
Prasad Alatkar 388b350f0d NimBLE-provisioning: Add NimBLE support to unified provisioning framework
- Adds NimBLE stack support to existing BLE variant of unified provisioning.
- Uses scan response to send device name, 128 bit custom UUIDs based on service
  UUID.
- Minimal changes to `app_prov.c`, component.mk, CMakeLists.txt and
  `protocomm_ble.h` to accomodate NimBLE stack for provisioning.
2019-07-02 14:20:10 +08:00
Anurag Kar 9c0ee28670 wifi_provisioning : Added Wi-Fi Scan list feature to Provisioning Manager
List of changes in components/wifi_provisioning:
* Manager version is now v1.1
* .proto files and protocomm handler added for sending Wi-Fi scan command and receiving scan results
* Implemented handlers for wifi_scan protocomm endpoint
* Update manager context data structure to hold scan state and results
* scheme_softap now runs Wi-Fi in APSTA mode
* Wi-Fi is started in AP mode when provisioning is started. This is necessary for scan list to work
* Docs updates with information about new wifi_scan endpoint

List of changes in tools/esp_prov:
* Added functions for sending and receiving protobuf messages compatible with wifi_scan protocomm endpoint
* Added feature to display/refresh scan results and accept user selection at runtime
* New functions:
  * get_version() : only returns the protocol version string
  * has_capability() : check is a capability is present according to proto-ver response
* wifi_scan feature is provided only if the `wifi_scan` capability is present

Other changes:
* Replace recursive mutex with plain mutex
* assert on return value of mutex give / take calls
* replace all calls with macros ACQUIRE_LOCK and RELEASE_LOCK
* some checks added in scanning related private APIs
* free and nullify scanning context and state if service is stopped while ongoing scan
2019-06-26 05:24:20 +00:00
Renz Christian Bagaporo 9eccd7c082 components: use new component registration api 2019-06-21 19:53:29 +08:00
Anurag Kar a75be3413e Wi-Fi Provisioning : Bugfix in copying SSID and Passphrase
These changes guarantee that the SSID and Passphrase received via protocomm are NULL terminated and size limited to their standard lengths.

List of changes:
* Corrected length of passphrase field in wifi_prov_config_set_data_t structure
* Performing length checks on SSID, passphrase and bssid, when populating wifi_prov_config_set_data_t structure with received credentials
2019-06-12 05:42:46 +00:00
Anurag Kar 4ef6c85f0c wifi_provisioning : Wi-Fi Provisioning Manager added 2019-06-10 15:13:50 +05:30
Anurag Kar 59b10709d1 wifi_provisioning : context pointer added to wifi_config_t structure and related examples/docs updated
Closes https://github.com/espressif/esp-idf/issues/2874
2019-02-15 10:45:34 +00:00
Anurag Kar 776c23da4a provisioning framework : 'extern C' directives added for C++ support 2019-02-15 10:45:34 +00:00
Anurag Kar 84f094453b Examples : Added provisioning examples, tests and client tool.
* BLE and softAP provisioning examples added along with tests.
* An application specific example added for demonstrating custom provisioning scheme.
* tools/esp_prov/esp_prov.py can be used as a provisioning client for SoftAP, BLE and CLI based transports.

Co-Authored-By: Amey Inamdar <amey@espressif.com>
Co-Authored-By: Anurag Kar <anurag.kar@espressif.com>
2018-10-02 19:07:28 +05:30
Amey Inamdar 2b52465416 WiFi Provisioning : Added component providing framework for configuring WiFi credentials during provisioning
Co-Authored-By: Amey Inamdar <amey@espressif.com>
Co-Authored-By: Anurag Kar <anurag.kar@espressif.com>
2018-10-02 19:07:28 +05:30