Commit graph

231 commits

Author SHA1 Message Date
wangmengyang c592714679 component/bt: fix typos in "if" condition espressions 2017-01-11 13:36:48 +08:00
wangmengyang 0c31bdf643 component/bt: check for registration status of callback function before using it 2017-01-11 11:31:35 +08:00
wangmengyang 59540eeae1 component/bt: bug fix of lack of checking bluetooth stack status inside API functions 2017-01-11 11:04:41 +08:00
Angus Gratton 26d1a23308 config: Move WiFi & BT toggles to Components menu, same as Ethernet 2017-01-10 16:39:43 +11:00
Angus Gratton 2e78b397bc config: Simplify WiFi & Bluetooth config options
Removes redundant menu options, splits WiFi configuration out from
generic ESP32 configuration.
2017-01-10 16:04:04 +11:00
Tian Hao 9c630b759f component/bt : add bt device api
1. add get bd_addr function
2017-01-06 21:19:58 +08:00
Tian Hao e4b9563dac component/bt : blufi add version 2017-01-06 17:40:46 +08:00
Tian Hao 9017c408ac component/bt : use new lib, optimize BT power 2017-01-05 20:41:15 +08:00
Tian Hao 24af07fd13 component/bt : new blufi
1. new blufi protocol
2. new blufi demo
3. support security
4. support sta/ap/sta_ap
5. support wpa-enterprise
2017-01-05 20:22:35 +08:00
wangmengyang 2e7748d625 component/bt: modify bluetooth API
1. VHCI api and doxygen
2. Controller api and doxygen
3. bluedroid init/enable api and doxygen
4. cleanup demo codes
2017-01-05 20:02:06 +08:00
Tian Hao d6fcec73b2 component/bt : add macro for adv_data_flag
1. add macro for adv data flag
2. add docs for doxygen
2017-01-05 17:53:33 +08:00
Tian Hao daf58e3852 component/bt : fix advertising bug
1. adv data flag
2. default adv data not BR/EDR in demo
2017-01-05 17:53:33 +08:00
Tian Hao ee318d42ae Merge branch 'master' into feature/btdm_gatt_api 2017-01-05 15:25:03 +08:00
Angus Gratton 06e03ff52e Replace backwards-compatible portTICK_RATE_MS with FreeRTOS v8+ portTICK_PERIOD_MS
Closes github #51 https://github.com/espressif/esp-idf/issues/51
2016-12-28 10:23:13 +11:00
Tian Hao 65fe6ab320 component/bt : modify demo for new api
1. modify GATT Client demo
2. modify GATT Server demo
3. fix a register notify bug
2016-12-19 17:15:41 +08:00
Tian Hao c01dedcb06 component/bt : change api for V2.0
1. change all gatt cb function to 3 args and function type. add gattc_if/gatts_if as second argument
2. delete gatt_if of "gatt cb param"
3. separate conn_id and gatt_if from conn_id
4. change the demo code as the gatt changed
2016-12-19 17:15:41 +08:00
Tian Hao 5a2033c4e3 Merge branch 'master' into bugfix/btdm_bluedroid 2016-12-15 14:40:29 +08:00
Tian Hao d242251295 component/bt : fix advertising bug
1. low duty can not be set bug
2. adv type can not be effective bug
2016-12-15 14:33:09 +08:00
Tian Hao f3450abf3d component/bt : add some macro , so redo the doxygen 2016-12-15 14:02:48 +08:00
Tian Hao d045187c0f component/bt : change the resolving list cleanup position
1. enable will malloc, but disable don't free resolving list, so fix it
2. In disable procedure, it will alloc alarm to hash_map, and all the alarm  hash_map will be free in deinit. So this need not be fixed currently.
2016-12-15 13:35:30 +08:00
Tian Hao aba262b18b component/bt : fix bluetooth disable memory leak 2016-12-15 01:36:27 +08:00
Tian Hao 69ee1de9fa component/bt : fix enable bug
1. enable will cause exception with list->head memory modify
2. gatt complete, timeout with HCI cmd timeout will cause exception
2016-12-14 22:10:21 +08:00
Tian Hao 5e87cdec7e component/bt : increase the task stack size
1. increase HCI task stack size
2. increase BTC task stack size for default
2016-12-14 22:10:21 +08:00
Tian Hao fd11beebcd component/bt : fix the init/deinit memory leak
1. modify the memory debug
2. fix init/deinit memory leak
2016-12-14 22:10:21 +08:00
Tian Hao 7ae7a56457 component/bt : fix the bug of deinit/disable
1. fix the exception of deinit/disable
2. debug mem leak of deinit, fix some memleak, but still something wrong.
3. debug men leak of disable.
4. add bluedroid memory debug
2016-12-14 22:10:21 +08:00
Angus Gratton bbe1bceda8 build system: Project ELF should depend on linker scripts, binary libraries
TW#7816
2016-12-12 15:58:53 +11:00
Tian Hao 1be09039e3 component/bt : cleanup the un-necessary include in api.h
1. cleanup the un-necessary include in api.h for "extern c"
2. add UUID define
2016-12-09 14:38:21 +08:00
Tian Hao 4c6ccf1c23 component/bt : add cpp extern c
1. add cpp extern c
2. retab tab to 4 space
2016-12-09 14:38:21 +08:00
Tian Hao e0e6966be0 component/bt : fix the authentication req type 2016-12-09 14:38:21 +08:00
Tian Hao 8185b0f806 component/bt : fix bug of bdaddr point to resolve gattc recv notify 2016-12-09 14:38:21 +08:00
Tian Hao 8ca6e37c12 component/bt : delete the un-used lines 2016-12-08 15:00:19 +08:00
Tian Hao 5933ebc6b6 component/bt : cleanup all the "-W-no-xx" and all the warnings
1. cleanup the warnings.
2. fix the some function called in gap
3. fix some code in btc_main
2016-12-07 13:49:53 -08:00
Tian Hao d925b96daf component/bt : cleanup the function warning in doxygen 2016-12-01 20:55:08 +08:00
Tian Hao 954ffa102f component/bt : add ble event type 2016-12-01 20:16:09 +08:00
Tian Hao bdf4006da7 component/bt : cleanup the return style 2016-12-01 19:58:52 +08:00
Tian Hao c6ec70b67b component/bt : cleanup the function comment as doxygen type 2016-12-01 18:58:54 +08:00
Tian Hao 281a9c2761 component/bt : fix a code bug 2016-12-01 12:14:57 +08:00
Tian Hao 1abf2c4ed7 component/bt : update lib 2016-12-01 12:05:42 +08:00
Tian Hao 758a9e5f06 component/bt : fix compile error 2016-11-29 19:45:10 +08:00
Tian Hao 4c83238a85 component/bt : fix compile error 2016-11-29 19:25:27 +08:00
Tian Hao 5a9801aca7 Merge branch 'master' into feature/btdm_bluedroid
# Conflicts:
#	components/esp32/cpu_freq.c
#	components/esp32/lib
2016-11-29 18:38:37 +08:00
Tian Hao 5a14e8addf component/bt : use ESP_LOGx instead of printf 2016-11-29 17:42:04 +08:00
Tian Hao 9f33d8f5c0 component/bt : add write type 2016-11-29 17:27:12 +08:00
Tian Hao 3a3d4276f8 component/bt : cleanup the comment and pass all doxygen check 2016-11-29 15:32:29 +08:00
Tian Hao 06e2a1d4e1 component/bt : cleanup a macro 2016-11-29 14:38:58 +08:00
Tian Hao f6de7ea764 component/bt : cleanup status and spell check 2016-11-28 22:40:30 +08:00
Tian Hao 9d9e758756 component/bt : add comment for doxygen
1. use doxygen check api comment
2016-11-28 21:59:04 +08:00
Tian Hao fd0d28afc3 component/bt : cleanup some missing code 2016-11-28 16:39:53 +08:00
Tian Hao ff8ce12787 component/bt : cleanup the spell && redundant 2016-11-28 14:58:30 +08:00
Tian Hao 1173106a20 component/bt : change task to decease dram(heap)
1. decrease the task size(HCI cannot < 1024, btu cannot < 4096)
2. btc task can config by menuconfig(default 2048)
2016-11-25 23:37:46 +08:00
Tian Hao c9a0b9a45c component/bt : decrese dram
1. decrease some resource
2016-11-25 21:24:16 +08:00
Tian Hao ac87ddfb05 component/bt : close sdp to free dram
1. free 15K
2016-11-25 15:54:18 +08:00
Tian Hao 19273c7b2d component/bt : run astyle handle the code files 2016-11-25 02:10:15 +08:00
Tian Hao d7eb709a9c component/bt : add license header 2016-11-25 01:58:26 +08:00
Tian Hao 55e0690f69 component/bt : wifi/bt software coexist option
1. option of sw coexist
2. cpu set freq function modify
3. update lib
4. ld add static data address
2016-11-24 19:57:47 +08:00
Tian Hao 7a41ab6982 Merge branch 'master' into feature/btdm_bluedroid
1. update bt lib submodule

# Conflicts:
#	components/bootloader/src/main/esp32.bootloader.ld
#	components/bt/component.mk
#	components/esp32/component.mk
#	components/esp32/lib
2016-11-24 15:45:04 +08:00
Tian Hao e5ceddabac component/bt : change gatt client callback param
1. change the array to point to decrease the memory occupy
2. change the sendindconfirm position
3. fix union lost
2016-11-24 15:17:49 +08:00
Tian Hao 225e31b6de component/bt : change gatt client arg to union
1. decrease the args memory occupy
2. change some macro name
2016-11-23 21:27:05 +08:00
Tian Hao 85aac3afa6 component/bt : decrease callback cb param size
1. decrease callback cb param size
2. add write in gatt server demo
2016-11-23 15:34:21 +08:00
Tian Hao 9ec0fea8e1 component/bt : gatt arg use union
1. union is 28 bytes for each btc task msg arg
2. as gap, individual arg(not use union) is the best mem occupy.
2016-11-23 13:45:21 +08:00
Ivan Grokhotkov df6edb50e9 implement esp_deep_sleep, fix build issues 2016-11-22 21:54:49 +08:00
Tian Hao 6cae05d058 component/bt : change gap btc args to union
1. change gap btc args to union to decrease the dram occupied by btc args
2. actually use individual args for every action is the best way(decrease the dram occupy), but for writing code easily and the style, use union
3. gatt server/client should do the same work
2016-11-22 21:50:26 +08:00
Tian Hao db007fbb2e component/bt : clean up the demos
1. cleanup gatt client demo
2. cleanup gatt server demo
3. cleanup blufi demo
4. use correct log level
2016-11-22 20:32:45 +08:00
Tian Hao 190b6d629b component/bt : Config for choose printf
1. add print or ets_print
2. as print format error, add -Wno-error=format
2016-11-22 18:19:55 +08:00
Tian Hao 595bd2e3c4 component/bt : gatt client fix search service bug
1. fix search service bug
2. delete some print
2016-11-22 17:26:30 +08:00
Tian Hao 3b432735c6 component/bt : fix advertising data and refer bug 2016-11-21 22:38:00 +08:00
Yulong 4079d1e008 component/bt : fix hci reassemble bug as cf2d19 2016-11-21 15:11:34 +08:00
Tian Hao fc6be12a8f component/bt : open privacy support 2016-11-21 15:06:12 +08:00
Tian Hao 4ed6404e9f Merge remote-tracking branch 'remotes/origin/feature/btdm_arch_debug1' into feature/btdm_arch
# Conflicts:
#	components/bt/bluedroid/api/include/esp_gatt_defs.h
#	components/bt/bluedroid/btc/profile/std/gap/btc_gap_ble.c
2016-11-21 14:50:51 +08:00
Tian Hao bf20b958a9 component/bt : fix rsp convert 2016-11-21 12:11:47 +08:00
Yulong 1561c02ba9 component bt:Add stop scan API to the esp_gap_ble API module 2016-11-19 09:56:36 -05:00
Yulong a76b65ed95 compnent bt:debug the btc_gattc received data error issues. 2016-11-19 08:00:08 -05:00
Tian Hao 0245a2028c component/bt : gatts fix
1. gatt server demo
2. gatt server fix bug(bta btc covert bug)
3. fix print lost
2016-11-18 22:10:35 +08:00
Yulong 3edcd29a83 compoent bt:debug the btc_gap_ble module, fix the adv len not long fix 2016-11-18 05:00:47 -05:00
Yulong 2f7288ff03 component bt:debug the scan result and add the resove adv data method to the gapapi 2016-11-18 03:43:51 -05:00
Tian Hao 37365cef95 component/bt : gatt server
1.add gatt server demo for user
2. some function didn't be tested
2016-11-18 00:30:35 +08:00
Yulong 645717b147 Merge remote-tracking branch 'origin/feature/btdm_arch' into feature/btdm_arch_debug1 2016-11-17 08:08:19 -05:00
Yulong 7548b8c622 component bt: Added the client demo to the bt project 2016-11-17 06:37:56 -05:00
Ivan Grokhotkov 3bbe41c34d Merge branch 'feature/docs_general_notes' into 'master'
Docs: new documentation and warnings cleanup

This change set

- adds a high-level description of application startup flow. Some parts are missing, but hopefully we can use this description as a base to expand on.
- adds a few notes about memory regions and their use in ESP-IDF.
- add SPI flash and partition APIs page
- fixes all Doxygen warnings in header files
- enables build failures on new Doxygen warnings

See merge request !201
2016-11-17 19:00:03 +08:00
Tian Hao a35e2d42f0 Merge remote-tracking branch 'remotes/origin/feature/btdm_arch_debug1' into feature/btdm_arch
1. merge to fix gap modify
2016-11-17 11:28:10 +08:00
Angus Gratton 24b4c17ead build system: Refactor SubmoduleCheck to work project-wide
Required at project level because some components use header files in
other components' submodules, and one component with a
submodule (esptool.py) doesn't have or need a component.mk.
2016-11-17 09:18:51 +11:00
Ivan Grokhotkov 13d4734399 docs: fix Doxygen warnings, fail CI build on Doxygen warnings 2016-11-16 22:44:22 +08:00
Tian Hao 94f26af17d component/bt : fix component.mk
delete coexist in lib, because the lib is in esp32/lib
2016-11-16 22:15:00 +08:00
Tian Hao aafaebefb4 component/bt : move blufi to new architecture btc task
1. move blufi to new architecture
2. delete some log trace
2016-11-16 22:11:59 +08:00
Yulong a63383dd19 component bt:change the scan rsp callback & scan param setup 2016-11-16 06:50:44 -05:00
Tian Hao 9691fe9dae component/bt : init api
1. use future to redefine init api
2016-11-16 16:26:02 +08:00
Tian Hao 8fed003ce5 component/bt : main api
1. use blufi check main api ok
2016-11-16 11:28:41 +08:00
Tian Hao 21d2b78105 component/bt : mv some define to btc
1. Actually,  btc & api are the same module thing. So the type defined in api header file can be included by btc c/h files.
    Besides, why btc & api should be separated, because that user may be aware of api and api refer defines/types, rather than other non-refer things.
    All defines/types that user won't use should be put in btc directory (and define with prefix "btc_"), and which will be used by user should be defined with prefix "esp_" .
2. rename attribute value(all is value, not data)
2016-11-16 02:10:37 +08:00
Tian Hao 229df65cfc component/bt : cleanup id/uuid define
1. which named uuid is esp_bt_uuid_t type
2. which named id is xxx_id_t type, such as service_id_t char_id_t, include inst & uuid
3. share include directory
2016-11-16 00:34:48 +08:00
Tian Hao 521ef3f579 component/bt : new architectecture
1st compile ok
2016-11-15 20:56:15 +08:00
Angus Gratton 208e83def7 build system: Refactor component.mk to not need component_common.mk
New makefile component_wrapper.mk allows some variables to be set
before component.mk is evaluated. This properly fixes problems with
sdkconfig being hard to access in all phases of the build.

Including component_common.mk is no longer necessary and will print a
deprecation warning for components which use it.
2016-11-10 15:52:22 +11:00
Angus Gratton 830e5caf4d build system: Replace get_variable target w/ component_project_vars.mk generated makefiles
Reduces number of make invocations, allows variables exported in project
to be seen in all component make processes, not just the main ones.

Also makes a no-op build about 3x faster than it was.
2016-11-09 16:51:52 +11:00
Tian Hao 118984283a component/bt : blufi use api
1. use api
2. bluetooth init/deinit/enable/disable wrap api(1st version)
3. bluetooth deinit(free resource) still some problem
2016-11-07 02:16:00 +08:00
Tian Hao 3b489f04f0 component:bt : change adv api 2016-11-06 23:58:37 +08:00
Tian Hao 224acf37f6 component/bt : api category 2016-11-05 20:40:07 +08:00
Tian Hao 084248e211 component/bt : cleanup task evt 2016-11-05 19:57:53 +08:00
Tian Hao aa6fe04148 component/bt : cleanup the liscence header 2016-11-05 02:48:16 +08:00
Tian Hao acda125e8b Merge branch 'feature/btdm_prf_task' into feature/btdm_bluedroid
# Conflicts:
#	components/bt/bluedroid/profiles/core/bt_prf_sys_main.c
#	components/bt/bluedroid/profiles/core/bt_prf_task.c
#	components/bt/bluedroid/profiles/core/include/bt_prf_sys.h
#	components/bt/bluedroid/profiles/core/include/bt_prf_task.h
#	components/bt/bluedroid/profiles/esp/include/wx_airsync_prf.h
#	components/bt/bluedroid/profiles/esp/wechat_AirSync/wx_airsync_prf.c
#	components/bt/bluedroid/stack/btm/btm_sec.c
2016-11-04 19:32:47 +08:00
Yulong b83b0ed06a commpnent bt:Added the stop advertising to the bt project 2016-11-04 05:36:32 -04:00
Yulong 1544965b21 componet bt:debug the advertising issues,it can works in this version 2016-11-04 04:52:23 -04:00