Commit graph

385 commits

Author SHA1 Message Date
Yulong 45999b69d6 component/bt: Set the style to the same, output the macro in the function.
1.After the separate, can save 15k~25k ram & 240k~460k code size(depending on the menuconfig).
2017-04-24 23:46:37 -04:00
Yulong 2cfde4dfd9 compoent/bt:change the code style 2017-04-23 05:52:18 -04:00
Yulong 1016ab1c2a component/bt:separate the smp_br_connect_callback from the BLE only mode 2017-04-23 00:48:23 -04:00
Yulong b5989a6b26 component/bt:Recovery the btm_establish_continue when created the acl connection 2017-04-21 02:43:35 -04:00
Angus Gratton 52c378b447 bluedroid: Fix compilation warnings related to aliasing
Merges PR #518 https://github.com/espressif/esp-idf/pull/518
2017-04-21 11:31:40 +10:00
Yulong bc807a18d1 component/bt:Finish all the separate code from BT & BLE 2017-04-20 07:18:05 -04:00
Yulong 2723504473 add the GATTC_INCLUDED marco to close the bta_gattc module when not used the GATTC 2017-04-19 05:16:24 -04:00
Yulong 0ddadc98a3 separate the btm layer from SMP security 2017-04-19 03:44:01 -04:00
Yulong 65ff8bd160 l2cap can send data to low layer when close the classic bt. 2017-04-18 05:42:55 -04:00
Yulong 22ccf6c368 component/bt:rebase the BT_BLE_separate to the new master 2017-04-17 22:53:43 -04:00
wangmengyang 4f3b391674 component/bt: transfer bluedroid timer events to be handled by BTC task 2017-04-14 18:49:30 +08:00
Yulong 4715fa16ae change the make error in bta_dm_ble_set_rand_address func 2017-04-14 02:52:43 -04:00
Yulong cb5c296829 component/bt:move the bugfix/ble_set_rand_addr_bug here for fix the conflict with the master 2017-04-14 02:45:07 -04:00
Yulong f6f094213e compoment/bt:Change the tabs to space in btc_ble_storage.c & btc_gap_ble.c file 2017-04-13 23:50:14 -04:00
Yulong aff8758fe4 delete the debug log in the btc_ble_storage file 2017-04-13 22:40:37 -04:00
Yulong c6a516f122 component/bt:move the btdm_rebase_ssp_api branch to this branch 2017-04-13 10:14:28 -04:00
Jiang Jiang Jian 6ace4f6fa4 Merge branch 'feature/btdm_avrc' into 'master'
Feature/btdm avrc

The source branch "feature/btdm_avrc" includes classic Bluetooth profiles A2DP(sink role) and AVRCP(controller role); 
Menuconfig options to control whether to enable classic BT is added.

See merge request !591
2017-04-13 14:36:58 +08:00
wangmengyang b503d68045 component/bt: implement classic Bluetooth profiles A2DP(sink) and AVRCP(controller) 2017-04-12 16:42:14 +08:00
Jiang Jiang Jian 79173c0f2a Merge branch 'bugfix/btdm_gatt_memory_leak' into 'master'
bt component: Fix memory leak while using gatt server

- fix memory leak while creating attribute table
- fix memory leak while deleting service

See merge request !656
2017-04-12 15:43:32 +08:00
island f688309b3a bt component: Fix memory leak while using gatt server
- fix memory leak while creating attribute table
- fix memory leak while deleting service
2017-04-12 14:58:45 +08:00
island 941a12cb4e bt component: Add stop adv/scan completed event 2017-04-12 14:19:16 +08:00
island a4f3312d9d bt component: optimize scan feature
1. Add advertising data length and scan response length in scan result
2. Add scan continuously feature
3. Fix non connectable adv topology error
4. Increase BTC queue size
2017-04-11 14:20:20 +08:00
wangmengyang ccfe4fefeb component/bt: implement classic Bluetooth profiles A2DP(sink) and AVRCP(controller) 2017-04-10 16:12:21 +08:00
Ivan Grokhotkov 85e709705b Merge branch 'bugfix/btdm_task_priority' into 'master'
component/bt : modify bluetooth task priority

modify bluetooth task priority to lower than IPC task priority.

See merge request !631
2017-04-07 14:56:31 +08:00
Ivan Grokhotkov 42d819e796 Merge branch 'feature/btdm_uart_hci' into 'master'
Feature/btdm uart hci

    1. support UART HCI, devolper need not to make a bridge between VHCI and UART.
    2. fix bug of rand/srand called in ISR.
    3. fix bug of BLE rx packets may cause assert.

See merge request !626
2017-04-07 12:13:42 +08:00
wangmengyang b5ea92a26e component/bt: implement classic Bluetooth profiles A2DP(sink) and AVRCP(controller) 2017-04-06 16:56:18 +08:00
wangmengyang dbd4e0522e Merge branch 'master' into feature/btdm_avrc 2017-04-06 14:59:58 +08:00
Tian Hao d90a35af19 component/bt : modify bluetooth config style 2017-04-06 11:35:53 +08:00
Tian Hao 95d691afdb component/bt : support UART HCI and fix some bugs
1. support UART HCI, devolper need not to make a bridge between VHCI and UART.
2. fix bug of rand/srand called in ISR.
3. fix bug of BLE rx packets may cause assert.
2017-04-05 21:23:43 +08:00
Tian Hao f5ebeb4c4d component/bt : add uart(1/2) as HCI IO directly 2017-04-05 21:23:42 +08:00
Tian Hao e384c7c014 component/bt : modify alarm APIs to be safely accessible from multiple tasks 2017-04-05 17:34:26 +08:00
Tian Hao ecb75b69fd component/bt : modify bluetooth task priority 2017-04-01 17:17:57 +08:00
wangmengyang 9d745be3f7 Merge branch 'master' into feature/btdm_avrc 2017-03-31 12:51:45 +08:00
wangmengyang c9d29d109e component/bt: fix the dependence issue in Kconfig 2017-03-30 21:16:11 +08:00
Angus Gratton b9a06e68dd Merge branch 'bugfix/minor_fixes' into 'master'
Minor fixes and PRs cherry-picked from Github



See merge request !602
2017-03-23 17:57:28 +08:00
Matthias Ringwald 3e7b786af5 component/bt: allow to use alternative Bluetooth stack by disabling Bluedroid
Merges #408 https://github.com/espressif/esp-idf/pull/440
2017-03-22 15:13:25 +08:00
Angus Gratton 8438b8aa92 bt: Fix typo ESP_BT_MODE_ILDE
Closes #450 https://github.com/espressif/esp-idf/issues/450
2017-03-22 14:41:44 +08:00
Tian Hao 13f0737883 component/bt : fix blufi bug of sec_mode reset 2017-03-21 17:17:07 +08:00
wangmengyang 2a5d01a930 component/bt: clean up the A2DP sink example 2017-03-18 16:02:54 +08:00
wangmengyang 8ec94418de component/bt: clean up the API header and generate documentation files 2017-03-18 14:55:31 +08:00
wangmengyang e132e95476 component/bt: format the new source files 2017-03-17 22:46:49 +08:00
wangmengyang 1cf5a56896 component/bt: move API to set device name that can be used by both bt and ble applications 2017-03-17 19:16:52 +08:00
wangmengyang 66fd3b9768 component/bt: add conditional compilation direvatives to control the source code building of SBC codec 2017-03-17 15:57:30 +08:00
wangmengyang fda2e89a1e component/bt: add conditional compilation direvatives to control the source code building of classic bluetooth 2017-03-17 15:08:47 +08:00
wangmengyang b2f52dd22e component/bt: add Kconfig option "CLASSIC_BT_ENABLED" 2017-03-16 22:32:27 +08:00
wangmengyang aaf0cc00c4 component/bt: minor issue fixes for pre-merge
1. arrange the order of profile ID enums
2. add directory "external" and move SBC codec source into it
2017-03-16 16:48:39 +08:00
wangmengyang a96df34d9b component/bt: recover the BLE buffer size macros 2017-03-14 21:00:58 +08:00
wangmengyang 6cb9985e5d component/bt: merge the HCI packet reassemble logic modification 2017-03-14 15:34:56 +08:00
wangmengyang 17696bc679 component/bt: resolve the differences with ESP-IDF master branch 2017-03-13 21:28:53 +08:00
wangmengyang 383db0dc81 Merge branch 'master' into feature/btdm_avrc 2017-03-13 16:21:41 +08:00
wangmengyang d101f2113b component/bt: code clean up for btc_media_task
1. remove unused macros variables and functions
2. modify the implementation of API "esp_a2d_register_data_callback" to post messages to BTC task.
2017-03-13 14:54:02 +08:00
wangmengyang 878b85c421 component/bt: update with bugfix that media task failed. 2017-03-09 20:16:10 +08:00
wangmengyang 5b7b704365 component/bt: format the API headers 2017-03-09 19:03:34 +08:00
island 123b6f88dc component/bt: modify BLE advertising type error 2017-03-09 15:36:22 +08:00
Ivan Grokhotkov 045aa45731 Merge branch 'bugfix/btdm_gatt_attribute_table_debug' into 'master'
bt component: fix bluetooth gatt packets process bugs

1. Add process of prepare write request packets
2. Add process of execute write request packets
3. Add process of reliable write request packets
4. Fix bug of processing read blob request packets
5. Fix bug of processing write request packets
6. Optimize error check and process in stack

See merge request !558
2017-03-09 13:28:11 +08:00
wangmengyang 18814c03d4 component/bt: clean up profile call/callback handlers
1. remove the empty function btc_gap_bt_cb_handler();
2. separate the a2dp profile call/callback handers
2017-03-08 21:08:11 +08:00
wangmengyang 07548918df component/bt: clean up AVRC logic and the header file 2017-03-08 19:25:58 +08:00
island a74f3f9fd7 bt component: code style update 2017-03-08 17:09:05 +08:00
island 3543d8170c bt component: update if…else code style 2017-03-08 17:00:56 +08:00
wangmengyang e6f36f2dc5 component/bt: modify AVRCP APIs to post events and arguments to be handled by BTC task 2017-03-08 13:48:56 +08:00
wangmengyang af13acdc29 component/bt: modify a2dp APIs to post event to BTC task 2017-03-07 21:15:54 +08:00
island 5ffe5474ac bt component: optimize gatt debug information 2017-03-07 19:55:21 +08:00
wangmengyang cfb18ba537 component/bt: fix some typos and comments 2017-03-07 15:33:05 +08:00
wangmengyang 3acd445f94 component/bt: transport the following modules: btif_config, btif_storage, btif_util 2017-03-07 15:09:52 +08:00
wangmengyang c23b66b1de component/bt: transport bta_av_co.c 2017-03-07 14:21:26 +08:00
Ivan Grokhotkov 32d5985ad2 Merge branch 'bugfix/btdm_host_init_flow' into 'master'
add extra check before bluedroid init and disable

add extra check before bluedroid init and disable to avoid the mixed call cause unexpected errors.

See merge request !553
2017-03-07 14:17:05 +08:00
wangmengyang 870389b3ba component/bt: optimize stack size of Bluetooth Tasks and make them be configurable according to the CONFIG_NEWLIB_NANO_FORMAT option 2017-03-06 23:09:42 +08:00
island 2955b20f2e bt component: fix bluetooth gatt packets process bugs
1. Add process of prepare write request packets
2. Add process of execute write request packets
3. Add process of reliable write request packets
4. Fix bug of processing read blob request packets
5. Fix bug of processing write request packets
6. Optimize error check and process in stack
2017-03-06 17:20:45 +08:00
Tian Hao bc020da4f5 add extra check before bluedroid init and disable 2017-03-03 18:42:27 +08:00
Derek Gregory a4a790030d component/bt: fix bug where uuid was not reset in btc_gatts_act_create_attr_tab.
Merges #307 https://github.com/espressif/esp-idf/pull/307
2017-03-03 14:59:15 +11:00
lucashutchinson 8ce94d5bd3 ble: Fix ble_adv data truncation
Fixed issue with ble_adv data being truncated after the 31st octet due to an incorrect length passed in a memcpy.

Merges #389 https://github.com/espressif/esp-idf/pull/389
2017-03-03 14:59:15 +11:00
wangmengyang b0e99a56cb component/bt: modify headers btif_av_api.h, btif_av_co.h 2017-03-02 16:08:24 +08:00
XiaXiaotian d3eede2110 mac address: add the number of MAC address generated from efuse for user to choose
1. Add the number of MAC address generated from efuse for user to choose.

2. Add MAC address derive method.
2017-03-02 15:54:35 +08:00
wangmengyang 8c84bcba72 component/bt: transport btif_media_task, btif_avrc 2017-03-02 11:47:59 +08:00
wangmengyang 6d061ec903 component/bt: modify the bluetooth read_efuse_mac interface 2017-03-01 21:04:12 +08:00
XiaXiaotian fabe0493c2 mac address: add user set mac address
add menuconfig for user to set mac address of wifi, bt and ethernet.
2017-03-01 20:51:49 +08:00
XiaXiaotian 23f933a78d mac address: add user set mac address
add menuconfig for user to set mac address of wifi, bt and ethernet.
2017-03-01 20:42:46 +08:00
wangmengyang e8464e0f61 component/bt: transport btif_sm module 2017-03-01 17:37:39 +08:00
wangmengyang 79ed36495b component/bt: transplant btif_rc module and program works. 2017-03-01 16:18:08 +08:00
wangmengyang b74eb56710 component/bt: transport btif_avk module 2017-03-01 13:49:26 +08:00
wangmengyang a25cb988bb component/bt: transport btif_profile_queue.c/h to btc_profile_queue.c/h 2017-02-28 17:06:11 +08:00
wangmengyang acab9e7ae4 fix btc_dm.c/h and replace the functions which are originally in btif_core.c and btif_dm.c 2017-02-28 15:43:02 +08:00
wangmengyang 8f65322a84 component/bt: modify the enable/disable function 2017-02-28 11:47:04 +08:00
wangmengyang 667ac172df component/bt: modify the init/deinit function 2017-02-24 20:39:41 +08:00
wangmengyang c7dac035ae component/bt: add module btc_gap_bt and port function esp_bt_gap_set_scan_mode 2017-02-24 17:28:33 +08:00
Jiang Jiang Jian 63e0140ae6 Merge branch 'bugfix/btdm_adv_scan_enable_report' into 'master'
component/bt : add adv/scan start complete event

1. indicate adv/scan start complete success or failed
2. controller do limit of adv/scan concurrence, so add some codes to report adv/scan start failed or not.

See merge request !524
2017-02-24 16:24:22 +08:00
Ivan Grokhotkov 708539c559 Merge branch 'bugfix/btdm_gatts_write_desc_error' into 'master'
component/bt:fixed the write ccc crash bug error

fix the gatt server write ccc lead to the system crash if not initialize the ccc value.

See merge request !515
2017-02-24 15:11:18 +08:00
Tian Hao b582697889 component/bt : add adv/scan start complete event
1. indicate adv/scan start complete success or failed
2. controller do limit of adv/scan concurrence, so add some codes to report adv/scan start failed or not.
2017-02-23 17:54:22 +08:00
wangmengyang 41070f6768 Merge branch 'master' into feature/btdm_avrc
1. merge master into feature/btdm_avrc
2. add call of esp_bt_controller_enable() in app_main
2017-02-23 15:10:25 +08:00
wangmengyang 118131109e component/bt: modification to a2dp API to support reconnection
1. add API esp_a2d_sink_connect() to initiate connection to other devices;
2. modify lower layers to transfer the disconnection reason upwards
2017-02-23 14:30:08 +08:00
wangmengyang 80cdfc9e0a componentbt: work around the crashing issue after a2dp is connected to Android Phone but before audio stream starts to play
The root cause is the bug in bluetooth controller, in which the HCI_SNIFF_MODE command is sent to controller and at the same time the controller has received same request from remote device.
For now change the time-out period of local device to enter the SNIFF mode.
2017-02-23 11:59:47 +08:00
wangmengyang 1d98c9849e component/bt: remove the A2DP decoding timer and instead trigger decoding directly upon data arrival 2017-02-23 11:56:38 +08:00
Tian Hao 55693b1168 component/bt : add option to release about 30K from BT if BLE only
1. later BT/BLE will be separated by BT/BLE macro, but this option should use when user make sure that in BLE only mode.
2017-02-21 17:46:59 +08:00
Tian Hao 12a7293b31 component/bt : add bluetooth status check
1. add bluetooth controller/host initialize status check
2. separate bluetooth controller task schedule loop from controller init
2017-02-21 01:05:37 +08:00
Yulong abf87b000d component/bt:fixed the write ccc crash bug error 2017-02-20 08:50:02 -05:00
Tian Hao 4bd5b0c91a component/bt : add bt enable/disable for power save
1. add new APIs bt controller enable/disab/deinit
2. make bt controller work need to call two APIs of esp_bt_controller_init and enable
3. modify phy init to make mac reset once
2017-02-17 19:24:58 +08:00
Tian Hao ad890aa5ea component/bt : wide range work temperature for bluetooth RF
1. add PLL track for bluetooth RF for wide range temperature
2. move some initialized codes to cache
2017-02-17 12:26:28 +08:00
XiaXiaotian cd13c9e95d disable phy and rf
1. add a macro in menuconfig for users to choose whether store phy calibration data into NVS or not.

2. rename some disable phy and rf APIs so that existing code which calls old APIS will fail to compile.
2017-02-17 10:24:55 +08:00
XiaXiaotian eb14284c92 disable PHY and RF when stop WiFi and disable BT
1. Add disable PHY and RF when WiFi and BT are both disabled(including call sniffer disable API).

2. Do not init PHY and RF when cpu start. Init PHY and RF when call Wifi or BT start APIs(including sniffer enable API).

3. Add a temporary lib: librtc_clk.a and will delete it when CPU frequency switching function is done.

4. Add an function to get OS tick rate.

5. Do not put the whole pp.a in iram0, only put lmac.o, ieee80211_misc.o, ets_time.o and wdev.o in iram0.
2017-02-17 10:24:54 +08:00
Jiang Jiang Jian 61c7bd3c3a Merge branch 'bugfix/btdm_gatt' into 'master'
component/bt : fix gatt write memory leak

fix bug of GATT write cause memory leak 

See merge request !506
2017-02-16 15:13:05 +08:00