Commit graph

995 commits

Author SHA1 Message Date
wangmengyang ae7bf1990e component/bt: bugfix for uncleared LMP transaction collision state after rejecting sniff request from slave 2018-07-31 17:10:32 +08:00
zhiweijian feef9b9387 Component/bt: fix gattc get count invalid 2018-07-31 02:36:46 +00:00
Noble-Mushtak dbd429af1b Changed value of BTM_OOB_INCLUDED to TRUE
Merges https://github.com/espressif/esp-idf/pull/2206
2018-07-30 08:53:01 +03:00
Mahavir Jain b79fefa011 bluedroid: remove dependency on arpa/inet.h include
Signed-off-by: Mahavir Jain <mahavir@espressif.com>
2018-07-30 11:16:38 +05:30
wangmengyang a23f857452 component/bt: bugfix on the crash during end of sco link resulted from link supervision timeout 2018-07-26 14:41:25 +08:00
Jiang Jiang Jian b3dd6ff9fc Merge branch 'bugfix/btdm_controller_deinit' into 'master'
bt : fix bug that bluetooth controller init/disable/enable/disable may cause exception

See merge request idf/esp-idf!2800
2018-07-25 21:00:35 +08:00
Ivan Grokhotkov caeab09f65 Merge branch 'bugfix/src_encoding' into 'master'
Correct source code encoding

See merge request idf/esp-idf!2820
2018-07-24 22:03:46 +08:00
Angus Gratton cf614120a5 Merge branch 'bugfix/reclaim_bt_ble_bss' into 'master'
components/bt: Reclaim BT/BTDM BSS in bluetooth memory release function

See merge request idf/esp-idf!2750
2018-07-23 12:48:13 +08:00
Tian Hao 6e4342a877 bt : fix bug that bluetooth controller init/disable/enable/disable may cause exception
1. when one task do deinit/init/disable/enable, especially different cpu
core, it may cause controller crash in ISR handler
2. fix while BLE is scanning, bluetooth controller is disabled cause BLE
scan is not abort.
2018-07-20 14:10:55 +08:00
Hrishikesh Dhayagude f610249bdd Reclaim BT/BTDM BSS and Data in bluetooth memory release function
1. Modify esp_bt_controller_mem_release() to release BTDM BSS and Data to heap if
ESP_BT_MODE_BTDM mode is passed to it
2. Add a new API esp_bt_mem_release() which internally calls
esp_bt_controller_mem_release() with the provided mode and then if mode
is ESP_BT_MODE_BTDM, releases BT BSS and Data to heap.

Background:
For Wi-Fi and BT/BLE applications, for e.g. the usecase is like when
Bluetooth is used for provisioning and once the device is connected to the Wi-Fi
AP, we can turn off Bluetooth completely. In such scenarios, it should be possible to
reclaim all the memory of Bluetooth. Although, currently this does not
happen.

Experiment:
Made the following modifications to examples/bluetooth/gatt_server :
1. Added support of simple_wifi to it
2. Moved all the bluetooth related code under CONFIG_BT_ENABLED config
option
3. Calculated the free heap in 2 similar scenarios:
   i. Disabled BT (CONFIG_BT_ENABLED undefined) and checked the free
heap after STA connected
   ii. Kept BT enabled and disabled it after STA connected and checked
the free heap
Ideally, the numbers for i., ii. above should have been similar. But
there was a delta of almost 30-31K. (i. > ii.)
4. Through make size-components checked the common BSS for libbta.a and libbtdm_app.a
and found it to be almost 30K. Data is around 1K

Solution:
1. Modified the linker script to mark the BSS and Data for these libraries and
free it when ESP_BT_MODE_BTDM mode is passed to mem release APIs.
2. Verified that the free heap is comparable for i. and ii. above.

Note: It is known that once this is done, Bluetooth can only be used
again post reboot.

Signed-off-by: Hrishikesh Dhayagude <hrishi@espressif.com>
2018-07-20 11:33:26 +05:30
Jiang Jiang Jian e4fb359c34 Merge branch 'bugfix/btdm_bt_remove_device_fail_when_ble_connected' into 'master'
component/bt: Fix bug of remove bond device fail when BLE and BT are connectd at the same time

See merge request idf/esp-idf!2767
2018-07-20 10:46:31 +08:00
Roland Dobai 0efb4a11ec Correct source code encoding 2018-07-19 14:00:44 +02:00
Jiang Jiang Jian d62293165b Merge branch 'bugfix/btdm_using_osi_malloc_instead_of_malloc' into 'master'
component/bt: Using osi_malloc instead of malloc

See merge request idf/esp-idf!2748
2018-07-18 11:09:28 +08:00
baohongde 11ca056320 component/bt: Fix bug of remove bond device fail when BLE and BT are connectd at the same time 2018-07-16 15:46:27 +08:00
Jiang Jiang Jian 6554bdcbb6 Merge branch 'bugfix/btdm_add_profile_descriptor_list_for_spp' into 'master'
component/bt: Add profile descriptor list for SPP

See merge request idf/esp-idf!2691
2018-07-13 19:20:03 +08:00
Jiang Jiang Jian 8571170abe Merge branch 'feature/btdm_bt_ssp' into 'master'
component/bt: Add Secure Simple Pairing

See merge request idf/esp-idf!2453
2018-07-13 19:19:53 +08:00
Ivan Grokhotkov b354770f42 Merge branch 'bugfix/fixes_from_github' into 'master'
Fixes from Github

See merge request idf/esp-idf!2730
2018-07-13 15:03:50 +08:00
baohongde 47a164b3ac component/bt: Using osi_malloc instead of malloc 2018-07-11 11:15:41 +00:00
baohongde d7c4ec5235 component/bt: Add profile descriptor list for SPP 2018-07-11 11:14:41 +00:00
baohongde 21af1d7339 component/bt: Add Secure Simple Pairing 2018-07-10 11:18:52 +08:00
Le-Andrew a8da9c1b96 Fixed typos on booleans.
Merges https://github.com/espressif/esp-idf/pull/2067
2018-07-09 14:36:06 +08:00
wangmengyang 1ade9a34d2 component/bt: bugfix for erroneous data reporting always enabled 2018-07-09 13:45:55 +08:00
wangmengyang 0ede362f84 component/bt: bugfix of invalid SCO handle in HCI number_of_completed_packets event 2018-07-05 12:00:41 +08:00
Mahavir Jain bd177a34c6 bt: fix OS abstraction layer for correct critical section API usage
Signed-off-by: Mahavir Jain <mahavir@espressif.com>
2018-07-01 19:07:51 +05:30
Jiang Jiang Jian abbccb7acd Merge branch 'bugfix/coex_bug' into 'master'
esp32: fix coex bug

See merge request idf/esp-idf!2603
2018-06-30 22:29:18 +08:00
Jiang Jiang Jian b1fa1ba617 Merge branch 'bugfix/btdm_fix_gattc_register_multi_srvc_chg' into 'master'
Component/bt: fix register multi service change when register multi gattc

See merge request idf/esp-idf!2625
2018-06-30 11:30:41 +08:00
Jiang Jiang Jian b727113fc1 Merge branch 'bugfix/btdm_delete_deprecated_files' into 'master'
Component/bt: delete deprecated files

See merge request idf/esp-idf!2583
2018-06-29 19:37:03 +08:00
Jiang Jiang Jian 53ce5fd106 Merge branch 'bugfix/btdm_bt_remove_device_disconnect' into 'master'
component/bt: Fix bug of BT and BLE remove bond device

See merge request idf/esp-idf!2562
2018-06-29 19:29:57 +08:00
Jiang Jiang Jian fe0dc407da Merge branch 'bugfix/btdm_bad_pointer_of_bt_gap' into 'master'
component/bt: Fix some bad point calculations of BT GAP

See merge request idf/esp-idf!2655
2018-06-29 19:25:13 +08:00
Tian Hao e3df7d97a7 esp32: fix coex bug
1. fix BLE connection missing in coex mode
    2. modify other parameters to make coex priority more reasonable
    3. fix modem sleep procedure trap cause Wifi disable RF when BT is
    working. Such cause that BR/EDR is difficult to be connected, BLE
    connection stability decrease and so on.
    4. modify BR/EDR coexist duration to imrove BR/EDR connect success
    ratio.
    5. Due to the hardware coexist bug, BLE scan interval/window should
    be less than 0x100(about 160ms). Therefore, it will cause BLE cannot
    scan any advertising packet while WiFi have higher priority
    behaviour(such like RX beacon, scan, TX/RX VO packets and etc.).
2018-06-29 16:28:11 +08:00
Jiang Jiang Jian 0e4b28e893 Merge branch 'bugfix/btdm_fix_stop_adv_error_in_dual_core' into 'master'
component/bt: fix stop adv error in dual core

See merge request idf/esp-idf!2561
2018-06-29 15:06:49 +08:00
Jiang Jiang Jian 1124e073d7 Merge branch 'bugfix/btdm_fix_no_adv_packet' into 'master'
component/bt: fix no adv packets

See merge request idf/esp-idf!2647
2018-06-29 14:59:01 +08:00
zhiweijian d1c3c8494b Component/bt: fix register multi service change when register multi gattc 2018-06-29 06:54:16 +00:00
Jiang Jiang Jian 34797d8d52 Merge branch 'bugfix/btdm_respond_error_when_receives_unsupported_request' into 'master'
component/bt: Fix bug: Respond with the Error Response when receiving a request…

See merge request idf/esp-idf!2591
2018-06-29 14:47:12 +08:00
Jiang Jiang Jian 9510f77f7a Merge branch 'bugfix/btdm_rm_assert_in_isr' into 'master'
bugfix/btdm_rm_assert_in_isr

See merge request idf/esp-idf!2633
2018-06-29 14:24:28 +08:00
Jiang Jiang Jian a1a2a2009d Merge branch 'bugfix/prevent_btsleep_dfs_coex' into 'master'
prevent Dynamic Frequency Scaling to be used together with bluetooth modem sleep

See merge request idf/esp-idf!2645
2018-06-29 14:23:40 +08:00
baohongde be8ec6b8d2 component/bt: Fix some bad point calculations of BT GAP
In response to: https://github.com/espressif/esp-idf/issues/2103
2018-06-29 11:40:46 +08:00
wangmengyang 04ea784011 prevent Dynamic Frequency Scaling when using bluetooth modem sleep
This constraint will be elimiated after the issue is fixed
2018-06-28 18:08:18 +08:00
zwj 077380a352 component/bt: fix no adv packets 2018-06-28 17:49:41 +08:00
wangmengyang cfea04b6b3 component/bt: fix the cornered case caused by singular finetime correction value upon waking up from sleep
1. revert previous changes that adds 1-slot margin for first master Tx event, since this bugfix can handle that case
2018-06-27 20:21:39 +08:00
wangmengyang 02a620811d component/bt: remove the call of assert in time conversion functions which can be caused in ISR 2018-06-27 17:23:23 +08:00
wangmengyang e1bcd6ba0f component/bt: add 1 slot margin to program the 1st master Tx event during BLE connection
this will resolve the issue of failure of BLE connection stress test with sleep enabled
2018-06-26 11:10:47 +08:00
Jiang Jiang Jian aaf12390eb Merge branch 'feature/btdm_controller_to_host_flow_control' into 'master'
component/bt: Add Controller to Host Flow Control

See merge request idf/esp-idf!2493
2018-06-25 20:33:21 +08:00
Jiang Jiang Jian 6dd786c74d Merge branch 'bugfix/btdm_slave_can_not_receive_long_packets_in_smp' into 'master'
Component/bt: fix slave can not receive long packets in smp

See merge request idf/esp-idf!2586
2018-06-25 20:28:27 +08:00
zhiweijian 2469e90953 Component/bt: fix slave can not receive long packets in smp 2018-06-22 18:10:58 +08:00
Jiang Jiang Jian 8a7e112a72 Merge branch 'bugfix/read_rssi' into 'master'
bt : fix read rssi conflict when in dual mode

See merge request idf/esp-idf!2592
2018-06-22 17:19:23 +08:00
baohongde 29b7d4e916 component/bt: Fix bug of BT and BLE remove bond device
1. esp_ble_remove_bond_device will only remove BLE bond key and disconnect BLE device.
2. esp_bt_gap_remove_bond_device  will only remove BT bond key and disconnect BT device.
2018-06-22 11:54:40 +08:00
Tian Hao e3d3ed5a06 bt : fix read rssi conflict when in dual mode 2018-06-22 11:16:16 +08:00
zhiweijian 4aae691519 Component/bt: modify throughput demo default config 2018-06-21 20:48:20 +08:00
baohongde 012415c9f8 component/bt: Fix bug: Respond with the Error Response when receiving a request that it does not support 2018-06-21 20:20:21 +08:00
zhiweijian 41b57d35c8 Component/bt: delete deprecated files 2018-06-21 06:07:21 +00:00
baohongde de8a735a7a component/bt: Add Controller to Host Flow Control 2018-06-21 11:44:40 +08:00
yulong 225c4371c1 component/bt: Fix the bug of when operating the list on interrupt function, there is no lock protection. 2018-06-19 21:01:50 +08:00
zwj c9aac643e3 component/bt: fix stop adv error in dual core 2018-06-15 20:43:10 +08:00
Angus Gratton 0e501e5edd Merge branch 'bugfix/bt_rfcomm_pr1923' into 'master'
bt: PORT_WriteDataCO: fixed a bug, reduced heap memory allocation

See merge request idf/esp-idf!2511
2018-06-13 08:41:16 +08:00
Markus Becker 3a71ae8595 bt: PORT_WriteDataCO: fixed a bug, reduced heap memory allocation
* a missing pointer increment caused error, if available was > 0 after the first iteration of while(available) loop.
* changed memory allocation strategy from large fixed size (RFCOMM_DATA_BUF_SIZE) to just the needed
  size, which will be below MTU

Cherry-picked from https://github.com/espressif/esp-idf/pull/1923/
2018-06-13 09:52:02 +10:00
Angus Gratton e33ec5ccf4 Merge branch 'bugfix/btdm_tx_power_value' into 'master'
fix bluetooth(dual-mode) tx power value

See merge request idf/esp-idf!2503
2018-06-13 07:43:13 +08:00
Tian Hao 294a4bd1f4 fix bluetootm(dual-mode) tx power value 2018-06-12 19:18:47 +08:00
zhiweijian 85e88cd0eb Component/bt: fix include service start handle error 2018-06-08 16:00:34 +08:00
Mahavir Jain 5a9fc19f38 bt: fix typo in documentation
Signed-off-by: Mahavir Jain <mahavir@espressif.com>
2018-06-06 18:22:32 +05:30
Jiang Jiang Jian 8955db6d29 Merge branch 'bugfix/btdm_fix_no_gatt_server_req_callback_warning' into 'master'
component/bt: fix the issue where no gatt server request callback warning caused…

See merge request idf/esp-idf!2502
2018-06-06 16:29:59 +08:00
zhiweijian 822dac5659 Component/bt: fix memory leak 2018-06-06 02:17:06 +00:00
island f30410113b component/bt: fix the issue where no gatt server request callback warning caused while acting as a GATTC 2018-06-05 02:41:34 +00:00
zhiweijian ae6b47a60a Component/bt: close BT sleep in default config 2018-06-04 11:17:27 +08:00
Tian Hao 21cb7226a2 component/bt : enlarge the A2DP SINK FRAME QUEUE SIZE to make A2DP more fluent 2018-06-01 16:51:23 +08:00
Jiang Jiang Jian cb9483e844 Merge branch 'bugfix/btdm_a2dp_assert_warn_after_connected' into 'master'
component/bt: Fix bug a2dp assert warn after connected

See merge request idf/esp-idf!2470
2018-06-01 15:54:05 +08:00
baohongde c04a4a8527 component/bt: Fix bug a2dp assert warn after connected 2018-06-01 10:57:22 +08:00
Jiang Jiang Jian 50252ca794 Merge branch 'bugfix/btdm_malloc_fail_lead_to_exception' into 'master'
component/bt: Fix malloc fail lead to crash

See merge request idf/esp-idf!2485
2018-06-01 10:36:36 +08:00
Jiang Jiang Jian a3a0b01c1b Merge branch 'bugfix/btdm_fix_ble_throughput_demo_fail' into 'master'
Component/bt: fix throughput_demo_fail

See merge request idf/esp-idf!2467
2018-05-31 18:53:01 +08:00
xiewenxiang 4467b34da2 component/bt: Fix malloc fail lead to crash 2018-05-31 13:31:27 +08:00
Angus Gratton 6b9784cc45 Merge branch 'master' into feature/cmake_update 2018-05-31 14:46:23 +10:00
zhiweijian 212b786119 Component/bt: fix throughput_demo_fail 2018-05-30 19:58:31 +08:00
Jiang Jiang Jian fbbf4b0c03 Merge branch 'bugfix/btdm_fix_start_adv' into 'master'
Component/bt: fix start adv complete event state error in dual core

See merge request idf/esp-idf!2432
2018-05-30 19:41:39 +08:00
zhiweijian c8e848b0ff Component/bt: fix start adv 2018-05-30 17:10:51 +08:00
baohongde 4c8d9278b5 component/bt: Fix mem leak of esp_ble_gap_set_security_param 2018-05-28 17:43:53 +08:00
Tian Hao 5f39b58b83 component/bt : fix bug that assert rwbt.c 265 8192 error 2018-05-24 15:47:16 +08:00
zhiweijian 2e63a445d9 Component/bt: fix set scan params command completer error 2018-05-23 12:09:39 +00:00
Jiang Jiang Jian affed9a235 Merge branch 'feature/a2dp-sink-source-runtime-selection' into 'master'
bt-a2dp: BT A2DP sink and source selection is now runtime

See merge request idf/esp-idf!2229
2018-05-22 22:21:39 +08:00
Amey Inamdar ae8ed8dad8 bt-a2dp: BT A2DP sink and source selection is now runtime
Earlier they have to be selected at the compile time through sdkconfig.
A2DP sink and source application tested with this change.

Signed-off-by: Amey Inamdar <amey@espressif.com>
2018-05-21 14:02:49 +05:30
zhiweijian 340ad5c430 Component/bt: fix scan duplicate 2018-05-21 15:23:15 +08:00
wangmengyang 4c4e143a2f component/bt: implement HFP Hands Free Unit Role 2018-05-21 11:33:30 +08:00
wangmengyang 22e21b38f7 component/bt: implement bluetooth modem sleep mode, one mode for BLE only and another for dual mode bluetooth
1. provide options for bluetooth low power mode
2. provide two options for bluetooth low power clock: main XTAL and external 32kHz XTAL
3. provide function and callbacks to control bluetooth low power mode, including enable/disable sleep, software wakeup request, low power clock settings, check power state, etc
4. modify vhci API vhci_host_send_packet to use blocking mode
5. note that DFS and bluetooth modem sleep can not be used together currently.
2018-05-19 15:37:26 +08:00
Roland Dobai 2aa9c15906 VFS: allow to find free file descriptors & register them 2018-05-18 07:57:35 +02:00
Jiang Jiang Jian 993b8b7bf6 Merge branch 'bugfix/o3_fails' into 'master'
Fix compilation errors when -O3 is used

See merge request idf/esp-idf!2396
2018-05-17 16:48:13 +08:00
baohongde 174501ff35 component/bt: modify BT GAP structure
1. Separate the upward and the downward
2. Cancel use of msg.aid when call btc_transfer_context
2018-05-16 18:58:13 +08:00
Jiang Jiang Jian f502e195aa Merge branch 'bugfix/improve_bt_debug' into 'master'
components/bt: Improve the Bluetooth debug messaging scheme

See merge request idf/esp-idf!2303
2018-05-16 16:04:34 +08:00
Jiang Jiang Jian 6adaeb0048 Merge branch 'bugfix/btdm_fix_crash_without_smp_when_deinit_bluedroid' into 'master'
Component/bt: fix crash without SMP when deinit bluedroid

See merge request idf/esp-idf!2375
2018-05-14 21:20:44 +08:00
Hrishikesh Dhayagude da6cb6c741 components/bt: Improve the Bluetooth debug messaging scheme
As of now, when Bluetooth debugs are enabled, all the messages are
mapped to BT_PRINTF which is mapped to ESP_LOGE. Hence, make monitor
shows all logs in red color which might lead to missing the actual
errors

This patch maps the Bluetooth messages to appropriate ESP_LOG* messages
and improves readability.

Also, make the BT trace level be configurable in menuconfig, so that
each layer of bt trace can be enabled/disabled.

Finally, add debug log control for BTC, OSI, BLUFI and clear up
Bluetooth debug logs.

So, with this the method of enabling Bluetooth logs is as follows:
1. make menuconfig -> Component config -> Bluetooth -> Bluedroid Enable
-> BT DEBUG LOG LEVEL -> set trace level for every layer of BT

Signed-off-by: Hrishikesh Dhayagude <hrishi@espressif.com>
2018-05-14 20:45:05 +08:00
Jiang Jiang Jian 9e5318b584 Merge branch 'bugfix/btdm_reconnect_con_params_update_reject_in_smp' into 'master'
Component/bt: update con params is rejected in smp when reconnection

See merge request idf/esp-idf!2318
2018-05-14 20:19:29 +08:00
Roland Dobai ca08397b6b Fix compilation errors when -O3 is used
Closes https://github.com/espressif/esp-idf/issues/718
2018-05-14 12:29:57 +02:00
Jiang Jiang Jian d4276efed7 Merge branch 'bugfix/bluedroid_const_char' into 'master'
Bluedroid: remove warnings about discarding "const" for "const char*"

See merge request idf/esp-idf!2387
2018-05-14 15:25:45 +08:00
Roland Dobai 2041c08681 Bluedroid: remove warnings about discarding "const" for "const char*" 2018-05-11 11:29:10 +02:00
Jiang Jiang Jian 325920046f Merge branch 'bugfix/btdm_conn_fail_after_deinit_and_init_spp' into 'master'
component/bt: Fix can't be connected if init SPP again after SPP deinit

See merge request idf/esp-idf!2369
2018-05-11 15:38:03 +08:00
Jiang Jiang Jian 41ba013bd4 Merge branch 'bugfix/btdm_fix_service_change_write_busy' into 'master'
Component/bt: fix service change write busy

See merge request idf/esp-idf!2359
2018-05-11 15:20:04 +08:00
Jiang Jiang Jian c1e0f029d1 Merge branch 'bugfix/btdm_a2dp_disconn_state_when_connecting_with_iphone' into 'master'
component/bt: Fix bug a2dp have disconnect state when connecting with iphone 7

See merge request idf/esp-idf!2288
2018-05-11 14:59:34 +08:00
baohongde dfbc59f1c2 component/bt: Fix can't be connected if init SPP again after SPP deinit 2018-05-10 16:16:25 +08:00
zhiweijian b7a5fef871 Component/bt: fix crash without SMP when deinit bluedroid
- fix crash without SMP when bluedroid deinit
- modify default menuconfig in blufi demo
2018-05-10 11:39:34 +08:00
zhiweijian cb59576dd0 Component/bt: fix service change write busy 2018-05-09 20:49:26 +08:00
zhiweijian 58b2cb3e0c Component/bt: update con params is rejected in smp when reconnection 2018-05-09 20:28:13 +08:00
Roland Dobai 80ff8d55ac bluedroid: use the new socket registering API 2018-05-07 09:01:56 +02:00
baohongde cbab7fec76 component/bt: Fix bug a2dp have disconnect state when connecting with iphone 7 2018-05-04 19:44:40 +08:00
Jiang Jiang Jian b827e0e331 Merge branch 'feature/btdm_get_end_handle_when_get_include_service' into 'master'
Component/bt: get end_handle when get include services

See merge request idf/esp-idf!2319
2018-05-04 19:31:43 +08:00
Jiang Jiang Jian ade78d3850 Merge branch 'bugfix/btdm_fix_version_excahnge_issue' into 'master'
Component/bt: fix version exchange issue

See merge request idf/esp-idf!2329
2018-05-04 19:30:03 +08:00
baohongde c22c070e07 component/bt: Add APIs of get and remove bond device
1. Add APIs of get and remove bond device
2. Add ESP_BT_GAP_AUTH_CMPL_EVT
2018-05-03 19:05:57 +08:00
Jiang Jiang Jian 1e8ab3d18e Merge branch 'bugfix/gap_appearance_fixes' into 'master'
components/bt: Make modifications to the support of GAP appearance/icon characteristic

See merge request idf/esp-idf!2249
2018-05-01 23:00:24 +08:00
Jiang Jiang Jian 0bb551c051 Merge branch 'bugfix/btdm_prepare_write_status_correct' into 'master'
component/bt: Check the value received from the peer device when sent the data used prepare write.

See merge request idf/esp-idf!2320
2018-05-01 22:57:20 +08:00
Jiang Jiang Jian 95cbdd76dc Merge branch 'feature/btdm_read_bredr_rssi' into 'master'
component/bt : add class bt read RSSI delta (golden range)

See merge request idf/esp-idf!2325
2018-05-01 22:55:50 +08:00
Angus Gratton 381be65472 cmake: Build all examples in CI
Includes some fixes for compile errors/warnings in examples.
2018-04-30 10:18:33 +10:00
Angus Gratton 1cb5712463 cmake: Add component dependency support
Components should set the COMPONENT_REQUIRES & COMPONENT_PRIVATE_REQUIRES variables to define their
requirements.
2018-04-30 09:59:20 +10:00
Angus Gratton b44c8b125f cmake: Style cleanup, add cmake linter to gitlab CI 2018-04-30 09:59:20 +10:00
Angus Gratton 800bffb8b0 cmake: Add CMakeLists.txt files for all examples
Generating using convert_to_cmake.py, with some minor cleanup
2018-04-30 09:59:20 +10:00
Angus Gratton 88df8fd293 cmake: Use cmake_lint project, tidy up all CMake source files 2018-04-30 09:59:20 +10:00
Angus Gratton 97e01a4c4d cmake: Remove stray tab 2018-04-30 09:59:20 +10:00
Angus Gratton c671a0c3eb build system: Initial cmake support, work in progress 2018-04-30 09:59:20 +10:00
Jiang Jiang Jian 5a080ee37a Merge branch 'bugfix/btdm_genrate_hash_key_by_bluedroid' into 'master'
component/bt: Added the hash key generated directly in the bluedroid module.

See merge request idf/esp-idf!2321
2018-04-28 16:42:27 +08:00
zhiweijian 5549ea3439 Component/bt: fix version exchange issue
- Android 7.0 version issue
- version exchange late in some phones
- can not get version in smp
2018-04-28 16:32:24 +08:00
Hrishikesh Dhayagude fd7baaf4ba components/bt: Make modifications to the support of GAP appearance/icon
characateristic

1. In addition to mentioning in the documentation, use the standard appearance
   values already present and return appropriate error in case an incorrect
   value is passed
2. Add ESP_BLE_APPEARANCE* macros corresponding to BTM_BLE_APPEARANCE*
and use them from the API instead
3. Add the missing appearance parameter values from
https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.characteristic.gap.appearance.xml
4. Fix some minor typos

Signed-off-by: Hrishikesh Dhayagude <hrishi@espressif.com>
2018-04-28 13:59:36 +05:30
zhiweijian e236ffd91f Component/bt: get end_handle when get include services 2018-04-28 16:27:25 +08:00
Yulong 6c20bc3203 component/bt: Added the hash key generated directly in the bluedroid module.
1. Change all the hash used from the coap module to generated by the bluedroid module directly.

component/bt: Added the <string.h> include file to the gattc_co module to avoid compile error.
2018-04-28 03:11:05 -04:00
Jiang Jiang Jian ee9ab48347 Merge branch 'feature/btdm_bt_spp_vfs' into 'master'
component/bt: Add SPP profile with VFS

See merge request idf/esp-idf!1883
2018-04-28 15:10:07 +08:00
Jiang Jiang Jian 25798b0e3a Merge branch 'feature/btdm_ble_throughput_optimiz' into 'master'
Feature/btdm ble throughput optimiz

See merge request idf/esp-idf!2265
2018-04-28 15:01:39 +08:00
baohongde d95d0ececb component/bt: Add SPP profile with VFS 2018-04-28 11:36:22 +08:00
Yulong fd3162d831 component/bt: Added the server test for the bit rate test.
component/bt: optimiz the code
component/bt: optimiz the code.
component/bt: added the l2c change.
component/bt: Added the modified.
component/bt: change the indicate callback function.

component/bt: added the BLE throughput test gattc & gatts example.

component/bt: Change the sdkconfig.default CONFIG_GATTS_NOTIFY_THROUGHPUT setting.

component/bt: Change the throughput_client_task delay method.

component/bt: change the btu task size from 4096 to 5096

comonent/bt: close the print when congest.

component/bt: Added the CPU frequency set method to the readme file.

component/bt: Change the gatts_demo_char1_val to gl_profile_tab[PROFILE_A_APP_ID].char_handle to avoid make error.

example/ble_throughput: Added the Readme explanation.

component/bt: Added the bt lib change.

component/bt: Update the bt lib & Change the LOG level from ERROR to DEBUG when congest.

component/bt: Fixed the bug of timer start assign error.

component/bt: Change back the gattc & gatts demo with same as the master.

example/ble_throughput: Fixed the bug when prepare write of the ble throughput.

component/bt: Update the check_sum algorithm.

component/bt: Change Added the path when used the include file of "l2cdefs.h" & "l2c_api.h".

example/throughput_client: Added the Freertos related header files to ble throughput client demo to avoid compile error.
2018-04-27 23:02:10 -04:00
Yulong 8f015e3e48 component/bt: Check the value received from the peer device when sent the data used prepare write.
component/bt: Fix misspellings of "corret" in comments in bta_gattc_write_cmpl function.
2018-04-27 08:20:01 -04:00
Liu Zhi Fu ed46976f41 esp32/bt/driver: support static allocation of FreeRTOS queues used by ISR routine
Support static allocation of FreeRTOS queues used by ISR routine in WiFi/BT/esp_timer/driver etc
2018-04-27 15:02:30 +08:00
Tian Hao 8646913cbf component/bt : add class bt read RSSI delta (golden range) 2018-04-27 14:33:47 +08:00
Tian Hao adada3f67e component/bt : modify header files to avoid conflict
1. add the L1 include path with a prefix, such like osi/list.h, stack/a2d_api.h and etc.
2. modify component, only bluedroid/api/include/api is export to another component and application,
   other include path just for bluedroid used
3. put bluedroid/include into common/include/common, so the root directory of bluedroid have no include path.
4. modify doxygen to use esp_bt.h and redirect to
component/bt/bluedroid/api/include/api/

fix compile
2018-04-26 19:32:06 +08:00
Jiang Jiang Jian 683270958c Merge branch 'feature/btdm_set_bredr_txpower' into 'master'
component/bt : add BR/EDR TX power set

See merge request idf/esp-idf!2267
2018-04-25 20:53:21 +08:00
Tian Hao e660785532 component/bt : add BR/EDR TX power set 2018-04-25 15:28:19 +08:00
zhiweijian be107320f7 Component/bt: fix gatt cache error
- fix sev == NULL error
- fix start_handle == end_handle
2018-04-23 15:43:10 +08:00
Angus Gratton 088c73bd22 Merge branch 'feature/disable_ble_service_change_pr1673' into 'master'
Add option to ena/dis BLE service change registration

See merge request idf/esp-idf!2210
2018-04-23 09:15:02 +08:00
Jiang Jiang Jian c32ccf7abb Merge branch 'bugfix/add_NULL_value_check_bta_gattc_get_services' into 'master'
components/bt: Add NULL value check in bta_gattc_get_service_with_uuid()

See merge request idf/esp-idf!2212
2018-04-20 18:15:45 +08:00
Jiang Jiang Jian 1c06b44f08 Merge branch 'bugfix/bt_correct_inquiry_mode_name' into 'master'
components/bt: Correct the enquiry mode name

See merge request idf/esp-idf!2217
2018-04-20 18:14:57 +08:00
Jiang Jiang Jian 102d08fd79 Merge branch 'feature/btdm_gattc_cache' into 'master'
Feature/btdm gattc cache

See merge request idf/esp-idf!1083
2018-04-20 17:49:35 +08:00
Yulong 2c7182c59f component/bt: For unity, Change all the associat & associa to abbreviated form(assoc). 2018-04-20 02:16:33 -04:00
Yulong b940abca0e component/bt: Change the cache 'associat' name for unify. 2018-04-19 22:56:33 -04:00
Ivan Grokhotkov bc4c201e20 Merge branch 'bugfix/fix_github_reported_1841_and_1845' into 'master'
Fix few minor github reported issues

See merge request idf/esp-idf!2252
2018-04-19 12:59:37 +08:00
Yulong ece6bd9b82 component/bt: Change the btc gattc callback function with the compile error.
1. Change all the gattc API && bta gattc layer.
2. Debug the code and change the btc_ble_gattc_get_db method.
3. Change the gatt read API interface.
4. Reconstruction the BTA_gattc_cache code.
5. Change back the bluedroid_get_status to marco.
6. Change the gattc docs format.
7. Change the docs format.
8. fix the read char value bug.
9. change the gattc_get_attr_count method.
10. Change back the bta_gattc write ccc code.
11. Change the gattc api docs format
12. Change the gattc API docs.
13. Change the prepare write descriptor method to avoid the exection.
14. modify gatt clinet demo with new API
15. Change the p_src_data->read.p_value to avoid exection.
16. Change the bugfix of gattc unreg for the notify.

    component/bt: Added the serch service res start_handle & end_handle to the result.

component/bt: Added the bta_gattc_cache_write when gatt discovery complete.

component/bt: Added the bta_gattc_cache_write declaration.

component/bt: Added the comments for esp_ble_gattc_cache_refresh API.

component/bt: Change the spelling errors & some comment error.

component/bt: fix bug of get gattc cache address list error.

1. Change the esp_bluedroid_get_status to macro;
2. added the malloc & free for the get_addr_list

component/bt: Added the addr_info->ass_addr == NULL Judgment to prevent crashes in the bta_gattc_co_cache_find_src_addr function.

component/bt: Fixed following gattc cache bugs

1. gattc can't refresh the gattc cache in the gatt discover state;
2. remove the nvs_get_blob in the cache address init function;
3. added the nvs_set_blob return value judgment in the cache address save function;
4. added the list_new when ass_address is NULL;
5. Change the ass_address list remove method to fix the ass address can't remove bug.
2018-04-19 12:05:13 +08:00
Jiang Jiang Jian 16ad81c636 Merge branch 'feature/btdm_get_and_set_cod' into 'master'
component/bt: Add API: get cod & set cod

See merge request idf/esp-idf!2127
2018-04-17 14:21:18 +08:00
Jiang Jiang Jian a3cfbdb150 Merge branch 'bugfix/btdm_a2dp_source_cleanup_bug' into 'master'
component/bt: Fix bug of a2dp source cleanup bug when connected

See merge request idf/esp-idf!2042
2018-04-17 14:20:15 +08:00
Jiang Jiang Jian 0d55f2cb7b Merge branch 'bugfix/btdm_add_assert_when_no_device_name' into 'master'
component/bt: Fix exception when there is no device name

See merge request idf/esp-idf!2184
2018-04-17 14:19:39 +08:00
Mahavir Jain 60ab582ba6 bt: fix incorrect comments for error codes
Closes https://github.com/espressif/esp-idf/issues/1845

Signed-off-by: Mahavir Jain <mahavir@espressif.com>
2018-04-17 10:44:48 +05:30
Jiang Jiang Jian 12dbe4dac5 Merge branch 'feature/btdm_add_set_local_icon_api' into 'master'
Component/bt: add set gap icon API

See merge request idf/esp-idf!2129
2018-04-11 20:48:13 +08:00
Jiang Jiang Jian 6b7ad6b707 Merge branch 'bugfix/btdm_do_not_update_conn_params_when_have_key_in_slave' into 'master'
Component/bt: do not update connection params when already have keys in slave

See merge request idf/esp-idf!2176
2018-04-11 20:47:27 +08:00
Hrishikesh Dhayagude 9c41c93f5f components/bt: Correct the enquiry mode name
Signed-off-by: Hrishikesh Dhayagude <hrishi@espressif.com>
2018-04-10 17:58:11 +05:30
baohongde 52dbcef908 component/bt: Fix exception when there is no device name 2018-04-10 17:55:33 +08:00
Roland Dobai 744c2dcdd9 Resolve problems found by enabling -Wwrite-strings compilation flag 2018-04-10 08:53:43 +02:00
Hrishikesh Dhayagude 284f332f06 components/bt: Add NULL value check in bta_gattc_get_service_with_uuid()
Signed-off-by: Hrishikesh Dhayagude <hrishi@espressif.com>
2018-04-10 09:34:03 +05:30
Ing. Jaroslav Safka 801632d68b bt: Add option to ena/dis BLE service change registration
Add option to enable/disable automatic registration of BLE Gattc
service change notify. Which sends in parralel
(with user message flow) commands to BLE server which
sometime leads to GATT_BUSY.
(BLE server is able to handle only one command at time)

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

Merges https://github.com/espressif/esp-idf/pull/1673
2018-04-10 12:27:33 +10:00
baohongde 789edc0b52 component/bt: Add API: get cod & set cod
In response to: https://github.com/espressif/esp-idf/issues/1565
2018-04-09 19:25:26 +08:00