Commit graph

5100 commits

Author SHA1 Message Date
Angus Gratton 6fbf2675e6 esp_tls: Make cacert_pem_bytes field a mutable integer
Ref https://esp32.com/viewtopic.php?f=2&t=9737&p=40278#p40277
2019-03-18 23:17:02 +00:00
Jiang Jiang Jian 044cadbad3 Merge branch 'bugfix/mdns_add_remove_multiple_srv_3.1' into 'release/v3.1'
mdns: fix possible crash if tx packet contained answer to removed service (backport 3.1)

See merge request idf/esp-idf!4482
2019-03-17 14:34:49 +08:00
Jiang Jiang Jian dda1af6e55 Merge branch 'bugfix/mdns_service_memory_leak_3.1' into 'release/v3.1'
mdns: fix memory leak when query for service plus various other fixes (Backport v3.1)

See merge request idf/esp-idf!4313
2019-03-17 14:28:35 +08:00
Jiang Jiang Jian cea8c51527 Merge branch 'bugfix/cmake_psram_fix_flag_v3.1' into 'release/v3.1'
cmake: Fix psram workaround compiler flag application (backport v3.1)

See merge request idf/esp-idf!4365
2019-03-15 10:57:49 +08:00
David Cermak d5938abf79 mdns: fix possible crash when probing on particular interface with duplicated service instances due to naming conflicts on network
Issue: MDNS server initially sends probing packets to resolve naming confilicts with already registered service instances. In case of a conflict, instance name is altered and probing restarts. Original instance however wasnnot removed from the structure and upon service removal only one entry was removed and a dangling service might have been kept in the structure to bring about a crash.
Resolution: Keep only one instance of a service in the probing structure.
2019-03-13 16:33:21 +01:00
David Cermak 58ed22461f mdns: enable pcbs before starting service thread to avoid updating pcb's internal variables from concurent tasks
possible race condition: user task runs mdns_init, which enables pcbs while mdns-task already created could execute enable/disable of the same pcbs if an appropriate system event received
2019-03-13 16:32:50 +01:00
David Cermak ed84e5aef3 mdns: fix possible deadlock on mdns deinit calling mdns_free()
mnds_free() initiates stop and delete timer tasks, which after locking the mutex could lead to a dead lock in case timer task executed before deleting the task, as it would wait indefinitelly for unlocking the mutex. This condition is fixed by calling _mdns_stop_timer without locking the mutex, because there's no need to protect any data when stopping and deleting the timer task
2019-03-13 16:32:59 +01:00
David Cermak f8310c4a67 mdsn: fix race condition in updating packet data from user task when failed to allocate or queue a new service
Issue: mdns_service_add API allocates and queues an action to be processed in mdns task context; when allocation or queueing fails, allocated structure needs to be freed. Function _mdns_free_service did not only fee all the structures, but also updates packet data.
Resolution: Moved removal of packet data outside of _mdns_free_service function.
2019-03-13 16:32:50 +01:00
David Cermak 03006a109b mdns: fix possible crash when packet scheduled to transmit contained service which might have been already removed
packets scheduled to transmit are pushed to action queue and removed from tx_queue_head structure, which is searched for all remaining services and while service is removed, then service questions/asnwers are also removed from this structure. This update fixes possible crash when packet is pushed to action queue, and when service is removed, its answers are removed from tx_queue_head, but not from action queue. this could lead to a crash when the packet is poped from action queue containing questions/answers to already removed (freed) service
2019-03-13 16:32:50 +01:00
zhiweijian 3d542b2530 Component/bt: add BLE adv report flow control 2019-03-12 15:15:21 +08:00
zwj 9f3bde6096 component/bt: add vendor hci cmd 2019-03-12 14:54:53 +08:00
Angus Gratton e4d61154f2 cmake: Fix psram workaround compiler flag application
Previously, this compiler flag was not being applied
regardless of CONFIG_SPIRAM_CACHE_WORKAROUND setting.

Explanation: add_compile_options() only applies to
source files added after the function is run, or in
subdirectories added after the function is run. In
this case, no new source files were being added after
this function was run.
2019-03-11 16:02:36 +11:00
xiehang f2f9d92131 fix the bug in auto Ip memory leak 2019-03-06 21:07:22 +08:00
xiehang 4c248f40aa fix the bug in auto Ip memory leak 2019-03-06 19:51:01 +08:00
David Cermak b92def7b01 mdns: fix memory leak in pbuf if tcpipadapter failed to get netif 2019-03-06 06:28:55 +00:00
David Cermak 94defe35cc mdns: fix malfuctional query_txt
when running a query for a single txt, result entries were not created and attached to result structure. this issue was introduced when fixing memory leak in txt structure, which worked correctly for PTR queries, but caused trouble for TXT query.
2019-03-06 06:28:55 +00:00
David Cermak 0b48653ed0 mdns: fix possible crash when mdns_free called while action queue not empty 2019-03-06 06:28:55 +00:00
David Cermak 1ce0434373 mdns: fix memory leak when query for service receives multiple ptr entries for one instance
fixes redmine issue 27300
2019-03-06 06:28:55 +00:00
Jiang Jiang Jian bc58f4b9ba Merge branch 'bugfix/cmake_stack_protector_v3.1' into 'release/v3.1'
esp32: disable stack protector for startup code (CMake) (backport v3.1)

See merge request idf/esp-idf!4251
2019-03-06 14:19:52 +08:00
Jiang Jiang Jian 2c3af8a18e Merge branch 'bugfix/fix_dig_gpio_unable_hold_bug_v3.1' into 'release/v3.1'
Bugfix/fix digital gpio unable hold bug  (backport v3.1)

See merge request idf/esp-idf!4354
2019-03-06 14:19:16 +08:00
Jiang Jiang Jian 39c6b2f904 Merge branch 'bugfix/btdm_fix_iOS_and_win10_compatibility_error_for_HID_v3.1' into 'release/v3.1'
Component/bt: fix iOS and win10 compatibility error  for HID (backport v3.1)

See merge request idf/esp-idf!4425
2019-03-06 14:12:31 +08:00
Ivan Grokhotkov e5b4d2e01a Merge branch 'bugfix/make_get_coreid_volatile_backport_v3.1' into 'release/v3.1'
freertos: Make xPortGetCoreID() volatile (backport v3.1)

See merge request idf/esp-idf!4378
2019-03-06 11:26:06 +08:00
kooho 3fc09372f1 driver(gpio): fixed digital gpio unable hold bug during deep-sleep for release/v3.1 . 2019-03-06 11:22:48 +08:00
Angus Gratton 6685ca4771 Merge branch 'feature/add_api_get_rmt_idle_level_v3.1' into 'release/v3.1'
Bugfix:  Fixed some RMT related issues (backport v3.1)

See merge request idf/esp-idf!4356
2019-03-06 10:39:42 +08:00
zhiweijian 1b5a77eba9 Component/bt: fix iOS and win10 compatibility error for HID 2019-03-05 20:00:18 +08:00
Ivan Grokhotkov 8fffb9d172 esp32: disable stack protector for startup code (CMake)
Files where stack protector is initialized should not be compiled with
stack protector enabled. This was done for Make but missing for CMake.

Fixes https://github.com/espressif/esp-idf/issues/2990.
2019-03-05 07:11:57 +00:00
Jiang Jiang Jian 62444346c1 Merge branch 'bugfix/fix_some_wifi_bugs_0301_v3.1' into 'release/v3.1'
esp32: fix some WiFi bugs (backport v3.1)

See merge request idf/esp-idf!4401
2019-03-05 10:33:24 +08:00
Darian Leung 4c4acd8d2f freertos: Make xPortGetCoreID() volatile
When xPortGetCoreID() is called twice within a function,
it might only be called once after compilation. This
commit makes the inline assembly of the function volatile.

Closes #3093
2019-03-01 10:49:58 +00:00
Jiang Jiang Jian 7e5ac34be7 Merge branch 'bugfix/wifi_modify_wifi_kconfig_v3.1' into 'release/v3.1'
esp32: modify WiFi Kconfig in order to achieve better compatility and performance (bakcport v3.1)

See merge request idf/esp-idf!4385
2019-03-01 18:46:36 +08:00
Jiang Jiang Jian 887ff7d685 Merge branch 'bugfix/multiple_backports_v3.1' into 'release/v3.1'
multiple backports (v3.1)

See merge request idf/esp-idf!4376
2019-03-01 18:46:10 +08:00
Jiang Jiang Jian 43dc03659e Merge branch 'bugfix/ble_reconn_rescan_readv_crash_v3.1' into 'release/v3.1'
component/bt : fix bug that there's low ratio crash when BLE do re-connect/re-scan/re-adv

See merge request idf/esp-idf!4327
2019-03-01 18:05:54 +08:00
Liu Zhi Fu 863da69c5b esp32: fix some WiFi bugs
Fix following WiFi bugs:
1. Fix the bug that STA incorrectly deletes BA when receiving DelBA request
2. Add out of memory check
3. Fix the bug that STA incorrectly receives packets when scanning in connected status
2019-03-01 12:50:39 +08:00
Ivan Grokhotkov 4e55490602 nvs: add a blob fragmentation test case
Ref. TW12937
2019-02-28 21:58:03 +08:00
Ivan Grokhotkov 7ee102a9f6 nvs: do eager cleanup of HashListBlocks
Previously when HashList was removing items, HashListBlocks were
removed lazily. This resulted in empty HashListBlocks dangling around
in full pages, even when all items have been erased. These blocks
would only be deleted when NVS was re-initialized
(nvs_flash_deinit/nvs_flash_init).

This change does eager cleanup instead, based on the code from
@negativekelvin offered in
https://github.com/espressif/esp-idf/issues/1642#issuecomment-367227994.

Closes https://github.com/espressif/esp-idf/issues/1642.
2019-02-28 21:58:03 +08:00
Ivan Grokhotkov 70a9e72e06 esp_timer: fix occasional failures in "monotonic values" test
1. ref_clock used in unit tests occasionally produces time off by ~100
microseconds shortly after being started. Add a delay to let
ref_clock stabilise, until the cause is found.

2. Reduce roundoff error accumulation which would occasionally cause
the test to fail, by choosing an overflow value which can be divided
by APB frequency.

3. Move time sampling part of the test into an IRAM function to
reduce variations due to cache behavior.

4. Remove calculation of "standard deviation" in the test, as what was
calculated was not actually standard deviation, and it did not add any
useful information.
2019-02-28 21:58:03 +08:00
Ivan Grokhotkov 9cfd94a9d6 esp_timer: improve unit test robustness
1. call esp_timer_get_time and ref_clock_get in the same order on
   start and in the loop

2. disable interrupts when calculating delta between ref_clock
   and esp_timer

3. ensure both functions are in cache before calculating the delta
2019-02-28 21:58:03 +08:00
Ivan Grokhotkov 48416c38c8 soc: define named constants for DPORT_CPUPERIOD_SEL values 2019-02-28 21:58:03 +08:00
Ivan Grokhotkov beb8347faa bootloader: check previously used clock frequency at run time
In the situation when bootloader was compiled for 240MHz, and app was
compiled for 160MHz, and the chip is a revision 0 chip, the
bootloader will assume that the application has also been running at
240MHz. This will cause the chip to lock up later. Modify this to use
a run time check of DPORT_CPUPERIOD_SEL, which indicates which of the
PLL frequencies was used.

Closes https://github.com/espressif/esp-idf/issues/2731.
2019-02-28 21:58:03 +08:00
Ivan Grokhotkov 450118fdf8 soc/rtc_clk: don’t clear DPORT_CPUPERIOD_SEL when switching to XTAL
This is not necessary since RTC_CNTL_SOC_CLK_SEL is set before this.
2019-02-28 21:58:03 +08:00
Jiang Jiang Jian 2f14aeee00 Merge branch 'bugfix/fix_scan_bugs_and_alloc_eb_fail_v3.1' into 'release/v3.1'
wifi: fix scan bugs and alloc eb fail (backport v3.1)

See merge request idf/esp-idf!4389
2019-02-28 21:31:49 +08:00
Jiang Jiang Jian 42383518b8 Merge branch 'bugfix/enlarge_ethernet_stack_size_v3.1' into 'release/v3.1'
enlarge ethernet task stack size (backport v3.1)

See merge request idf/esp-idf!4369
2019-02-28 18:23:28 +08:00
zhangyanjiao fb15403515 wifi changes:
1. make menuconfig can set the WiFi mgmt short buffer num
2. fix several scan bugs
2019-02-28 15:40:56 +08:00
XiaXiaotian 8a20519222 esp32: modify WiFi Kconfig in order to achieve better compatility
and performance
2019-02-28 10:06:06 +08:00
Jiang Jiang Jian 98ed70cd91 Merge branch 'doc/btdm_modem_sleep_EVED_mode_for_v3.1' into 'release/v3.1'
doc/btdm_modem_sleep_EVED_mode_for_v3.1(backport v3.1)

See merge request idf/esp-idf!4361
2019-02-27 18:36:04 +08:00
morris ed1771c7cc ethernet: enlarge ethernet task stack size
1. In original driver, the stack size for emac driver task "emacT" is only 2048 Bytes, which also can not be changed by user.
2. Each time when invoking "emac_start" function, it will reset emac registers, the driver should reconfig some important registers again.

Closes https://github.com/espressif/esp-idf/issues/3025
2019-02-27 15:21:09 +08:00
wangmengyang 1bd674dc64 component/bt: add more information and description for bluetooth modem sleep
Add remark that "EVED" mode for bluetooth modem sleep is only used for internal test
2019-02-27 10:51:15 +08:00
Paul Abbott 285a0aa13c driver(rmt): Fixed some RMT related issues for release/v3.1.
1. Add missing get function to RMT API: rmt_get_idle_level().
2. Suppress error message from rmt_wait_tx_done() if wait_time==0 (allows for polling).
3. Remove the blank lines between parameter lists.

Merges https://github.com/espressif/esp-idf/pull/2666
2019-02-26 20:35:28 +08:00
Liu Zhi Fu a019517d07 esp32: make WiFi IRAM optimization configurable
With this feature, the WiFi IRAM optimization can be disabled/enabled via menuconfig.
2019-02-26 19:26:02 +08:00
Tian Hao f57d5db86d component/bt : fix bug that there's low ratio crash when BLE do re-connect/re-scan/re-adv
fix 3 bugs:
1. do BLE connect (both of slave and master), it mgiht cause crash due to there's much interrupts happens effect ble code running, for example, wifi run on the same core as bluetooth controller and wifi run throughtput test.
2. do BLE scan stop or adv stop or connection stop, it might cause ASSERT or crash due to memory corrupted in controller memory poll.
3. minor bug fix, not really effect bluetooth.
2019-02-25 13:41:51 +00:00
Jiang Jiang Jian 57118e2f10 Merge branch 'bugfix/btdm_backport_v3.1' into 'release/v3.1'
component/bt: backport some MRs to v3.1

See merge request idf/esp-idf!4312
2019-02-21 18:24:45 +08:00
Jiang Jiang Jian 03527e840c Merge branch 'bugfix/btdm_fix_connection_params_update_issues_v3.1' into 'release/v3.1'
component/bt:fix connection params update issues (backport v3.1)

See merge request idf/esp-idf!4298
2019-02-21 11:47:58 +08:00
zhiweijian 191cad0398 Component/bt: fix get attr value API error 2019-02-20 17:57:14 +08:00
zhiweijian 454268da00 Component/bt: fix ble cannot send or receive packet sometimes 2019-02-20 17:56:55 +08:00
zhiweijian 5e048a9ebb Component/bt: add scan window and interval check when set scan params 2019-02-20 17:56:36 +08:00
Jiang Jiang Jian ce83031571 Merge branch 'bugfix/mdns_crash_free_strdup_3.1' into 'release/v3.1'
mdns: fixed crash on free undefined ptr if strdup is skipped (Backport 3.1)

See merge request idf/esp-idf!4189
2019-02-20 02:15:51 +08:00
Jiang Jiang Jian 298aafd112 Merge branch 'bugfix/coex_lc_protect_v3.1' into 'release/v3.1'
component/esp32 : fix coexist lc protect cause memory corrupted

See merge request idf/esp-idf!4266
2019-02-20 02:11:29 +08:00
zwj f8f96c368b component/bt:fix connection params update issues 2019-02-19 20:43:28 +08:00
baohongde 6743820bce components/bt: Add precautions for esp_vhci_host_send_packet (backport 3.1) 2019-02-15 17:56:59 +08:00
baohongde 3e06ad6af9 components/bt: Fix crash when inquiry stop (backport 3.1) 2019-02-15 17:53:55 +08:00
Tian Hao 1c6b0bf925 component/esp32 : fix coexist lc protect cause memory corrupted
The bug will cause memory corrupted (the largest range is from 0x3ffc0000 ~ 0x3ffc8000),
some strange error will happen, like IllegalInstruction, LoadProhibited and .etc.
2019-02-15 16:13:30 +08:00
Jiang Jiang Jian ef2bf23862 Merge branch 'bugfix/fix_some_wifi_bugs_0131_v3.1' into 'release/v3.1'
esp32: fix some wifi bugs  (backport v3.1)

See merge request idf/esp-idf!4219
2019-02-15 12:15:04 +08:00
Angus Gratton cf5dbadf4f Merge branch 'bugfix/backtrace_from_interrupts_backport_v3.1' into 'release/v3.1'
Make backtrace work across interrupts (backport v3.1)

See merge request idf/esp-idf!4182
2019-02-13 16:53:39 +08:00
Angus Gratton 72c88db3a8 Merge branch 'fix/nvs_host_test' into 'release/v3.1'
Fix/nvs host test

See merge request idf/esp-idf!4223
2019-02-04 14:28:26 +08:00
Liu Zhi Fu be115ec3ab esp32: fix some WiFi bugs
Fix following WiFi bugs:
1. Fix a crash bug which is caused by WiFi static TX buffer alloc/free.
2. Fix the bug that iphone fails to connect to ESP32 AP by enabling AP BAR receiving.
3. Fix the bug that ESP32 station fails to connect some APs, such as Xiaomi hotspot etc,
   after reset.
2019-01-31 21:42:49 +08:00
Shivani Tipnis dbfe5b5886 Fix/Nvs host test extra argument passed
(cherry picked from commit 7b2cae15ba37420700d19fad55062dadc32241e5)
2019-01-31 18:47:07 +05:30
zhiweijian e94b130ede Component/bt: fix write char crash after disconnection 2019-01-31 12:22:10 +00:00
He Yin Ling 5412ccbcb1 Merge branch 'feature/add_ipv6_related_change_v3.1' into 'release/v3.1'
modify test case to support ipv6 (backport v3.1)

See merge request idf/esp-idf!4073
2019-01-31 14:31:26 +08:00
Darian Leung 2ccfa6bd44 freertos: Make backtrace work across interrupts (backport v3.1)
This commit adds the ability for backtracing to trace from the itnerrupt to the
task stack, and across nested interrupts. Test cases have also been added.

See merge request !4084
Note: "Test backtrace from abort" reset reason modified by removing abort as a reason.
2019-01-30 22:13:28 +08:00
Liu Zhi Fu 188f86e946 esp32: fix WPS thread-safe
Fix WPS thread-safe bug
2019-01-30 13:48:15 +08:00
David Cermak 31716a4960 mdns: fixed crash on free undefined ptr after skipped strdup
Shortcircuit evaluation may cause skip of _mdns_strdup_check of any further question field, which after clear_rx_packet freed undefined memory.
Fixes https://ezredmine.espressif.cn:8765/issues/28465
2019-01-29 19:27:46 +01:00
XiaXiaotian 10cac76d79 esp32: update libphy.a to fix interrupt watchdog when WiFi and BT run at
the same time and both enable modem sleep
2019-01-29 11:10:05 +08:00
huchaoru 778566042b modify test case to support ipv6 2019-01-26 13:07:06 +00:00
Jiang Jiang Jian 0e2eccfad0 Merge branch 'bugfix/btdm_fix_crash_adv_scan_coex_v3.1' into 'release/v3.1'
fix crash when adv and scan coex and optimize duplicate scan

See merge request idf/esp-idf!4147
2019-01-25 12:04:55 +08:00
Jiang Jiang Jian b26ded717f Merge branch 'bugfix/ble_active_scan_not_wait_scan_rsp_v3.1' into 'release/v3.1'
component/bt: add a option to make report adv data and scan response individually (backport v3.1)

See merge request idf/esp-idf!4132
2019-01-25 11:53:27 +08:00
Tian Hao 85825377c8 component/bt: add a option to make report adv data and scan response individually
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.
2019-01-24 18:45:57 +08:00
zhiweijian 10419b48bf fix crash when adv and scan coex and optimize duplicate scan 2019-01-24 17:29:44 +08:00
Angus Gratton fa8c79e0fe Merge branch 'bugfix/i2c_master_clear_bus_v3.1' into 'release/v3.1'
i2c/fix i2c_master_clear_bus (backport v3.1)

See merge request idf/esp-idf!4128
2019-01-24 14:53:00 +08:00
Jiang Jiang Jian c6750d271e Merge branch 'bugfix/bootloader_map_size_v3.1' into 'release/v3.1'
bootloader: fix incorrect mapping size (backport v3.1)

See merge request idf/esp-idf!4139
2019-01-24 14:09:58 +08:00
Jiang Jiang Jian 63a9054e5b Merge branch 'bugfix/sha_ownership_v3.1' into 'release/v3.1'
hwcrypto sha: Allow SHA contexts to be shared between tasks (backport v3.1)

See merge request idf/esp-idf!4144
2019-01-24 14:08:35 +08:00
Jiang Jiang Jian 9699ec9277 Merge branch 'bugfix/rom_export_functions_v3.1' into 'release/v3.1'
esp32, bootloader: fix issues related to linking order (backport v3.1)

See merge request idf/esp-idf!4135
2019-01-23 21:58:58 +08:00
Jiang Jiang Jian 15ac1d40fa Merge branch 'bugfix/vfs_unregister_nested_v3.1' into 'release/v3.1'
vfs: fix unregister removing top level VFS instead of nested (backport v3.1)

See merge request idf/esp-idf!4136
2019-01-23 21:54:04 +08:00
Angus Gratton 02668b62e8 hwcrypto sha: Use spinlocks instead of semaphores for small state changes
Significant performance improvement and smaller RAM footprint.
2019-01-23 18:18:38 +08:00
Angus Gratton 36b65c8498 hwcrypto sha: Allow SHA contexts to be shared between tasks
Previously, hardware SHA engine "locks" were mutex semaphores. This meant that the task which
started a particular SHA session (in hardware) needed to finalise that session, or an invalid
FreeRTOS state was created.

Replace with binary semaphore which can be shared between tasks.

Includes a unit test, but unit test doesn't crash even without this fix
(some other unknown condition is required).
2019-01-23 18:18:38 +08:00
Angus Gratton 91bc4ebb6c Update esptool.py to v2.6 2019-01-23 17:06:11 +08:00
Ivan Grokhotkov 205c484c49 bootloader: account for load address when mapping cache pages
Bootloader used to calculate the number of cache pages assuming that
load address was aligned, while in reality load address for DROM and
IROM was offset by 0x20 bytes from the start of 64kB page. This
caused the bootloader to map one less page if the size of the image
was 0x4..0x1c less than a multiple of 64kB.

Reported in https://esp32.com/viewtopic.php?f=13&t=6952.
2019-01-23 17:06:11 +08:00
Ivan Grokhotkov 60f4ccf303 bootloader: fix IROM and DROM swapped in log messages 2019-01-23 17:05:37 +08:00
Ivan Grokhotkov 1d0df04579 vfs: fix unregister removing top level VFS instead of nested
Credits @neoniousTR.

Fixes https://github.com/espressif/esp-idf/pull/2770
2019-01-23 16:28:09 +08:00
Ivan Grokhotkov 50d4ffd22e esp32: remove ROM functions redefined in IDF from LD script
In some cases, linker could choose to use ROM functions instead of the
ones defined in IDF.
For functions used in ROM stub table, this would lead to infinite
recursion when the corresponding function was called from ROM.
For crypto functions, some of these were modified in IDF, and
incompatible with ROM counterparts.
2019-01-23 16:26:14 +08:00
Ivan Grokhotkov 9845219a5f bootloader_support: exclude bootloader_init.c when building app
Depending on link order of libraries, bootloader implementation of
__assert_func could be linked instead of the one provided by newlib.
2019-01-23 16:26:14 +08:00
Ivan Grokhotkov b4939b1121 bootloader, esp32: add workaround for Tensilica erratum 572
If zero-overhead loop buffer is enabled, under certain rare conditions
when executing a zero-overhead loop, the CPU may attempt to execute an invalid instruction. Work around by disabling the buffer.
2019-01-23 16:23:08 +08:00
XiaXiaotian e444a31e79 esp32: fix invalid channel state information(CSI) data index
Due to a hardware limitation in ESP32, the first four bytes of some
    CSI data is invalid, not the last four bytes.

    Correct a mistake of CSI sub-carrier index in documentation.
2019-01-22 20:43:36 +08:00
Wangjialin c3bd2a7539 bugfix(i2c): reduce speed of I2C master bus reset routine and release SDA
closes https://github.com/espressif/esp-idf/issues/2494
closes https://github.com/espressif/esp-idf/pull/2493
closes https://github.com/espressif/esp-idf/pull/2496

1. Change bus reset to handle interrupted READ sequences.
2. Slow down I2C to 100khz during reset
3. If a SLAVE device was in a read operation when the bus was interrupted, the SLAVE device is controlling SDA.The only bit during the 9 clock cycles of a byte READ the MASTER(ESP32) is guaranteed control over, is during the ACK bit period.
If the SLAVE is sending a stream of ZERO bytes, it will only release SDA during the ACK bit period. The master(ESP32) cannot generate a STOP unless SDA is HIGH. So, this reset code synchronizes the bit stream with, Either, the ACK bit, Or a 1 bit.
2019-01-22 13:48:37 +08:00
chuck todd 3a9c713748 1. Slow down I2C to 100khz During Reset
I am stealing this delay coding from @jeremyherbert #2493 pr.

2. Change Bus Reset to handle interrupted READ sequences.

The current code does not handle interrupted READ cycles.

 If a SLAVE device was in a read operation when the bus was interrupted, the SLAVE device is controlling SDA.

The only bit during the 9 clock cycles of a byte READ the MASTER(ESP32) is guaranteed control over, is during the ACK bit period.

If the SLAVE is sending a stream of ZERO bytes, it will only release SDA during the ACK bit period. The master(ESP32) cannot generate a STOP unless SDA is HIGH.

So, this reset code synchronizes the bit stream with, Either, the ACK bit, Or a 1 bit.

3. fix typo

correct `sda_id` to `sda_io` in `i2c_master_clear_bus()` @ryan-ma found it.  This typo was generated when I manually edited this patch on GitHub, I should have done a Copy/Paste operation!
2019-01-22 13:48:23 +08:00
jeremy 6a63d0eeaf reduce speed of i2c master bus reset routine and release sda 2019-01-22 13:48:07 +08:00
Tian Hao 8ad6ba2436 Fix some bugs in phy
1. fix bug PHY/RTC functions called in ISR (update phy to v4007)
2. add UnitTest to test it
3. fix task watchdog bug when wifi change channel
4. disable/enable agc to mac deinit/init
5. add UnitTest Job
2019-01-16 22:23:04 +08:00
jack 126ade78d4 esp32: fix the incorrect tx complete state issue 2019-01-12 15:38:30 +08:00
Liu Zhi Fu fe05db83f1 esp32: fix wrongly deleting hardware BA index bug
Fix the bug that hardware BA index will be wrongly removed in
WiFi mode WIFI_MODE_APSTA.
2019-01-11 16:48:58 +08:00
Ivan Grokhotkov 7ce22b11bf Merge branch 'bugfix/mdns_udp_send_protected_backport3.1' into 'release/v3.1'
mdns networking udp send protected (Backport 3.1)

See merge request idf/esp-idf!4021
2019-01-11 15:36:57 +08:00
Ivan Grokhotkov b917fbe914 Merge branch 'bugfix/mdns_query_failed_after_init_v3.1' into 'release/v3.1'
Fixed: mdns query failed after init (Backport v3.1)

See merge request idf/esp-idf!3730
2019-01-11 11:26:28 +08:00
Ivan Grokhotkov beb80ffeeb Merge branch 'bugfix/mdns_crash_when_query_backport3.1' into 'release/v3.1'
mdns crash when query (backport 3.1)

See merge request idf/esp-idf!4019
2019-01-11 11:26:02 +08:00
XiaXiaotian 92a27d642b esp32: do defragmentation only for data and management frame
Check frame type before defragmentation. Only data and management frame can do
    defragmentation.
2019-01-10 14:07:11 +08:00
Jiang Jiang Jian 9bc10d9eda Merge branch 'bugfix/coex_unforce_wifi_if_no_data_buffered_in_beacon_v3.1' into 'release/v3.1'
esp32: unforce wifi if receiving beacon with no data buffered in dream (backport v3.1)

See merge request idf/esp-idf!4035
2019-01-09 17:06:11 +08:00
Jiang Jiang Jian 357239a20c Merge branch 'bugfix/btdm_fix_auth_mode_error_when_reconnection_in_smp_v3.1' into 'release/v3.1'
Component/bt: fix auth_mode error when reconnection in SMP(backport V3.1)

See merge request idf/esp-idf!3956
2019-01-09 13:57:07 +08:00
Jiang Jiang Jian 014b3c639f Merge branch 'bufix/btdm_fix_save_key_when_auth_mode_without_bond_v3.1' into 'release/v3.1'
Component/bt: fix save keys when auth mode without bond (backport v3.1)

See merge request idf/esp-idf!3958
2019-01-09 13:56:28 +08:00
Jiang Jiang Jian 505663cd6b Merge branch 'feature/illegal_instruction_panic_info_v3.1' into 'release/v3.1'
panic: dump some instruction memory on IllegalInstruction exception (backport v3.1)

See merge request idf/esp-idf!3959
2019-01-09 13:55:48 +08:00
Jiang Jiang Jian 2dc384198d Merge branch 'bugfix/btdm_modem_sleep_cowork_with_DFS_for_v3.1' into 'release/v3.1'
Bugfix/btdm modem sleep cowork with dfs for v3.1(backport v3.1)

See merge request idf/esp-idf!3964
2019-01-09 13:53:28 +08:00
Jiang Jiang Jian e1dcd81c18 Merge branch 'bugfix/btdm_fix_two_bugs_about_pairing_v3.1' into 'release/v3.1'
components/bt: Fix two bugs about pairing(backport 3.1)

See merge request idf/esp-idf!3996
2019-01-09 13:51:07 +08:00
Jiang Jiang Jian 9f653a9d9f Merge branch 'bugfix/ota_magic_byte_issue_v3.1' into 'release/v3.1'
Bugfix/ota magic byte issue v3.1 (backport v3.1)

See merge request idf/esp-idf!4003
2019-01-09 12:00:57 +08:00
Jiang Jiang Jian b0c389c450 Merge branch 'bugfix/fix_mbox_thread_safe_issue_v3.1' into 'release/v3.1'
fix mbox thread-safe issue (backport v3.1)

See merge request idf/esp-idf!4006
2019-01-09 11:23:21 +08:00
Jiang Jiang Jian cbd1e9fa35 Merge branch 'bugfix/fix_uart_read_bug_when_using_dual_core_v3.1' into 'release/v3.1'
driver(uart): fixed uart read error bug when using dual core  (backport v3.1)

See merge request idf/esp-idf!3814
2019-01-09 11:01:27 +08:00
Jiang Jiang Jian e105d23b51 Merge branch 'test/add_case_to_detect_ds2ds_issue_v3.1' into 'release/v3.1'
test: add test case to receive ds2ds packet (backport v3.1)

See merge request idf/esp-idf!3850
2019-01-09 10:57:26 +08:00
Jiang Jiang Jian 6cc626ab99 Merge branch 'bugfix/uart_select_buffer_v3.1' into 'release/v3.1'
VFS: select() on UART should return immediately when data is buffered (backport v3.1)

See merge request idf/esp-idf!3830
2019-01-09 10:54:16 +08:00
Jiang Jiang Jian e70fc19384 Merge branch 'bugfix/btdm_fix_accept_specified_sec_auth_v3.1' into 'release/v3.1'
Component/bt: fix accept specified sec auth error(backport V3.1)

See merge request idf/esp-idf!3837
2019-01-09 10:37:19 +08:00
Jiang Jiang Jian 935501896d Merge branch 'bugfix/btdm_fix_receive_adv_pkt_when_duplicate_scan_enabled_v3.1' into 'release/v3.1'
Component/bt: fix receive adv pkt when enable duplicate scan (backport v3.1)

See merge request idf/esp-idf!3943
2019-01-09 10:35:05 +08:00
Jiang Jiang Jian e690cfcbd7 Merge branch 'bugfix/bbpll_wakeup_reset_v3.1' into 'release/v3.1'
BBPLL reset fixes (backport v3.1)

See merge request idf/esp-idf!4013
2019-01-09 10:31:50 +08:00
XiaXiaotian 6f582fe71d esp32: unforce wifi if receiving beacon with no data buffered in dream
state and reduce force receiving broadcast data time

    1. If receiving beacon which indicates that there is no data
    buffered, do not force to receive WiFi data.
    2. If receiving beacon which indicates that there is broadcast data
    buffered, reduce the time to force receiving broadcast data.
2019-01-07 16:44:49 +08:00
zhangyanjiao 014b6ba44a wifi: fix the bug that STA can scan the channel out of the country regdomain range 2019-01-03 18:11:43 +08:00
Liu Zhi Fu a663c61427 lwip: fix mbox thread-safe issue
Fix a mbox free thread-safe issue that can lead to crash in sys_arch_mbox_fetch.
2019-01-02 23:06:24 +08:00
Ivan Grokhotkov 1937bc2bd7 esp_timer: do not allow deleting timers while callbacks are dispatched
timer_process_alarm function of esp_timer holds a spinlock for the
entire duration of its operation, except for the time when timer
callback function is called. It is possible that when
timer_process_alarm releases the spinlock, a higher priority task may
run and delete the timer. Then the execution will return to
timer_process_alarm, and this will either cause a crash, or undesired
execution of callback after the timer has been stopped or deleted.

To solve this problem, add a mutex which will prevent deletion of timers
while callbacks are being dispatched.
2019-01-02 20:01:26 +11:00
Konstantin Kondrashov 1255be4e3e newlib: Fix UT adjtime 2018-12-28 09:56:15 +08:00
Angus Gratton 3e7a5b144a unit tests: Only initialise tcpip_adapter() when needed by the test
Prevents unexpected memory allocations when running tests which
don't require tcpip_adapter.
2018-12-28 09:56:15 +08:00
Ivan Grokhotkov 763c2cc188 spiffs: increase timeout in readdir test
Timeout of 15 seconds is not sufficient if SPIFFS partition needs to
be formatted, on some of the boards.
2018-12-28 09:56:15 +08:00
He Yin Ling 9969b4218d test: add test case to receive ds2ds packet 2018-12-28 09:56:15 +08:00
David Cermak 02c3097191 mdns: fix networking running udp_sendif from lwip thread 2018-12-21 16:57:20 +01:00
David Cermak db256ed1e1 mdns: fixed static memory leak 2018-12-21 16:33:47 +01:00
David Cermak 270f105823 mdns: check all mallocs for failure and add default hook to log error with free heap
solves crash about _mdns_result_txt_create when stress test
2018-12-21 16:33:32 +01:00
David Cermak 44811c6896 mdns: resolve memory leak when txt record received multiple times 2018-12-21 16:33:19 +01:00
David Cermak d8c9530d3c mdns: skip sending search when finished, not properly locked timer task 2018-12-21 16:33:08 +01:00
baohongde 152a4f46d6 components/bt: Fix two bugs about pairing
1. Fix Legacy Pairing failed without remote device name
2. Fix discovery no device after disabling SSP
2018-12-21 20:52:46 +08:00
Ivan Grokhotkov b4552c02d4 soc/rtc: reset BBPLL configuration after enabling it
A workaround to reset BBPLL configuration after light sleep. Fixes the
issue that Wi-Fi can not receive packets after waking up from light
sleep.

Ref. https://github.com/espressif/esp-idf/issues/2711
2018-12-21 13:38:22 +08:00
Supreet Deshpande 3c87f47ba2 bugfix/ota_magic_byte_issue: Fix indent and replace constant by macro
Replace 0xE9 by ESP_IMAGE_HEADER_MAGIC.
2018-12-20 12:24:55 +05:30
Supreet Deshpande a0eedf112f bugfix/ota_magic_byte_issue: Fixes OTA magic byte error
On enabling flash encryption, OTA fails with magic byte error in the second chunk
if the http data is split into two or more chunks and first chunk is less than 16.
2018-12-20 12:24:34 +05:30
wangmengyang a9dae85d03 component/bt: use a pm_lock to prevent light sleep when bluetooth is enabled due to current imcompatibility 2018-12-18 15:40:27 +08:00
Liu Zhi Fu 6a418013a3 esp32: fix WiFi stop bug in WiFi/BT coexist mode
This fix includes following changes:
1. Fix the bug that esp_restart()/esp_wifi_stop() sometimes fails in WiFi/BT coexist mode.
2. Add a timer for WiFi stop and stop WiFi forcibly once the timer expires.
2018-12-17 20:39:54 +08:00
zhiweijian bd9eb5255d Component/bt: fix receive adv pkt when enable duplicate scan 2018-12-17 15:55:38 +08:00
wangmengyang 29da5b2e17 component/bt: add DRAM_ATTR attribute to global variables(mainly bss segment) in bt.c which can be accessed in ISRs 2018-12-14 21:21:22 +08:00
wangmengyang 1c4bbaa567 component/bt: bugfix of bluetooth modem sleep not being able to work with Dynamic Frequency Scaling
1. start an esp_timer on entering sleep to acquire pm_lock before wake up from modem sleep
2. decrease the clock division of XTAL fed to bluetooth low power clock from 32us to 2us period to allow to work under 240MHz Max CPU frequency
3. decrease the minimum sleep duration threshold to allow shorter bluetooth modem sleep period, especially for BLE with short connection interval
4. reconfigure bluetooth baseband(BT-BB) settings after PHY/RF init upon waking up from modem sleep to avoid packet RX/TX performance degradation
2018-12-14 21:21:22 +08:00
Tian Hao 129f1df461 fix bug that there's very low ratio to cause BLE assert(65536, 0) in rwble.c at line 222 2018-12-14 17:52:31 +08:00
Ivan Grokhotkov 2b58be5a6c panic: dump some instruction memory on IllegalInstruction exception 2018-12-13 17:09:53 +08:00
zhiweijian ee99795f3d Component/bt: fix save keys when auth mode without bond 2018-12-13 15:49:02 +08:00
zhiweijian f4b64a491b Component/bt: fix auth_mode error when reconnection in SMP 2018-12-13 15:36:51 +08:00
Sagar Bijwe 76f98a4b36 mbedtls: Fix compilation errors when CONFIG_MBEDTLS_HARDWARE_AES is disabled 2018-12-07 09:41:59 +00:00
Ivan Grokhotkov 0b3fdf420f Merge branch 'bugfix/fat_lock_log_v3.1' into 'release/v3.1'
fatfs: Do not log from critical sections (backport v3.1)

See merge request idf/esp-idf!3720
2018-12-07 14:07:16 +08:00
Jiang Jiang Jian a7d37b303d Merge branch 'bugfix/btdm_assert_ble_32768_v3.1' into 'release/v3.1'
fix bug that there's very low ratio to cause BLE assert(32768, 0) in rwble.c at line 222

See merge request idf/esp-idf!3918
2018-12-07 13:54:18 +08:00
Angus Gratton a7b5496770 Merge branch 'fix/spi_callback_in_iram_v3.1' into 'release/v3.1'
spi: fix the crash when callbacks are not in the IRAM (Backports v3.1)

See merge request idf/esp-idf!3886
2018-12-07 09:11:47 +08:00
Tian Hao ce5b2709ab fix bug that there's very low ratio to cause BLE assert(32768, 0) in rwble.c at line 222 2018-12-06 21:17:49 +08:00
Michael (XIAO Xufeng) 3387d751d9 spi: fix the crash when callbacks are not in the IRAM
Introduced in 9c23b8e5 and 4f87a62f. To get higher speed, menuconfig
options are added to put ISR and other functions into the IRAM.  The
interrupt flag ESP_INTR_FLAG_IRAM is also mistakenly set when the ISR is
put into the IRAM. However callbacks, which are wrote by the user, are
called in the master and slave ISR. The user may not be aware of that
these callbacks are not disabled during flash operations. Any cache miss
during flash operation will cause panic.

Essentially IRAM functions and intrrupt flag ESP_INTR_FLAG_IRAM are
different, the latter means not disabling the ISR during flash
operations.  New bus_config flag intr_flags is offered to help set the
interrupt attribute, including priority level, SHARED, IRAM (not
disabled during flash operations).  It introduced a small BREAK to
IDFv3.1 (but the same as IDFv3.0) that the user has to manually set IRAM
flag now (therefore he's aware of the IRAM thing) to void the ISR being
disabled during flash operations.
2018-12-05 10:25:57 +08:00
Tian Hao 155e48bbde component/bt and esp32: fix two bluetooth bugs that caused by coexist module
1. Fix interrupt watchdog timeout in bluetooth "btdm_bb_isr"
    2. Fix BLE assert(512) or assert(1536)  in rwble.c at line 222
    3. Update librtc.a to fix BLE assert(512) in rwble.c at line 222

    The #1 and #2 occurs random.
    The #3 bug occurs in certain scenario:
    	1. If Wifi start softap and BLE is working
    	2. If wifi start station, but do not use normal station operation, such
    		as just use espnow, while BLE is working
    	3. Any other scenario, that wifi works without use software coexist
    		operation, while BLE is working(such as do advertising and ...)

    4. update libcoexist.a version to v1.1.2
2018-12-03 22:09:04 +08:00
zhiweijian 34064b4302 Component/bt: fix accept specified sec auth error 2018-11-29 20:49:54 +08:00
Ivan Grokhotkov 93fcc418fe Merge branch 'bugfix/i2c_hardware_filter_default_enable_v3.1' into 'release/v3.1'
driver(i2c): enable I2C master hardware filter by default for release/v3.1

See merge request idf/esp-idf!3816
2018-11-29 19:29:04 +08:00
Roland Dobai 6393ef0f52 VFS: select() on UART should return immediately when data is buffered 2018-11-29 10:12:25 +01:00
Ivan Grokhotkov f00c6d1e84 Merge branch 'bugfix/freertos_idle_tick_count_v3.1' into 'release/v3.1'
freertos: use xTaskQueueMutex to protect tick count (backport v3.1)

See merge request idf/esp-idf!3728
2018-11-29 12:01:56 +08:00
kooho 2aea6e5e9c driver(i2c): enable I2C master hardware filter by default for release/v3.1 2018-11-28 17:38:50 +08:00
kooho 47a9e032d8 driver(uart): fixed uart read error bug when using dual core for release/v3.1. 2018-11-28 16:46:23 +08:00
Konstantin Kondrashov 868da0741c aes/sha/mpi: Bugfix a use of shared registers.
This commit resolves a blocking in esp_aes_block function.

Introduce:
The problem was in the fact that AES is switched off at the moment when he should give out the processed data. But because of the disabled, the operation can not be completed successfully, there is an infinite hang. The reason for this behavior is that the registers for controlling the inclusion of AES, SHA, MPI have shared registers and they were not protected from sharing.

Fix some related issue with shared using of AES SHA RSA accelerators.

Closes: https://github.com/espressif/esp-idf/issues/2295#issuecomment-432898137
2018-11-26 02:42:37 +00:00
Jiang Jiang Jian 09b2cd7d26 Merge branch 'bugfix/btdm_add_check_peer_addr_type_in_set_adv_params_v3.1' into 'release/v3.1'
Component/bt: add check peer addr type in set adv params (backport v3.1)

See merge request idf/esp-idf!3735
2018-11-23 20:14:15 +08:00
Liu Zhi Fu ddbb535080 esp32: fix some wifi bugs
Fix some wifi bugs
1. Enable RX BAR
2. Fix the bug that ESP32 AP negotiates with iphone to 11g
3. Fix the bug that ESP32 STA has ap_loss because CMCC AP contains two SSID
2018-11-21 15:24:30 +08:00
Jiang Jiang Jian 195f7274c4 Merge branch 'bugfix/btdm_controller_disable_v3.1' into 'release/v3.1'
Fix two bugs when disable bluetooth controller(backport v3.1)

See merge request idf/esp-idf!3693
2018-11-20 17:00:38 +08:00
Jiang Jiang Jian cdd3131f8a Merge branch 'bugfix/btdm_errors_in_comment_v3.1' into 'release/v3.1'
components/bt: Some errors in comment(backport 3.1)

See merge request idf/esp-idf!3714
2018-11-20 14:26:19 +08:00
zhiweijian dfd46965ae Component/bt: add check peer addr type in set adv params 2018-11-19 17:21:28 +08:00
David Cermak e885ff235f mdns: sending search packets also in probing and announcing state
mdns queries did not work properly when send imeadiately after set_hostname, which cuased reinit of pcb and therefore restarted probing, so search packets were blocked until probing finished
closes #2507, closes #2593
2018-11-19 04:56:34 +01:00
Ivan Grokhotkov 845bbc293a freertos: use xTaskQueueMutex to protect tick count
Having two different spinlocks is problematic due to possibly
different order in which the locks will be taken. Changing the order
would require significant restructuring of kernel code which is
undesirable.

An additional place where taking xTickCountMutex was needed was in
vApplicationSleep function. Not taking xTickCountMutex resulted in
other CPU sometimes possibly advancing tick count while light sleep
entry/exit was happening. Taking xTickCountMutex in addition to
xTaskQueueMutex has shown a problem that in different code paths,
these two spinlocks could be taken in different order, leading to
(unlikely, but possible) deadlocks.
2018-11-19 11:09:37 +08:00
zhangyanjiao 50f8b7b783 wifi: fix the bug that if station (sleep is enabled) and sniffer are enabled at the same time,
when disable sniffer, station will never enable phy and rf againi. (backport v3.1)
2018-11-16 20:19:21 +08:00
Roland Dobai c4193d5ec1 fatfs: Do not log from critical sections
Logging in the critical section can result in a deadlock when the logger
is redirected to FATFS.

Closes https://github.com/espressif/esp-idf/issues/1693
2018-11-16 12:59:38 +01:00
baohongde 8e0bb3ec81 components/bt: Some errors in comment 2018-11-16 15:38:22 +08:00
Jiang Jiang Jian 13d4e43888 Merge branch 'bugfix/tw27096_fix_lwip_mbox_free_crash_v3.1' into 'release/v3.1'
fix the crash caused by sys_mbox_free (backport v3.1)

See merge request idf/esp-idf!3620
2018-11-15 10:32:06 +08:00
Tian Hao dbd225c673 Fix two bugs when disable bluetooth controller
1. Fix the bug that disable controller suddenly cause crash when ble is working
2. Fix the bug that when disable controller, it will cause wifi cannot RX, TX timeout, buffer lack and etc.
2018-11-13 17:49:06 +08:00
morris da8835aa0b ethernetif: fix potential memory leak
1. If L2_TO_L3_RX_BUF_MODE is not selected, we must assign l2_owner explictly before we call pbuf_free.
2018-11-13 11:41:17 +08:00
Jiang Jiang Jian 8e703b14ee Merge branch 'test/fix_bug_of_scan_interval_and_windows_for_v3.1' into 'release/v3.1'
test: fix bug of scan interval and window (backport v3.1)

See merge request idf/esp-idf!3668
2018-11-12 17:34:55 +08:00
Jiang Jiang Jian 79da87def9 Merge branch 'bugfix/wifi_do_not_load_phy_data_if_fail_to_open_nvs_v3.1' into 'release/v3.1'
esp32: do not try to load PHY data if fail to open NVS (backport v3.1)

See merge request idf/esp-idf!3649
2018-11-12 17:00:14 +08:00
Jiang Jiang Jian 0ffe9f0c4e Merge branch 'bugfix/mdns_crash_on_network_change_backport3.1' into 'release/v3.1'
Fixed mdns crashes on network changes (backport v3.1)

See merge request idf/esp-idf!3579
2018-11-12 15:30:44 +08:00
XiaXiaotian 8b50419f55 esp32: do not try to load PHY data if fail to open NVS 2018-11-12 03:17:11 +00:00
Liu Zhi Fu 3514effcd0 lwip: fix crash caused by sys_mbox_free
Fix lwip crashed bug caused by sys_mbox_free()
2018-11-11 11:51:10 +08:00
chensheng f7b9ea8cb5 test: fix bug of scan interval and window 2018-11-09 11:28:16 +08:00
baohongde ac124ee89c components/bt: Point ACL RX buffer ptr to ACL RX buffer if ACL RX buffer ptr is null(backprot 3.1)
1. When WIFI task or other high priority task blocks the Bluetooth task, ACL RX buffer will use up, ACL RX buffer ptr will point to null and will never point to a valid adress. Causing errors in Bluetooth.
2. hcimsgs.h used whether flow control is on or off
2018-11-09 03:26:36 +00:00
He Yin Ling 01cfb0d6bd Merge branch 'test/fixbug_create_service_check_message_change_v3.1' into 'release/v3.1'
test: bugfix create service check message change for v3.1

See merge request idf/esp-idf!3664
2018-11-09 11:22:05 +08:00
Jiang Jiang Jian 69b6eabef0 Merge branch 'bugfix/btdm_add_profile_descriptor_list_for_spp_v3.1' into 'release/v3.1'
component/bt: Add profile descriptor list for SPP(backport 3.1)

See merge request idf/esp-idf!3602
2018-11-08 17:27:21 +08:00
Jiang Jiang Jian 8c16be1edc Merge branch 'bugfix/btdm_name_buffer_allocation_size_differs_v3.1' into 'release/v3.1'
components/bt: Fix the different size of name buffer allocation size(backport 3.1)

See merge request idf/esp-idf!3588
2018-11-08 17:24:53 +08:00
chensheng a015072a7e test: bugfix create service check message change for v3.1 2018-11-08 11:23:59 +08:00
Jiang Jiang Jian 7cc2445b9a Merge branch 'bugfix/btdm_sniff_anchor_point_calculation_error_for_v3.1' into 'release/v3.1'
bugfix/btdm_sniff_anchor_point_calculation_error_for_v3.1(backport v3.1)

See merge request idf/esp-idf!3614
2018-11-06 17:12:39 +08:00
wangmengyang cfef8291bb component/bt: bugfix of two issues of sniff mode in classic bluetooth
1. resolve the error in calculating sniff anchor point that result in connection supervision timeout
2. resolve the issue of user case that requires sniff attempt is larger than 0xff
2018-11-06 12:02:18 +08:00
Jiang Jiang Jian 725978b817 Merge branch 'bugfix/btdm_allow_a2dp_codec_dynamic_alloc_for_v3.1' into 'release/v3.1'
bugfix/btdm_allow_a2dp_codec_dynamic_alloc_for_v3.1(backport v3.1)

See merge request idf/esp-idf!3600
2018-11-06 11:57:04 +08:00
Jiang Jiang Jian 1e598fc6db Merge branch 'bugfix/btdm_add_static_passkey_and_accept_specified_sec_aut' into 'release/v3.1'
component/bt:  add static passkey and accept specified sec auth (backport v3.1)

See merge request idf/esp-idf!3559
2018-11-05 11:02:18 +08:00
Jiang Jiang Jian 08c14389f6 Merge branch 'bugfix/fix_some_wifi_bugs_1022_v3.1' into 'release/v3.1'
esp32: fix some wifi bugs (backport v3.1)

See merge request idf/esp-idf!3540
2018-11-02 15:36:46 +08:00
Ivan Grokhotkov 2aa9a21180 Merge branch 'bugfix/fix_psram_eid_v3.1' into 'release/v3.1'
psram: fix psram eid (backport v3.1)

See merge request idf/esp-idf!3467
2018-11-01 22:15:04 +08:00
Ivan Grokhotkov acdc7b0511 Merge branch 'bugfix/workaround_free_peripherals_isr_when_using_dual_core_v3.1' into 'release/v3.1'
driver(interrupt): fix the issue that interrupt might be allocated and freed on different core for release/v3.1

See merge request idf/esp-idf!3436
2018-11-01 22:14:52 +08:00
Ivan Grokhotkov 3b92e85b30 Merge branch 'bugfix/bootloader_iram_overlap_check_v3.1' into 'release/v3.1'
bootloader: verify that loaded image does not overlap bootloader code (backport v3.1)

See merge request idf/esp-idf!3526
2018-11-01 16:40:26 +08:00
Angus Gratton 7d6b82673f bootloader: Fix crash enabling flash encryption
Regression in 9c715d7946
2018-11-01 14:14:18 +08:00
Mahavir Jain 12e5f25a1c bootloader: keep bootloader_common code to retention region
It is possible to utilize some of the routines related to otadata
partition validation, after firmware image is downloaded to RAM. Hence
these routines should be part of app cpu cache, so that they do not
get overwritten by firmware.

Signed-off-by: Mahavir Jain <mahavir@espressif.com>
2018-11-01 14:14:00 +08:00
baohongde 539064b93c component/bt: Add profile descriptor list for SPP(backport 3.1)
A cherry-pick of MR !2691
2018-11-01 10:36:11 +08:00
wangmengyang 82e69475ca component/bt: allow dynamic allocation of SBC encoder/decoder buffer used in A2DP to save internal DRAM 2018-10-31 17:54:51 +08:00
baohongde 7a05ef2002 components/bt: Fix the different size of name buffer allocation size(backport 3.1)
A cherry-pick of MR !3587
Close https://github.com/espressif/esp-idf/issues/2615
2018-10-31 10:56:16 +08:00
David Cermak 6a6fccc191 mdns: fixed crashes on network change (not properly locked sending packets to queue from timer task), backport 3.1 2018-10-30 07:37:02 +01:00
Angus Gratton a7372d5828 cmake: Fix some failing example builds, fix gcov 2018-10-30 10:59:39 +11:00
Sagar Bijwe 536549253d nvs_flash: Update documentation at different places to indicate NVS encryption is supported 2018-10-29 06:57:28 +00:00
zhiweijian 143c0bdaf9 Component/bt: add ble disconnect when ACCEPT_SPECIFIED_SEC_AUTH failed 2018-10-26 14:10:32 +08:00
Ivan Grokhotkov 9ec43e1721 bootloader: verify that loaded image does not overlap bootloader code
Fixes CVE-2018-18558
2018-10-26 12:44:58 +08:00
zhiweijian e5f2f1ba78 Component/bt: add only accept sepecified Authentication 2018-10-26 11:58:25 +08:00
zhiweijian 89ee65e1c6 Component/bt: add set default passkey function 2018-10-26 11:55:18 +08:00
Angus Gratton 4eb20f4d99 Merge branch 'feature/34_coding_scheme_v3.1' into 'release/v3.1'
Secure Boot & Flash encryption: Support 3/4 Coding Scheme

See merge request idf/esp-idf!3510
2018-10-26 08:40:51 +08:00
zwj 4b5cf90a95 component/bt: fix remove bond list failed 2018-10-25 05:32:01 +00:00
Liu Zhi Fu 9edde5e8af esp32: fix some wifi bugs
Fix following WiFi bugs:
1. Fix the bug that MIC verification fails on soft-AP mode
2. Modify mesh root to have same behavior as normal WiFi STA in state change
3. Fix the bug that sniffer can't catch control packets
4. Fix crash bug in soft-AP mode
5. Fix ACM(Admission Control Management) bug
2018-10-25 12:05:27 +08:00
Angus Gratton 67ad5852f6 Secure Boot & Flash encryption: Support 3/4 Coding Scheme
Includes esptool update to v2.6-beta1
2018-10-24 23:21:17 +00:00
Liu Zhi Fu 6159788b97 esp32: fix wifi memory leak
Fix a WiFi memory leak bug
2018-10-21 20:43:48 +08:00
Tian Hao e982c25b40 coexist : fix coexist bugs related to coex hw blocking
1. fix some bugs by previous coex hw blocking bugfix,
   such like, rwble.c (64, 0) line 222
2. fix bug that ble scan performance is very low when software coexist
   is working.
3. update libcoexist version to v1.1.0
2018-10-17 18:30:39 +08:00
Liu Zhi Fu f97e2d3bde Bugfix/tw26696 fix wifi timer v3.1 (backport v3.1) 2018-10-17 17:30:46 +08:00
Ivan Grokhotkov 93f04b87b2 Merge branch 'bugfix/fix_random_failure_with_ota_updates_v3.1' into 'release/v3.1'
app_update: fix intermittent failure with firmware updates (backport v3.1)

See merge request idf/esp-idf!3419
2018-10-16 10:58:24 +08:00
Angus Gratton d444469cae heap: Fix heap metadata test to account for background memory allocations 2018-10-12 18:22:07 +11:00
chenjianqiang 64b41b5602 bugfix(psram): fix psram driver
1. remove use EID to distinguish psram voltage
2. 1V8 64Mbit psram and 3V3 64Mbit psram use the same psram driver(standard spi interface)
3. set cs hold time register as 1
2018-10-11 12:22:34 +08:00
Wangjialin b26b1389de feature(psram): add support for 64MBit psram of 1.8v and 3.3v.
1. Add reading psram EID.
2. Configure different clock mode for different EID.
3. add API to get psram size and voltage.
4. Remove unnecessary VSPI claim.

For 32MBit@1.8V and 64MBit@3.3V psram, there should be 2 extra clock cycles after CS get high level.
For 64MBit@1.8 psram, we can just use standard SPI protocol to drive the psram. We also need to increase the HOLD time for CS in this case.

EID for psram:
32MBit 1.8v: 0x20
64MBit 1.8v: 0x26
64MBit 3.3v: 0x46
2018-10-11 12:21:31 +08:00
Jiang Jiang Jian 3cf2f09469 Merge branch 'bugfix/several_bugfix_about_ba_session_setup_v3.1' into 'release/v3.1'
esp32: several fixes about BA session setup (backport v3.1)

See merge request idf/esp-idf!3456
2018-10-11 11:42:15 +08:00
kooho fb30315d01 driver(interrupt): fix the issue that interrupt might be allocated and freed on different cores for release/v3.1 2018-10-10 19:22:34 +08:00
Angus Gratton 027e081622 Merge branch 'bugfix/misc_v3_1_backports' into 'release/v3.1'
Multiple v3.1 backports

See merge request idf/esp-idf!3378
2018-10-10 15:01:13 +08:00
Liu Zhi Fu 84b4916fb8 esp32: several fixes about BA session setup
1. Fix the bug that ESP32 will reject the retry AddBA request frame
   if AddBA response frame is failed to sent by WiFi LMAC
2. Fix the bug that AddBA request retrys too frequently
3. Forbid BA session setup for VO queue related TID
2018-10-10 14:04:29 +08:00
Angus Gratton 27023a77e7 Merge branch 'fix/spi_master_cmd_addr_lsbfirst_v3.1' into 'release/v3.1'
spi_master: fix the command and address field when LSB_FIRST enabled (Backport v3.1)

See merge request idf/esp-idf!3446
2018-10-09 11:46:41 +08:00
Jiang Jiang Jian 1a3db605c2 Merge branch 'bugfix/no_disconnect_event_report_if_no_correct_status_code_report_v3.1' into 'release/v3.1'
Bugfix of no disconnect event report if no correct status code report( Backport v3.1)

See merge request idf/esp-idf!3386
2018-10-08 21:35:02 +08:00
michael 712b9374af test: modify the command/address test a bit to test the LSBFIRST feature 2018-10-08 19:19:47 +08:00
michael 06321a5241 spi: move gpio direction config to common func for coinsistence
(MINOR CHANGE)
2018-10-08 19:19:47 +08:00
Michael (XIAO Xufeng) b9f10a71ea spi_master: fix the command and address field when LSB_FIRST enabled
Resolves https://github.com/espressif/esp-idf/issues/2444.
2018-10-08 19:19:31 +08:00
Angus Gratton 97219eeb31 Merge branch 'feature/nvs_encr_v3.1' into 'release/v3.1'
nvs_flash: Add support for nvs encryption

See merge request idf/esp-idf!3434
2018-10-08 16:20:28 +08:00
Mahavir Jain a2f2cd3b41 app_update: remove unrequired static attribute from mmap handle 2018-10-08 03:18:37 +00:00
Mahavir Jain bbad487deb app_update: fix intermittent failure with firmware updates
Routine `spi_flash_cache2phys` sometimes return incorrect value,
resulting in failure in getting currently running ota partition.
This in turn aborts firmware update process.This issue was more
prominent with SPIRAM enabled cases.

Fix ensures proper cache guards during `spi_flash_cache2phys`, and
also for few other similar APIs.

In addition, `esp_ota_get_running_partition` has also been optimized
to save currently running partition for subsequent invocations.

Fixes https://github.com/espressif/esp-idf/issues/2451
2018-10-08 03:18:37 +00:00
Sagar Bijwe 68a9d1168f nvs_flash: Add support for nvs encryption 2018-10-04 19:25:12 +05:30
Angus Gratton 1755fba8dc esptool: Update to v2.5.1
Release notes: https://github.com/espressif/esptool/releases/tag/v2.5.1

Needed to no longer burn keys if 3/4 Coding Scheme is enabled.
2018-10-04 16:51:30 +10:00
Angus Gratton d7615df616 bootloader: Don't enable secure boot or flash encryption for 3/4 Coding Scheme 2018-10-04 16:51:30 +10:00
Angus Gratton 541e02a7e3 Merge branch 'bugfix/bootloader_gen_secure_boot_digest_v3.1' into 'release/v3.1'
bootloader: Fix secure boot digest generation for image length where (len%128 < 32) (backport v3.1)

See merge request idf/esp-idf!3411
2018-10-03 11:38:00 +08:00
Angus Gratton d899bf029d Merge branch 'fix/sdio_slave_reset_ret_queue_v3.1' into 'release/v3.1'
sdio_slave: fix the ret_queue crash issue when being reset by the master (Backport v3.1)

See merge request idf/esp-idf!3394
2018-10-03 09:24:08 +08:00
Jiang Jiang Jian f11ac037c4 Merge branch 'bugfix/btdm_watchdog_timeout_after_pair_with_iphone_v3.1' into 'release/v3.1'
component/bt: Fix BTU task watchdog timeout after pair with iphone (backport 3.1)

See merge request idf/esp-idf!3396
2018-09-30 14:39:09 +08:00
Angus Gratton f16b3754fb bootloader: Fix secure boot digest generation for image length where (len%128 < 32) 2018-09-30 00:45:07 +10:00
Deng Xin 862b7b22b5 Bugfix of no disconnect event report if no correct status code report
Problem Description
The reporduce steps are as follows:

1.This issue can be reproduced with 4 ESP32 devices, 2 for stations (STA1, STA2) and 2 for soft-AP (AP1, AP2)
2.Configure AP1/AP2 to the same SSID (ssid_xxx)
3.The max allowed WiFi connections of AP1 is configured to 1 and STA1 connects to AP1
4.The AP1 is close to STA2 while AP2 is far away from STA2 (but the STA2 can find the AP2 via scan)
5.STA2 connects ssid_xxx with all scan method
6.The problem will happen on STA2 because it fails to connec AP1 and never connects AP2

Phenmenon
STA fail to connect after send auth or assoc with a wrong status code, but no disconnect event report and can not connect the next one in the envrionment
Root Cause
Because there are some same ssid APs in the evnrionment, when do all channel scan, it will collect all the matched AP in rc list, because rc list is not empty, so it would send disconnect event, however, we didn't do other step such as connect to other one
VNC MR 575
closes https://github.com/espressif/esp-idf/issues/2323
2018-09-29 16:18:26 +08:00
wangmengyang e353d09630 component/bt: bugfix that hci down stream datapath is unblocked too early on waking up from sleep
This issue can cause the controller to stuck after sleep interrupt happens and clock interrupt enabled
2018-09-28 14:31:49 +08:00
Ivan Grokhotkov 5205b31186 Merge branch 'bugfix/btdm_coex_hw_blocking_v3.1' into 'release/v3.1'
component/bt : fix coexist hardware blocking bug

See merge request idf/esp-idf!3363
2018-09-28 11:57:26 +08:00
baohongde de0a323bef component/bt: Fix BTU task watchdog timeout after pair with iphone (backport 3.1)
A cherry-pick of MR !3366

Create a new pending queue, then re-submit pending requests in old pending queue,preventing new events being inserted into it.

Closes https://github.com/espressif/esp-idf/issues/2191
2018-09-28 11:04:44 +08:00
michael 39f97ee0d0 sdio_slave: fix the ret_queue crash issue when being reset by the master 2018-09-27 21:33:45 +08:00
Tian Hao ebdc82d3d2 component/bt : fix coexist hardware blocking bug
fix the bug following:
1. after disable bluetooth controller, wifi cannot TX/RX any packets.
2. when software coexist working, there's a little ratio cause wifi task
watchdog timeout
3. when software coexist working, there's a little ratio cause bluetooth
cannot receive anything.

feature:
1. add libbtdm_app.a git commit local and remote checking

Known issues:
1. there's still a bug occurs with a very very low ratio cause bluetooth
   cannot receive anything. The reproduce interval may great than 3days
   ~ 1week via 7x24 hours heavy testing.
2018-09-27 20:56:46 +08:00
Angus Gratton 773d282d71 Merge branch 'feature/backport_mp_support' into 'release/v3.1'
nvs-flash: Support for blobs larger than half of SPI Flash sector size

See merge request idf/esp-idf!3350
2018-09-27 17:19:32 +08:00
Ivan Grokhotkov c4ce84bba5 cmake: add app_trace as FreeRTOS dependency
This is needed because FreeRTOSConfig.h includes header file provided
by app_trace when CONFIG_SYSVIEW_ENABLE=y.
2018-09-27 13:35:11 +08:00
negativekelvin 9ad19e8122 wpa_supplicant: more wpa2_enterprise fixes
Merges https://github.com/espressif/esp-idf/pull/2386

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

Closes https://github.com/espressif/esp-idf/issues/2381
2018-09-27 13:35:11 +08:00
Ivan Grokhotkov 75fcd062e8 esp32: abort when running on single core chip in dual core mode
Ref. https://esp32.com/viewtopic.php?f=2&t=7307
2018-09-27 13:35:11 +08:00
Ivan Grokhotkov b7fde00aed sleep: keep RTC_SLOW_MEM powered on if RTC_NOINIT is used
Fixes a bug that if application uses RTC_NOINIT variables but doesn’t
use RTC_DATA variables, then RTC_NOINIT variables loose their values
after deep sleep.

Reported in https://esp32.com/viewtopic.php?f=2&t=7045&p=30301#p30299
2018-09-27 11:31:28 +08:00
Ivan Grokhotkov d6547595d7 bt: build unit tests only when CONFIG_BT_ENABLED=1 2018-09-27 11:31:10 +08:00
zhiweijian 5bb12070d9 Component/bt: fix get bond list error sometimes 2018-09-27 02:33:33 +00:00
Jiang Jiang Jian bdb65ed066 Merge branch 'bugfix/btdm_bt_remove_device_fail_when_ble_connected_v3.1' into 'release/v3.1'
component/bt: Fix bug of remove bond device fail when BLE and BT are connectd at…

See merge request idf/esp-idf!3368
2018-09-26 18:57:36 +08:00
baohongde cc0a73c156 component/bt: Fix bug of remove bond device fail when BLE and BT are connectd at the same time (backport 3.1)
A cherry-pick of MR !2767
2018-09-26 14:23:05 +08:00
qiyueixa 1d4ae1e9ad mesh: bugfix
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.
2018-09-25 13:43:55 +08:00
Sagar Bijwe e14b836fcc nvs-flash: Support for blobs larger than half of SPI Flash sector size
This change removes the earlier limitation of 1984 bytes for storing data-blobs.
Blobs larger than the sector size are split and stored on multiple sectors.
For this purpose, two new datatypes (multi-page index and multi-page data) are
added for entries stored in the sectors. The underlying read, write, erase and find
operations are modified to support these large blobs. The change is transparent
to users of the library and no special APIs need to be used to store these large
blobs.
2018-09-24 18:50:35 +05:30
Jiang Jiang Jian fbcfc869e2 Merge branch 'bugfix/fix_the_bug_create_socket_fail_v3.1' into 'release/v3.1'
lwip: fix the bug that failed to create socket (backport v3.1)

See merge request idf/esp-idf!3311
2018-09-20 18:44:18 +08:00
Jiang Jiang Jian 4107361a3a Merge branch 'bugfix/btdm_fix_crash_when_test_multi_connect_v3.1' into 'release/v3.1'
Component/bt: fix crash when test multi_connect(backport v3.1)

See merge request idf/esp-idf!3313
2018-09-20 14:02:12 +08:00
Jiang Jiang Jian e8aa442305 Merge branch 'bugfix/btdm_fix_save_error_key_in_smp_when_reconnect_v3.1' into 'release/v3.1'
Component/bt: fix save error key in smp when reconnect(backport v3.1)

See merge request idf/esp-idf!3289
2018-09-20 10:58:01 +08:00
Jiang Jiang Jian 82ee078d9a Merge branch 'bugfix/btdm_fix_iphoneX_error_when_get_wifi_list_v3.1' into 'release/v3.1'
Component/bt: fix iPhoneX error when getting wifi list (backport v3.1)

See merge request idf/esp-idf!3314
2018-09-20 10:55:08 +08:00
Liu Zhi Fu bb48077a81 lwip: fix the bug that failed to create socket
Fix the bug that failed to create nonblocking TCP or UDP socket after several times socket create/close
2018-09-19 16:43:25 +08:00
zhiweijian 72f9d15a57 Component/bt: fix iPhoneX error when getting wifi list 2018-09-19 15:21:57 +08:00
zhiweijian 78dca32a28 Component/bt: fix crash when test multi_connect 2018-09-19 14:26:55 +08:00
Liu Han 52a70b3418 feat(mdns): fix bug when clean action memory 2018-09-18 23:39:10 +05:30
Jiang Jiang Jian 889c80ec1c Merge branch 'bugfix/backport_several_wifi_bugfix_v3.1' into 'release/v3.1'
esp32: backport several WiFi bug fixes to v3.1 (backport v3.1)

See merge request idf/esp-idf!3280
2018-09-18 20:03:32 +08:00
Angus Gratton 922bae0be3 Merge branch 'bugfix/cmake_make_flash_target_v3.1' into 'release/v3.1'
cmake: Fix "make flash" & "ninja flash" targets

See merge request idf/esp-idf!3295
2018-09-18 10:49:52 +08:00
Angus Gratton 982a7fa499 Merge branch 'fix/spi_slave_free_cs_v3.1' into 'release/v3.1'
spi_slave: fix the issue rx dma get broken by master unexpected transaction (backport v3.1)

See merge request idf/esp-idf!3294
2018-09-18 08:08:41 +08:00
Angus Gratton 52413e9925 Merge branch 'feature/signature_verify_updates_v3.1' into 'release/v3.1'
secure boot: Support signed app verification without hardware secure boot  (backport v3.1)

See merge request idf/esp-idf!3184
2018-09-18 07:56:12 +08:00
Angus Gratton cfb96e67f9 cmake: Fix "make flash" & "ninja flash" targets
As reported on forum.

Requires a small CMake wrapper script to pick
up environment variables at flashing time.
2018-09-18 09:32:54 +10:00
michael a7c67c1681 spi_slave: fix the issue rx dma get broken by master unexpected transaction 2018-09-17 22:36:49 +08:00
zhiweijian 53d75901a9 Component/bt: fix save error key in smp when reconnect 2018-09-17 20:13:30 +08:00
Jiang Jiang Jian 8f665c3393 Merge branch 'bugfix/btdm_enable_modem_sleep_by_default_for_v3.1' into 'release/v3.1'
bugfix/btdm_enable_modem_sleep_by_default_for_v3.1(backport v3.1)

See merge request idf/esp-idf!3275
2018-09-17 16:17:46 +08:00
XiaXiaotian 738afe2de3 esp32: backport several WiFi bug fixes to v3.1
Backport following WiFi fixes to v3.1:
1. Fix AMPDU RX sequence compitability bug
2. Optimize scan capability in all channel scan
3. Fix some modem sleep bugs
4. Update API to set CSI channel filter and HT_LTF data generating
2018-09-17 14:40:24 +08:00
baohongde ea3b2716fd component/bt: Unlock reserve of SCN 1 for HFP (backport v3.1)
A cherry-pick of MR !3269
2018-09-17 11:01:58 +08:00
Jiang Jiang Jian bfcb673c8e Merge branch 'bugfix/tw24694_dns_request_no_reply_v3.1' into 'release/v3.1'
lwip: add code for sending gratuitous ARP periodically (backport v3.1)

See merge request idf/esp-idf!3195
2018-09-16 15:18:39 +08:00
Jiang Jiang Jian e5d8a68d96 Merge branch 'bugfix/mdns_service_txt_set_backportv3.1' into 'release/v3.1'
bugfix: mdns_service_txt_set() wasn't allocating memory for TXT records (backport v3.1)

See merge request idf/esp-idf!3254
2018-09-16 15:12:03 +08:00
Jiang Jiang Jian 760772ec4b Merge branch 'bugfix/ble_adv_data_tx_power_v3.1' into 'release/v3.1'
fix TX power value in ble adv data is incorrect

See merge request idf/esp-idf!3187
2018-09-16 14:54:59 +08:00
wangmengyang c6d2fc6807 component/bt: enable bluetooth modem sleep as default setting 2018-09-14 17:01:45 +08:00
Piyush Shah 9237110c5c bugfix: mdns_service_txt_set() wasn't allocating memory for TXT records
Allocation was happening later, causing possible use of stack variables
of caller function, which could be invalid.

Signed-off-by: Piyush Shah <piyush@espressif.com>
2018-09-14 11:17:53 +05:30
wangmengyang 4c240064ab component/bt: stop to inititate AVRC connection when A2DP connection fails to set up
AVRCP connection binds to A2DP in current implementation, despite the two profiles are\
independent according to specification. AVRCP connection is not necessary to set-up \
if A2DP connection fails to establish
2018-09-13 17:58:00 +08:00
wangmengyang da4108dd1e component/bt: stop to initiate AVDTP connection on failure of A2DP service discovery
In opening state of AVDTP connection, if SDP client fails to get valid A2DP service record\
from peer SDP server, then do not initiate AVDTP connection request
2018-09-13 17:58:00 +08:00
wangmengyang 01994059e2 component/bt: bugfix that A2DP sink device can be connected by another A2DP sink device
In pevious implementation, A2DP sink will register an A2DP source Stream End Point(SEP) although the SEP is not\
supposed to be used. Now remove the unused SEP for source so that only one role of A2DP can be supported at one
time. Service record in local SDP server only includes at most one service for A2DP sink role or source
2018-09-13 17:58:00 +08:00
He Yin Ling 0e1f561a32 test: fix incorrect tx power value in adv 2018-09-13 15:48:52 +08:00
Renz Christian Bagaporo bc8540fec1 cmake: fix source list issues 2018-09-13 11:13:27 +08:00
Renz Bagaporo 7edf2bf66c cmake: make main a component again 2018-09-13 11:13:27 +08:00
Tian Hao a05868f0a8 fix TX power value in ble adv data is incorrect
refence to https://github.com/espressif/esp-idf/issues/2284
Before fixing, the tx power in adv data is always 0xeb(-21dbm).

restriction:
    If change BLE advertising TX power, please call esp_ble_gap_config_adv_data()
    after BLE adv TX power changed.

    Later, will implement set BLE advertising TX power via HCI, then the
    TX power value in adv data can be update automatically after BLE adv
    TX power changed.
2018-09-12 10:19:08 +00:00
zhangyanjiao f6f4d7b410 add code for sending gratuitous ARP periodically 2018-09-11 15:20:24 +08:00
zhangyanjiao f617a33b8d esp32: fix the bug that SYSTEM_EVENT_STA_GOT_IP is forbidden when gateway is 0.0.0.0 2018-09-11 10:57:17 +08:00
michael b3697e7741 sdio_slave: fix the recv crash when trans finish and load at the same time 2018-09-10 15:17:07 +08:00
Jiang Jiang Jian 35785d08fd Merge branch 'feature/btdm_legacy_paring_v3.1' into 'release/v3.1'
component/bt: Add Legacy Pairing (backport 3.1)

See merge request idf/esp-idf!3193
2018-09-07 14:44:19 +08:00
Ivan Grokhotkov 297945c32e Merge branch 'test/split_test_env_for_integration_test_v3.1' into 'release/v3.1'
test: split CI test environment (backport v3.1)

See merge request idf/esp-idf!3211
2018-09-07 11:06:51 +08:00
Jiang Jiang Jian d193895ec6 Merge branch 'bugfix/btdm_hfp_invalid_hci_sync_pkt_len_for_v3.1' into 'release/v3.1'
bugfix/btdm_hfp_invalid_hci_sync_pkt_len_for_v3.1(backport v3.1)

See merge request idf/esp-idf!3188
2018-09-06 19:52:05 +08:00
He Yin Ling f1bf446410 test: split CI test environment:
Currently CI test environment is complicated, usually includes NIC, AP.
These devices are not used for a lot test cases. Therefore we split the
test environment, remove unnecessary devices. Then it will be easier to
create CI runners.
2018-09-06 16:35:34 +08:00
Jiang Jiang Jian e6a0eb74c8 Merge branch 'bugfix/btdm_discovery_ble_v3.1' into 'release/v3.1'
component/bt : fix bug that set discovery mode will stop ble adv

See merge request idf/esp-idf!3189
2018-09-06 14:19:31 +08:00
zhangyanjiao c27c381ba2 defination: fix the bug that esp_derive_local_mac() defination missing 2018-09-05 14:42:23 +08:00
baohongde 95c5805088 component/bt: Add Legacy Pairing (backport 3.1)
A cherry-pick of MR !3057
2018-09-04 20:59:03 +08:00
Tian Hao 196793dccb component/bt : fix bug that set discovery mode will stop ble adv
As the bluedroid original implmentation of BR/EDR and BLE dual mode about discovery mode,
when set discovery mode for BR/EDR, it will stop ble advertising.

Reference to https://github.com/espressif/esp-idf/issues/2306
2018-09-04 20:29:36 +08:00
wangmengyang 7c6d447938 component/bt: bugfix for incorrect length of HCI SCO packet size in HFP resulted from uninitialized data buffer length 2018-09-04 20:24:00 +08:00
Angus Gratton b069b31a2c secure boot: Support secure boot signatures without hardware secure boot
Allows OTA updates to be secured via signature checks, without requiring the overhead or complexity
of a full secure boot implementation.

Uses same signing mechanisms (build system and/or espsecure.py as Secure Boot).

Requires:
* [ ] More testing
* [ ] Documentation
2018-09-04 19:10:02 +08:00
Jiang Jiang Jian 969161183a Merge branch 'bugfix/esp_wifi_disconnect_fail_v3.1' into 'release/v3.1'
update wifi lib to fix two bugs (backport v3.1)

See merge request idf/esp-idf!3158
2018-09-04 15:06:49 +08:00
Jiang Jiang Jian 45e29a817c Merge branch 'bugfix/btdm_update_private_address_v3.1' into 'release/v3.1'
component/bt: Update BLE private address after it's private address interval (backport 3.1)

See merge request idf/esp-idf!3170
2018-09-04 14:10:47 +08:00
Jiang Jiang Jian dabebbf639 Merge branch 'bugfix/btdm_rfcomm_test_command_cause_crash_v3.1' into 'release/v3.1'
component/bt: Fix bug rfcomm test command cause crash (backport 3.1)

See merge request idf/esp-idf!3169
2018-09-04 14:10:05 +08:00
Jiang Jiang Jian cd78dc632a Merge branch 'bugfix/btdm_find_remote_service_by_uuid_always_return_success_v3.1' into 'release/v3.1'
component/bt: Fix bug of SDP find services by uuid always return success (backport 3.1)

See merge request idf/esp-idf!3164
2018-09-04 14:09:36 +08:00
baohongde 6a2f492832 component/bt: Update BLE private address after it's private address interval (backport 3.1)
A cherry-pick of MR !2987
2018-09-03 14:27:15 +08:00
baohongde 24a03a8d3f component/bt: Fix bug rfcomm test command cause crash (backport 3.1)
A cherry-pick of MR !3080
2018-09-03 14:17:56 +08:00
Darian Leung 27ffeacf07 docs/rewrite_mesh_docs
The following commit rewrites the ESP-MESH docs. This commit includes
new diagrams and a structure approach to the mesh docs. Some mesh api references
have also been modified.
2018-09-03 13:03:32 +08:00
baohongde b1da63d645 component/bt: Fix bug of SDP find services by uuid always return success (backport 3.1)
A cherry-pick of MR !3036
2018-09-03 11:52:19 +08:00
zhangyanjiao ec3a1318dc update wifi lib to fix two bugs
1. fix the esp_wifi_disconnect() err when wifi is not started or inited

2. make g_intr_lock_mux and g_osi_funs_p in DRAM
2018-08-31 20:10:20 +08:00
Jiang Jiang Jian 22da5f6de9 Merge branch 'bugfix/btdm_security_vulnerability_v3.1' into 'release/v3.1'
fix bluetooth security vulnerability of ECDH public key checking

See merge request idf/esp-idf!3139
2018-08-31 02:11:55 +08:00
XiaXiaotian 2ad5686937 esp32: reorder MPDU as AMPDU
Some APs transmit AMPDU and MPDU by turns. Moreover, the sequence
    numbers of AMPDU and MPDU are out of order, e.g. MPDU(1253) -
    AMPDU(1251, 1252) - MPDU(1254) - AMPDU(1255, 1256). In order to
    receive both AMPDU and MPDU in order, MPDU must be reordered with
    AMPDU.
2018-08-30 11:46:16 +08:00