Commit Graph

68 Commits

Author SHA1 Message Date
isha.pardikar@espressif.com
c134171e80 wifi_prov_mgr : Fixed return value of characteristic read operation 2023-03-09 10:44:54 +05:30
Isha Pardikar
a78a36e7b9 wifi_provisioning : Increased 1 byte of BLE advertising device name to store '\0', at the end, to ensure we adhere to the max name length as per spec. 2022-09-27 16:09:11 +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
Marius Vikhammer
90e58c3721 docs: fix all doxygen warnings
Doxygen warnings would previously not result in a failed pipeline.
Fixed this as well as all current warnings.
2022-07-05 11:14:40 +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
509a423f83
protocomm: Regenerated proto-c and python with protobuf compiler v3.21.0 2022-06-07 15:59:40 +05:30
lorenzo.consolaro
c9d5c14451 Fix iOS advertisement response and simplify 2022-05-09 10:09:06 +05:30
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
c3d2f2361c protocomm: Updated function for constant time buffer comparison
- mbedtls_ssl_safer_memcmp() -> mbedtls_ct_memcmp()
2022-02-02 10:56:48 +05:30
isha pardikar
5ba6ac26c4 Merge branch 'bugfix/protocomm_nimble_allocation' into 'master'
NimBLE: Fixed potential allocation bug in protocomm_nimble.c

Closes https://github.com/espressif/esp-idf/issues/7689

See merge request espressif/esp-idf!15669
2021-11-18 14:17:35 +05:30
isha pardikar
09800028e1 Wifi_prov_mgr:Fix for ios device needs to do forget device 2021-10-06 17:46:22 +08:00
Switi Mhaiske
99cce49299 ESP32C3: Fix for provisioning failure with ble transport mode and bluedriod stack 2021-07-22 15:37:46 +08:00
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
Siarhei Volkau
ba15970abb esp_http_server, protocomm: Consider a connection as closed if recv() returns 0
This check prevents infinite loop on closed sockets

Closes https://github.com/espressif/esp-idf/pull/6541

Signed-off-by: Shubham Kulkarni <shubham.kulkarni@espressif.com>
2021-06-08 05:48:30 +00:00
kewal shah
b8dfb27141 protocomm_console.c: Fix out of bound read in protocomm_console_task and define line_buf size 2021-05-11 04:00:47 +00:00
Rahul Tank
105497f861 Add secure connection for just works in provisioning app for bluedroid
This MR adds support of secure connection, encryption flags to characteristics and bonding with Just Work as association model

[BLE Provisioning] Added secure connection pairing support to unified provisioning framework.
2021-04-01 09:29:03 +00:00
Prasad Alatkar
fbd906e05f BLE provisioning: Add secure connection pairing with just works for NimBLE 2021-04-01 17:26:30 +08:00
Prasad Alatkar
bf6ff41a9e BLE Provisioning: Remove unnecessary strdup/free from protocomm_nimble
Closes IDFGH-4980
2021-03-25 16:55:57 +05:30
Aditya Patwardhan
d36479728c protocomm: Fixed NULL check of allocated memory
Fixes one part of - https://github.com/espressif/esp-idf/issues/6440
2021-02-10 02:07:58 +00:00
Fu Hanxi
0146f258d7 style: format python files with isort and double-quote-string-fixer 2021-01-26 10:49:01 +08:00
zwj
7c1c669799 component/bt: add BLE v5.0 feature for bluedroid host 2021-01-15 17:55:12 +08:00
Piyush Shah
541cf16c9e protocomm security1: Restart security session if SESSION_STATE_CMD0 is received
With the introduction of cookies to track a session, it is possible that the
clients restart the provisioning on the same session, specifically when a user
cancels a current provisioning attempt. This can result in an error as the state
on the device side and client side will go out of sync.

This has now been changed such that if SESSION_STATE_CMD0 is received on
an existing session, the state is reset and flow allowed to continue.
2021-01-13 04:34:10 +00:00
Piyush Shah
72fa8d0750 protocomm_httpd: Use HTTP cookies to track session
Earlier, a "socket connection" was being considered as a protocomm "session".
However, for HTTP, we cannot expect clients to necessarily use the same
socket for all requests of a given transaction. This was indeed causing
some failures for Wi-Fi provisioning from Android phones.

So, we have introduced http cookies to track a session even if the socket
connection does not stay intact throughout the transaction.
This change is backward compatible. If the client does not use cookies, the
socket connection will be considered as the session.

Closes: https://github.com/espressif/esp-idf/issues/6316
Reference: https://github.com/espressif/esp-idf/pull/6330
2021-01-13 04:34:10 +00:00
Piyush Shah
85cb1e8ca3 protocomm_httpd: Change an info print to debug print as it isn't really required in the logs 2020-11-18 04:12:47 +00: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
Prasad Alatkar
13433d10fc Protocomm/simple_ble: Make gatt table map size equal to number of handles received
- Fixes memcpy failure observed while adding 2 or more endpoints in
  wifi_provisioning.

 Closes IDF-2250
2020-11-05 08:53:13 +00:00
kewal shah
9a16b551ef protocomm_console.c: Check if memory is allocated to buf and if not then return ESP_ERR_NO_MEM error 2020-10-06 10:13:40 +05:30
Jakob Hasse
20c068ef3b cmock: added cmock as component
* changing dependencies from unity->cmock
* added component.mk and Makefile.projbuild
* ignore test dir in gen_esp_err_to_name.py
* added some brief introduction of CMock in IDF
2020-09-02 16:38:37 +08:00
Prasad Alatkar
457d4f36a6 BLE provisioning: Add check for valid ble read offset 2020-07-14 13:14:53 +00:00
Piyush Shah
05852bc4aa protocomm_httpd: Restart security session if request is received on a new session
This commit fixes a bug as well as changes a behaviour.

Bugfix: During softap/httpd based provisioning, if a session was closed
midway and a new one started, it would never proceed if the http server
assigns same socket number to the new session (which happens almost always).
Now, if a session is closed, using the http callbacks, the older session
data is cleared so that a new one can be created.

Behavioural change: If a client (mobile app particularly) does not use
persistent http session i.e. all provisioning communication on the same
socket, the provisioning may fail. Earlier, since the session context was
not getting cleared, even if the client closed a session and continued
on a new one, it would go through if the socket number assigned was same
(which happens almost always).

Ideally, from a security perspective, all communication related
to secure provisioning must happen on the same socket, and so, this
change is required.
2020-05-11 13:01:13 +00:00
Renz Bagaporo
3d0967a58a test: declare requirements and include dirs private 2020-03-23 10:58:50 +08:00
Mahavir Jain
b3e7e61f23 protocomm: enable test cases for esp32s2 with software AES 2020-02-25 18:05:35 +05:30
Hrishikesh Dhayagude
3080cad4da Unified Provisioning - BLE: Fix characteristics read response issue
Fix the issue when number of bytes to be read is an exact multiple of [MTU-1]
2020-02-18 14:42:07 +08:00
michael
2529eda907 ci: disable failed cases for s2 temporarily 2020-02-15 18:28:25 +08:00
Marius Vikhammer
c63684cf6c hw crypto: activated hardware acceleration for esp32s2beta
Activated AES, RSA and SHA hardware acceleration for esp32s2 and enabled related unit tests.

Updated with changes made for ESP32 from 0a04034, 961f59f and caea288.

Added performance targets for esp32s2beta

Closes IDF-757
2019-12-12 12:37:29 +08:00
Michael (XIAO Xufeng)
76a3a5fb48 ci: disable unavailable tests for esp32s2beta 2019-09-04 10:53:25 +10:00
Prasad Alatkar
4c7b83defc NimBLE: Fix bug in protocomm_nimble chararcteristic access callback
Fixes bug in `protocomm_nimble` while writing to characteristic with length greater than MTU value.
2019-08-15 10:50:30 +08:00
Anton Maklakov
afbaf74007 tools: Mass fixing of empty prototypes (for -Wstrict-prototypes) 2019-08-01 16:28:56 +07: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
b75f8b1b20 ESP Local Control Feature Added
List of changes:
* New component esp_local_ctrl added
* Example added under examples/protocols/esp_local_ctrl
* Documentation added under protocols/esp_local_ctrl
* Demo client side app esp_local_ctrl.py added under examples/protocols/esp_local_ctrl/scripts
* protocomm_ble : protocomm_ble_config_t given struct name for allowing forward declaration
* esp_prov/transport_softap renamed to transport_http
* transport_http module supports verification of server certificate
* transport_http module performs name resolution before connection
2019-07-03 21:31:04 +05:30
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
eb5cc203f9 protocomm_ble : Bugfix for unbound memcpy on prepare write buffer
Closes https://github.com/espressif/esp-idf/issues/3633
2019-06-25 19:58:19 +00:00
Renz Christian Bagaporo
9b350f9ecc cmake: some formatting fixes
Do not include bootloader in flash target when secure boot is enabled.
Emit signing warning on all cases where signed apps are enabled (secure
boot and signed images)
Follow convention of capital letters for SECURE_BOOT_SIGNING_KEY
variable, since it is
relevant to other components, not just bootloader.
Pass signing key and verification key via config, not requiring
bootloader to know parent app dir.
Misc. variables name corrections
2019-06-21 19:53:29 +08:00
Renz Christian Bagaporo
9eccd7c082 components: use new component registration api 2019-06-21 19:53:29 +08:00
Renz Christian Bagaporo
54ef60f26b component: revert some of the dependency corrections
!4452 and !4897 made some ill-advised corrections to dependency info;
revert those in this MR. Handling pre-built binaries as imported
libraries is retained, however.
2019-06-11 18:09:26 +08:00
Angus Gratton
8b890bdaf3 Merge branch 'bugfix/protocomm_sec_mult_inst' into 'master'
Protocomm : Session security now supports multiple instances of the same type

See merge request idf/esp-idf!4756
2019-06-03 11:46:24 +08:00
Angus Gratton
92c5f17be0 Merge branch 'bugfix/protocomm_minor' into 'master'
Protocomm : Minor fixes

See merge request idf/esp-idf!5094
2019-06-03 09:48:03 +08:00
Anurag Kar
5384338341 Protocomm : Minor fixes
List of changes:
* protocomm_httpd : Reset session_id static variable on start and stop
* security1 : Typo in checking failed dynamic allocation
2019-05-28 14:41:49 +05:30
Renz Christian Bagaporo
2c12080049 components: correct dependency information for linking without link groups 2019-05-28 10:51:02 +08:00
Roland Dobai
a1bddb923b Rename Kconfig options (components/bt) 2019-05-21 09:09:01 +02:00