Commit Graph

225 Commits

Author SHA1 Message Date
xueyunfei
841339c012 fix(dhcp server):dhcp server can not restore address pool 2023-12-07 15:18:45 +08:00
xueyunfei
30ecc4ce72 Fix(dhcps):fix dhcp subnet option api dos not work issue 2023-11-16 20:17:42 +08:00
Xue Yun Fei
e64712b263 Merge branch 'lost_timer_failed_to_start_when_sta_is_connected' into 'master'
esp-netif:lost timer failed to start when sta is disconnected

Closes WIFI-5984

See merge request espressif/esp-idf!24076
2023-10-19 14:12:17 +08:00
Zhang Xiao Yan
dffe28b787 Merge branch 'docs/add_parameter_description_to_esp_netif' into 'master'
docs: add parameter description to esp_netif.h

See merge request espressif/esp-idf!26487
2023-10-19 10:52:51 +08:00
Zim Kalinowski
fa1a3ce0b5 Merge branch 'refactor/components_linux_compatible' into 'master'
Exclude all currently incompatible components from Linux build

Closes IDF-8318 and IDF-5996

See merge request espressif/esp-idf!25598
2023-10-18 20:17:49 +08:00
David Čermák
210f757835 Merge branch 'fix/esp_netif_lock' into 'master'
fix(esp_netif): Lock netif list with TCPIP context

Closes IDFGH-11088

See merge request espressif/esp-idf!26164
2023-10-17 21:36:39 +08:00
Linda
6c86424772 docs: add parameter description to esp_netif.h 2023-10-17 10:35:39 +08:00
Jakob Hasse
548022fbe6 refactor(linux): excluded all non-Linux components from build
* All components which won't build (yet) on Linux are excluded.
  This enables switching to Linux in an application without
  explicitly setting COMPONENTS to main in the main
  CMakeLists.txt.
* ESP Timer provides headers for Linux now
* automatically disabling LWIP in Kconfig if it is not available

doc(linux): brought section
  "Component Linux/Mock Support Overview" up to date
2023-10-16 17:06:54 +08:00
David Cermak
88d18e9a40 fix(esp_netif): Mark esp_netif_next deprecated and fix usages
* Uses netif_find_if() in IPv6 examples
* Fixes esp_netif_next() usage in L2TAP
2023-10-13 15:56:45 +02:00
David Cermak
606363897c feat(esp_netif): Added new API to search in netif list 2023-10-13 15:56:30 +02:00
David Cermak
36735f4d77 fix(esp_netif): Lock netif list with TCPIP context
This commit removes the lock from the list manipulation code in esp_netif_objects.c,
 because we already have another lock/task context for lwip.
So the list manipulation is unsafe and safety must be assured by the stack layer
(in esp_netif_lwip).
Problems with current locking:
* implementation of locking was wrong -- lazy init style of creating the mutex is not
  thread safe (and destroying it if we have no interface makes the problem exhibit very frequently)
* locking only the list won't solve issues when assessing interfaces atomically
* maintaining multiple locks is problematic, as we often switch between
lwip context and user context in internal implementation of esp_netif_lwip

Closes https://github.com/espressif/esp-idf/issues/12261
2023-10-13 15:54:53 +02:00
xueyunfei
e9949d4782 lost timer failed to start when sta is connected 2023-10-09 02:14:25 +00:00
David Cermak
10a5fcf99e feat(esp_netif): PPP: Use RAM allocated pbufs instead of POOL (fixed size)
PPP netif: Used allocated packet buffers of exact size
for input to TCP/IP stack to consume less memory in download mode
(compared to the previously used fixed sized packet buffers)
2023-09-25 16:48:48 +02:00
David Cermak
966b8620c2 feat(esp_netif): PPP config option to allow disabling LCP runtime
If LCP keepalive mechanism is enabled in menuconfig, it's statically
configured on creation of an interface and cannot be changed runtime. In
some cases it's useful to relax LCP criteria during runtime operation,
for example before initiating OTA. This config option allows for
disabling already enabled LCP echo (this setting becomes effective after
reconnecting, i.e. initializing a new session)

Closes https://github.com/espressif/esp-protocols/issues/287
2023-09-25 16:48:48 +02:00
Chen Yudong
2e11919f70 fix(ci): change build-test-rules files folder 2023-09-20 19:17:06 +08:00
Darian Leung
287bdc5e61 fix(test_apps): Trim builds of component test apps
Some component test apps do not use the "set(COMPONENTS main)" command in their
project level "CMakeLists.txt", thus leading to their builds pulling in all
ESP-IDF components.

This commit trims the build of multiple component test apps:

- Add "set(COMPONENTS main ...)" to project level "CMakeLists.txt"
- Add missing "PRIV_REQUIRES" in some "main" component "CMakeLists.txt"

Also removed repeated configuraiton options in legacy_i2c_driver/sdkconfig.ci.defaults
as they are already specified in legacy_i2c_driver/sdkconfig.defaults
2023-09-18 17:16:37 +08:00
xueyunfei
fff7c6a399 fix(dhcp server):fix set dhcp server poll fail issue 2023-09-13 10:20:02 +08:00
Armando
7dbd3f6909 feat(ci): Enable p4 example, test_apps and unit tests CI build 2023-08-24 12:51:19 +08:00
David Cermak
ca44460359 esp_netif: Fix Wno-format issues 2023-08-14 14:13:33 +02:00
David Čermák
70951831c0 Merge branch 'bugfix/netif_default_sta_init' into 'master'
wifi: Fix default wifi-netif creation to assert if no event loop

Closes IDFGH-10321

See merge request espressif/esp-idf!24361
2023-07-21 21:56:37 +08:00
David Cermak
20fcc23f88 fix(wifi): Fix default wifi-netif creation to assert if no event loop
- Added ESP_ERROR_CHECK() checks to `esp_wifi_set_default_wifi_..._handlers()` calls
- Added ESP_ERROR_CHECH() to `esp_netif_attach_wifi_...()` calls
- Updated documentation to reflect the changes

Closes https://github.com/espressif/esp-idf/issues/11580
2023-07-10 16:56:16 +02:00
Ondrej Kosta
3288f83401 feat(network/examples): extended LwIP bridge example
Extended LwIP bridge example to support WiFi AP interface and DHCP Server

https://github.com/espressif/esp-idf/issues/5697
2023-06-30 14:38:24 +02:00
KonstantinKondrashov
e72061695e all: Removes unnecessary newline character in logs
Closes https://github.com/espressif/esp-idf/issues/11465
2023-06-09 03:31:21 +08:00
movsb
2ff12460dd fix(c++): invalid conversion from int to enumeration 2023-05-12 15:08:53 +08:00
David Cermak
7d6241e761 esp_netif: Make esp_netif_receive() return value configurable 2023-04-05 12:18:21 +02:00
David Cermak
8855ddf044 esp_netif: Report error if esp_netif_receive() fails
Closes https://github.com/espressif/esp-idf/issues/10770
2023-04-05 12:18:21 +02:00
Abhik Roy
8e71e96603 lwip/esp_napt: Added api to enable/disable napt based on esp_netif. 2023-03-23 20:38:03 +11:00
David Cermak
97e785c01d lwip:esp_netif: Send Periodic Gratuitous ARP only on valid IPv4
It was possible that the device would send a Gratuitous ARP before
acquiring a valid address, advertising it has 0.0.0.0 address.
2023-03-17 09:18:53 +01:00
Nachiket Kukade
4c76af3f68 esp_wifi: Add support for NAN Discovery and Datapath
Update wifi lib with below -
1. Create NAN Discovery SM for beaconing & cluster formation
2. Create NAN interface for Tx/Rx of beacons & action frames
3. Add commands & events for NAN Services Publish/Subscribe/Followup
4. Add NAN Datapath definitions, Events, Peer structures
5. Support for forming and parsing of Datapath related attributes
6. Modules for NDP Req, Resp, Confirm, Term, Peer management
7. NAN Interface related additions in Datapath, Data Tx Q's

In addition include below changes -
1. Add netif and driver support for NAN Interface
2. Add simple examples for Publisher-Subscriber usecases
3. Add an advanced console example that supports commands
   for NAN Discovery, Services & Datapath
4. Add wifi_apps for providing better NAN API's and Peer management

Co-authored-by: Shyamal Khachane <shyamal.khachane@espressif.com>
2023-03-10 11:18:23 +05:30
xueyunfei
ad0b32c662 lwip: solve some routers do not forward multicast packet issue 2023-03-08 16:58:29 +08:00
David Cermak
5f6cb31105 lwip: Support IPv6 only mode 2023-02-27 08:53:34 +01:00
Alexey Lapshin
85b48bfcc0 esp_netif: fix test_app_vfs_l2tap stack overflow 2023-02-22 05:33:03 +00:00
Kapil Gupta
30a2558450 esp_wifi: Merge wpa_supplicant and esp_wifi Kconfig 2023-02-11 07:38:45 +08:00
David Cermak
7ae58e223d esp_netif/tests: Consolidate test_apps/unit_test
* Remove duplicated test cases
* Migrated remaining unit tests to test_apps
2023-02-01 14:17:09 +01:00
David Cermak
fa97004faf lwip: Support for linux target
Implement linux port layer and reuse the original FreeRTOS layer
that's compiled and used on linux target as well, by means of FreeRTOS
simulator.
2023-01-31 08:43:45 +01:00
Abhik Roy
9cf70e0c98 Merge branch 'lwip/restrict_dhcp_server_client_together' into 'master'
esp-lwip: Restrict configuring DHCP server and client together

See merge request espressif/esp-idf!22137
2023-01-27 22:36:30 +08:00
Abhik Roy
d762f9a1a5 esp-lwip: Added check in esp_netif_new() to restrict configuring DHCP
server and client together.
2023-01-26 20:59:04 +05:30
Abhik Roy
7e81518a57 esp-lwip: Added API to expose default esp-netif. 2023-01-25 12:03:02 +05:30
David Čermák
2f1d30d155 Merge branch 'bugfix/lwip_core_locking' into 'master'
esp_netif/lwip: Fix core-locking config

Closes IDFGH-8445, IDFGH-9098, and IDFGH-9063

See merge request espressif/esp-idf!20840
2023-01-18 20:31:25 +08:00
David Cermak
a71fa82177 esp_netif/lwip: Fix core-locking config
* Fix thread safety issues in non-core locking
* Add option to verify thread safety issues in lwip (core-lock assertion)
* Make esp_sntp.h thread safe API
* Fix sntp examples
* Fix openthread libs

Closes https://github.com/espressif/esp-idf/issues/9908
Closes https://github.com/espressif/esp-idf/issues/10502
Closes https://github.com/espressif/esp-idf/issues/10466
2023-01-17 16:15:58 +01:00
Cao Sen Miao
94120b82c2 esp32h2: add build test 2023-01-17 10:29:04 +08:00
David Cermak
d16c422b11 esp_netif: Allow set_dns_info() for PPP netifs
esp_netif_set_dns_info() was available only for standard interfaces, not
for Point to point types (PPP, SLIP), but it should be normally
supported. Moreover DNS servers are global in lwip, so it doesn't really
depend on type of the interface.

Also added some minor fixes to the esp_netif_get_dns_info() to allow for
NULL parameters (as it's a public API) and hardcode the IPv4 type in
case of DHCP server capable interface.

Updated logs and added error checks to the original API, before we
launch the lwIP counterpart.

Closes https://github.com/espressif/esp-idf/issues/8648
2023-01-13 10:31:28 +00:00
David Čermák
c498017df6 Merge branch 'unit_test_for_C2_netif' into 'master'
lwip: Re-enable esp-netif unit tests for ESP32C2 target

See merge request espressif/esp-idf!21372
2023-01-05 18:56:23 +08:00
David Čermák
bef3f2ce9e Merge branch 'bugfix/esp_netif_ip_reconnect' into 'master'
esp_netif: Post IP event for PPP netifs unconditionally

Closes IDFGH-8893 and IDFGH-8899

See merge request espressif/esp-idf!21666
2023-01-03 01:10:07 +08:00
David Cermak
12fd9029bf esp_netif: Post IP event for PPP netifs unconditionally
IP update notification for "point to point" interfaces is performed
via the same callback function as for any other interfaces (dhcp_cb,
although it's not DHCP related). In P2P interfaces we have to assure
that we always get a notification, so we can set the interface up.
This was omitted when getting the same IP address for the second
time, causing the PPPoS interface (in esp-modem applications) failing
to reconnect if disconnected.

Closes https://github.com/espressif/esp-idf/issues/10308
Closes https://github.com/espressif/esp-protocols/issues/188
2022-12-16 18:07:32 +01:00
David Cermak
38dec0be48 esp-netif: Support non-lwip mode, add test
It is required to define a mandatory dependency on lwip, so we
introduced esp_netif_stack component and made it require lwip, instead
of directly depending on lwip.
This enables building w-out lwip and support other TCP/IP stacks.
2022-12-14 14:12:50 +00:00
David Cermak
678d7aadd9 esp-netif/lwip: Introduce TCP/IP stack has BSD API
* This variable is automatically selected when lwip stack is chosen
* This commit also fixes lwip loopback configuration
2022-12-14 14:12:50 +00:00
David Cermak
fab39d2c4b esp_netif: Make GARP default netif flags only if enabled in lwip
Closes https://github.com/espressif/esp-idf/issues/8641
2022-12-14 14:12:50 +00:00
David Cermak
0309e0eb03 ci/esp-netif: Update build/test rules for netif tests 2022-12-14 14:12:50 +00:00
AndriiFilippov
4417d49333 Re-enable esp-netif unit tests for ESP32C2 target 2022-12-14 14:07:28 +01:00