Other changes:
* Command line argument name and descriptions updated and formatted
* Some exception messages updated for clarity
* READMEs updated for tool and all provisioning examples
* Minor update in example test scripts due to change in esp_prov.get_transport() API
* Transport_HTTP now forces connect on initialization
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
- 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.
The existing Bluetooth examples are split as:
1. examples/bluetooth/bluedroid - Bluedroid Host (BT + BLE) examples
a. examples/bluetooth/bluedroid/classic_bt - Classic BT examples
b. examples/bluetooth/bluedroid/ble - BLE examples
c. examples/bluetooth/bluedroid/coex - Classic BT and BLE coex examples
d. examples/bluetooth/bluedroid/hci - VHCI and HCI UART examples
i. Rename ble_adv to controller_vhci_ble_adv and move it in hci folder
2. examples/bluetooth/nimble - NimBLE BLE Host + NimBLE Mesh examples
3. examples/bluetooth/esp_ble_mesh - ESP BLE Mesh examples
4. Update documentation references
Move supplicant to idf and do following refactoring:
1. Make the folder structure consitent with supplicant upstream
2. Remove duplicated header files and minimize the public header files
3. Refactor for WiFi/supplicant interfaces
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
This MR improves existing flash encryption document to provide simplified steps
Adds two new modes for user: Development & Release
Adds a simple example
Supports encrypted write through make command
1. BLE Mesh Core
* Provisioning: Node Role
* Advertising and GATT bearer
* Authentication OOB
* Provisioning: Provisioner Role
* Advertising and GATT bearer
* Authentication OOB
* Networking
* Relay
* Segmentation and Reassembly
* Key Refresh
* IV Update
* Proxy Support
* Multiple Client Models Run Simultaneously
* Support multiple client models send packets to different nodes simultaneously
* No blocking between client model and server
* NVS Storage
* Store Provisioning Data of BLE Mesh Nodes in Flash
2. BLE Mesh Applications
* BLE Mesh Node & Provisioner
* Node Example
* Provisioner Example
* Node + Generic OnOff Client Example
* Fast Provisioning
* Vendor Fast Prov Server Model
* Vendor Fast Prov Client Model
* Examples
* Wi-Fi & BLE Mesh Coexistence
* Example
* BLE Mesh Console Commands
* Example
3. BLE Mesh Models
* Foundation Models
* Configuration Server Model
* Configuration Client Model
* Health Server Model
* Health Client Model
* Generic Client Models
* Generic OnOff Client
* Generic Level Client
* Generic Location Client
* Generic Default Transition Timer Client
* Generic Power OnOff Client
* Generic Power Level Client
* Generic Battery Client
* Generic Property Client
* Generic Server Models
* Generic OnOff Server (Example)
* Lighting Client Models
* Light Lightness Client
* Light CTL Client
* Light HSL Client
* Light xyL Client
* Light LC Client
* Sensor Client Model
* Sensor Client
* Time and Scenes Client Models
* Time Client
* Scene Client
* Scheduler Client
!4452 used setting LINK_LIBRARIES and INTERFACE_LINK_LIBRARIES to link
components built under ESP-IDF build system. However, LINK_LIBRARIES does
not produce behavior same as linking PRIVATE. This MR uses the new
signature for target_link_libraries directly instead. This also moves
setting dependencies during component registration rather than after all
components have been processed.
The consequence is that internally, components have to use the new
signature form as well. This does not affect linking the components to
external targets, such as with idf_as_lib example. This only affects
linking additional libraries to ESP-IDF libraries outside component processing (after
idf_build_process), which is not even possible for CMake<v3.13 as
target_link_libraries is not valid for targets not created in current
directory. See https://cmake.org/cmake/help/v3.13/policy/CMP0079.html#policy:CMP0079
Changes argument parsing mechanism from argparse to a new one, that provides better support for extensions and options that are only applicable to specific subcommands,
Breaking changes:
1. All global options should go before subcommands, i.e. `idf.py build -C ~/some/project` will not work anymore, only `idf.py -C ~/some/project build` is acceptable
2. To provide multiple values to an option like `--define-cache-entry` it's necessary to repeat option many times, i.e. `idf.py -D entry1 entry2 entry3` will not work, right way is: `idf.py -D entry1 -D entry2 -D entry3`
At the moment there are 3 options like this: `--define-cache-entry` in base list and `--test-components` and `--test-exclude-components` in the unit test extensions
3. Drops `defconfig` and `bootloader-clean` subcommands
Closes https://github.com/espressif/esp-idf/issues/3570
Closes https://github.com/espressif/esp-idf/issues/3571
Using xxx_periph.h in whole IDF instead of xxx_reg.h, xxx_struct.h, xxx_channel.h ... .
Cleaned up header files from unnecessary headers (releated to soc/... headers).
The SEC_CNT field in the eddystone TLM frame represents the number of centiseconds
elapsed since reboot. A divisor of 10 has been placed within the code to derive seconds from SEC_CNT.
Closes https://github.com/espressif/esp-idf/pull/3300
Change incorrect bitshifts in big_endian_read_32() function.
This was giving wrong values of of the 4 byte fieldswithin the eddystone TLM message, namely 'ADV_CNT' and 'SEC_CNT'
This change prevents buffer overflows in case of really long file paths.
Other changes:
* Remove query (?) and fragment (#) component from URI when converting to file path
* /index.html and favicon.ico can be overridden by files with same name and path in SPIFFS
* README.md updated
inet_aton returns 0 on failure, but socket_add_ipv4_multicast_group has to return negative values for failures
getaddrinfo sets res to zero of address could not resolved, but doesn't necessarily return an
error. res is now checked for zero before dereferencing
Merges https://github.com/espressif/esp-idf/pull/2814
Contains two different component folders per each implementation (serial_master and serial_slave) with concrete ports.
Added common public api for master and slave and common interface for master and slave implementation.
Add support of cmake system (added cmake files).
Added sdkconfig.defaults files for slave and master modbus examples.
Updated make file and KConfig for freemodbus component
Update according to review and fix doxygen warnings
Fix Doxyfile to pass documentation build
Update headers and change interface file names as per review comments
Merge branch feature/freemodbus_move_rs485_mode_control
Update after review:
The stack modbus folder updated to support master and slave ports together and moved into freemodbus/modbus
Stack and port files updated to remove duplicated simbols
Make file, KConfig and CMakeLists.txt updated to compile master and slave stacks, common interface and concrete implementations of ports
Stack callback functions execute callbacks using interface pointer from concrete port implementation
User can instantiate any of concrete port using common API (only one concrete port at a time) and it does not require to select port by KConfig
Port pins and mode configuration moved into example files from port files to allow user select pins and port mode (customer request)
Changes tested using pymodbus, ModbusPoll and communication between two boards
Updated DoxyFile according to public include path
Fix maximum instance size for slave (merge from master of customer issue)
Fix critical section issue TW#28622 (change spin lock based critical section to semaphore)
Move serial port files into component port folder for master and slave accordingly
Fix example issue showed in the log when IO slave is not configured correctly
Fix conflicts while merging from origin/master
Fix errors handling in modbus controller interface + some final corrections according to review
Update maximum allowed number of slaves in the network segment
Fix bug with incorrect coils read mask
Closes https://github.com/espressif/esp-idf/issues/858
This MR removes the common dependency from every IDF components to the SOC component.
Currently, in the ``idf_functions.cmake`` script, we include the header path of SOC component by default for all components.
But for better code organization (or maybe also benifits to the compiling speed), we may remove the dependency to SOC components for most components except the driver and kernel related components.
In CMAKE, we have two kinds of header visibilities (set by include path visibility):
(Assume component A --(depends on)--> B, B is the current component)
1. public (``COMPONENT_ADD_INCLUDEDIRS``): means this path is visible to other depending components (A) (visible to A and B)
2. private (``COMPONENT_PRIV_INCLUDEDIRS``): means this path is only visible to source files inside the component (visible to B only)
and we have two kinds of depending ways:
(Assume component A --(depends on)--> B --(depends on)--> C, B is the current component)
1. public (```COMPONENT_REQUIRES```): means B can access to public include path of C. All other components rely on you (A) will also be available for the public headers. (visible to A, B)
2. private (``COMPONENT_PRIV_REQUIRES``): means B can access to public include path of C, but don't propagate this relation to other components (A). (visible to B)
1. remove the common requirement in ``idf_functions.cmake``, this makes the SOC components invisible to all other components by default.
2. if a component (for example, DRIVER) really needs the dependency to SOC, add a private dependency to SOC for it.
3. some other components that don't really depends on the SOC may still meet some errors saying "can't find header soc/...", this is because it's depended component (DRIVER) incorrectly include the header of SOC in its public headers. Moving all this kind of #include into source files, or private headers
4. Fix the include requirements for some file which miss sufficient #include directives. (Previously they include some headers by the long long long header include link)
This is a breaking change. Previous code may depends on the long include chain.
You may need to include the following headers for some files after this commit:
- soc/soc.h
- soc/soc_memory_layout.h
- driver/gpio.h
- esp_sleep.h
The major broken include chain includes:
1. esp_system.h no longer includes esp_sleep.h. The latter includes driver/gpio.h and driver/touch_pad.h.
2. ets_sys.h no longer includes soc/soc.h
3. freertos/portmacro.h no longer includes soc/soc_memory_layout.h
some peripheral headers no longer includes their hw related headers, e.g. rom/gpio.h no longer includes soc/gpio_pins.h and soc/gpio_reg.h
BREAKING CHANGE
Removed all other instances of call to esp_wifi_init(), because every time this is called it
will override its previously set default event handler and hence cause numerous warnings.
Also, call nvs_flash_init() only once, that is before calling esp_wifi_init() in main function
incorrect set of the MB_EVENT_COILS_WR event is changed while read coils in mbcontroller.c file
added read/write handling for appropriate registers in freemodbus.c example file
Closes https://github.com/espressif/esp-idf/issues/3289
1. Add more notification events to the enum according to the event list in AVRCP specification.
2. Add API and callback events for basic AVRCP target functionalities to do init, deinit, callback-registration, connection status indication.
3. Implement API to set/get supported PASSTHROUGH command on local AVRCP TG, implement callback events for remote passthrough command indication.
4. Implement API to set/get supported notification eventIDs on local AVRCP TG, implement API to send event notifications to remote CT. \
Currently supported event in TG only includes ESP_AVRC_RN_VOLUME_CHANGE(0xd), which can be extended in later commits.
5. Implement callback events for SetAbsoluteVolume command indication on TG.
6. Add limitation of event_ids supported in RegisterNotification command in CT. The supported event_ids include: \
ESP_AVRC_RN_PLAY_STATUS_CHANGE(0x1), ESP_AVRC_RN_TRACK_CHANGE(0x2), ESP_AVRC_RN_PLAY_POS_CHANGE(0x5), ESP_AVRC_RN_VOLUME_CHANGE(0xd).
7. Add feature bit mask in parameter of callback event ESP_AVRC_CT_REMOTE_FEATURES_EVT for peer feature information got from SDP.
8. Add API and callback event to AVRCP CT to retrieve remote TG's supported notification event capabilities.
9. Modify data type for parameter of callback event ESP_AVRC_CT_CHANGE_NOTIFY_EVT.
10. Change AVRCP version from 1.3 to 1.4 for compatibility cause in using AbsoluteVolume feature.
11. Modify local AVRCP device to be category 1 as CT and category 2 as TG that applies to bluetooth headphones or speakers.
12. Update the use of AVRCP APIs and events in the two examples: a2dp_sink and a2dp_gatts_coex, which include the demo of volume control and notification.
testing conditions:
transports (tcp, ssl, ws..)
qos (0, 1, 2)
short repeated messages (packed packets)
oversized messages (fragmented packets)
publish from a different thread
Closes https://github.com/espressif/esp-idf/issues/2870 by means of including commit 815623dfe5a0e41fa0e51ab4e336feb3eaa5ba15 from esp-mqtt
Closes https://github.com/espressif/esp-idf/issues/2975 by means of including commit 752953dc3be007cca4255b66a35d3087e61f6a54 from esp-mqtt
Closes https://github.com/espressif/esp-idf/issues/2850 by means of including commits df455d2a5fe562dd1b8351da99a1d6d82b66eff3 17fd713bced4f2d00df7ed664ed82a7d108ab317 from esp-mqtt
1. separate rom include files and linkscript to esp_rom
2. modefiy "include rom/xxx.h" to "include esp32/rom/xxx.h"
3. Forward compatible
4. update mqtt
This takes the code up to the latest released version of libcoap.
As there have been API changes, coap_client and coap_server in
examples/protocols have been updated to use the new APIs.
Further information on the new libcoap APIs can be found at
https://libcoap.net/doc/reference/4.2.0/
coap_client has been updated to handle BLOCK2 responses from
"coap://californium.eclipse.org"
coap_client has been modified to only send out one request (and wait for
the response)
coap_server has been updated to support Observe subscriptions, and well as
adding in PUT and DELETE handlers to work on the Espressif resource
coap_server and coap_client have had their stack sizes increased.
port/coap_io.c has been added, a copy of libcoap/src/coap_io.c with support
added for systems that do not have RFC 3542 section 20 support.
port/coap_io_socket.c has been removed as a lot of the code is now
replicated in different libcoap files.
Once this PR is place, then adding in DTLS will be a lot simpler (as a
separate PR)
Signed-off-by: Jitin George <jitin@espressif.com>
Merges https://github.com/espressif/esp-idf/pull/3148
newlib uses significantly more stack space when printing to an
unbuffered stream. To reduce the amount of stack space required to
use the console, don’t disable buffering. linenoise should support
unbuffered stdout instead.
The current API is insufficient to allow the users to set different combinations of connection and discoverable mode
Users should be able to choose the device modes independently:
1. Connectable-
i. Non-connectable mode
ii. Connectable mode
2. Discoverable-
i. Non-discoverable mode
ii. Limited discoverable mode
iii. General discoverable mode
1. Fix wrong timeout setting in join command, also alter the default timeout value to 10 seconds
2. Don't clear the CONNECTED_BIT when connected to AP.
The following commit adds a real time stats example demonstrating how to
obtain task CPU usage statistics over a period of time, as opposed to the current
run time stats in FreeRTOS which measures task CPU usage as a percentage of
total system run time.
This commits adds the functions can_clear_transmit_queue() and
can_clear_receive_queue(). Closes#2906
The following bug are fixed:
- CAN_IO_UNUSED is now explicitly cast to enum type. Closes#2825
- Fix multiple documentation errors. Closes#2898, Closes#2794
- can_reconfigure_alerts() returns incorrect current_alerts. Closes#3028
- Add missing header file. Closes#3065
Note : Examples have been updated to prevent invocation of bluedroid/wifi APIs from inside timer callback when stopping provisioning. Workaround is to spawn new task from inside the timer callback.
Added:
* set a secure version in app/bootloader.
* description anti-rollback to ota part
* emulate the secure_version write and read operations
* efuse_em partition.
* a description about a rollback for native_ota_example.
Closes: TW26335
1. Cleanup the README of app_trace_to_host example based on the template.
2. Remove unused header files in the example.
3. Fix typos in public header file.
Test services may cause confussion (and did cause some GitHub/forum issues). This update runs test services only when example executed in ci. Also host name is a simple config entry if executed outside of ci.
Originally, when doing BLE active scan, Bluedroid will not report adv to
application layer until receive scan response. This option is used to
disable the behavior. When enable this option, Bluedroid will report
adv data or scan response to application layer immediately.
1. add support for ESP32 DTE
2. add support for SIM800/BG96 DCE
3. add PPPoS setup procedure
4. add support for SMS
5. add mqtt example after PPP connection established
1. detect and fix root conflicts when router BSSID is not set.
2. when root can not connect to the router due to NO_MORE_STAS(reason code:5), root will stop re-connection and perform MESH_NWK_LOOK_FOR_NETWORK.
3. wifi: fix the disconnection caused by receiving a deauth frame from non-parent node during scanning.
4. fix routing table redundant issue.
5. modify the max routes limitation from 300 to 1000.
6. wifi: fix ap does not deauth sta which has not completed the 4-way handshake.
esp-idf/components/freemodbus/modbus_controller/modbus_controller.c: The MB_INST_MAX_SIZE is changed to max value=(65535*2);
Update support for coils read into freemodbus.c;
TW#28143
Closes https://github.com/espressif/esp-idf/issues/2884
1. when no parent is found, send probe request via broadcast.
2. fix memory leak caused by the remove announcement being sent is not released when esp_mesh_stop() is called.
3. fix modify IE encrypt after mesh is started.
4. ignore esp_mesh_connect() if mesh automatic reconnection is enabled.
5. fix reason is cleared before vote is done.
Update freemodbus component file esp-idf/components/freemodbus/port/portserial.c to remove UART mode settings;
Move UART mode settings into esp-idf/examples/protocols/modbus_slave/main/freemodbus.c
Move UART pin settings from Component config into example Kconfig.projbuild file
Move setup of UART port pins from freemodbus component into example file
TW#27721
Closes https://github.com/espressif/esp-idf/issues/2784#issuecomment-443600157
1. add network channel switch function.
- users can obtain the new channel through the event MESH_EVENT_CHANNEL_SWITCH.
- the entire network will be moved to the same channel as the router without user intervention.
- if no router is in the network, users can call esp_mesh_switch_channel() on the root side to
move the entire network to their desired channel.
2. support not configuring the network channel.
3. support not configuring the router BSSID even if the router is hidden.
4. add allow_channel_switch to mesh configuration.
- if the channel is not specified, this value will be ignored.
- if the channel is specified and this value is set, when "fail" (mesh_attempts_t) times of parent selection
or look for networks are reached, device will change to perform a full channel scan for networks that could join.
- if the channel is specified and this value is set to 0, when a root is not elected, channel switch is not allowed.
but when a root appears, the root performs a full channel scan during the process of connecting to the router,
so even allow_channel_switch is set to 0, the root may still switch channel and eventually the entire network
changes channel.
5. add allow_router_switch to mesh router configuration.
- if the BSSID of router is not specified, this value will be ignored.
- if the BSSID of router is specified and this value is set, when the router of this specified BSSID fails to be found
after "fail" (mesh_attempts_t) times, the entire network is allowed to switch to another router with the same SSID.
6. modify the root to perform a full channel scan when esp_wifi_connect().
7. support handling beacon without DS Paramter Set.
This example adds functionality to support basic communication in RS485 networks using Modbus protocol.
This example uses FreeModbus stack and regular UART driver API to communicate in RS485 half duplex mode.
Added initial support of modbus controller pure C api to access device parameters over Modbus transport.
Move freemodbus stack and port files into components folder
Move the modbus_controller interface into components idf folder
Source files updated after review.
Add modbus interface documentation docs/en/api-reference/protocols/modbus.rst
porttimer.c: fix bug with timer1 selected in the Kconfig
Add support of cmake system (added cmake files)
Closes https://github.com/espressif/esp-idf/issues/858
1. Add command for Ethernet based on console component.
2. Make cmd_system and iperf a component that can be referenced by other examples
3. Add "version" command to cmd_system.c
4. Clean up the README.md in all ethernet examples[TW#26525]
* 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>
1. suppport mesh type, mesh ID, router and IE crypt func&key at any time after mesh is initalized.
2. support modify parent at any time after mesh is configured.
3. modify manual networking example.
4. update header file.
5. fix issues in root conflicts handling.
6. add max length of beacon to menuconfig.
7. fix issue when received a beacon without DSSS.
added docs and tests for mqtt library, small fixes (removed warnings, option for custom outbox, websocket bug fixed for longer transports). refactored to use common tcp_transport component, support for CMake build system.
Closes#2108
* Fixed regex constraints for parsing IP and other parameters from monitor log.
* httplib connection timeouts set
* Redundent tests (commented out earlier) have been removed from advanced_tests. These tests are already run during unit testing.
This commit does the following
- Add power management lock to CAN driver so that APB frequency does not change
whilst CAN driver is in use
- Fix incorrect flag in can_transmit()
- Refactor can_driver_install() and can_driver_uninstall() so that critical sections
are shorter
- Fix CAN gpio configuration bug on RX pin. Closes#2302
- Add docs about multiple ID configuration and fix example links
This introduces the following changes in the example test scripts :
* Dependency on python requests library removed in favor of httplib
* Bug fixed in the logic responsible for receiving and processing http chunked responses
* Default timeouts increased Note : Due to connectivity issues (between runner host and DUT) in the runner environment, some of the advanced_tests are being ignored. These tests are intended for verifying the expected limits of the http_server capabilities, and implement sending and receiving of large HTTP packets and malformed requests, running multiple parallel sessions, etc. It is advised that all these tests be run locally, when making changes or adding new features to this component.