├── .github └── FUNDING.yml ├── .gitignore ├── CMakeLists.txt ├── Makefile ├── README.md ├── main ├── CMakeLists.txt ├── component.mk ├── config.h ├── hfp_hf_demo.c ├── main.c ├── microphone.c ├── microphone.h ├── sco_demo_util.c ├── sco_demo_util.h ├── speaker.c └── speaker.h ├── sdkconfig └── set_port.sh /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [atomic14] 4 | ko_fi: atomic14 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | # BTstack example 'hfp_hf_demo' for ESP32 port 3 | # 4 | # Generated by /Users/chrisgreening/esp/btstack/port/esp32 5 | # On Fri Jul 23 14:34:42 2021 6 | 7 | # The following lines of boilerplate have to be in your project's 8 | # CMakeLists in this exact order for cmake to work correctly 9 | cmake_minimum_required(VERSION 3.5) 10 | 11 | include($ENV{IDF_PATH}/tools/cmake/project.cmake) 12 | project(hfp_hf_demo) 13 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # BTstack example 'hfp_hf_demo' for ESP32 port 3 | # 4 | # Generated by /Users/chrisgreening/esp/btstack/port/esp32 5 | # On Fri Jul 23 14:34:42 2021 6 | 7 | PROJECT_NAME := hfp_hf_demo 8 | 9 | include $(IDF_PATH)/make/project.mk 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Intro 2 | 3 | You can watch a video of this working here: https://youtu.be/0jR-QNTfydA at around 4:23 4 | 5 | [![Demo Video](https://img.youtube.com/vi/0jR-QNTfydA/0.jpg)](https://www.youtube.com/watch?v=0jR-QNTfydA) 6 | 7 | This is a slight rework of the headset profile handsfree demo from here: https://github.com/bluekitchen/btstack 8 | 9 | I've added in support for microphone input and pulled the speaker output into the demo code so that it can be more easily customised. 10 | 11 | I'll try and clean this code up further, but I would not recommend trying to use this code unless you really know what you are doing and know how to use the esp-idf. 12 | 13 | # Setup 14 | 15 | You'll need the esp-idf setup. Follow the instructions here: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/ 16 | 17 | You'll also need the [bluekitchen/btstack](https://github.com/bluekitchen/btstack) 18 | 19 | Follow the instructions here: https://github.com/bluekitchen/btstack/tree/master/port/esp32 20 | 21 | Change the value in `hfp_hf_demo.c` for `device_addr_string` to match the device you want to connect to (use the mac address of the Bluetooth interface) 22 | 23 | ``` 24 | static const char *device_addr_string = "08:c7:29:06:84:27"; 25 | ``` 26 | 27 | # Build 28 | 29 | In the `esp-idf` folder run: 30 | 31 | ``` 32 | . ./export.sh 33 | ``` 34 | 35 | Then in the projects folder run: 36 | 37 | ``` 38 | make 39 | ``` 40 | 41 | Then to flash, run this command: 42 | 43 | ``` 44 | ESPPORT=/dev/tty.SLAB_USBtoUART make flash 45 | ``` 46 | 47 | And then 48 | 49 | ``` 50 | ESPPORT=/dev/tty.SLAB_USBtoUART make monitor 51 | ``` 52 | -------------------------------------------------------------------------------- /main/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register( 2 | SRCS "sco_demo_util.c" "microphone.c" "speaker.c" "hfp_hf_demo.c" "main.c" 3 | INCLUDE_DIRS "${CMAKE_CURRENT_BINARY_DIR}") 4 | -------------------------------------------------------------------------------- /main/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Main component makefile. 3 | # 4 | # This Makefile can be left empty. By default, it will take the sources in the 5 | # src/ directory, compile them and link them into lib(subdirectory_name).a 6 | # in the build directory. This behaviour is entirely configurable, 7 | # please read the ESP-IDF documents if you need to do this. 8 | # 9 | CFLAGS += -Wno-format 10 | 11 | -------------------------------------------------------------------------------- /main/config.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | // if you want to use ADC input then you need to use I2S_NUM_0 6 | #define I2S_MIC_DEVICE I2S_NUM_0 7 | 8 | // I2S Microphone Settings 9 | // Which channel is the I2S microphone on? I2S_CHANNEL_FMT_ONLY_LEFT or I2S_CHANNEL_FMT_ONLY_RIGHT 10 | // Generally they will default to LEFT - but you may need to attach the L/R pin to GND 11 | #define I2S_MIC_CHANNEL I2S_CHANNEL_FMT_ONLY_LEFT 12 | // #define I2S_MIC_CHANNEL I2S_CHANNEL_FMT_ONLY_RIGHT 13 | #define I2S_MIC_SERIAL_CLOCK GPIO_NUM_26 14 | #define I2S_MIC_LEFT_RIGHT_CLOCK GPIO_NUM_22 15 | #define I2S_MIC_SERIAL_DATA GPIO_NUM_21 16 | 17 | // how often should we check for new samples from the microphone 18 | #define DRIVER_POLL_INTERVAL_MS 5 19 | // DMA settings 20 | #define DMA_BUFFER_COUNT 10 21 | // keep this fairly low to for low latency 22 | #define DMA_BUFFER_SAMPLES 100 23 | 24 | // speaker settings 25 | #define I2S_SPEAKER_DEVICE I2S_NUM_1 26 | 27 | #define I2S_SPEAKER_SERIAL_CLOCK GPIO_NUM_19 28 | #define I2S_SPEAKER_LEFT_RIGHT_CLOCK GPIO_NUM_27 29 | #define I2S_SPEAKER_SERIAL_DATA GPIO_NUM_18 30 | -------------------------------------------------------------------------------- /main/hfp_hf_demo.c: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) 2014 BlueKitchen GmbH 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * 3. Neither the name of the copyright holders nor the names of 15 | * contributors may be used to endorse or promote products derived 16 | * from this software without specific prior written permission. 17 | * 4. Any redistribution, use, or modification is done solely for 18 | * personal benefit and not for any commercial purpose or for 19 | * monetary gain. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS 22 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS 25 | * RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 28 | * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 29 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 30 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 31 | * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 | * SUCH DAMAGE. 33 | * 34 | * Please inquire about commercial licensing options at 35 | * contact@bluekitchen-gmbh.com 36 | * 37 | */ 38 | 39 | #define BTSTACK_FILE__ "hfp_hf_demo.c" 40 | 41 | /* 42 | * hfp_hs_demo.c 43 | */ 44 | 45 | // ***************************************************************************** 46 | /* EXAMPLE_START(hfp_hs_demo): HFP HF - Hands-Free 47 | * 48 | * @text This HFP Hands-Free example demonstrates how to receive 49 | * an output from a remote HFP audio gateway (AG), and, 50 | * if HAVE_BTSTACK_STDIN is defined, how to control the HFP AG. 51 | */ 52 | // ***************************************************************************** 53 | 54 | #include "btstack_config.h" 55 | 56 | #include 57 | #include 58 | #include 59 | #include 60 | #include "btstack.h" 61 | 62 | #include "sco_demo_util.h" 63 | 64 | uint8_t hfp_service_buffer[150]; 65 | const uint8_t rfcomm_channel_nr = 1; 66 | const char hfp_hf_service_name[] = "HFP HF Demo"; 67 | 68 | #ifdef HAVE_BTSTACK_STDIN 69 | // static const char * device_addr_string = "6C:72:E7:10:22:EE"; 70 | // static const char *device_addr_string = "C8:E0:EB:48:34:EC"; 71 | static const char *device_addr_string = "08:c7:29:06:84:27"; 72 | #endif 73 | 74 | static bd_addr_t device_addr; 75 | 76 | #ifdef HAVE_BTSTACK_STDIN 77 | // 80:BE:05:D5:28:48 78 | // prototypes 79 | static void show_usage(void); 80 | #endif 81 | static hci_con_handle_t acl_handle = HCI_CON_HANDLE_INVALID; 82 | static hci_con_handle_t sco_handle = HCI_CON_HANDLE_INVALID; 83 | #ifdef ENABLE_HFP_WIDE_BAND_SPEECH 84 | static uint8_t codecs[] = {HFP_CODEC_CVSD, HFP_CODEC_MSBC}; 85 | #else 86 | static uint8_t codecs[] = {HFP_CODEC_CVSD}; 87 | #endif 88 | static uint16_t indicators[1] = {0x01}; 89 | static uint8_t negotiated_codec = HFP_CODEC_CVSD; 90 | static btstack_packet_callback_registration_t hci_event_callback_registration; 91 | char cmd; 92 | 93 | static void dump_supported_codecs(void) 94 | { 95 | unsigned int i; 96 | int mSBC_skipped = 0; 97 | printf("Supported codecs: "); 98 | for (i = 0; i < sizeof(codecs); i++) 99 | { 100 | switch (codecs[i]) 101 | { 102 | case HFP_CODEC_CVSD: 103 | printf("CVSD"); 104 | break; 105 | case HFP_CODEC_MSBC: 106 | if (hci_extended_sco_link_supported()) 107 | { 108 | printf(", mSBC"); 109 | } 110 | else 111 | { 112 | mSBC_skipped = 1; 113 | } 114 | break; 115 | default: 116 | btstack_assert(false); 117 | break; 118 | } 119 | } 120 | printf("\n"); 121 | if (mSBC_skipped) 122 | { 123 | printf("mSBC codec disabled because eSCO not supported by local controller.\n"); 124 | } 125 | } 126 | 127 | #ifdef HAVE_BTSTACK_STDIN 128 | 129 | // Testig User Interface 130 | static void show_usage(void) 131 | { 132 | bd_addr_t iut_address; 133 | gap_local_bd_addr(iut_address); 134 | 135 | printf("\n--- Bluetooth HFP Hands-Free (HF) unit Test Console %s ---\n", bd_addr_to_str(iut_address)); 136 | printf("\n"); 137 | printf("a - establish SLC to %s | ", bd_addr_to_str(device_addr)); 138 | printf("A - release SLC connection to device\n"); 139 | printf("b - establish Audio connection | B - release Audio connection\n"); 140 | printf("d - query network operator | D - Enable HFP AG registration status update via bitmap(IIA)\n"); 141 | printf("f - answer incoming call | F - Hangup call\n"); 142 | printf("g - query network operator name | G - reject incoming call\n"); 143 | printf("i - dial 123 | I - dial 123\n"); 144 | printf("j - dial #1 | J - dial #99\n"); 145 | printf("o - Set speaker volume to 0 (minimum) | O - Set speaker volume to 9 (default)\n"); 146 | printf("p - Set speaker volume to 12 (higher) | P - Set speaker volume to 15 (maximum)\n"); 147 | printf("q - Set microphone gain to 0 (minimum) | Q - Set microphone gain to 9 (default)\n"); 148 | printf("s - Set microphone gain to 12 (higher) | S - Set microphone gain to 15 (maximum)\n"); 149 | printf("t - terminate connection\n"); 150 | printf("u - send 'user busy' (TWC 0)\n"); 151 | printf("U - end active call and accept other call' (TWC 1)\n"); 152 | printf("v - Swap active call call (TWC 2) | V - Join held call (TWC 3)\n"); 153 | printf("w - Connect calls (TWC 4) | W - redial\n"); 154 | printf("c/C - disable/enable registration status update for all AG indicators\n"); 155 | printf("e/E - disable/enable reporting of the extended AG error result code\n"); 156 | printf("k/K - deactivate/activate call waiting notification\n"); 157 | printf("l/L - deactivate/activate calling line notification\n"); 158 | printf("m/M - deactivate/activate echo canceling and noise reduction\n"); 159 | printf("n/N - deactivate/activate voice recognition\n"); 160 | printf("0123456789#*-+ - send DTMF dial tones\n"); 161 | printf("x - request phone number for voice tag | X - current call status (ECS)\n"); 162 | printf("y - release call with index 2 (ECC) | Y - private consulation with call 2(ECC)\n"); 163 | printf("[ - Query Response and Hold status (RHH ?) | ] - Place call in a response and held state(RHH 0)\n"); 164 | printf("{ - Accept held call(RHH 1) | } - Reject held call(RHH 2)\n"); 165 | printf("? - Query Subscriber Number (NUM)\n"); 166 | printf("! - Update HF indicator with assigned number 1 (HFI)\n"); 167 | printf("\n"); 168 | } 169 | 170 | static void stdin_process(char c) 171 | { 172 | cmd = c; // used in packet handler 173 | 174 | if (cmd >= '0' && cmd <= '9') 175 | { 176 | printf("DTMF Code: %c\n", cmd); 177 | hfp_hf_send_dtmf_code(acl_handle, cmd); 178 | return; 179 | } 180 | 181 | switch (cmd) 182 | { 183 | case '#': 184 | case '-': 185 | case '+': 186 | case '*': 187 | log_info("USER:\'%c\'", cmd); 188 | printf("DTMF Code: %c\n", cmd); 189 | hfp_hf_send_dtmf_code(acl_handle, cmd); 190 | break; 191 | case 'a': 192 | log_info("USER:\'%c\'", cmd); 193 | printf("Establish Service level connection to device with Bluetooth address %s...\n", bd_addr_to_str(device_addr)); 194 | hfp_hf_establish_service_level_connection(device_addr); 195 | break; 196 | case 'A': 197 | log_info("USER:\'%c\'", cmd); 198 | printf("Release Service level connection.\n"); 199 | hfp_hf_release_service_level_connection(acl_handle); 200 | break; 201 | case 'b': 202 | log_info("USER:\'%c\'", cmd); 203 | printf("Establish Audio connection to device with Bluetooth address %s...\n", bd_addr_to_str(device_addr)); 204 | hfp_hf_establish_audio_connection(acl_handle); 205 | break; 206 | case 'B': 207 | log_info("USER:\'%c\'", cmd); 208 | printf("Release Audio service level connection.\n"); 209 | hfp_hf_release_audio_connection(acl_handle); 210 | break; 211 | case 'C': 212 | log_info("USER:\'%c\'", cmd); 213 | printf("Enable registration status update for all AG indicators.\n"); 214 | hfp_hf_enable_status_update_for_all_ag_indicators(acl_handle); 215 | break; 216 | case 'c': 217 | log_info("USER:\'%c\'", cmd); 218 | printf("Disable registration status update for all AG indicators.\n"); 219 | hfp_hf_disable_status_update_for_all_ag_indicators(acl_handle); 220 | break; 221 | case 'D': 222 | log_info("USER:\'%c\'", cmd); 223 | printf("Set HFP AG registration status update for individual indicators (0111111).\n"); 224 | hfp_hf_set_status_update_for_individual_ag_indicators(acl_handle, 63); 225 | break; 226 | case 'd': 227 | log_info("USER:\'%c\'", cmd); 228 | printf("Query network operator.\n"); 229 | hfp_hf_query_operator_selection(acl_handle); 230 | break; 231 | case 'E': 232 | log_info("USER:\'%c\'", cmd); 233 | printf("Enable reporting of the extended AG error result code.\n"); 234 | hfp_hf_enable_report_extended_audio_gateway_error_result_code(acl_handle); 235 | break; 236 | case 'e': 237 | log_info("USER:\'%c\'", cmd); 238 | printf("Disable reporting of the extended AG error result code.\n"); 239 | hfp_hf_disable_report_extended_audio_gateway_error_result_code(acl_handle); 240 | break; 241 | case 'f': 242 | log_info("USER:\'%c\'", cmd); 243 | printf("Answer incoming call.\n"); 244 | hfp_hf_answer_incoming_call(acl_handle); 245 | break; 246 | case 'F': 247 | log_info("USER:\'%c\'", cmd); 248 | printf("Hangup call.\n"); 249 | hfp_hf_terminate_call(acl_handle); 250 | break; 251 | case 'G': 252 | log_info("USER:\'%c\'", cmd); 253 | printf("Reject incoming call.\n"); 254 | hfp_hf_reject_incoming_call(acl_handle); 255 | break; 256 | case 'g': 257 | log_info("USER:\'%c\'", cmd); 258 | printf("Query operator.\n"); 259 | hfp_hf_query_operator_selection(acl_handle); 260 | break; 261 | case 't': 262 | log_info("USER:\'%c\'", cmd); 263 | printf("Terminate HCI connection.\n"); 264 | gap_disconnect(acl_handle); 265 | break; 266 | case 'i': 267 | log_info("USER:\'%c\'", cmd); 268 | printf("Dial 123\n"); 269 | hfp_hf_dial_number(acl_handle, "123"); 270 | break; 271 | case 'I': 272 | log_info("USER:\'%c\'", cmd); 273 | printf("Dial 123\n"); 274 | hfp_hf_dial_number(acl_handle, "123"); 275 | break; 276 | case 'j': 277 | log_info("USER:\'%c\'", cmd); 278 | printf("Dial #1\n"); 279 | hfp_hf_dial_memory(acl_handle, 1); 280 | break; 281 | case 'J': 282 | log_info("USER:\'%c\'", cmd); 283 | printf("Dial #99\n"); 284 | hfp_hf_dial_memory(acl_handle, 99); 285 | break; 286 | case 'k': 287 | log_info("USER:\'%c\'", cmd); 288 | printf("Deactivate call waiting notification\n"); 289 | hfp_hf_deactivate_call_waiting_notification(acl_handle); 290 | break; 291 | case 'K': 292 | log_info("USER:\'%c\'", cmd); 293 | printf("Activate call waiting notification\n"); 294 | hfp_hf_activate_call_waiting_notification(acl_handle); 295 | break; 296 | case 'l': 297 | log_info("USER:\'%c\'", cmd); 298 | printf("Deactivate calling line notification\n"); 299 | hfp_hf_deactivate_calling_line_notification(acl_handle); 300 | break; 301 | case 'L': 302 | log_info("USER:\'%c\'", cmd); 303 | printf("Activate calling line notification\n"); 304 | hfp_hf_activate_calling_line_notification(acl_handle); 305 | break; 306 | case 'm': 307 | log_info("USER:\'%c\'", cmd); 308 | printf("Deactivate echo canceling and noise reduction\n"); 309 | hfp_hf_deactivate_echo_canceling_and_noise_reduction(acl_handle); 310 | break; 311 | case 'M': 312 | log_info("USER:\'%c\'", cmd); 313 | printf("Activate echo canceling and noise reduction\n"); 314 | hfp_hf_activate_echo_canceling_and_noise_reduction(acl_handle); 315 | break; 316 | case 'n': 317 | log_info("USER:\'%c\'", cmd); 318 | printf("Deactivate voice recognition\n"); 319 | hfp_hf_deactivate_voice_recognition_notification(acl_handle); 320 | break; 321 | case 'N': 322 | log_info("USER:\'%c\'", cmd); 323 | printf("Activate voice recognition %s\n", bd_addr_to_str(device_addr)); 324 | hfp_hf_activate_voice_recognition_notification(acl_handle); 325 | break; 326 | case 'o': 327 | log_info("USER:\'%c\'", cmd); 328 | printf("Set speaker gain to 0 (minimum)\n"); 329 | hfp_hf_set_speaker_gain(acl_handle, 0); 330 | break; 331 | case 'O': 332 | log_info("USER:\'%c\'", cmd); 333 | printf("Set speaker gain to 9 (default)\n"); 334 | hfp_hf_set_speaker_gain(acl_handle, 9); 335 | break; 336 | case 'p': 337 | log_info("USER:\'%c\'", cmd); 338 | printf("Set speaker gain to 12 (higher)\n"); 339 | hfp_hf_set_speaker_gain(acl_handle, 12); 340 | break; 341 | case 'P': 342 | log_info("USER:\'%c\'", cmd); 343 | printf("Set speaker gain to 15 (maximum)\n"); 344 | hfp_hf_set_speaker_gain(acl_handle, 15); 345 | break; 346 | case 'q': 347 | log_info("USER:\'%c\'", cmd); 348 | printf("Set microphone gain to 0\n"); 349 | hfp_hf_set_microphone_gain(acl_handle, 0); 350 | break; 351 | case 'Q': 352 | log_info("USER:\'%c\'", cmd); 353 | printf("Set microphone gain to 9\n"); 354 | hfp_hf_set_microphone_gain(acl_handle, 9); 355 | break; 356 | case 's': 357 | log_info("USER:\'%c\'", cmd); 358 | printf("Set microphone gain to 12\n"); 359 | hfp_hf_set_microphone_gain(acl_handle, 12); 360 | break; 361 | case 'S': 362 | log_info("USER:\'%c\'", cmd); 363 | printf("Set microphone gain to 15\n"); 364 | hfp_hf_set_microphone_gain(acl_handle, 15); 365 | break; 366 | case 'u': 367 | log_info("USER:\'%c\'", cmd); 368 | printf("Send 'user busy' (Three-Way Call 0)\n"); 369 | hfp_hf_user_busy(acl_handle); 370 | break; 371 | case 'U': 372 | log_info("USER:\'%c\'", cmd); 373 | printf("End active call and accept waiting/held call (Three-Way Call 1)\n"); 374 | hfp_hf_end_active_and_accept_other(acl_handle); 375 | break; 376 | case 'v': 377 | log_info("USER:\'%c\'", cmd); 378 | printf("Swap active call and hold/waiting call (Three-Way Call 2)\n"); 379 | hfp_hf_swap_calls(acl_handle); 380 | break; 381 | case 'V': 382 | log_info("USER:\'%c\'", cmd); 383 | printf("Join hold call (Three-Way Call 3)\n"); 384 | hfp_hf_join_held_call(acl_handle); 385 | break; 386 | case 'w': 387 | log_info("USER:\'%c\'", cmd); 388 | printf("Connect calls (Three-Way Call 4)\n"); 389 | hfp_hf_connect_calls(acl_handle); 390 | break; 391 | case 'W': 392 | log_info("USER:\'%c\'", cmd); 393 | printf("Redial\n"); 394 | hfp_hf_redial_last_number(acl_handle); 395 | break; 396 | case 'x': 397 | log_info("USER:\'%c\'", cmd); 398 | printf("Request phone number for voice tag\n"); 399 | hfp_hf_request_phone_number_for_voice_tag(acl_handle); 400 | break; 401 | case 'X': 402 | log_info("USER:\'%c\'", cmd); 403 | printf("Query current call status\n"); 404 | hfp_hf_query_current_call_status(acl_handle); 405 | break; 406 | case 'y': 407 | log_info("USER:\'%c\'", cmd); 408 | printf("Release call with index 2\n"); 409 | hfp_hf_release_call_with_index(acl_handle, 2); 410 | break; 411 | case 'Y': 412 | log_info("USER:\'%c\'", cmd); 413 | printf("Private consulation with call 2\n"); 414 | hfp_hf_private_consultation_with_call(acl_handle, 2); 415 | break; 416 | case '[': 417 | log_info("USER:\'%c\'", cmd); 418 | printf("Query Response and Hold status (RHH ?)\n"); 419 | hfp_hf_rrh_query_status(acl_handle); 420 | break; 421 | case ']': 422 | log_info("USER:\'%c\'", cmd); 423 | printf("Place call in a response and held state (RHH 0)\n"); 424 | hfp_hf_rrh_hold_call(acl_handle); 425 | break; 426 | case '{': 427 | log_info("USER:\'%c\'", cmd); 428 | printf("Accept held call (RHH 1)\n"); 429 | hfp_hf_rrh_accept_held_call(acl_handle); 430 | break; 431 | case '}': 432 | log_info("USER:\'%c\'", cmd); 433 | printf("Reject held call (RHH 2)\n"); 434 | hfp_hf_rrh_reject_held_call(acl_handle); 435 | break; 436 | case '?': 437 | log_info("USER:\'%c\'", cmd); 438 | printf("Query Subscriber Number\n"); 439 | hfp_hf_query_subscriber_number(acl_handle); 440 | break; 441 | case '!': 442 | log_info("USER:\'%c\'", cmd); 443 | printf("Update HF indicator with assigned number 1 (HFI)\n"); 444 | hfp_hf_set_hf_indicator(acl_handle, 1, 1); 445 | break; 446 | default: 447 | show_usage(); 448 | break; 449 | } 450 | } 451 | #endif 452 | 453 | static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *event, uint16_t event_size) 454 | { 455 | UNUSED(channel); 456 | uint8_t status; 457 | 458 | switch (packet_type) 459 | { 460 | 461 | case HCI_SCO_DATA_PACKET: 462 | if (READ_SCO_CONNECTION_HANDLE(event) != sco_handle) 463 | break; 464 | sco_demo_receive(event, event_size); 465 | break; 466 | 467 | case HCI_EVENT_PACKET: 468 | switch (hci_event_packet_get_type(event)) 469 | { 470 | case HCI_EVENT_SCO_CAN_SEND_NOW: 471 | sco_demo_send(sco_handle); 472 | break; 473 | 474 | case HCI_EVENT_COMMAND_COMPLETE: 475 | if (HCI_EVENT_IS_COMMAND_COMPLETE(event, hci_read_local_supported_features)) 476 | { 477 | dump_supported_codecs(); 478 | } 479 | break; 480 | 481 | case HCI_EVENT_HFP_META: 482 | switch (hci_event_hfp_meta_get_subevent_code(event)) 483 | { 484 | case HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED: 485 | acl_handle = hfp_subevent_service_level_connection_established_get_acl_handle(event); 486 | hfp_subevent_service_level_connection_established_get_bd_addr(event, device_addr); 487 | printf("Service level connection established %s.\n\n", bd_addr_to_str(device_addr)); 488 | break; 489 | case HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_RELEASED: 490 | acl_handle = HCI_CON_HANDLE_INVALID; 491 | printf("Service level connection released.\n\n"); 492 | break; 493 | case HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED: 494 | status = hfp_subevent_audio_connection_established_get_status(event); 495 | if (status != ERROR_CODE_SUCCESS) 496 | { 497 | printf("Audio connection establishment failed with status 0x%02x\n", status); 498 | } 499 | else 500 | { 501 | sco_handle = hfp_subevent_audio_connection_established_get_sco_handle(event); 502 | printf("Audio connection established with SCO handle 0x%04x.\n", sco_handle); 503 | negotiated_codec = hfp_subevent_audio_connection_established_get_negotiated_codec(event); 504 | switch (negotiated_codec) 505 | { 506 | case 0x01: 507 | printf("Using CVSD codec.\n"); 508 | break; 509 | case 0x02: 510 | printf("Using mSBC codec.\n"); 511 | break; 512 | default: 513 | printf("Using unknown codec 0x%02x.\n", negotiated_codec); 514 | break; 515 | } 516 | sco_demo_set_codec(negotiated_codec); 517 | hci_request_sco_can_send_now_event(); 518 | } 519 | break; 520 | case HFP_SUBEVENT_AUDIO_CONNECTION_RELEASED: 521 | sco_handle = HCI_CON_HANDLE_INVALID; 522 | printf("Audio connection released\n"); 523 | sco_demo_close(); 524 | break; 525 | case HFP_SUBEVENT_COMPLETE: 526 | status = hfp_subevent_complete_get_status(event); 527 | if (status == ERROR_CODE_SUCCESS) 528 | { 529 | printf("Cmd \'%c\' succeeded\n", cmd); 530 | } 531 | else 532 | { 533 | printf("Cmd \'%c\' failed with status 0x%02x\n", cmd, status); 534 | } 535 | break; 536 | case HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED: 537 | printf("AG_INDICATOR_STATUS_CHANGED, AG indicator (index: %d) to: %d of range [%d, %d], name '%s'\n", 538 | hfp_subevent_ag_indicator_status_changed_get_indicator_index(event), 539 | hfp_subevent_ag_indicator_status_changed_get_indicator_status(event), 540 | hfp_subevent_ag_indicator_status_changed_get_indicator_min_range(event), 541 | hfp_subevent_ag_indicator_status_changed_get_indicator_max_range(event), 542 | (const char *)hfp_subevent_ag_indicator_status_changed_get_indicator_name(event)); 543 | break; 544 | case HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED: 545 | printf("NETWORK_OPERATOR_CHANGED, operator mode: %d, format: %d, name: %s\n", 546 | hfp_subevent_network_operator_changed_get_network_operator_mode(event), 547 | hfp_subevent_network_operator_changed_get_network_operator_format(event), 548 | (char *)hfp_subevent_network_operator_changed_get_network_operator_name(event)); 549 | break; 550 | case HFP_SUBEVENT_EXTENDED_AUDIO_GATEWAY_ERROR: 551 | printf("EXTENDED_AUDIO_GATEWAY_ERROR_REPORT, status : 0x%02x\n", 552 | hfp_subevent_extended_audio_gateway_error_get_error(event)); 553 | break; 554 | case HFP_SUBEVENT_RING: 555 | printf("** Ring **\n"); 556 | break; 557 | case HFP_SUBEVENT_NUMBER_FOR_VOICE_TAG: 558 | printf("Phone number for voice tag: %s\n", 559 | (const char *)hfp_subevent_number_for_voice_tag_get_number(event)); 560 | break; 561 | case HFP_SUBEVENT_SPEAKER_VOLUME: 562 | printf("Speaker volume: gain %u\n", 563 | hfp_subevent_speaker_volume_get_gain(event)); 564 | break; 565 | case HFP_SUBEVENT_MICROPHONE_VOLUME: 566 | printf("Microphone volume: gain %u\n", 567 | hfp_subevent_microphone_volume_get_gain(event)); 568 | break; 569 | case HFP_SUBEVENT_CALLING_LINE_IDENTIFICATION_NOTIFICATION: 570 | printf("Caller ID, number %s\n", hfp_subevent_calling_line_identification_notification_get_number(event)); 571 | break; 572 | case HFP_SUBEVENT_ENHANCED_CALL_STATUS: 573 | printf("Enhanced call status:\n"); 574 | printf(" - call index: %d \n", hfp_subevent_enhanced_call_status_get_clcc_idx(event)); 575 | printf(" - direction : %s \n", hfp_enhanced_call_dir2str(hfp_subevent_enhanced_call_status_get_clcc_dir(event))); 576 | printf(" - status : %s \n", hfp_enhanced_call_status2str(hfp_subevent_enhanced_call_status_get_clcc_status(event))); 577 | printf(" - mode : %s \n", hfp_enhanced_call_mode2str(hfp_subevent_enhanced_call_status_get_clcc_mode(event))); 578 | printf(" - multipart : %s \n", hfp_enhanced_call_mpty2str(hfp_subevent_enhanced_call_status_get_clcc_mpty(event))); 579 | printf(" - type : %d \n", hfp_subevent_enhanced_call_status_get_bnip_type(event)); 580 | printf(" - number : %s \n", hfp_subevent_enhanced_call_status_get_bnip_number(event)); 581 | break; 582 | default: 583 | break; 584 | } 585 | break; 586 | 587 | default: 588 | break; 589 | } 590 | break; 591 | 592 | default: 593 | break; 594 | } 595 | } 596 | 597 | /* @section Main Application Setup 598 | * 599 | * @text Listing MainConfiguration shows main application code. 600 | * To run a HFP HF service you need to initialize the SDP, and to create and register HFP HF record with it. 601 | * The packet_handler is used for sending commands to the HFP AG. It also receives the HFP AG's answers. 602 | * The stdin_process callback allows for sending commands to the HFP AG. 603 | * At the end the Bluetooth stack is started. 604 | */ 605 | 606 | /* LISTING_START(MainConfiguration): Setup HFP Hands-Free unit */ 607 | int btstack_main(int argc, const char *argv[]); 608 | int btstack_main(int argc, const char *argv[]) 609 | { 610 | (void)argc; 611 | (void)argv; 612 | 613 | sco_demo_init(); 614 | 615 | gap_discoverable_control(1); 616 | gap_set_class_of_device(0x200408); 617 | gap_set_local_name("HFP HF Demo 00:00:00:00:00:00"); 618 | 619 | // init L2CAP 620 | l2cap_init(); 621 | 622 | uint16_t hf_supported_features = 623 | (1 << HFP_HFSF_ESCO_S4) | 624 | (1 << HFP_HFSF_CLI_PRESENTATION_CAPABILITY) | 625 | (1 << HFP_HFSF_HF_INDICATORS) | 626 | (1 << HFP_HFSF_CODEC_NEGOTIATION) | 627 | (1 << HFP_HFSF_ENHANCED_CALL_STATUS) | 628 | (1 << HFP_HFSF_REMOTE_VOLUME_CONTROL); 629 | int wide_band_speech = 1; 630 | 631 | rfcomm_init(); 632 | hfp_hf_init(rfcomm_channel_nr); 633 | hfp_hf_init_supported_features(hf_supported_features); 634 | hfp_hf_init_hf_indicators(sizeof(indicators) / sizeof(uint16_t), indicators); 635 | hfp_hf_init_codecs(sizeof(codecs), codecs); 636 | 637 | sdp_init(); 638 | memset(hfp_service_buffer, 0, sizeof(hfp_service_buffer)); 639 | hfp_hf_create_sdp_record(hfp_service_buffer, 0x10001, rfcomm_channel_nr, hfp_hf_service_name, hf_supported_features, wide_band_speech); 640 | printf("SDP service record size: %u\n", de_get_len(hfp_service_buffer)); 641 | sdp_register_service(hfp_service_buffer); 642 | 643 | // register for HCI events and SCO packets 644 | hci_event_callback_registration.callback = &packet_handler; 645 | hci_add_event_handler(&hci_event_callback_registration); 646 | hci_register_sco_packet_handler(&packet_handler); 647 | hci_register_sco_packet_handler(&packet_handler); 648 | 649 | // register for HFP events 650 | hfp_hf_register_packet_handler(packet_handler); 651 | 652 | #ifdef HAVE_BTSTACK_STDIN 653 | // parse human readable Bluetooth address 654 | sscanf_bd_addr(device_addr_string, device_addr); 655 | btstack_stdin_setup(stdin_process); 656 | #endif 657 | // turn on! 658 | hci_power_control(HCI_POWER_ON); 659 | return 0; 660 | } 661 | /* LISTING_END */ 662 | /* EXAMPLE_END */ 663 | -------------------------------------------------------------------------------- /main/main.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2020 BlueKitchen GmbH 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY MATTHIAS RINGWALD AND CONTRIBUTORS 18 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 20 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS 21 | * RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 22 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 23 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 24 | * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 25 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 27 | * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 | * SUCH DAMAGE. 29 | * 30 | */ 31 | 32 | /* 33 | * main.c 34 | * 35 | * Minimal main application that initializes BTstack, prepares the example and enters BTstack's Run Loop. 36 | * 37 | * If needed, you can create other threads. Please note that BTstack's API is not thread-safe and can only be 38 | * called from BTstack timers or in response to its callbacks, e.g. packet handlers. 39 | */ 40 | 41 | #include "btstack_port_esp32.h" 42 | #include "btstack_run_loop.h" 43 | #include "btstack_audio.h" 44 | #include "hci_dump.h" 45 | #include "hci_dump_embedded_stdout.h" 46 | #include "microphone.h" 47 | #include "speaker.h" 48 | 49 | #include 50 | 51 | extern int btstack_main(int argc, const char *argv[]); 52 | 53 | int app_main(void) 54 | { 55 | // optional: enable packet logger 56 | // hci_dump_init(hci_dump_embedded_stdout_get_instance()); 57 | 58 | // Configure BTstack for ESP32 VHCI Controller 59 | btstack_init(); 60 | 61 | // setup the audio sink and audio source - this overrides what was set in btstack_init() 62 | btstack_audio_source_set_instance(btstack_audio_esp32_source_get_instance()); 63 | btstack_audio_sink_set_instance(btstack_audio_esp32_sink_get_instance()); 64 | 65 | // Setup example 66 | btstack_main(0, NULL); 67 | 68 | // Enter run loop (forever) 69 | btstack_run_loop_execute(); 70 | 71 | return 0; 72 | } 73 | -------------------------------------------------------------------------------- /main/microphone.c: -------------------------------------------------------------------------------- 1 | #define BTSTACK_FILE__ "btstack_audio_esp32.c" 2 | 3 | #include "btstack_config.h" 4 | #include "btstack_debug.h" 5 | #include "btstack_audio.h" 6 | #include "btstack_run_loop.h" 7 | #include "hal_audio.h" 8 | 9 | #include "freertos/FreeRTOS.h" 10 | #include "freertos/queue.h" 11 | #include "driver/i2s.h" 12 | 13 | #include "config.h" 14 | 15 | // client 16 | static void (*recording_callback)(const int16_t *buffer, uint16_t num_samples); 17 | 18 | // timer to fill output ring buffer 19 | static btstack_timer_source_t driver_timer_source; 20 | 21 | // current gain 22 | static int source_gain = 1; 23 | // are we currently streaming from the microphone 24 | static bool is_source_streaming; 25 | // samples that are read from the microphone 26 | static int32_t buffer_in[DMA_BUFFER_SAMPLES]; 27 | // samples that have been converted to PCM 16 bit 28 | static int16_t samples_in[DMA_BUFFER_SAMPLES]; 29 | 30 | // read samples from the microphone and send them off to bluetooth 31 | static void copy_samples(void) 32 | { 33 | // read from I2S - we pass portMAX_DELAY so we don't delay 34 | size_t bytes_read = 0; 35 | i2s_read(I2S_MIC_DEVICE, buffer_in, DMA_BUFFER_SAMPLES * sizeof(int32_t), &bytes_read, portMAX_DELAY); 36 | // how many samples have we read 37 | int samples_read = bytes_read / sizeof(int32_t); 38 | if (samples_read > 0) 39 | { 40 | // convert the samples to 16 bit 41 | for (int i = 0; i < samples_read; i++) 42 | { 43 | // in theory we should shift to the right by 16 bits, but MEMS microphones have a very 44 | // high dynamic range, so if we shift all the way we lose a lot of signal 45 | samples_in[i] = source_gain * (buffer_in[i] >> 11); 46 | } 47 | // send the samples off to be processed 48 | (*recording_callback)((int16_t *)samples_in, samples_read); 49 | } 50 | } 51 | 52 | // callback from the timer 53 | static void driver_timer_handler_source(btstack_timer_source_t *ts) 54 | { 55 | // if we're streaming from the microphone then copy the samples from the I2S device 56 | if (recording_callback) 57 | { 58 | copy_samples(); 59 | } 60 | // re-set timer 61 | btstack_run_loop_set_timer(ts, DRIVER_POLL_INTERVAL_MS); 62 | btstack_run_loop_add_timer(ts); 63 | } 64 | 65 | // setup the I2S driver 66 | static int btstack_audio_esp32_source_init( 67 | uint8_t channels, 68 | uint32_t samplerate, 69 | void (*recording)(const int16_t *buffer, uint16_t num_samples)) 70 | { 71 | recording_callback = recording; 72 | i2s_config_t config = { 73 | .mode = I2S_MODE_MASTER | I2S_MODE_RX, 74 | .sample_rate = samplerate, 75 | .bits_per_sample = I2S_BITS_PER_SAMPLE_32BIT, 76 | .channel_format = channels == 2 ? I2S_CHANNEL_FMT_RIGHT_LEFT : I2S_MIC_CHANNEL, 77 | .communication_format = I2S_COMM_FORMAT_STAND_I2S, 78 | .dma_buf_count = DMA_BUFFER_COUNT, // Number of DMA buffers. Max 128. 79 | .dma_buf_len = DMA_BUFFER_SAMPLES, // Size of each DMA buffer in samples. Max 1024. 80 | .intr_alloc_flags = ESP_INTR_FLAG_LEVEL1}; 81 | i2s_pin_config_t pins = { 82 | .bck_io_num = I2S_MIC_SERIAL_CLOCK, 83 | .ws_io_num = I2S_MIC_LEFT_RIGHT_CLOCK, 84 | .data_out_num = -1, 85 | .data_in_num = I2S_MIC_SERIAL_DATA}; 86 | 87 | i2s_driver_install(I2S_MIC_DEVICE, &config, 0, NULL); 88 | i2s_set_pin(I2S_MIC_DEVICE, &pins); 89 | i2s_zero_dma_buffer(I2S_MIC_DEVICE); 90 | 91 | return 0; 92 | } 93 | 94 | // update the gain 95 | static void btstack_audio_esp32_source_gain(uint8_t gain) 96 | { 97 | source_gain = gain; 98 | } 99 | 100 | // start streaming from the microphone 101 | static void btstack_audio_esp32_source_start_stream() 102 | { 103 | // start i2s 104 | i2s_start(I2S_MIC_DEVICE); 105 | 106 | // start timer 107 | btstack_run_loop_set_timer_handler(&driver_timer_source, &driver_timer_handler_source); 108 | btstack_run_loop_set_timer(&driver_timer_source, DRIVER_POLL_INTERVAL_MS); 109 | btstack_run_loop_add_timer(&driver_timer_source); 110 | 111 | // state 112 | is_source_streaming = true; 113 | } 114 | 115 | // stop streaming from the microphone 116 | static void btstack_audio_esp32_source_stop_stream(void) 117 | { 118 | if (!is_source_streaming) 119 | return; 120 | 121 | // stop timer 122 | btstack_run_loop_remove_timer(&driver_timer_source); 123 | 124 | // stop i2s 125 | i2s_stop(I2S_MIC_DEVICE); 126 | 127 | // state 128 | is_source_streaming = false; 129 | } 130 | 131 | // shutdown the driver 132 | static void btstack_audio_esp32_source_close(void) 133 | { 134 | if (is_source_streaming) 135 | { 136 | btstack_audio_esp32_source_stop_stream(); 137 | } 138 | // uninstall driver 139 | i2s_driver_uninstall(I2S_MIC_DEVICE); 140 | } 141 | 142 | static const btstack_audio_source_t btstack_audio_source_esp32 = { 143 | /* int (*init)(..);*/ &btstack_audio_esp32_source_init, 144 | /* void (*set_gain)(uint8_t gain); */ &btstack_audio_esp32_source_gain, 145 | /* void (*start_stream(void));*/ &btstack_audio_esp32_source_start_stream, 146 | /* void (*stop_stream)(void) */ &btstack_audio_esp32_source_stop_stream, 147 | /* void (*close)(void); */ &btstack_audio_esp32_source_close}; 148 | 149 | const btstack_audio_source_t *btstack_audio_esp32_source_get_instance(void) 150 | { 151 | return &btstack_audio_source_esp32; 152 | } 153 | -------------------------------------------------------------------------------- /main/microphone.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "btstack_config.h" 4 | #include "btstack_audio.h" 5 | 6 | const btstack_audio_source_t *btstack_audio_esp32_source_get_instance(void); 7 | -------------------------------------------------------------------------------- /main/sco_demo_util.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 BlueKitchen GmbH 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 4. Any redistribution, use, or modification is done solely for 17 | * personal benefit and not for any commercial purpose or for 18 | * monetary gain. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS 21 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS 24 | * RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 27 | * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 28 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 30 | * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 | * SUCH DAMAGE. 32 | * 33 | * Please inquire about commercial licensing options at 34 | * contact@bluekitchen-gmbh.com 35 | * 36 | */ 37 | 38 | #define BTSTACK_FILE__ "sco_demo_util.c" 39 | 40 | /* 41 | * sco_demo_util.c - send/receive test data via SCO, used by hfp_*_demo and hsp_*_demo 42 | */ 43 | 44 | #include 45 | 46 | #include "sco_demo_util.h" 47 | 48 | #include "btstack_audio.h" 49 | #include "btstack_debug.h" 50 | #include "btstack_ring_buffer.h" 51 | #include "classic/btstack_cvsd_plc.h" 52 | #include "classic/btstack_sbc.h" 53 | #include "classic/hfp.h" 54 | #include "classic/hfp_msbc.h" 55 | 56 | // number of sco packets until 'report' on console 57 | #define SCO_REPORT_PERIOD 100 58 | 59 | // #define ENABLE_SCO_STEREO_PLAYBACK 60 | 61 | // pre-buffer for CVSD and mSBC - also defines latency 62 | #define SCO_CVSD_PA_PREBUFFER_MS 50 63 | #define SCO_MSBC_PA_PREBUFFER_MS 50 64 | 65 | // constants 66 | #define NUM_CHANNELS 1 67 | #define CVSD_SAMPLE_RATE 8000 68 | #define MSBC_SAMPLE_RATE 16000 69 | #define BYTES_PER_FRAME 2 70 | 71 | #define CVSD_PA_PREBUFFER_BYTES (SCO_CVSD_PA_PREBUFFER_MS * CVSD_SAMPLE_RATE / 1000 * BYTES_PER_FRAME) 72 | #define MSBC_PA_PREBUFFER_BYTES (SCO_MSBC_PA_PREBUFFER_MS * MSBC_SAMPLE_RATE / 1000 * BYTES_PER_FRAME) 73 | 74 | // output 75 | static int audio_output_paused = 0; 76 | static uint8_t audio_output_ring_buffer_storage[2 * MSBC_PA_PREBUFFER_BYTES]; 77 | static btstack_ring_buffer_t audio_output_ring_buffer; 78 | 79 | // input 80 | static int audio_input_paused = 0; 81 | static uint8_t audio_input_ring_buffer_storage[2 * 8000]; // full second input buffer 82 | static btstack_ring_buffer_t audio_input_ring_buffer; 83 | 84 | static int dump_data = 1; 85 | static int count_sent = 0; 86 | static int count_received = 0; 87 | static int negotiated_codec = -1; 88 | 89 | #ifdef ENABLE_HFP_WIDE_BAND_SPEECH 90 | static btstack_sbc_decoder_state_t decoder_state; 91 | #endif 92 | 93 | static btstack_cvsd_plc_state_t cvsd_plc_state; 94 | 95 | #define MAX_NUM_MSBC_SAMPLES (16 * 8) 96 | 97 | int num_samples_to_write; 98 | int num_audio_frames; 99 | unsigned int phase; 100 | 101 | static void playback_callback(int16_t *buffer, uint16_t num_samples) 102 | { 103 | 104 | uint32_t prebuffer_bytes; 105 | switch (negotiated_codec) 106 | { 107 | case HFP_CODEC_MSBC: 108 | prebuffer_bytes = MSBC_PA_PREBUFFER_BYTES; 109 | break; 110 | case HFP_CODEC_CVSD: 111 | default: 112 | prebuffer_bytes = CVSD_PA_PREBUFFER_BYTES; 113 | break; 114 | } 115 | 116 | // fill with silence while paused 117 | if (audio_output_paused) 118 | { 119 | if (btstack_ring_buffer_bytes_available(&audio_output_ring_buffer) < prebuffer_bytes) 120 | { 121 | #ifdef ENABLE_SCO_STEREO_PLAYBACK 122 | memset(buffer, 0, num_samples * BYTES_PER_FRAME * 2); 123 | #else 124 | memset(buffer, 0, num_samples * BYTES_PER_FRAME); 125 | #endif 126 | return; 127 | } 128 | else 129 | { 130 | // resume playback 131 | audio_output_paused = 0; 132 | } 133 | } 134 | 135 | // get data from ringbuffer 136 | uint32_t bytes_read = 0; 137 | #ifdef ENABLE_SCO_STEREO_PLAYBACK 138 | while (num_samples) 139 | { 140 | int16_t temp[16]; 141 | unsigned int bytes_to_read = btstack_min(num_samples * BYTES_PER_FRAME, sizeof(temp)); 142 | btstack_ring_buffer_read(&audio_output_ring_buffer, (uint8_t *)&temp[0], bytes_to_read, &bytes_read); 143 | if (bytes_read == 0) 144 | break; 145 | unsigned int i; 146 | for (i = 0; i < bytes_read / BYTES_PER_FRAME; i++) 147 | { 148 | *buffer++ = temp[i]; 149 | *buffer++ = temp[i]; 150 | num_samples--; 151 | } 152 | } 153 | #else 154 | btstack_ring_buffer_read(&audio_output_ring_buffer, (uint8_t *)buffer, num_samples * BYTES_PER_FRAME, &bytes_read); 155 | num_samples -= bytes_read / BYTES_PER_FRAME; 156 | buffer += bytes_read / BYTES_PER_FRAME; 157 | #endif 158 | 159 | // fill with 0 if not enough 160 | if (num_samples) 161 | { 162 | #ifdef ENABLE_SCO_STEREO_PLAYBACK 163 | memset(buffer, 0, num_samples * BYTES_PER_FRAME * 2); 164 | #else 165 | memset(buffer, 0, num_samples * BYTES_PER_FRAME); 166 | #endif 167 | audio_output_paused = 1; 168 | } 169 | } 170 | 171 | static void recording_callback(const int16_t *buffer, uint16_t num_samples) 172 | { 173 | btstack_ring_buffer_write(&audio_input_ring_buffer, (uint8_t *)buffer, num_samples * 2); 174 | } 175 | 176 | // return 1 if ok 177 | static int audio_initialize(int sample_rate) 178 | { 179 | 180 | // -- output -- // 181 | 182 | // init buffers 183 | memset(audio_output_ring_buffer_storage, 0, sizeof(audio_output_ring_buffer_storage)); 184 | btstack_ring_buffer_init(&audio_output_ring_buffer, audio_output_ring_buffer_storage, sizeof(audio_output_ring_buffer_storage)); 185 | 186 | // config and setup audio playback 187 | const btstack_audio_sink_t *audio_sink = btstack_audio_sink_get_instance(); 188 | if (audio_sink) 189 | { 190 | #ifdef ENABLE_SCO_STEREO_PLAYBACK 191 | audio_sink->init(2, sample_rate, &playback_callback); 192 | #else 193 | audio_sink->init(1, sample_rate, &playback_callback); 194 | #endif 195 | audio_sink->start_stream(); 196 | 197 | audio_output_paused = 1; 198 | } 199 | // -- input -- // 200 | 201 | // init buffers 202 | memset(audio_input_ring_buffer_storage, 0, sizeof(audio_input_ring_buffer_storage)); 203 | btstack_ring_buffer_init(&audio_input_ring_buffer, audio_input_ring_buffer_storage, sizeof(audio_input_ring_buffer_storage)); 204 | 205 | // config and setup audio recording 206 | const btstack_audio_source_t *audio_source = btstack_audio_source_get_instance(); 207 | if (audio_source) 208 | { 209 | audio_source->init(1, sample_rate, &recording_callback); 210 | audio_source->start_stream(); 211 | 212 | audio_input_paused = 1; 213 | } 214 | return 1; 215 | } 216 | 217 | static void audio_terminate(void) 218 | { 219 | const btstack_audio_sink_t *audio_sink = btstack_audio_sink_get_instance(); 220 | if (audio_sink) 221 | { 222 | audio_sink->close(); 223 | } 224 | 225 | const btstack_audio_source_t *audio_source = btstack_audio_source_get_instance(); 226 | if (audio_source) 227 | { 228 | audio_source->close(); 229 | } 230 | } 231 | 232 | #ifdef ENABLE_HFP_WIDE_BAND_SPEECH 233 | 234 | static void handle_pcm_data(int16_t *data, int num_samples, int num_channels, int sample_rate, void *context) 235 | { 236 | UNUSED(context); 237 | UNUSED(sample_rate); 238 | UNUSED(data); 239 | UNUSED(num_samples); 240 | UNUSED(num_channels); 241 | 242 | #if (SCO_DEMO_MODE == SCO_DEMO_MODE_MICROPHONE) 243 | 244 | // printf("handle_pcm_data num samples %u, sample rate %d\n", num_samples, num_channels); 245 | 246 | // samples in callback in host endianess, ready for playback 247 | btstack_ring_buffer_write(&audio_output_ring_buffer, (uint8_t *)data, num_samples * num_channels * 2); 248 | 249 | #endif /* Demo mode sine or microphone */ 250 | } 251 | #endif /* ENABLE_HFP_WIDE_BAND_SPEECH */ 252 | 253 | #ifdef ENABLE_HFP_WIDE_BAND_SPEECH 254 | 255 | static void sco_demo_init_mSBC(void) 256 | { 257 | printf("SCO Demo: Init mSBC\n"); 258 | 259 | btstack_sbc_decoder_init(&decoder_state, SBC_MODE_mSBC, &handle_pcm_data, NULL); 260 | hfp_msbc_init(); 261 | 262 | audio_initialize(MSBC_SAMPLE_RATE); 263 | } 264 | 265 | static void sco_demo_receive_mSBC(uint8_t *packet, uint16_t size) 266 | { 267 | btstack_sbc_decoder_process_data(&decoder_state, (packet[1] >> 4) & 3, packet + 3, size - 3); 268 | } 269 | #endif 270 | 271 | static void sco_demo_init_CVSD(void) 272 | { 273 | printf("SCO Demo: Init CVSD\n"); 274 | 275 | btstack_cvsd_plc_init(&cvsd_plc_state); 276 | 277 | audio_initialize(CVSD_SAMPLE_RATE); 278 | } 279 | 280 | static void sco_demo_receive_CVSD(uint8_t *packet, uint16_t size) 281 | { 282 | 283 | int16_t audio_frame_out[128]; // 284 | 285 | if (size > sizeof(audio_frame_out)) 286 | { 287 | printf("sco_demo_receive_CVSD: SCO packet larger than local output buffer - dropping data.\n"); 288 | return; 289 | } 290 | 291 | const int audio_bytes_read = size - 3; 292 | const int num_samples = audio_bytes_read / BYTES_PER_FRAME; 293 | 294 | // convert into host endian 295 | int16_t audio_frame_in[128]; 296 | int i; 297 | for (i = 0; i < num_samples; i++) 298 | { 299 | audio_frame_in[i] = little_endian_read_16(packet, 3 + i * 2); 300 | } 301 | 302 | // treat packet as bad frame if controller does not report 'all good' 303 | bool bad_frame = (packet[1] & 0x30) != 0; 304 | 305 | btstack_cvsd_plc_process_data(&cvsd_plc_state, bad_frame, audio_frame_in, num_samples, audio_frame_out); 306 | 307 | btstack_ring_buffer_write(&audio_output_ring_buffer, (uint8_t *)audio_frame_out, audio_bytes_read); 308 | } 309 | 310 | void sco_demo_close(void) 311 | { 312 | printf("SCO demo close\n"); 313 | 314 | printf("SCO demo statistics: "); 315 | #ifdef ENABLE_HFP_WIDE_BAND_SPEECH 316 | if (negotiated_codec == HFP_CODEC_MSBC) 317 | { 318 | printf("Used mSBC with PLC, number of processed frames: \n - %d good frames, \n - %d zero frames, \n - %d bad frames.\n", decoder_state.good_frames_nr, decoder_state.zero_frames_nr, decoder_state.bad_frames_nr); 319 | } 320 | else 321 | #endif 322 | { 323 | printf("Used CVSD with PLC, number of proccesed frames: \n - %d good frames, \n - %d bad frames.\n", cvsd_plc_state.good_frames_nr, cvsd_plc_state.bad_frames_nr); 324 | } 325 | 326 | negotiated_codec = -1; 327 | audio_terminate(); 328 | } 329 | 330 | void sco_demo_set_codec(uint8_t codec) 331 | { 332 | if (negotiated_codec == codec) 333 | return; 334 | negotiated_codec = codec; 335 | 336 | if (negotiated_codec == HFP_CODEC_MSBC) 337 | { 338 | #ifdef ENABLE_HFP_WIDE_BAND_SPEECH 339 | sco_demo_init_mSBC(); 340 | #endif 341 | } 342 | else 343 | { 344 | sco_demo_init_CVSD(); 345 | } 346 | } 347 | 348 | void sco_demo_init(void) 349 | { 350 | 351 | #ifdef ENABLE_CLASSIC_LEGACY_CONNECTIONS_FOR_SCO_DEMOS 352 | printf("Disable BR/EDR Secure Connctions due to incompatibilities with SCO connections\n"); 353 | gap_secure_connections_enable(false); 354 | #endif 355 | 356 | // status 357 | printf("SCO Demo: Sending and receiving audio via btstack_audio.\n"); 358 | hci_set_sco_voice_setting(0x60); // linear, unsigned, 16-bit, CVSD 359 | } 360 | 361 | void sco_report(void); 362 | void sco_report(void) 363 | { 364 | printf("SCO: sent %u, received %u\n", count_sent, count_received); 365 | } 366 | 367 | void sco_demo_send(hci_con_handle_t sco_handle) 368 | { 369 | 370 | if (sco_handle == HCI_CON_HANDLE_INVALID) 371 | return; 372 | 373 | int sco_packet_length = hci_get_sco_packet_length(); 374 | int sco_payload_length = sco_packet_length - 3; 375 | 376 | hci_reserve_packet_buffer(); 377 | uint8_t *sco_packet = hci_get_outgoing_packet_buffer(); 378 | 379 | if (btstack_audio_source_get_instance()) 380 | { 381 | 382 | if (negotiated_codec == HFP_CODEC_MSBC) 383 | { 384 | // MSBC 385 | 386 | if (audio_input_paused) 387 | { 388 | if (btstack_ring_buffer_bytes_available(&audio_input_ring_buffer) >= MSBC_PA_PREBUFFER_BYTES) 389 | { 390 | // resume sending 391 | audio_input_paused = 0; 392 | } 393 | } 394 | 395 | if (!audio_input_paused) 396 | { 397 | int num_samples = hfp_msbc_num_audio_samples_per_frame(); 398 | if (num_samples > MAX_NUM_MSBC_SAMPLES) 399 | return; // assert 400 | if (hfp_msbc_can_encode_audio_frame_now() && btstack_ring_buffer_bytes_available(&audio_input_ring_buffer) >= (unsigned int)(num_samples * BYTES_PER_FRAME)) 401 | { 402 | int16_t sample_buffer[MAX_NUM_MSBC_SAMPLES]; 403 | uint32_t bytes_read; 404 | btstack_ring_buffer_read(&audio_input_ring_buffer, (uint8_t *)sample_buffer, num_samples * BYTES_PER_FRAME, &bytes_read); 405 | hfp_msbc_encode_audio_frame(sample_buffer); 406 | num_audio_frames++; 407 | } 408 | if (hfp_msbc_num_bytes_in_stream() < sco_payload_length) 409 | { 410 | log_error("mSBC stream should not be empty."); 411 | } 412 | } 413 | 414 | if (audio_input_paused || hfp_msbc_num_bytes_in_stream() < sco_payload_length) 415 | { 416 | memset(sco_packet + 3, 0, sco_payload_length); 417 | audio_input_paused = 1; 418 | } 419 | else 420 | { 421 | hfp_msbc_read_from_stream(sco_packet + 3, sco_payload_length); 422 | } 423 | } 424 | else 425 | { 426 | // CVSD 427 | 428 | log_debug("send: bytes avail %u, free %u", btstack_ring_buffer_bytes_available(&audio_input_ring_buffer), btstack_ring_buffer_bytes_free(&audio_input_ring_buffer)); 429 | // fill with silence while paused 430 | int bytes_to_copy = sco_payload_length; 431 | if (audio_input_paused) 432 | { 433 | if (btstack_ring_buffer_bytes_available(&audio_input_ring_buffer) >= CVSD_PA_PREBUFFER_BYTES) 434 | { 435 | // resume sending 436 | audio_input_paused = 0; 437 | } 438 | } 439 | 440 | // get data from ringbuffer 441 | uint16_t pos = 0; 442 | uint8_t *sample_data = &sco_packet[3]; 443 | if (!audio_input_paused) 444 | { 445 | uint32_t bytes_read = 0; 446 | btstack_ring_buffer_read(&audio_input_ring_buffer, sample_data, bytes_to_copy, &bytes_read); 447 | // flip 16 on big endian systems 448 | // @note We don't use (uint16_t *) casts since all sample addresses are odd which causes crahses on some systems 449 | if (btstack_is_big_endian()) 450 | { 451 | unsigned int i; 452 | for (i = 0; i < bytes_read; i += 2) 453 | { 454 | uint8_t tmp = sample_data[i * 2]; 455 | sample_data[i * 2] = sample_data[i * 2 + 1]; 456 | sample_data[i * 2 + 1] = tmp; 457 | } 458 | } 459 | bytes_to_copy -= bytes_read; 460 | pos += bytes_read; 461 | } 462 | 463 | // fill with 0 if not enough 464 | if (bytes_to_copy) 465 | { 466 | memset(sample_data + pos, 0, bytes_to_copy); 467 | audio_input_paused = 1; 468 | } 469 | } 470 | } 471 | else 472 | { 473 | // just send '0's 474 | memset(sco_packet + 3, 0, sco_payload_length); 475 | } 476 | // set handle + flags 477 | little_endian_store_16(sco_packet, 0, sco_handle); 478 | // set len 479 | sco_packet[2] = sco_payload_length; 480 | // finally send packet 481 | hci_send_sco_packet_buffer(sco_packet_length); 482 | 483 | // request another send event 484 | hci_request_sco_can_send_now_event(); 485 | 486 | count_sent++; 487 | if ((count_sent % SCO_REPORT_PERIOD) == 0) 488 | sco_report(); 489 | } 490 | 491 | /** 492 | * @brief Process received data 493 | */ 494 | #define ANSI_COLOR_RED "\x1b[31m" 495 | #define ANSI_COLOR_GREEN "\x1b[32m" 496 | #define ANSI_COLOR_YELLOW "\x1b[33m" 497 | #define ANSI_COLOR_BLUE "\x1b[34m" 498 | #define ANSI_COLOR_MAGENTA "\x1b[35m" 499 | #define ANSI_COLOR_CYAN "\x1b[36m" 500 | #define ANSI_COLOR_RESET "\x1b[0m" 501 | 502 | void sco_demo_receive(uint8_t *packet, uint16_t size) 503 | { 504 | 505 | dump_data = 1; 506 | 507 | count_received++; 508 | static uint32_t packets = 0; 509 | static uint32_t crc_errors = 0; 510 | static uint32_t data_received = 0; 511 | static uint32_t byte_errors = 0; 512 | 513 | data_received += size - 3; 514 | packets++; 515 | if (data_received > 100000) 516 | { 517 | printf("Summary: data %07u, packets %04u, packet with crc errors %0u, byte errors %04u\n", (unsigned int)data_received, (unsigned int)packets, (unsigned int)crc_errors, (unsigned int)byte_errors); 518 | crc_errors = 0; 519 | byte_errors = 0; 520 | data_received = 0; 521 | packets = 0; 522 | } 523 | 524 | switch (negotiated_codec) 525 | { 526 | #ifdef ENABLE_HFP_WIDE_BAND_SPEECH 527 | case HFP_CODEC_MSBC: 528 | sco_demo_receive_mSBC(packet, size); 529 | break; 530 | #endif 531 | case HFP_CODEC_CVSD: 532 | sco_demo_receive_CVSD(packet, size); 533 | break; 534 | default: 535 | break; 536 | } 537 | dump_data = 0; 538 | } 539 | -------------------------------------------------------------------------------- /main/sco_demo_util.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 BlueKitchen GmbH 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 4. Any redistribution, use, or modification is done solely for 17 | * personal benefit and not for any commercial purpose or for 18 | * monetary gain. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS 21 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS 24 | * RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 27 | * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 28 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 30 | * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 | * SUCH DAMAGE. 32 | * 33 | * Please inquire about commercial licensing options at 34 | * contact@bluekitchen-gmbh.com 35 | * 36 | */ 37 | 38 | /* 39 | * sco_demo_util.h - send/receive test data via SCO, used by hfp_*_demo and hsp_*_demo 40 | */ 41 | 42 | #ifndef SCO_DEMO_UTIL_H 43 | #define SCO_DEMO_UTIL_H 44 | 45 | #include "hci.h" 46 | 47 | #if defined __cplusplus 48 | extern "C" 49 | { 50 | #endif 51 | 52 | /** 53 | * @brief Init demo SCO data production/consumtion 54 | */ 55 | void sco_demo_init(void); 56 | 57 | /** 58 | * @brief Set codec (cvsd:0x01, msbc:0x02) and initalize wav writter and portaudio . 59 | * @param codec 60 | */ 61 | void sco_demo_set_codec(uint8_t codec); 62 | 63 | /** 64 | * @brief Send next data on con_handle 65 | * @param con_handle 66 | */ 67 | void sco_demo_send(hci_con_handle_t con_handle); 68 | 69 | /** 70 | * @brief Process received data 71 | */ 72 | void sco_demo_receive(uint8_t *packet, uint16_t size); 73 | 74 | /** 75 | * @brief Close WAV writer, stop portaudio stream 76 | */ 77 | void sco_demo_close(void); 78 | 79 | #if defined __cplusplus 80 | } 81 | #endif 82 | 83 | #endif 84 | -------------------------------------------------------------------------------- /main/speaker.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2018 BlueKitchen GmbH 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 4. Any redistribution, use, or modification is done solely for 17 | * personal benefit and not for any commercial purpose or for 18 | * monetary gain. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS 21 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS 24 | * RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 27 | * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 28 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 30 | * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 | * SUCH DAMAGE. 32 | * 33 | * Please inquire about commercial licensing options at 34 | * contact@bluekitchen-gmbh.com 35 | * 36 | */ 37 | 38 | /* 39 | * btstack_audio_esp32.c 40 | * 41 | * Implementation of btstack_audio.h using polling ESP32 I2S driver 42 | * 43 | */ 44 | 45 | #include "btstack_config.h" 46 | #include "btstack_debug.h" 47 | #include "btstack_audio.h" 48 | #include "btstack_run_loop.h" 49 | #include "hal_audio.h" 50 | 51 | #include "freertos/FreeRTOS.h" 52 | #include "freertos/queue.h" 53 | #include "driver/i2s.h" 54 | 55 | #include "config.h" 56 | 57 | // client 58 | static void (*playback_callback)(int16_t *buffer, uint16_t num_samples) = NULL; 59 | 60 | // timer to fill output ring buffer 61 | static btstack_timer_source_t driver_timer; 62 | 63 | static bool is_sink_streaming; 64 | 65 | static int sink_gain = 1; 66 | static int sink_channels = 2; 67 | 68 | // provide enough space for 2 channels - the way channels is done in this example is a bit odd 69 | static int16_t buffer[DMA_BUFFER_SAMPLES * 2]; 70 | static void fill_buffer(void) 71 | { 72 | size_t bytes_written; 73 | if (playback_callback) 74 | { 75 | (*playback_callback)(buffer, DMA_BUFFER_SAMPLES); 76 | for (int i = 0; i < DMA_BUFFER_SAMPLES * sink_channels; i++) 77 | { 78 | // gain doesn't seem to be wired up 79 | // buffer[i] = buffer[i] * sink_gain; 80 | // seems to be exceptionally loud so we scale it down 81 | buffer[i] = buffer[i] * 0.5; 82 | } 83 | i2s_write(I2S_SPEAKER_DEVICE, buffer, DMA_BUFFER_SAMPLES * sink_channels * sizeof(int16_t), &bytes_written, portMAX_DELAY); 84 | } 85 | } 86 | 87 | static void driver_timer_handler(btstack_timer_source_t *ts) 88 | { 89 | 90 | // playback buffer ready to fill 91 | if (playback_callback) 92 | { 93 | fill_buffer(); 94 | } 95 | 96 | // re-set timer 97 | btstack_run_loop_set_timer(ts, DRIVER_POLL_INTERVAL_MS); 98 | btstack_run_loop_add_timer(ts); 99 | } 100 | 101 | static int btstack_audio_esp32_sink_init( 102 | uint8_t channels, 103 | uint32_t samplerate, 104 | void (*playback)(int16_t *buffer, uint16_t num_samples)) 105 | { 106 | playback_callback = playback; 107 | sink_channels = channels; 108 | 109 | i2s_config_t config = 110 | { 111 | .mode = I2S_MODE_MASTER | I2S_MODE_TX, // Playback only 112 | .sample_rate = samplerate, 113 | .bits_per_sample = I2S_BITS_PER_SAMPLE_16BIT, 114 | .channel_format = channels == 2 ? I2S_CHANNEL_FMT_RIGHT_LEFT : I2S_CHANNEL_FMT_ONLY_LEFT, 115 | .communication_format = I2S_COMM_FORMAT_STAND_I2S, 116 | .dma_buf_count = DMA_BUFFER_COUNT, // Number of DMA buffers. Max 128. 117 | .dma_buf_len = DMA_BUFFER_SAMPLES, // Size of each DMA buffer in samples. Max 1024. 118 | .intr_alloc_flags = ESP_INTR_FLAG_LEVEL1}; 119 | 120 | i2s_pin_config_t pins = { 121 | .bck_io_num = I2S_SPEAKER_SERIAL_CLOCK, 122 | .ws_io_num = I2S_SPEAKER_LEFT_RIGHT_CLOCK, 123 | .data_out_num = I2S_SPEAKER_SERIAL_DATA, 124 | .data_in_num = I2S_PIN_NO_CHANGE}; 125 | 126 | i2s_driver_install(I2S_SPEAKER_DEVICE, &config, 0, NULL); 127 | i2s_set_pin(I2S_SPEAKER_DEVICE, &pins); 128 | i2s_zero_dma_buffer(I2S_SPEAKER_DEVICE); 129 | return 0; 130 | } 131 | 132 | static void btstack_audio_esp32_sink_gain(uint8_t gain) 133 | { 134 | sink_gain = gain; 135 | } 136 | 137 | static void btstack_audio_esp32_sink_start_stream(void) 138 | { 139 | // start i2s 140 | i2s_start(I2S_SPEAKER_DEVICE); 141 | 142 | // start timer 143 | btstack_run_loop_set_timer_handler(&driver_timer, &driver_timer_handler); 144 | btstack_run_loop_set_timer(&driver_timer, DRIVER_POLL_INTERVAL_MS); 145 | btstack_run_loop_add_timer(&driver_timer); 146 | 147 | // state 148 | is_sink_streaming = true; 149 | } 150 | 151 | static void btstack_audio_esp32_sink_stop_stream(void) 152 | { 153 | if (!is_sink_streaming) 154 | return; 155 | 156 | // stop timer 157 | btstack_run_loop_remove_timer(&driver_timer); 158 | 159 | // stop i2s 160 | i2s_stop(I2S_SPEAKER_DEVICE); 161 | 162 | // state 163 | is_sink_streaming = false; 164 | } 165 | 166 | static void btstack_audio_esp32_sink_close(void) 167 | { 168 | 169 | if (is_sink_streaming) 170 | { 171 | btstack_audio_esp32_sink_stop_stream(); 172 | } 173 | 174 | // uninstall driver 175 | i2s_driver_uninstall(I2S_SPEAKER_DEVICE); 176 | } 177 | 178 | static const btstack_audio_sink_t btstack_audio_sink_esp32 = { 179 | /* int (*init)(..);*/ &btstack_audio_esp32_sink_init, 180 | /* void (*set_gain)(uint8_t gain); */ &btstack_audio_esp32_sink_gain, 181 | /* void (*start_stream(void));*/ &btstack_audio_esp32_sink_start_stream, 182 | /* void (*stop_stream)(void) */ &btstack_audio_esp32_sink_stop_stream, 183 | /* void (*close)(void); */ &btstack_audio_esp32_sink_close}; 184 | 185 | const btstack_audio_sink_t *btstack_audio_esp32_sink_get_instance(void) 186 | { 187 | return &btstack_audio_sink_esp32; 188 | } 189 | -------------------------------------------------------------------------------- /main/speaker.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "btstack_config.h" 4 | #include "btstack_audio.h" 5 | 6 | const btstack_audio_sink_t *btstack_audio_esp32_sink_get_instance(void); -------------------------------------------------------------------------------- /sdkconfig: -------------------------------------------------------------------------------- 1 | # 2 | # Automatically generated file. DO NOT EDIT. 3 | # Espressif IoT Development Framework (ESP-IDF) Project Configuration 4 | # 5 | CONFIG_IDF_TARGET_ARCH_XTENSA=y 6 | CONFIG_IDF_TARGET="esp32" 7 | CONFIG_IDF_TARGET_ESP32=y 8 | CONFIG_IDF_FIRMWARE_CHIP_ID=0x0000 9 | 10 | # 11 | # SDK tool configuration 12 | # 13 | CONFIG_SDK_TOOLPREFIX="xtensa-esp32-elf-" 14 | CONFIG_SDK_PYTHON="python" 15 | CONFIG_SDK_MAKE_WARN_UNDEFINED_VARIABLES=y 16 | # CONFIG_SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS is not set 17 | # end of SDK tool configuration 18 | 19 | # 20 | # Build type 21 | # 22 | CONFIG_APP_BUILD_TYPE_APP_2NDBOOT=y 23 | # CONFIG_APP_BUILD_TYPE_ELF_RAM is not set 24 | CONFIG_APP_BUILD_GENERATE_BINARIES=y 25 | CONFIG_APP_BUILD_BOOTLOADER=y 26 | CONFIG_APP_BUILD_USE_FLASH_SECTIONS=y 27 | # end of Build type 28 | 29 | # 30 | # Application manager 31 | # 32 | CONFIG_APP_COMPILE_TIME_DATE=y 33 | # CONFIG_APP_EXCLUDE_PROJECT_VER_VAR is not set 34 | # CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR is not set 35 | # CONFIG_APP_PROJECT_VER_FROM_CONFIG is not set 36 | CONFIG_APP_RETRIEVE_LEN_ELF_SHA=16 37 | # end of Application manager 38 | 39 | # 40 | # Bootloader config 41 | # 42 | CONFIG_BOOTLOADER_OFFSET_IN_FLASH=0x1000 43 | CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y 44 | # CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG is not set 45 | # CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_PERF is not set 46 | # CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE is not set 47 | # CONFIG_BOOTLOADER_LOG_LEVEL_NONE is not set 48 | # CONFIG_BOOTLOADER_LOG_LEVEL_ERROR is not set 49 | CONFIG_BOOTLOADER_LOG_LEVEL_WARN=y 50 | # CONFIG_BOOTLOADER_LOG_LEVEL_INFO is not set 51 | # CONFIG_BOOTLOADER_LOG_LEVEL_DEBUG is not set 52 | # CONFIG_BOOTLOADER_LOG_LEVEL_VERBOSE is not set 53 | CONFIG_BOOTLOADER_LOG_LEVEL=2 54 | # CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_8V is not set 55 | CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y 56 | # CONFIG_BOOTLOADER_FACTORY_RESET is not set 57 | # CONFIG_BOOTLOADER_APP_TEST is not set 58 | CONFIG_BOOTLOADER_WDT_ENABLE=y 59 | # CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE is not set 60 | CONFIG_BOOTLOADER_WDT_TIME_MS=9000 61 | # CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE is not set 62 | # CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP is not set 63 | # CONFIG_BOOTLOADER_SKIP_VALIDATE_ON_POWER_ON is not set 64 | # CONFIG_BOOTLOADER_SKIP_VALIDATE_ALWAYS is not set 65 | CONFIG_BOOTLOADER_RESERVE_RTC_SIZE=0 66 | # CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC is not set 67 | # end of Bootloader config 68 | 69 | # 70 | # Security features 71 | # 72 | # CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT is not set 73 | # CONFIG_SECURE_BOOT is not set 74 | # CONFIG_SECURE_FLASH_ENC_ENABLED is not set 75 | # end of Security features 76 | 77 | # 78 | # Example Board Configuration 79 | # 80 | # CONFIG_ESP_LYRAT_V4_3_BOARD is not set 81 | CONFIG_ESP_CUSTOM_BOARD=y 82 | # end of Example Board Configuration 83 | 84 | # 85 | # Serial flasher config 86 | # 87 | CONFIG_ESPTOOLPY_PORT="/dev/ttyUSB0" 88 | CONFIG_ESPTOOLPY_BAUD_115200B=y 89 | # CONFIG_ESPTOOLPY_BAUD_230400B is not set 90 | # CONFIG_ESPTOOLPY_BAUD_921600B is not set 91 | # CONFIG_ESPTOOLPY_BAUD_2MB is not set 92 | # CONFIG_ESPTOOLPY_BAUD_OTHER is not set 93 | CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200 94 | CONFIG_ESPTOOLPY_BAUD=115200 95 | CONFIG_ESPTOOLPY_COMPRESSED=y 96 | # CONFIG_ESPTOOLPY_NO_STUB is not set 97 | # CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set 98 | # CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set 99 | CONFIG_ESPTOOLPY_FLASHMODE_DIO=y 100 | # CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set 101 | CONFIG_ESPTOOLPY_FLASHMODE="dio" 102 | # CONFIG_ESPTOOLPY_FLASHFREQ_80M is not set 103 | CONFIG_ESPTOOLPY_FLASHFREQ_40M=y 104 | # CONFIG_ESPTOOLPY_FLASHFREQ_26M is not set 105 | # CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set 106 | CONFIG_ESPTOOLPY_FLASHFREQ="40m" 107 | # CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set 108 | CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y 109 | # CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set 110 | # CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set 111 | # CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set 112 | CONFIG_ESPTOOLPY_FLASHSIZE="2MB" 113 | CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y 114 | CONFIG_ESPTOOLPY_BEFORE_RESET=y 115 | # CONFIG_ESPTOOLPY_BEFORE_NORESET is not set 116 | CONFIG_ESPTOOLPY_BEFORE="default_reset" 117 | CONFIG_ESPTOOLPY_AFTER_RESET=y 118 | # CONFIG_ESPTOOLPY_AFTER_NORESET is not set 119 | CONFIG_ESPTOOLPY_AFTER="hard_reset" 120 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_CONSOLE is not set 121 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_9600B is not set 122 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_57600B is not set 123 | CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y 124 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_230400B is not set 125 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_921600B is not set 126 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_2MB is not set 127 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER is not set 128 | CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL=115200 129 | CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 130 | # end of Serial flasher config 131 | 132 | # 133 | # Partition Table 134 | # 135 | CONFIG_PARTITION_TABLE_SINGLE_APP=y 136 | # CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE is not set 137 | # CONFIG_PARTITION_TABLE_TWO_OTA is not set 138 | # CONFIG_PARTITION_TABLE_CUSTOM is not set 139 | CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" 140 | CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv" 141 | CONFIG_PARTITION_TABLE_OFFSET=0x8000 142 | CONFIG_PARTITION_TABLE_MD5=y 143 | # end of Partition Table 144 | 145 | # 146 | # Compiler options 147 | # 148 | CONFIG_COMPILER_OPTIMIZATION_DEFAULT=y 149 | # CONFIG_COMPILER_OPTIMIZATION_SIZE is not set 150 | # CONFIG_COMPILER_OPTIMIZATION_PERF is not set 151 | # CONFIG_COMPILER_OPTIMIZATION_NONE is not set 152 | CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y 153 | # CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT is not set 154 | # CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE is not set 155 | CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL=2 156 | # CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT is not set 157 | # CONFIG_COMPILER_CXX_EXCEPTIONS is not set 158 | # CONFIG_COMPILER_CXX_RTTI is not set 159 | CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y 160 | # CONFIG_COMPILER_STACK_CHECK_MODE_NORM is not set 161 | # CONFIG_COMPILER_STACK_CHECK_MODE_STRONG is not set 162 | # CONFIG_COMPILER_STACK_CHECK_MODE_ALL is not set 163 | # CONFIG_COMPILER_WARN_WRITE_STRINGS is not set 164 | # CONFIG_COMPILER_DISABLE_GCC8_WARNINGS is not set 165 | # CONFIG_COMPILER_DUMP_RTL_FILES is not set 166 | # end of Compiler options 167 | 168 | # 169 | # Component config 170 | # 171 | 172 | # 173 | # Application Level Tracing 174 | # 175 | # CONFIG_APPTRACE_DEST_JTAG is not set 176 | CONFIG_APPTRACE_DEST_NONE=y 177 | CONFIG_APPTRACE_LOCK_ENABLE=y 178 | # end of Application Level Tracing 179 | 180 | # 181 | # ESP-ASIO 182 | # 183 | # CONFIG_ASIO_SSL_SUPPORT is not set 184 | # end of ESP-ASIO 185 | 186 | # 187 | # Bluetooth 188 | # 189 | CONFIG_BT_ENABLED=y 190 | CONFIG_BT_CTRL_ESP32=y 191 | 192 | # 193 | # Bluetooth controller(ESP32 Dual Mode Bluetooth) 194 | # 195 | # CONFIG_BTDM_CTRL_MODE_BLE_ONLY is not set 196 | # CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY is not set 197 | CONFIG_BTDM_CTRL_MODE_BTDM=y 198 | CONFIG_BTDM_CTRL_BLE_MAX_CONN=9 199 | CONFIG_BTDM_CTRL_BR_EDR_MAX_ACL_CONN=7 200 | CONFIG_BTDM_CTRL_BR_EDR_MAX_SYNC_CONN=2 201 | # CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_HCI is not set 202 | CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_PCM=y 203 | CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=1 204 | CONFIG_BTDM_CTRL_PCM_ROLE_EDGE_CONFIG=y 205 | CONFIG_BTDM_CTRL_PCM_ROLE_MASTER=y 206 | # CONFIG_BTDM_CTRL_PCM_ROLE_SLAVE is not set 207 | CONFIG_BTDM_CTRL_PCM_POLAR_FALLING_EDGE=y 208 | # CONFIG_BTDM_CTRL_PCM_POLAR_RISING_EDGE is not set 209 | CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0 210 | CONFIG_BTDM_CTRL_PCM_POLAR_EFF=0 211 | # CONFIG_BTDM_CTRL_AUTO_LATENCY is not set 212 | CONFIG_BTDM_CTRL_LEGACY_AUTH_VENDOR_EVT=y 213 | CONFIG_BTDM_CTRL_LEGACY_AUTH_VENDOR_EVT_EFF=y 214 | CONFIG_BTDM_CTRL_BLE_MAX_CONN_EFF=9 215 | CONFIG_BTDM_CTRL_BR_EDR_MAX_ACL_CONN_EFF=7 216 | CONFIG_BTDM_CTRL_BR_EDR_MAX_SYNC_CONN_EFF=2 217 | CONFIG_BTDM_CTRL_PINNED_TO_CORE=0 218 | CONFIG_BTDM_CTRL_HCI_MODE_VHCI=y 219 | # CONFIG_BTDM_CTRL_HCI_MODE_UART_H4 is not set 220 | 221 | # 222 | # MODEM SLEEP Options 223 | # 224 | CONFIG_BTDM_CTRL_MODEM_SLEEP=y 225 | CONFIG_BTDM_CTRL_MODEM_SLEEP_MODE_ORIG=y 226 | # CONFIG_BTDM_CTRL_MODEM_SLEEP_MODE_EVED is not set 227 | CONFIG_BTDM_CTRL_LPCLK_SEL_MAIN_XTAL=y 228 | # end of MODEM SLEEP Options 229 | 230 | CONFIG_BTDM_BLE_DEFAULT_SCA_250PPM=y 231 | CONFIG_BTDM_BLE_SLEEP_CLOCK_ACCURACY_INDEX_EFF=1 232 | CONFIG_BTDM_BLE_SCAN_DUPL=y 233 | CONFIG_BTDM_SCAN_DUPL_TYPE_DEVICE=y 234 | # CONFIG_BTDM_SCAN_DUPL_TYPE_DATA is not set 235 | # CONFIG_BTDM_SCAN_DUPL_TYPE_DATA_DEVICE is not set 236 | CONFIG_BTDM_SCAN_DUPL_TYPE=0 237 | CONFIG_BTDM_SCAN_DUPL_CACHE_SIZE=200 238 | # CONFIG_BTDM_BLE_MESH_SCAN_DUPL_EN is not set 239 | CONFIG_BTDM_CTRL_FULL_SCAN_SUPPORTED=y 240 | CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP=y 241 | CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100 242 | CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20 243 | # end of Bluetooth controller(ESP32 Dual Mode Bluetooth) 244 | 245 | CONFIG_BT_CTRL_MODE_EFF=1 246 | CONFIG_BT_CTRL_BLE_MAX_ACT=10 247 | CONFIG_BT_CTRL_BLE_MAX_ACT_EFF=10 248 | CONFIG_BT_CTRL_BLE_STATIC_ACL_TX_BUF_NB=0 249 | CONFIG_BT_CTRL_PINNED_TO_CORE=0 250 | CONFIG_BT_CTRL_HCI_TL=1 251 | CONFIG_BT_CTRL_ADV_DUP_FILT_MAX=30 252 | CONFIG_BT_CTRL_HW_CCA_EFF=0 253 | CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF=0 254 | CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP=y 255 | CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM=100 256 | CONFIG_BT_CTRL_BLE_ADV_REPORT_DISCARD_THRSHOLD=20 257 | CONFIG_BT_CTRL_BLE_SCAN_DUPL=y 258 | CONFIG_BT_CTRL_SCAN_DUPL_TYPE=0 259 | CONFIG_BT_CTRL_SCAN_DUPL_CACHE_SIZE=100 260 | 261 | # 262 | # MODEM SLEEP Options 263 | # 264 | # end of MODEM SLEEP Options 265 | 266 | CONFIG_BT_CTRL_SLEEP_MODE_EFF=0 267 | CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0 268 | CONFIG_BT_CTRL_HCI_TL_EFF=1 269 | 270 | # 271 | # MODEM SLEEP Options 272 | # 273 | # end of MODEM SLEEP Options 274 | 275 | CONFIG_BT_BLUEDROID_ENABLED=y 276 | # CONFIG_BT_NIMBLE_ENABLED is not set 277 | # CONFIG_BT_CONTROLLER_ONLY is not set 278 | 279 | # 280 | # Bluedroid Options 281 | # 282 | CONFIG_BT_BTC_TASK_STACK_SIZE=3072 283 | CONFIG_BT_BLUEDROID_PINNED_TO_CORE=0 284 | CONFIG_BT_BTU_TASK_STACK_SIZE=4096 285 | # CONFIG_BT_BLUEDROID_MEM_DEBUG is not set 286 | # CONFIG_BT_CLASSIC_ENABLED is not set 287 | CONFIG_BT_BLE_ENABLED=y 288 | CONFIG_BT_GATTS_ENABLE=y 289 | # CONFIG_BT_GATTS_PPCP_CHAR_GAP is not set 290 | # CONFIG_BT_BLE_BLUFI_ENABLE is not set 291 | CONFIG_BT_GATT_MAX_SR_PROFILES=8 292 | # CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MANUAL is not set 293 | CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO=y 294 | CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE=0 295 | CONFIG_BT_GATTC_ENABLE=y 296 | # CONFIG_BT_GATTC_CACHE_NVS_FLASH is not set 297 | CONFIG_BT_GATTC_CONNECT_RETRY_COUNT=3 298 | CONFIG_BT_BLE_SMP_ENABLE=y 299 | # CONFIG_BT_SMP_SLAVE_CON_PARAMS_UPD_ENABLE is not set 300 | # CONFIG_BT_STACK_NO_LOG is not set 301 | 302 | # 303 | # BT DEBUG LOG LEVEL 304 | # 305 | # CONFIG_BT_LOG_HCI_TRACE_LEVEL_NONE is not set 306 | # CONFIG_BT_LOG_HCI_TRACE_LEVEL_ERROR is not set 307 | CONFIG_BT_LOG_HCI_TRACE_LEVEL_WARNING=y 308 | # CONFIG_BT_LOG_HCI_TRACE_LEVEL_API is not set 309 | # CONFIG_BT_LOG_HCI_TRACE_LEVEL_EVENT is not set 310 | # CONFIG_BT_LOG_HCI_TRACE_LEVEL_DEBUG is not set 311 | # CONFIG_BT_LOG_HCI_TRACE_LEVEL_VERBOSE is not set 312 | CONFIG_BT_LOG_HCI_TRACE_LEVEL=2 313 | # CONFIG_BT_LOG_BTM_TRACE_LEVEL_NONE is not set 314 | # CONFIG_BT_LOG_BTM_TRACE_LEVEL_ERROR is not set 315 | CONFIG_BT_LOG_BTM_TRACE_LEVEL_WARNING=y 316 | # CONFIG_BT_LOG_BTM_TRACE_LEVEL_API is not set 317 | # CONFIG_BT_LOG_BTM_TRACE_LEVEL_EVENT is not set 318 | # CONFIG_BT_LOG_BTM_TRACE_LEVEL_DEBUG is not set 319 | # CONFIG_BT_LOG_BTM_TRACE_LEVEL_VERBOSE is not set 320 | CONFIG_BT_LOG_BTM_TRACE_LEVEL=2 321 | # CONFIG_BT_LOG_L2CAP_TRACE_LEVEL_NONE is not set 322 | # CONFIG_BT_LOG_L2CAP_TRACE_LEVEL_ERROR is not set 323 | CONFIG_BT_LOG_L2CAP_TRACE_LEVEL_WARNING=y 324 | # CONFIG_BT_LOG_L2CAP_TRACE_LEVEL_API is not set 325 | # CONFIG_BT_LOG_L2CAP_TRACE_LEVEL_EVENT is not set 326 | # CONFIG_BT_LOG_L2CAP_TRACE_LEVEL_DEBUG is not set 327 | # CONFIG_BT_LOG_L2CAP_TRACE_LEVEL_VERBOSE is not set 328 | CONFIG_BT_LOG_L2CAP_TRACE_LEVEL=2 329 | # CONFIG_BT_LOG_RFCOMM_TRACE_LEVEL_NONE is not set 330 | # CONFIG_BT_LOG_RFCOMM_TRACE_LEVEL_ERROR is not set 331 | CONFIG_BT_LOG_RFCOMM_TRACE_LEVEL_WARNING=y 332 | # CONFIG_BT_LOG_RFCOMM_TRACE_LEVEL_API is not set 333 | # CONFIG_BT_LOG_RFCOMM_TRACE_LEVEL_EVENT is not set 334 | # CONFIG_BT_LOG_RFCOMM_TRACE_LEVEL_DEBUG is not set 335 | # CONFIG_BT_LOG_RFCOMM_TRACE_LEVEL_VERBOSE is not set 336 | CONFIG_BT_LOG_RFCOMM_TRACE_LEVEL=2 337 | # CONFIG_BT_LOG_SDP_TRACE_LEVEL_NONE is not set 338 | # CONFIG_BT_LOG_SDP_TRACE_LEVEL_ERROR is not set 339 | CONFIG_BT_LOG_SDP_TRACE_LEVEL_WARNING=y 340 | # CONFIG_BT_LOG_SDP_TRACE_LEVEL_API is not set 341 | # CONFIG_BT_LOG_SDP_TRACE_LEVEL_EVENT is not set 342 | # CONFIG_BT_LOG_SDP_TRACE_LEVEL_DEBUG is not set 343 | # CONFIG_BT_LOG_SDP_TRACE_LEVEL_VERBOSE is not set 344 | CONFIG_BT_LOG_SDP_TRACE_LEVEL=2 345 | # CONFIG_BT_LOG_GAP_TRACE_LEVEL_NONE is not set 346 | # CONFIG_BT_LOG_GAP_TRACE_LEVEL_ERROR is not set 347 | CONFIG_BT_LOG_GAP_TRACE_LEVEL_WARNING=y 348 | # CONFIG_BT_LOG_GAP_TRACE_LEVEL_API is not set 349 | # CONFIG_BT_LOG_GAP_TRACE_LEVEL_EVENT is not set 350 | # CONFIG_BT_LOG_GAP_TRACE_LEVEL_DEBUG is not set 351 | # CONFIG_BT_LOG_GAP_TRACE_LEVEL_VERBOSE is not set 352 | CONFIG_BT_LOG_GAP_TRACE_LEVEL=2 353 | # CONFIG_BT_LOG_BNEP_TRACE_LEVEL_NONE is not set 354 | # CONFIG_BT_LOG_BNEP_TRACE_LEVEL_ERROR is not set 355 | CONFIG_BT_LOG_BNEP_TRACE_LEVEL_WARNING=y 356 | # CONFIG_BT_LOG_BNEP_TRACE_LEVEL_API is not set 357 | # CONFIG_BT_LOG_BNEP_TRACE_LEVEL_EVENT is not set 358 | # CONFIG_BT_LOG_BNEP_TRACE_LEVEL_DEBUG is not set 359 | # CONFIG_BT_LOG_BNEP_TRACE_LEVEL_VERBOSE is not set 360 | CONFIG_BT_LOG_BNEP_TRACE_LEVEL=2 361 | # CONFIG_BT_LOG_PAN_TRACE_LEVEL_NONE is not set 362 | # CONFIG_BT_LOG_PAN_TRACE_LEVEL_ERROR is not set 363 | CONFIG_BT_LOG_PAN_TRACE_LEVEL_WARNING=y 364 | # CONFIG_BT_LOG_PAN_TRACE_LEVEL_API is not set 365 | # CONFIG_BT_LOG_PAN_TRACE_LEVEL_EVENT is not set 366 | # CONFIG_BT_LOG_PAN_TRACE_LEVEL_DEBUG is not set 367 | # CONFIG_BT_LOG_PAN_TRACE_LEVEL_VERBOSE is not set 368 | CONFIG_BT_LOG_PAN_TRACE_LEVEL=2 369 | # CONFIG_BT_LOG_A2D_TRACE_LEVEL_NONE is not set 370 | # CONFIG_BT_LOG_A2D_TRACE_LEVEL_ERROR is not set 371 | CONFIG_BT_LOG_A2D_TRACE_LEVEL_WARNING=y 372 | # CONFIG_BT_LOG_A2D_TRACE_LEVEL_API is not set 373 | # CONFIG_BT_LOG_A2D_TRACE_LEVEL_EVENT is not set 374 | # CONFIG_BT_LOG_A2D_TRACE_LEVEL_DEBUG is not set 375 | # CONFIG_BT_LOG_A2D_TRACE_LEVEL_VERBOSE is not set 376 | CONFIG_BT_LOG_A2D_TRACE_LEVEL=2 377 | # CONFIG_BT_LOG_AVDT_TRACE_LEVEL_NONE is not set 378 | # CONFIG_BT_LOG_AVDT_TRACE_LEVEL_ERROR is not set 379 | CONFIG_BT_LOG_AVDT_TRACE_LEVEL_WARNING=y 380 | # CONFIG_BT_LOG_AVDT_TRACE_LEVEL_API is not set 381 | # CONFIG_BT_LOG_AVDT_TRACE_LEVEL_EVENT is not set 382 | # CONFIG_BT_LOG_AVDT_TRACE_LEVEL_DEBUG is not set 383 | # CONFIG_BT_LOG_AVDT_TRACE_LEVEL_VERBOSE is not set 384 | CONFIG_BT_LOG_AVDT_TRACE_LEVEL=2 385 | # CONFIG_BT_LOG_AVCT_TRACE_LEVEL_NONE is not set 386 | # CONFIG_BT_LOG_AVCT_TRACE_LEVEL_ERROR is not set 387 | CONFIG_BT_LOG_AVCT_TRACE_LEVEL_WARNING=y 388 | # CONFIG_BT_LOG_AVCT_TRACE_LEVEL_API is not set 389 | # CONFIG_BT_LOG_AVCT_TRACE_LEVEL_EVENT is not set 390 | # CONFIG_BT_LOG_AVCT_TRACE_LEVEL_DEBUG is not set 391 | # CONFIG_BT_LOG_AVCT_TRACE_LEVEL_VERBOSE is not set 392 | CONFIG_BT_LOG_AVCT_TRACE_LEVEL=2 393 | # CONFIG_BT_LOG_AVRC_TRACE_LEVEL_NONE is not set 394 | # CONFIG_BT_LOG_AVRC_TRACE_LEVEL_ERROR is not set 395 | CONFIG_BT_LOG_AVRC_TRACE_LEVEL_WARNING=y 396 | # CONFIG_BT_LOG_AVRC_TRACE_LEVEL_API is not set 397 | # CONFIG_BT_LOG_AVRC_TRACE_LEVEL_EVENT is not set 398 | # CONFIG_BT_LOG_AVRC_TRACE_LEVEL_DEBUG is not set 399 | # CONFIG_BT_LOG_AVRC_TRACE_LEVEL_VERBOSE is not set 400 | CONFIG_BT_LOG_AVRC_TRACE_LEVEL=2 401 | # CONFIG_BT_LOG_MCA_TRACE_LEVEL_NONE is not set 402 | # CONFIG_BT_LOG_MCA_TRACE_LEVEL_ERROR is not set 403 | CONFIG_BT_LOG_MCA_TRACE_LEVEL_WARNING=y 404 | # CONFIG_BT_LOG_MCA_TRACE_LEVEL_API is not set 405 | # CONFIG_BT_LOG_MCA_TRACE_LEVEL_EVENT is not set 406 | # CONFIG_BT_LOG_MCA_TRACE_LEVEL_DEBUG is not set 407 | # CONFIG_BT_LOG_MCA_TRACE_LEVEL_VERBOSE is not set 408 | CONFIG_BT_LOG_MCA_TRACE_LEVEL=2 409 | # CONFIG_BT_LOG_HID_TRACE_LEVEL_NONE is not set 410 | # CONFIG_BT_LOG_HID_TRACE_LEVEL_ERROR is not set 411 | CONFIG_BT_LOG_HID_TRACE_LEVEL_WARNING=y 412 | # CONFIG_BT_LOG_HID_TRACE_LEVEL_API is not set 413 | # CONFIG_BT_LOG_HID_TRACE_LEVEL_EVENT is not set 414 | # CONFIG_BT_LOG_HID_TRACE_LEVEL_DEBUG is not set 415 | # CONFIG_BT_LOG_HID_TRACE_LEVEL_VERBOSE is not set 416 | CONFIG_BT_LOG_HID_TRACE_LEVEL=2 417 | # CONFIG_BT_LOG_APPL_TRACE_LEVEL_NONE is not set 418 | # CONFIG_BT_LOG_APPL_TRACE_LEVEL_ERROR is not set 419 | CONFIG_BT_LOG_APPL_TRACE_LEVEL_WARNING=y 420 | # CONFIG_BT_LOG_APPL_TRACE_LEVEL_API is not set 421 | # CONFIG_BT_LOG_APPL_TRACE_LEVEL_EVENT is not set 422 | # CONFIG_BT_LOG_APPL_TRACE_LEVEL_DEBUG is not set 423 | # CONFIG_BT_LOG_APPL_TRACE_LEVEL_VERBOSE is not set 424 | CONFIG_BT_LOG_APPL_TRACE_LEVEL=2 425 | # CONFIG_BT_LOG_GATT_TRACE_LEVEL_NONE is not set 426 | # CONFIG_BT_LOG_GATT_TRACE_LEVEL_ERROR is not set 427 | CONFIG_BT_LOG_GATT_TRACE_LEVEL_WARNING=y 428 | # CONFIG_BT_LOG_GATT_TRACE_LEVEL_API is not set 429 | # CONFIG_BT_LOG_GATT_TRACE_LEVEL_EVENT is not set 430 | # CONFIG_BT_LOG_GATT_TRACE_LEVEL_DEBUG is not set 431 | # CONFIG_BT_LOG_GATT_TRACE_LEVEL_VERBOSE is not set 432 | CONFIG_BT_LOG_GATT_TRACE_LEVEL=2 433 | # CONFIG_BT_LOG_SMP_TRACE_LEVEL_NONE is not set 434 | # CONFIG_BT_LOG_SMP_TRACE_LEVEL_ERROR is not set 435 | CONFIG_BT_LOG_SMP_TRACE_LEVEL_WARNING=y 436 | # CONFIG_BT_LOG_SMP_TRACE_LEVEL_API is not set 437 | # CONFIG_BT_LOG_SMP_TRACE_LEVEL_EVENT is not set 438 | # CONFIG_BT_LOG_SMP_TRACE_LEVEL_DEBUG is not set 439 | # CONFIG_BT_LOG_SMP_TRACE_LEVEL_VERBOSE is not set 440 | CONFIG_BT_LOG_SMP_TRACE_LEVEL=2 441 | # CONFIG_BT_LOG_BTIF_TRACE_LEVEL_NONE is not set 442 | # CONFIG_BT_LOG_BTIF_TRACE_LEVEL_ERROR is not set 443 | CONFIG_BT_LOG_BTIF_TRACE_LEVEL_WARNING=y 444 | # CONFIG_BT_LOG_BTIF_TRACE_LEVEL_API is not set 445 | # CONFIG_BT_LOG_BTIF_TRACE_LEVEL_EVENT is not set 446 | # CONFIG_BT_LOG_BTIF_TRACE_LEVEL_DEBUG is not set 447 | # CONFIG_BT_LOG_BTIF_TRACE_LEVEL_VERBOSE is not set 448 | CONFIG_BT_LOG_BTIF_TRACE_LEVEL=2 449 | # CONFIG_BT_LOG_BTC_TRACE_LEVEL_NONE is not set 450 | # CONFIG_BT_LOG_BTC_TRACE_LEVEL_ERROR is not set 451 | CONFIG_BT_LOG_BTC_TRACE_LEVEL_WARNING=y 452 | # CONFIG_BT_LOG_BTC_TRACE_LEVEL_API is not set 453 | # CONFIG_BT_LOG_BTC_TRACE_LEVEL_EVENT is not set 454 | # CONFIG_BT_LOG_BTC_TRACE_LEVEL_DEBUG is not set 455 | # CONFIG_BT_LOG_BTC_TRACE_LEVEL_VERBOSE is not set 456 | CONFIG_BT_LOG_BTC_TRACE_LEVEL=2 457 | # CONFIG_BT_LOG_OSI_TRACE_LEVEL_NONE is not set 458 | # CONFIG_BT_LOG_OSI_TRACE_LEVEL_ERROR is not set 459 | CONFIG_BT_LOG_OSI_TRACE_LEVEL_WARNING=y 460 | # CONFIG_BT_LOG_OSI_TRACE_LEVEL_API is not set 461 | # CONFIG_BT_LOG_OSI_TRACE_LEVEL_EVENT is not set 462 | # CONFIG_BT_LOG_OSI_TRACE_LEVEL_DEBUG is not set 463 | # CONFIG_BT_LOG_OSI_TRACE_LEVEL_VERBOSE is not set 464 | CONFIG_BT_LOG_OSI_TRACE_LEVEL=2 465 | # CONFIG_BT_LOG_BLUFI_TRACE_LEVEL_NONE is not set 466 | # CONFIG_BT_LOG_BLUFI_TRACE_LEVEL_ERROR is not set 467 | CONFIG_BT_LOG_BLUFI_TRACE_LEVEL_WARNING=y 468 | # CONFIG_BT_LOG_BLUFI_TRACE_LEVEL_API is not set 469 | # CONFIG_BT_LOG_BLUFI_TRACE_LEVEL_EVENT is not set 470 | # CONFIG_BT_LOG_BLUFI_TRACE_LEVEL_DEBUG is not set 471 | # CONFIG_BT_LOG_BLUFI_TRACE_LEVEL_VERBOSE is not set 472 | CONFIG_BT_LOG_BLUFI_TRACE_LEVEL=2 473 | # end of BT DEBUG LOG LEVEL 474 | 475 | CONFIG_BT_ACL_CONNECTIONS=4 476 | CONFIG_BT_MULTI_CONNECTION_ENBALE=y 477 | # CONFIG_BT_ALLOCATION_FROM_SPIRAM_FIRST is not set 478 | # CONFIG_BT_BLE_DYNAMIC_ENV_MEMORY is not set 479 | # CONFIG_BT_BLE_HOST_QUEUE_CONG_CHECK is not set 480 | CONFIG_BT_SMP_ENABLE=y 481 | # CONFIG_BT_BLE_ACT_SCAN_REP_ADV_SCAN is not set 482 | CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30 483 | # CONFIG_BT_BLE_RPA_SUPPORTED is not set 484 | CONFIG_BT_RESERVE_DRAM=0xdb5c 485 | # end of Bluedroid Options 486 | 487 | CONFIG_BT_NIMBLE_USE_ESP_TIMER=y 488 | # end of Bluetooth 489 | 490 | # CONFIG_BLE_MESH is not set 491 | 492 | # 493 | # CoAP Configuration 494 | # 495 | CONFIG_COAP_MBEDTLS_PSK=y 496 | # CONFIG_COAP_MBEDTLS_PKI is not set 497 | # CONFIG_COAP_MBEDTLS_DEBUG is not set 498 | CONFIG_COAP_LOG_DEFAULT_LEVEL=0 499 | # end of CoAP Configuration 500 | 501 | # 502 | # Driver configurations 503 | # 504 | 505 | # 506 | # ADC configuration 507 | # 508 | # CONFIG_ADC_FORCE_XPD_FSM is not set 509 | CONFIG_ADC_DISABLE_DAC=y 510 | # end of ADC configuration 511 | 512 | # 513 | # SPI configuration 514 | # 515 | # CONFIG_SPI_MASTER_IN_IRAM is not set 516 | CONFIG_SPI_MASTER_ISR_IN_IRAM=y 517 | # CONFIG_SPI_SLAVE_IN_IRAM is not set 518 | CONFIG_SPI_SLAVE_ISR_IN_IRAM=y 519 | # end of SPI configuration 520 | 521 | # 522 | # TWAI configuration 523 | # 524 | # CONFIG_TWAI_ISR_IN_IRAM is not set 525 | # CONFIG_TWAI_ERRATA_FIX_BUS_OFF_REC is not set 526 | # CONFIG_TWAI_ERRATA_FIX_TX_INTR_LOST is not set 527 | # CONFIG_TWAI_ERRATA_FIX_RX_FRAME_INVALID is not set 528 | # CONFIG_TWAI_ERRATA_FIX_RX_FIFO_CORRUPT is not set 529 | # end of TWAI configuration 530 | 531 | # 532 | # UART configuration 533 | # 534 | # CONFIG_UART_ISR_IN_IRAM is not set 535 | # end of UART configuration 536 | 537 | # 538 | # RTCIO configuration 539 | # 540 | # CONFIG_RTCIO_SUPPORT_RTC_GPIO_DESC is not set 541 | # end of RTCIO configuration 542 | 543 | # 544 | # GPIO Configuration 545 | # 546 | # CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL is not set 547 | # end of GPIO Configuration 548 | # end of Driver configurations 549 | 550 | # 551 | # eFuse Bit Manager 552 | # 553 | # CONFIG_EFUSE_CUSTOM_TABLE is not set 554 | # CONFIG_EFUSE_VIRTUAL is not set 555 | # CONFIG_EFUSE_CODE_SCHEME_COMPAT_NONE is not set 556 | CONFIG_EFUSE_CODE_SCHEME_COMPAT_3_4=y 557 | # CONFIG_EFUSE_CODE_SCHEME_COMPAT_REPEAT is not set 558 | CONFIG_EFUSE_MAX_BLK_LEN=192 559 | # end of eFuse Bit Manager 560 | 561 | # 562 | # ESP-TLS 563 | # 564 | CONFIG_ESP_TLS_USING_MBEDTLS=y 565 | # CONFIG_ESP_TLS_USE_SECURE_ELEMENT is not set 566 | # CONFIG_ESP_TLS_SERVER is not set 567 | # CONFIG_ESP_TLS_PSK_VERIFICATION is not set 568 | # CONFIG_ESP_TLS_INSECURE is not set 569 | # end of ESP-TLS 570 | 571 | # 572 | # ESP32-specific 573 | # 574 | CONFIG_ESP32_REV_MIN_0=y 575 | # CONFIG_ESP32_REV_MIN_1 is not set 576 | # CONFIG_ESP32_REV_MIN_2 is not set 577 | # CONFIG_ESP32_REV_MIN_3 is not set 578 | CONFIG_ESP32_REV_MIN=0 579 | # CONFIG_ESP32_DEFAULT_CPU_FREQ_80 is not set 580 | # CONFIG_ESP32_DEFAULT_CPU_FREQ_160 is not set 581 | CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y 582 | CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=240 583 | # CONFIG_ESP32_SPIRAM_SUPPORT is not set 584 | # CONFIG_ESP32_TRAX is not set 585 | CONFIG_ESP32_TRACEMEM_RESERVE_DRAM=0x0 586 | # CONFIG_ESP32_ULP_COPROC_ENABLED is not set 587 | CONFIG_ESP32_ULP_COPROC_RESERVE_MEM=0 588 | CONFIG_ESP32_DEBUG_OCDAWARE=y 589 | CONFIG_ESP32_BROWNOUT_DET=y 590 | CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_0=y 591 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_1 is not set 592 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_2 is not set 593 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_3 is not set 594 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_4 is not set 595 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_5 is not set 596 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_6 is not set 597 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_7 is not set 598 | CONFIG_ESP32_BROWNOUT_DET_LVL=0 599 | CONFIG_ESP32_TIME_SYSCALL_USE_RTC_FRC1=y 600 | # CONFIG_ESP32_TIME_SYSCALL_USE_RTC is not set 601 | # CONFIG_ESP32_TIME_SYSCALL_USE_FRC1 is not set 602 | # CONFIG_ESP32_TIME_SYSCALL_USE_NONE is not set 603 | CONFIG_ESP32_RTC_CLK_SRC_INT_RC=y 604 | # CONFIG_ESP32_RTC_CLK_SRC_EXT_CRYS is not set 605 | # CONFIG_ESP32_RTC_CLK_SRC_EXT_OSC is not set 606 | # CONFIG_ESP32_RTC_CLK_SRC_INT_8MD256 is not set 607 | CONFIG_ESP32_RTC_CLK_CAL_CYCLES=1024 608 | CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY=0 609 | # CONFIG_ESP32_XTAL_FREQ_40 is not set 610 | # CONFIG_ESP32_XTAL_FREQ_26 is not set 611 | CONFIG_ESP32_XTAL_FREQ_AUTO=y 612 | CONFIG_ESP32_XTAL_FREQ=0 613 | # CONFIG_ESP32_DISABLE_BASIC_ROM_CONSOLE is not set 614 | # CONFIG_ESP32_COMPATIBLE_PRE_V2_1_BOOTLOADERS is not set 615 | # CONFIG_ESP32_COMPATIBLE_PRE_V3_1_BOOTLOADERS is not set 616 | # CONFIG_ESP32_RTCDATA_IN_FAST_MEM is not set 617 | # CONFIG_ESP32_USE_FIXED_STATIC_RAM_SIZE is not set 618 | CONFIG_ESP32_DPORT_DIS_INTERRUPT_LVL=5 619 | # CONFIG_ESP32_IRAM_AS_8BIT_ACCESSIBLE_MEMORY is not set 620 | # end of ESP32-specific 621 | 622 | CONFIG_ESP32C3_DEBUG_OCDAWARE=y 623 | CONFIG_ESP32C3_BROWNOUT_DET=y 624 | CONFIG_ESP32C3_LIGHTSLEEP_GPIO_RESET_WORKAROUND=y 625 | CONFIG_ESP32H2_DEBUG_OCDAWARE=y 626 | CONFIG_ESP32H2_BROWNOUT_DET=y 627 | CONFIG_ESP32H2_LIGHTSLEEP_GPIO_RESET_WORKAROUND=y 628 | 629 | # 630 | # Cache config 631 | # 632 | # end of Cache config 633 | 634 | CONFIG_ESP32S2_TRACEMEM_RESERVE_DRAM=0x0 635 | CONFIG_ESP32S2_ULP_COPROC_RESERVE_MEM=0 636 | CONFIG_ESP32S2_DEBUG_OCDAWARE=y 637 | CONFIG_ESP32S2_BROWNOUT_DET=y 638 | 639 | # 640 | # Cache config 641 | # 642 | # end of Cache config 643 | 644 | CONFIG_ESP32S3_TRACEMEM_RESERVE_DRAM=0x0 645 | CONFIG_ESP32S3_ULP_COPROC_RESERVE_MEM=0 646 | CONFIG_ESP32S3_DEBUG_OCDAWARE=y 647 | CONFIG_ESP32S3_BROWNOUT_DET=y 648 | 649 | # 650 | # ADC-Calibration 651 | # 652 | CONFIG_ADC_CAL_EFUSE_TP_ENABLE=y 653 | CONFIG_ADC_CAL_EFUSE_VREF_ENABLE=y 654 | CONFIG_ADC_CAL_LUT_ENABLE=y 655 | # end of ADC-Calibration 656 | 657 | # 658 | # Common ESP-related 659 | # 660 | CONFIG_ESP_ERR_TO_NAME_LOOKUP=y 661 | # end of Common ESP-related 662 | 663 | # 664 | # Ethernet 665 | # 666 | CONFIG_ETH_ENABLED=y 667 | CONFIG_ETH_USE_ESP32_EMAC=y 668 | CONFIG_ETH_PHY_INTERFACE_RMII=y 669 | CONFIG_ETH_RMII_CLK_INPUT=y 670 | # CONFIG_ETH_RMII_CLK_OUTPUT is not set 671 | CONFIG_ETH_RMII_CLK_IN_GPIO=0 672 | CONFIG_ETH_DMA_BUFFER_SIZE=512 673 | CONFIG_ETH_DMA_RX_BUFFER_NUM=10 674 | CONFIG_ETH_DMA_TX_BUFFER_NUM=10 675 | CONFIG_ETH_USE_SPI_ETHERNET=y 676 | # CONFIG_ETH_SPI_ETHERNET_DM9051 is not set 677 | # CONFIG_ETH_SPI_ETHERNET_W5500 is not set 678 | # CONFIG_ETH_SPI_ETHERNET_KSZ8851SNL is not set 679 | # CONFIG_ETH_USE_OPENETH is not set 680 | # end of Ethernet 681 | 682 | # 683 | # Event Loop Library 684 | # 685 | # CONFIG_ESP_EVENT_LOOP_PROFILING is not set 686 | CONFIG_ESP_EVENT_POST_FROM_ISR=y 687 | CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR=y 688 | # end of Event Loop Library 689 | 690 | # 691 | # GDB Stub 692 | # 693 | # end of GDB Stub 694 | 695 | # 696 | # ESP HTTP client 697 | # 698 | CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=y 699 | # CONFIG_ESP_HTTP_CLIENT_ENABLE_BASIC_AUTH is not set 700 | CONFIG_ESP_HTTP_CLIENT_ENABLE_DIGEST_AUTH=y 701 | # end of ESP HTTP client 702 | 703 | # 704 | # HTTP Server 705 | # 706 | CONFIG_HTTPD_MAX_REQ_HDR_LEN=512 707 | CONFIG_HTTPD_MAX_URI_LEN=512 708 | CONFIG_HTTPD_ERR_RESP_NO_DELAY=y 709 | CONFIG_HTTPD_PURGE_BUF_LEN=32 710 | # CONFIG_HTTPD_LOG_PURGE_DATA is not set 711 | # CONFIG_HTTPD_WS_SUPPORT is not set 712 | # end of HTTP Server 713 | 714 | # 715 | # ESP HTTPS OTA 716 | # 717 | # CONFIG_OTA_ALLOW_HTTP is not set 718 | # end of ESP HTTPS OTA 719 | 720 | # 721 | # ESP HTTPS server 722 | # 723 | # CONFIG_ESP_HTTPS_SERVER_ENABLE is not set 724 | # end of ESP HTTPS server 725 | 726 | # 727 | # Hardware Settings 728 | # 729 | 730 | # 731 | # MAC Config 732 | # 733 | CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_STA=y 734 | CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_AP=y 735 | CONFIG_ESP_MAC_ADDR_UNIVERSE_BT=y 736 | CONFIG_ESP_MAC_ADDR_UNIVERSE_ETH=y 737 | # CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_TWO is not set 738 | CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_FOUR=y 739 | CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES=4 740 | # end of MAC Config 741 | 742 | # 743 | # Sleep Config 744 | # 745 | CONFIG_ESP_SLEEP_POWER_DOWN_FLASH=y 746 | # end of Sleep Config 747 | # end of Hardware Settings 748 | 749 | # 750 | # LCD and Touch Panel 751 | # 752 | # end of LCD and Touch Panel 753 | 754 | # 755 | # ESP NETIF Adapter 756 | # 757 | CONFIG_ESP_NETIF_IP_LOST_TIMER_INTERVAL=120 758 | CONFIG_ESP_NETIF_TCPIP_LWIP=y 759 | # CONFIG_ESP_NETIF_LOOPBACK is not set 760 | CONFIG_ESP_NETIF_TCPIP_ADAPTER_COMPATIBLE_LAYER=y 761 | # end of ESP NETIF Adapter 762 | 763 | # 764 | # PHY 765 | # 766 | CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y 767 | # CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set 768 | CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 769 | CONFIG_ESP32_PHY_MAX_TX_POWER=20 770 | CONFIG_ESP32_REDUCE_PHY_TX_POWER=y 771 | # end of PHY 772 | 773 | # 774 | # Power Management 775 | # 776 | # CONFIG_PM_ENABLE is not set 777 | # end of Power Management 778 | 779 | # 780 | # ESP System Settings 781 | # 782 | CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y 783 | # CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT is not set 784 | # CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set 785 | # CONFIG_ESP_SYSTEM_PANIC_GDBSTUB is not set 786 | # CONFIG_ESP_SYSTEM_GDBSTUB_RUNTIME is not set 787 | CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE=y 788 | CONFIG_ESP_SYSTEM_RTC_FAST_MEM_AS_HEAP_DEPCHECK=y 789 | CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP=y 790 | 791 | # 792 | # Memory protection 793 | # 794 | # end of Memory protection 795 | 796 | CONFIG_ESP_SYSTEM_EVENT_QUEUE_SIZE=32 797 | CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=2048 798 | CONFIG_ESP_MAIN_TASK_STACK_SIZE=4096 799 | CONFIG_ESP_MAIN_TASK_AFFINITY_CPU0=y 800 | # CONFIG_ESP_MAIN_TASK_AFFINITY_NO_AFFINITY is not set 801 | CONFIG_ESP_MAIN_TASK_AFFINITY=0x0 802 | CONFIG_ESP_MINIMAL_SHARED_STACK_SIZE=2048 803 | CONFIG_ESP_CONSOLE_UART_DEFAULT=y 804 | # CONFIG_ESP_CONSOLE_UART_CUSTOM is not set 805 | # CONFIG_ESP_CONSOLE_NONE is not set 806 | CONFIG_ESP_CONSOLE_UART=y 807 | CONFIG_ESP_CONSOLE_MULTIPLE_UART=y 808 | CONFIG_ESP_CONSOLE_UART_NUM=0 809 | CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 810 | CONFIG_ESP_INT_WDT=y 811 | CONFIG_ESP_INT_WDT_TIMEOUT_MS=300 812 | CONFIG_ESP_TASK_WDT=y 813 | # CONFIG_ESP_TASK_WDT_PANIC is not set 814 | CONFIG_ESP_TASK_WDT_TIMEOUT_S=5 815 | CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0=y 816 | CONFIG_ESP_IPC_TASK_STACK_SIZE=1024 817 | # CONFIG_ESP_PANIC_HANDLER_IRAM is not set 818 | # end of ESP System Settings 819 | 820 | # 821 | # High resolution timer (esp_timer) 822 | # 823 | # CONFIG_ESP_TIMER_PROFILING is not set 824 | CONFIG_ESP_TIME_FUNCS_USE_RTC_TIMER=y 825 | CONFIG_ESP_TIME_FUNCS_USE_ESP_TIMER=y 826 | CONFIG_ESP_TIMER_TASK_STACK_SIZE=4096 827 | CONFIG_ESP_TIMER_INTERRUPT_LEVEL=1 828 | # CONFIG_ESP_TIMER_SUPPORTS_ISR_DISPATCH_METHOD is not set 829 | # CONFIG_ESP_TIMER_IMPL_FRC2 is not set 830 | CONFIG_ESP_TIMER_IMPL_TG0_LAC=y 831 | # end of High resolution timer (esp_timer) 832 | 833 | # 834 | # Wi-Fi 835 | # 836 | CONFIG_ESP32_WIFI_ENABLED=y 837 | CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE=y 838 | CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=10 839 | CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=32 840 | # CONFIG_ESP32_WIFI_STATIC_TX_BUFFER is not set 841 | CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y 842 | CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1 843 | CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=32 844 | # CONFIG_ESP32_WIFI_CSI_ENABLED is not set 845 | CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y 846 | CONFIG_ESP32_WIFI_TX_BA_WIN=6 847 | CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y 848 | CONFIG_ESP32_WIFI_RX_BA_WIN=6 849 | CONFIG_ESP32_WIFI_NVS_ENABLED=y 850 | CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752 851 | CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32 852 | CONFIG_ESP32_WIFI_IRAM_OPT=y 853 | CONFIG_ESP32_WIFI_RX_IRAM_OPT=y 854 | CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE=y 855 | # CONFIG_ESP_WIFI_SLP_IRAM_OPT is not set 856 | # CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE is not set 857 | # end of Wi-Fi 858 | 859 | # 860 | # Core dump 861 | # 862 | # CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH is not set 863 | CONFIG_ESP_COREDUMP_ENABLE_TO_UART=y 864 | # CONFIG_ESP_COREDUMP_ENABLE_TO_NONE is not set 865 | # CONFIG_ESP_COREDUMP_DATA_FORMAT_BIN is not set 866 | CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF=y 867 | CONFIG_ESP_COREDUMP_CHECKSUM_CRC32=y 868 | # CONFIG_ESP_COREDUMP_CHECKSUM_SHA256 is not set 869 | CONFIG_ESP_COREDUMP_ENABLE=y 870 | CONFIG_ESP_COREDUMP_MAX_TASKS_NUM=64 871 | CONFIG_ESP_COREDUMP_UART_DELAY=0 872 | CONFIG_ESP_COREDUMP_DECODE_INFO=y 873 | # CONFIG_ESP_COREDUMP_DECODE_DISABLE is not set 874 | CONFIG_ESP_COREDUMP_DECODE="info" 875 | # end of Core dump 876 | 877 | # 878 | # FAT Filesystem support 879 | # 880 | # CONFIG_FATFS_CODEPAGE_DYNAMIC is not set 881 | CONFIG_FATFS_CODEPAGE_437=y 882 | # CONFIG_FATFS_CODEPAGE_720 is not set 883 | # CONFIG_FATFS_CODEPAGE_737 is not set 884 | # CONFIG_FATFS_CODEPAGE_771 is not set 885 | # CONFIG_FATFS_CODEPAGE_775 is not set 886 | # CONFIG_FATFS_CODEPAGE_850 is not set 887 | # CONFIG_FATFS_CODEPAGE_852 is not set 888 | # CONFIG_FATFS_CODEPAGE_855 is not set 889 | # CONFIG_FATFS_CODEPAGE_857 is not set 890 | # CONFIG_FATFS_CODEPAGE_860 is not set 891 | # CONFIG_FATFS_CODEPAGE_861 is not set 892 | # CONFIG_FATFS_CODEPAGE_862 is not set 893 | # CONFIG_FATFS_CODEPAGE_863 is not set 894 | # CONFIG_FATFS_CODEPAGE_864 is not set 895 | # CONFIG_FATFS_CODEPAGE_865 is not set 896 | # CONFIG_FATFS_CODEPAGE_866 is not set 897 | # CONFIG_FATFS_CODEPAGE_869 is not set 898 | # CONFIG_FATFS_CODEPAGE_932 is not set 899 | # CONFIG_FATFS_CODEPAGE_936 is not set 900 | # CONFIG_FATFS_CODEPAGE_949 is not set 901 | # CONFIG_FATFS_CODEPAGE_950 is not set 902 | CONFIG_FATFS_CODEPAGE=437 903 | CONFIG_FATFS_LFN_NONE=y 904 | # CONFIG_FATFS_LFN_HEAP is not set 905 | # CONFIG_FATFS_LFN_STACK is not set 906 | CONFIG_FATFS_FS_LOCK=0 907 | CONFIG_FATFS_TIMEOUT_MS=10000 908 | CONFIG_FATFS_PER_FILE_CACHE=y 909 | # CONFIG_FATFS_USE_FASTSEEK is not set 910 | # end of FAT Filesystem support 911 | 912 | # 913 | # Modbus configuration 914 | # 915 | CONFIG_FMB_COMM_MODE_TCP_EN=y 916 | CONFIG_FMB_TCP_PORT_DEFAULT=502 917 | CONFIG_FMB_TCP_PORT_MAX_CONN=5 918 | CONFIG_FMB_TCP_CONNECTION_TOUT_SEC=20 919 | CONFIG_FMB_COMM_MODE_RTU_EN=y 920 | CONFIG_FMB_COMM_MODE_ASCII_EN=y 921 | CONFIG_FMB_MASTER_TIMEOUT_MS_RESPOND=150 922 | CONFIG_FMB_MASTER_DELAY_MS_CONVERT=200 923 | CONFIG_FMB_QUEUE_LENGTH=20 924 | CONFIG_FMB_PORT_TASK_STACK_SIZE=2048 925 | CONFIG_FMB_SERIAL_BUF_SIZE=256 926 | CONFIG_FMB_SERIAL_ASCII_BITS_PER_SYMB=8 927 | CONFIG_FMB_SERIAL_ASCII_TIMEOUT_RESPOND_MS=1000 928 | CONFIG_FMB_PORT_TASK_PRIO=10 929 | CONFIG_FMB_CONTROLLER_SLAVE_ID_SUPPORT=y 930 | CONFIG_FMB_CONTROLLER_SLAVE_ID=0x00112233 931 | CONFIG_FMB_CONTROLLER_NOTIFY_TIMEOUT=20 932 | CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 933 | CONFIG_FMB_CONTROLLER_STACK_SIZE=4096 934 | CONFIG_FMB_EVENT_QUEUE_TIMEOUT=20 935 | CONFIG_FMB_TIMER_PORT_ENABLED=y 936 | CONFIG_FMB_TIMER_GROUP=0 937 | CONFIG_FMB_TIMER_INDEX=0 938 | # CONFIG_FMB_TIMER_ISR_IN_IRAM is not set 939 | # end of Modbus configuration 940 | 941 | # 942 | # FreeRTOS 943 | # 944 | CONFIG_FREERTOS_UNICORE=y 945 | CONFIG_FREERTOS_NO_AFFINITY=0x7FFFFFFF 946 | CONFIG_FREERTOS_CORETIMER_0=y 947 | # CONFIG_FREERTOS_CORETIMER_1 is not set 948 | CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y 949 | CONFIG_FREERTOS_HZ=1000 950 | CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y 951 | # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE is not set 952 | # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL is not set 953 | CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y 954 | # CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK is not set 955 | CONFIG_FREERTOS_INTERRUPT_BACKTRACE=y 956 | CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=3 957 | CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y 958 | # CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE is not set 959 | # CONFIG_FREERTOS_ASSERT_DISABLE is not set 960 | CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1024 961 | CONFIG_FREERTOS_ISR_STACKSIZE=2096 962 | # CONFIG_FREERTOS_LEGACY_HOOKS is not set 963 | CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16 964 | CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION=y 965 | # CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP is not set 966 | CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 967 | CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 968 | CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 969 | CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 970 | # CONFIG_FREERTOS_USE_TRACE_FACILITY is not set 971 | # CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS is not set 972 | CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER=y 973 | CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER=y 974 | # CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE is not set 975 | # CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH is not set 976 | CONFIG_FREERTOS_DEBUG_OCDAWARE=y 977 | # CONFIG_FREERTOS_FPU_IN_ISR is not set 978 | # end of FreeRTOS 979 | 980 | # 981 | # Hardware Abstraction Layer (HAL) and Low Level (LL) 982 | # 983 | CONFIG_HAL_ASSERTION_EQUALS_SYSTEM=y 984 | # CONFIG_HAL_ASSERTION_DISABLE is not set 985 | # CONFIG_HAL_ASSERTION_SILIENT is not set 986 | # CONFIG_HAL_ASSERTION_ENABLE is not set 987 | CONFIG_HAL_DEFAULT_ASSERTION_LEVEL=2 988 | # end of Hardware Abstraction Layer (HAL) and Low Level (LL) 989 | 990 | # 991 | # Heap memory debugging 992 | # 993 | CONFIG_HEAP_POISONING_DISABLED=y 994 | # CONFIG_HEAP_POISONING_LIGHT is not set 995 | # CONFIG_HEAP_POISONING_COMPREHENSIVE is not set 996 | CONFIG_HEAP_TRACING_OFF=y 997 | # CONFIG_HEAP_TRACING_STANDALONE is not set 998 | # CONFIG_HEAP_TRACING_TOHOST is not set 999 | # CONFIG_HEAP_ABORT_WHEN_ALLOCATION_FAILS is not set 1000 | # end of Heap memory debugging 1001 | 1002 | # 1003 | # jsmn 1004 | # 1005 | # CONFIG_JSMN_PARENT_LINKS is not set 1006 | # CONFIG_JSMN_STRICT is not set 1007 | # end of jsmn 1008 | 1009 | # 1010 | # libsodium 1011 | # 1012 | # end of libsodium 1013 | 1014 | # 1015 | # Log output 1016 | # 1017 | # CONFIG_LOG_DEFAULT_LEVEL_NONE is not set 1018 | # CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set 1019 | # CONFIG_LOG_DEFAULT_LEVEL_WARN is not set 1020 | CONFIG_LOG_DEFAULT_LEVEL_INFO=y 1021 | # CONFIG_LOG_DEFAULT_LEVEL_DEBUG is not set 1022 | # CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set 1023 | CONFIG_LOG_DEFAULT_LEVEL=3 1024 | CONFIG_LOG_MAXIMUM_EQUALS_DEFAULT=y 1025 | # CONFIG_LOG_MAXIMUM_LEVEL_DEBUG is not set 1026 | # CONFIG_LOG_MAXIMUM_LEVEL_VERBOSE is not set 1027 | CONFIG_LOG_MAXIMUM_LEVEL=3 1028 | CONFIG_LOG_COLORS=y 1029 | CONFIG_LOG_TIMESTAMP_SOURCE_RTOS=y 1030 | # CONFIG_LOG_TIMESTAMP_SOURCE_SYSTEM is not set 1031 | # end of Log output 1032 | 1033 | # 1034 | # LWIP 1035 | # 1036 | CONFIG_LWIP_LOCAL_HOSTNAME="espressif" 1037 | # CONFIG_LWIP_NETIF_API is not set 1038 | CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y 1039 | # CONFIG_LWIP_L2_TO_L3_COPY is not set 1040 | # CONFIG_LWIP_IRAM_OPTIMIZATION is not set 1041 | CONFIG_LWIP_TIMERS_ONDEMAND=y 1042 | CONFIG_LWIP_MAX_SOCKETS=4 1043 | # CONFIG_LWIP_USE_ONLY_LWIP_SELECT is not set 1044 | # CONFIG_LWIP_SO_LINGER is not set 1045 | CONFIG_LWIP_SO_REUSE=y 1046 | CONFIG_LWIP_SO_REUSE_RXTOALL=y 1047 | # CONFIG_LWIP_SO_RCVBUF is not set 1048 | # CONFIG_LWIP_NETBUF_RECVINFO is not set 1049 | CONFIG_LWIP_IP4_FRAG=y 1050 | CONFIG_LWIP_IP6_FRAG=y 1051 | # CONFIG_LWIP_IP4_REASSEMBLY is not set 1052 | # CONFIG_LWIP_IP6_REASSEMBLY is not set 1053 | # CONFIG_LWIP_IP_FORWARD is not set 1054 | # CONFIG_LWIP_STATS is not set 1055 | CONFIG_LWIP_ETHARP_TRUST_IP_MAC=y 1056 | CONFIG_LWIP_ESP_GRATUITOUS_ARP=y 1057 | CONFIG_LWIP_GARP_TMR_INTERVAL=60 1058 | CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=32 1059 | CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y 1060 | # CONFIG_LWIP_DHCP_DISABLE_CLIENT_ID is not set 1061 | # CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set 1062 | 1063 | # 1064 | # DHCP server 1065 | # 1066 | CONFIG_LWIP_DHCPS=y 1067 | CONFIG_LWIP_DHCPS_LEASE_UNIT=60 1068 | CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8 1069 | # end of DHCP server 1070 | 1071 | # CONFIG_LWIP_AUTOIP is not set 1072 | CONFIG_LWIP_IPV6=y 1073 | # CONFIG_LWIP_IPV6_AUTOCONFIG is not set 1074 | CONFIG_LWIP_IPV6_NUM_ADDRESSES=3 1075 | # CONFIG_LWIP_IPV6_FORWARD is not set 1076 | CONFIG_LWIP_IPV6_RDNSS_MAX_DNS_SERVERS=0 1077 | # CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set 1078 | CONFIG_LWIP_NETIF_LOOPBACK=y 1079 | CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 1080 | 1081 | # 1082 | # TCP 1083 | # 1084 | CONFIG_LWIP_MAX_ACTIVE_TCP=16 1085 | CONFIG_LWIP_MAX_LISTENING_TCP=16 1086 | CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y 1087 | CONFIG_LWIP_TCP_MAXRTX=12 1088 | CONFIG_LWIP_TCP_SYNMAXRTX=6 1089 | CONFIG_LWIP_TCP_MSS=1436 1090 | CONFIG_LWIP_TCP_TMR_INTERVAL=250 1091 | CONFIG_LWIP_TCP_MSL=60000 1092 | CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744 1093 | CONFIG_LWIP_TCP_WND_DEFAULT=5744 1094 | CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 1095 | CONFIG_LWIP_TCP_QUEUE_OOSEQ=y 1096 | # CONFIG_LWIP_TCP_SACK_OUT is not set 1097 | # CONFIG_LWIP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set 1098 | CONFIG_LWIP_TCP_OVERSIZE_MSS=y 1099 | # CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set 1100 | # CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set 1101 | CONFIG_LWIP_TCP_RTO_TIME=1500 1102 | # end of TCP 1103 | 1104 | # 1105 | # UDP 1106 | # 1107 | CONFIG_LWIP_MAX_UDP_PCBS=16 1108 | CONFIG_LWIP_UDP_RECVMBOX_SIZE=6 1109 | # end of UDP 1110 | 1111 | # 1112 | # Checksums 1113 | # 1114 | # CONFIG_LWIP_CHECKSUM_CHECK_IP is not set 1115 | # CONFIG_LWIP_CHECKSUM_CHECK_UDP is not set 1116 | CONFIG_LWIP_CHECKSUM_CHECK_ICMP=y 1117 | # end of Checksums 1118 | 1119 | CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=2560 1120 | CONFIG_LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY=y 1121 | # CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 is not set 1122 | CONFIG_LWIP_TCPIP_TASK_AFFINITY=0x7FFFFFFF 1123 | # CONFIG_LWIP_PPP_SUPPORT is not set 1124 | CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 1125 | CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 1126 | # CONFIG_LWIP_SLIP_SUPPORT is not set 1127 | 1128 | # 1129 | # ICMP 1130 | # 1131 | CONFIG_LWIP_ICMP=y 1132 | # CONFIG_LWIP_MULTICAST_PING is not set 1133 | # CONFIG_LWIP_BROADCAST_PING is not set 1134 | # end of ICMP 1135 | 1136 | # 1137 | # LWIP RAW API 1138 | # 1139 | CONFIG_LWIP_MAX_RAW_PCBS=16 1140 | # end of LWIP RAW API 1141 | 1142 | # 1143 | # SNTP 1144 | # 1145 | CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1 1146 | CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000 1147 | # end of SNTP 1148 | 1149 | CONFIG_LWIP_ESP_LWIP_ASSERT=y 1150 | 1151 | # 1152 | # Hooks 1153 | # 1154 | # CONFIG_LWIP_HOOK_TCP_ISN_NONE is not set 1155 | CONFIG_LWIP_HOOK_TCP_ISN_DEFAULT=y 1156 | # CONFIG_LWIP_HOOK_TCP_ISN_CUSTOM is not set 1157 | CONFIG_LWIP_HOOK_IP6_ROUTE_NONE=y 1158 | # CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT is not set 1159 | # CONFIG_LWIP_HOOK_IP6_ROUTE_CUSTOM is not set 1160 | CONFIG_LWIP_HOOK_ND6_GET_GW_NONE=y 1161 | # CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT is not set 1162 | # CONFIG_LWIP_HOOK_ND6_GET_GW_CUSTOM is not set 1163 | CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_NONE=y 1164 | # CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_DEFAULT is not set 1165 | # CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_CUSTOM is not set 1166 | # end of Hooks 1167 | 1168 | # CONFIG_LWIP_DEBUG is not set 1169 | # end of LWIP 1170 | 1171 | # 1172 | # mbedTLS 1173 | # 1174 | CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y 1175 | # CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC is not set 1176 | # CONFIG_MBEDTLS_CUSTOM_MEM_ALLOC is not set 1177 | CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN=y 1178 | CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN=16384 1179 | CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN=4096 1180 | # CONFIG_MBEDTLS_DYNAMIC_BUFFER is not set 1181 | # CONFIG_MBEDTLS_DEBUG is not set 1182 | 1183 | # 1184 | # Certificate Bundle 1185 | # 1186 | CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y 1187 | CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL=y 1188 | # CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN is not set 1189 | # CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE is not set 1190 | # CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE is not set 1191 | # end of Certificate Bundle 1192 | 1193 | # CONFIG_MBEDTLS_ECP_RESTARTABLE is not set 1194 | # CONFIG_MBEDTLS_CMAC_C is not set 1195 | CONFIG_MBEDTLS_HARDWARE_AES=y 1196 | CONFIG_MBEDTLS_HARDWARE_MPI=y 1197 | CONFIG_MBEDTLS_HARDWARE_SHA=y 1198 | CONFIG_MBEDTLS_ROM_MD5=y 1199 | # CONFIG_MBEDTLS_ATCA_HW_ECDSA_SIGN is not set 1200 | # CONFIG_MBEDTLS_ATCA_HW_ECDSA_VERIFY is not set 1201 | CONFIG_MBEDTLS_HAVE_TIME=y 1202 | # CONFIG_MBEDTLS_HAVE_TIME_DATE is not set 1203 | CONFIG_MBEDTLS_ECDSA_DETERMINISTIC=y 1204 | CONFIG_MBEDTLS_SHA512_C=y 1205 | CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y 1206 | # CONFIG_MBEDTLS_TLS_SERVER_ONLY is not set 1207 | # CONFIG_MBEDTLS_TLS_CLIENT_ONLY is not set 1208 | # CONFIG_MBEDTLS_TLS_DISABLED is not set 1209 | CONFIG_MBEDTLS_TLS_SERVER=y 1210 | CONFIG_MBEDTLS_TLS_CLIENT=y 1211 | CONFIG_MBEDTLS_TLS_ENABLED=y 1212 | 1213 | # 1214 | # TLS Key Exchange Methods 1215 | # 1216 | # CONFIG_MBEDTLS_PSK_MODES is not set 1217 | CONFIG_MBEDTLS_KEY_EXCHANGE_RSA=y 1218 | CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA=y 1219 | CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE=y 1220 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA=y 1221 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA=y 1222 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=y 1223 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=y 1224 | # end of TLS Key Exchange Methods 1225 | 1226 | CONFIG_MBEDTLS_SSL_RENEGOTIATION=y 1227 | # CONFIG_MBEDTLS_SSL_PROTO_SSL3 is not set 1228 | CONFIG_MBEDTLS_SSL_PROTO_TLS1=y 1229 | CONFIG_MBEDTLS_SSL_PROTO_TLS1_1=y 1230 | CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y 1231 | # CONFIG_MBEDTLS_SSL_PROTO_DTLS is not set 1232 | CONFIG_MBEDTLS_SSL_ALPN=y 1233 | CONFIG_MBEDTLS_CLIENT_SSL_SESSION_TICKETS=y 1234 | CONFIG_MBEDTLS_X509_CHECK_KEY_USAGE=y 1235 | CONFIG_MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE=y 1236 | CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS=y 1237 | 1238 | # 1239 | # Symmetric Ciphers 1240 | # 1241 | CONFIG_MBEDTLS_AES_C=y 1242 | # CONFIG_MBEDTLS_CAMELLIA_C is not set 1243 | # CONFIG_MBEDTLS_DES_C is not set 1244 | CONFIG_MBEDTLS_RC4_DISABLED=y 1245 | # CONFIG_MBEDTLS_RC4_ENABLED_NO_DEFAULT is not set 1246 | # CONFIG_MBEDTLS_RC4_ENABLED is not set 1247 | # CONFIG_MBEDTLS_BLOWFISH_C is not set 1248 | # CONFIG_MBEDTLS_XTEA_C is not set 1249 | CONFIG_MBEDTLS_CCM_C=y 1250 | CONFIG_MBEDTLS_GCM_C=y 1251 | # CONFIG_MBEDTLS_NIST_KW_C is not set 1252 | # end of Symmetric Ciphers 1253 | 1254 | # CONFIG_MBEDTLS_RIPEMD160_C is not set 1255 | 1256 | # 1257 | # Certificates 1258 | # 1259 | CONFIG_MBEDTLS_PEM_PARSE_C=y 1260 | CONFIG_MBEDTLS_PEM_WRITE_C=y 1261 | CONFIG_MBEDTLS_X509_CRL_PARSE_C=y 1262 | CONFIG_MBEDTLS_X509_CSR_PARSE_C=y 1263 | # end of Certificates 1264 | 1265 | CONFIG_MBEDTLS_ECP_C=y 1266 | CONFIG_MBEDTLS_ECDH_C=y 1267 | CONFIG_MBEDTLS_ECDSA_C=y 1268 | # CONFIG_MBEDTLS_ECJPAKE_C is not set 1269 | CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED=y 1270 | CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED=y 1271 | CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y 1272 | CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED=y 1273 | CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED=y 1274 | CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED=y 1275 | CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED=y 1276 | CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED=y 1277 | CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED=y 1278 | CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED=y 1279 | CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=y 1280 | CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y 1281 | CONFIG_MBEDTLS_ECP_NIST_OPTIM=y 1282 | # CONFIG_MBEDTLS_POLY1305_C is not set 1283 | # CONFIG_MBEDTLS_CHACHA20_C is not set 1284 | # CONFIG_MBEDTLS_HKDF_C is not set 1285 | # CONFIG_MBEDTLS_THREADING_C is not set 1286 | # CONFIG_MBEDTLS_LARGE_KEY_SOFTWARE_MPI is not set 1287 | # CONFIG_MBEDTLS_SECURITY_RISKS is not set 1288 | # end of mbedTLS 1289 | 1290 | # 1291 | # mDNS 1292 | # 1293 | CONFIG_MDNS_MAX_SERVICES=10 1294 | CONFIG_MDNS_TASK_PRIORITY=1 1295 | CONFIG_MDNS_TASK_STACK_SIZE=4096 1296 | # CONFIG_MDNS_TASK_AFFINITY_NO_AFFINITY is not set 1297 | CONFIG_MDNS_TASK_AFFINITY_CPU0=y 1298 | CONFIG_MDNS_TASK_AFFINITY=0x0 1299 | CONFIG_MDNS_SERVICE_ADD_TIMEOUT_MS=2000 1300 | # CONFIG_MDNS_STRICT_MODE is not set 1301 | CONFIG_MDNS_TIMER_PERIOD_MS=100 1302 | # end of mDNS 1303 | 1304 | # 1305 | # ESP-MQTT Configurations 1306 | # 1307 | CONFIG_MQTT_PROTOCOL_311=y 1308 | CONFIG_MQTT_TRANSPORT_SSL=y 1309 | CONFIG_MQTT_TRANSPORT_WEBSOCKET=y 1310 | CONFIG_MQTT_TRANSPORT_WEBSOCKET_SECURE=y 1311 | # CONFIG_MQTT_MSG_ID_INCREMENTAL is not set 1312 | # CONFIG_MQTT_SKIP_PUBLISH_IF_DISCONNECTED is not set 1313 | # CONFIG_MQTT_REPORT_DELETED_MESSAGES is not set 1314 | # CONFIG_MQTT_USE_CUSTOM_CONFIG is not set 1315 | # CONFIG_MQTT_TASK_CORE_SELECTION_ENABLED is not set 1316 | # CONFIG_MQTT_CUSTOM_OUTBOX is not set 1317 | # end of ESP-MQTT Configurations 1318 | 1319 | # 1320 | # Newlib 1321 | # 1322 | CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y 1323 | # CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF is not set 1324 | # CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR is not set 1325 | # CONFIG_NEWLIB_STDIN_LINE_ENDING_CRLF is not set 1326 | # CONFIG_NEWLIB_STDIN_LINE_ENDING_LF is not set 1327 | CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y 1328 | # CONFIG_NEWLIB_NANO_FORMAT is not set 1329 | # end of Newlib 1330 | 1331 | # 1332 | # NVS 1333 | # 1334 | # end of NVS 1335 | 1336 | # 1337 | # OpenSSL 1338 | # 1339 | # CONFIG_OPENSSL_DEBUG is not set 1340 | CONFIG_OPENSSL_ERROR_STACK=y 1341 | CONFIG_OPENSSL_ASSERT_DO_NOTHING=y 1342 | # CONFIG_OPENSSL_ASSERT_EXIT is not set 1343 | # end of OpenSSL 1344 | 1345 | # 1346 | # OpenThread 1347 | # 1348 | # CONFIG_OPENTHREAD_ENABLED is not set 1349 | # end of OpenThread 1350 | 1351 | # 1352 | # PThreads 1353 | # 1354 | CONFIG_PTHREAD_TASK_PRIO_DEFAULT=5 1355 | CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT=2048 1356 | CONFIG_PTHREAD_STACK_MIN=768 1357 | CONFIG_PTHREAD_TASK_CORE_DEFAULT=-1 1358 | CONFIG_PTHREAD_TASK_NAME_DEFAULT="pthread" 1359 | # end of PThreads 1360 | 1361 | # 1362 | # SPI Flash driver 1363 | # 1364 | # CONFIG_SPI_FLASH_VERIFY_WRITE is not set 1365 | # CONFIG_SPI_FLASH_ENABLE_COUNTERS is not set 1366 | CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y 1367 | CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS=y 1368 | # CONFIG_SPI_FLASH_DANGEROUS_WRITE_FAILS is not set 1369 | # CONFIG_SPI_FLASH_DANGEROUS_WRITE_ALLOWED is not set 1370 | # CONFIG_SPI_FLASH_USE_LEGACY_IMPL is not set 1371 | # CONFIG_SPI_FLASH_SHARE_SPI1_BUS is not set 1372 | # CONFIG_SPI_FLASH_BYPASS_BLOCK_ERASE is not set 1373 | CONFIG_SPI_FLASH_YIELD_DURING_ERASE=y 1374 | CONFIG_SPI_FLASH_ERASE_YIELD_DURATION_MS=20 1375 | CONFIG_SPI_FLASH_ERASE_YIELD_TICKS=1 1376 | CONFIG_SPI_FLASH_WRITE_CHUNK_SIZE=8192 1377 | # CONFIG_SPI_FLASH_SIZE_OVERRIDE is not set 1378 | # CONFIG_SPI_FLASH_CHECK_ERASE_TIMEOUT_DISABLED is not set 1379 | # CONFIG_SPI_FLASH_OVERRIDE_CHIP_DRIVER_LIST is not set 1380 | 1381 | # 1382 | # Auto-detect flash chips 1383 | # 1384 | CONFIG_SPI_FLASH_SUPPORT_ISSI_CHIP=y 1385 | CONFIG_SPI_FLASH_SUPPORT_MXIC_CHIP=y 1386 | CONFIG_SPI_FLASH_SUPPORT_GD_CHIP=y 1387 | CONFIG_SPI_FLASH_SUPPORT_WINBOND_CHIP=y 1388 | # end of Auto-detect flash chips 1389 | 1390 | CONFIG_SPI_FLASH_ENABLE_ENCRYPTED_READ_WRITE=y 1391 | # end of SPI Flash driver 1392 | 1393 | # 1394 | # SPIFFS Configuration 1395 | # 1396 | CONFIG_SPIFFS_MAX_PARTITIONS=3 1397 | 1398 | # 1399 | # SPIFFS Cache Configuration 1400 | # 1401 | CONFIG_SPIFFS_CACHE=y 1402 | CONFIG_SPIFFS_CACHE_WR=y 1403 | # CONFIG_SPIFFS_CACHE_STATS is not set 1404 | # end of SPIFFS Cache Configuration 1405 | 1406 | CONFIG_SPIFFS_PAGE_CHECK=y 1407 | CONFIG_SPIFFS_GC_MAX_RUNS=10 1408 | # CONFIG_SPIFFS_GC_STATS is not set 1409 | CONFIG_SPIFFS_PAGE_SIZE=256 1410 | CONFIG_SPIFFS_OBJ_NAME_LEN=32 1411 | # CONFIG_SPIFFS_FOLLOW_SYMLINKS is not set 1412 | CONFIG_SPIFFS_USE_MAGIC=y 1413 | CONFIG_SPIFFS_USE_MAGIC_LENGTH=y 1414 | CONFIG_SPIFFS_META_LENGTH=4 1415 | CONFIG_SPIFFS_USE_MTIME=y 1416 | 1417 | # 1418 | # Debug Configuration 1419 | # 1420 | # CONFIG_SPIFFS_DBG is not set 1421 | # CONFIG_SPIFFS_API_DBG is not set 1422 | # CONFIG_SPIFFS_GC_DBG is not set 1423 | # CONFIG_SPIFFS_CACHE_DBG is not set 1424 | # CONFIG_SPIFFS_CHECK_DBG is not set 1425 | # CONFIG_SPIFFS_TEST_VISUALISATION is not set 1426 | # end of Debug Configuration 1427 | # end of SPIFFS Configuration 1428 | 1429 | # 1430 | # TCP Transport 1431 | # 1432 | 1433 | # 1434 | # Websocket 1435 | # 1436 | CONFIG_WS_TRANSPORT=y 1437 | CONFIG_WS_BUFFER_SIZE=1024 1438 | # end of Websocket 1439 | # end of TCP Transport 1440 | 1441 | # 1442 | # Unity unit testing library 1443 | # 1444 | CONFIG_UNITY_ENABLE_FLOAT=y 1445 | CONFIG_UNITY_ENABLE_DOUBLE=y 1446 | # CONFIG_UNITY_ENABLE_64BIT is not set 1447 | # CONFIG_UNITY_ENABLE_COLOR is not set 1448 | CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=y 1449 | # CONFIG_UNITY_ENABLE_FIXTURE is not set 1450 | # CONFIG_UNITY_ENABLE_BACKTRACE_ON_FAIL is not set 1451 | # end of Unity unit testing library 1452 | 1453 | # 1454 | # Virtual file system 1455 | # 1456 | CONFIG_VFS_SUPPORT_IO=y 1457 | CONFIG_VFS_SUPPORT_DIR=y 1458 | CONFIG_VFS_SUPPORT_SELECT=y 1459 | CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT=y 1460 | CONFIG_VFS_SUPPORT_TERMIOS=y 1461 | 1462 | # 1463 | # Host File System I/O (Semihosting) 1464 | # 1465 | CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS=1 1466 | CONFIG_VFS_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 1467 | # end of Host File System I/O (Semihosting) 1468 | # end of Virtual file system 1469 | 1470 | # 1471 | # Wear Levelling 1472 | # 1473 | # CONFIG_WL_SECTOR_SIZE_512 is not set 1474 | CONFIG_WL_SECTOR_SIZE_4096=y 1475 | CONFIG_WL_SECTOR_SIZE=4096 1476 | # end of Wear Levelling 1477 | 1478 | # 1479 | # Wi-Fi Provisioning Manager 1480 | # 1481 | CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16 1482 | CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30 1483 | # end of Wi-Fi Provisioning Manager 1484 | 1485 | # 1486 | # Supplicant 1487 | # 1488 | CONFIG_WPA_MBEDTLS_CRYPTO=y 1489 | # CONFIG_WPA_WAPI_PSK is not set 1490 | # CONFIG_WPA_DEBUG_PRINT is not set 1491 | # CONFIG_WPA_TESTING_OPTIONS is not set 1492 | # CONFIG_WPA_WPS_STRICT is not set 1493 | # CONFIG_WPA_11KV_SUPPORT is not set 1494 | # end of Supplicant 1495 | # end of Component config 1496 | 1497 | # 1498 | # Compatibility options 1499 | # 1500 | # CONFIG_LEGACY_INCLUDE_COMMON_HEADERS is not set 1501 | # end of Compatibility options 1502 | 1503 | # Deprecated options for backward compatibility 1504 | CONFIG_TOOLPREFIX="xtensa-esp32-elf-" 1505 | CONFIG_PYTHON="python" 1506 | CONFIG_MAKE_WARN_UNDEFINED_VARIABLES=y 1507 | # CONFIG_LOG_BOOTLOADER_LEVEL_NONE is not set 1508 | # CONFIG_LOG_BOOTLOADER_LEVEL_ERROR is not set 1509 | CONFIG_LOG_BOOTLOADER_LEVEL_WARN=y 1510 | # CONFIG_LOG_BOOTLOADER_LEVEL_INFO is not set 1511 | # CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG is not set 1512 | # CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE is not set 1513 | CONFIG_LOG_BOOTLOADER_LEVEL=2 1514 | # CONFIG_APP_ROLLBACK_ENABLE is not set 1515 | # CONFIG_FLASH_ENCRYPTION_ENABLED is not set 1516 | # CONFIG_FLASHMODE_QIO is not set 1517 | # CONFIG_FLASHMODE_QOUT is not set 1518 | CONFIG_FLASHMODE_DIO=y 1519 | # CONFIG_FLASHMODE_DOUT is not set 1520 | # CONFIG_MONITOR_BAUD_9600B is not set 1521 | # CONFIG_MONITOR_BAUD_57600B is not set 1522 | CONFIG_MONITOR_BAUD_115200B=y 1523 | # CONFIG_MONITOR_BAUD_230400B is not set 1524 | # CONFIG_MONITOR_BAUD_921600B is not set 1525 | # CONFIG_MONITOR_BAUD_2MB is not set 1526 | # CONFIG_MONITOR_BAUD_OTHER is not set 1527 | CONFIG_MONITOR_BAUD_OTHER_VAL=115200 1528 | CONFIG_MONITOR_BAUD=115200 1529 | CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG=y 1530 | # CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE is not set 1531 | CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y 1532 | # CONFIG_OPTIMIZATION_ASSERTIONS_SILENT is not set 1533 | # CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED is not set 1534 | CONFIG_OPTIMIZATION_ASSERTION_LEVEL=2 1535 | # CONFIG_CXX_EXCEPTIONS is not set 1536 | CONFIG_STACK_CHECK_NONE=y 1537 | # CONFIG_STACK_CHECK_NORM is not set 1538 | # CONFIG_STACK_CHECK_STRONG is not set 1539 | # CONFIG_STACK_CHECK_ALL is not set 1540 | # CONFIG_WARN_WRITE_STRINGS is not set 1541 | # CONFIG_DISABLE_GCC8_WARNINGS is not set 1542 | # CONFIG_ESP32_APPTRACE_DEST_TRAX is not set 1543 | CONFIG_ESP32_APPTRACE_DEST_NONE=y 1544 | CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y 1545 | # CONFIG_BTDM_CONTROLLER_MODE_BLE_ONLY is not set 1546 | # CONFIG_BTDM_CONTROLLER_MODE_BR_EDR_ONLY is not set 1547 | CONFIG_BTDM_CONTROLLER_MODE_BTDM=y 1548 | CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN=9 1549 | CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN=7 1550 | CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN=2 1551 | CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN_EFF=9 1552 | CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN_EFF=7 1553 | CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN_EFF=2 1554 | CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE=0 1555 | CONFIG_BTDM_CONTROLLER_HCI_MODE_VHCI=y 1556 | # CONFIG_BTDM_CONTROLLER_HCI_MODE_UART_H4 is not set 1557 | CONFIG_BTDM_CONTROLLER_MODEM_SLEEP=y 1558 | CONFIG_BLE_SCAN_DUPLICATE=y 1559 | CONFIG_SCAN_DUPLICATE_BY_DEVICE_ADDR=y 1560 | # CONFIG_SCAN_DUPLICATE_BY_ADV_DATA is not set 1561 | # CONFIG_SCAN_DUPLICATE_BY_ADV_DATA_AND_DEVICE_ADDR is not set 1562 | CONFIG_SCAN_DUPLICATE_TYPE=0 1563 | CONFIG_DUPLICATE_SCAN_CACHE_SIZE=200 1564 | # CONFIG_BLE_MESH_SCAN_DUPLICATE_EN is not set 1565 | CONFIG_BTDM_CONTROLLER_FULL_SCAN_SUPPORTED=y 1566 | CONFIG_BLE_ADV_REPORT_FLOW_CONTROL_SUPPORTED=y 1567 | CONFIG_BLE_ADV_REPORT_FLOW_CONTROL_NUM=100 1568 | CONFIG_BLE_ADV_REPORT_DISCARD_THRSHOLD=20 1569 | CONFIG_BLUEDROID_ENABLED=y 1570 | # CONFIG_NIMBLE_ENABLED is not set 1571 | CONFIG_BTC_TASK_STACK_SIZE=3072 1572 | CONFIG_BLUEDROID_PINNED_TO_CORE=0 1573 | CONFIG_BTU_TASK_STACK_SIZE=4096 1574 | # CONFIG_BLUEDROID_MEM_DEBUG is not set 1575 | # CONFIG_CLASSIC_BT_ENABLED is not set 1576 | CONFIG_GATTS_ENABLE=y 1577 | # CONFIG_GATTS_SEND_SERVICE_CHANGE_MANUAL is not set 1578 | CONFIG_GATTS_SEND_SERVICE_CHANGE_AUTO=y 1579 | CONFIG_GATTS_SEND_SERVICE_CHANGE_MODE=0 1580 | CONFIG_GATTC_ENABLE=y 1581 | # CONFIG_GATTC_CACHE_NVS_FLASH is not set 1582 | CONFIG_BLE_SMP_ENABLE=y 1583 | # CONFIG_SMP_SLAVE_CON_PARAMS_UPD_ENABLE is not set 1584 | # CONFIG_HCI_TRACE_LEVEL_NONE is not set 1585 | # CONFIG_HCI_TRACE_LEVEL_ERROR is not set 1586 | CONFIG_HCI_TRACE_LEVEL_WARNING=y 1587 | # CONFIG_HCI_TRACE_LEVEL_API is not set 1588 | # CONFIG_HCI_TRACE_LEVEL_EVENT is not set 1589 | # CONFIG_HCI_TRACE_LEVEL_DEBUG is not set 1590 | # CONFIG_HCI_TRACE_LEVEL_VERBOSE is not set 1591 | CONFIG_HCI_INITIAL_TRACE_LEVEL=2 1592 | # CONFIG_BTM_TRACE_LEVEL_NONE is not set 1593 | # CONFIG_BTM_TRACE_LEVEL_ERROR is not set 1594 | CONFIG_BTM_TRACE_LEVEL_WARNING=y 1595 | # CONFIG_BTM_TRACE_LEVEL_API is not set 1596 | # CONFIG_BTM_TRACE_LEVEL_EVENT is not set 1597 | # CONFIG_BTM_TRACE_LEVEL_DEBUG is not set 1598 | # CONFIG_BTM_TRACE_LEVEL_VERBOSE is not set 1599 | CONFIG_BTM_INITIAL_TRACE_LEVEL=2 1600 | # CONFIG_L2CAP_TRACE_LEVEL_NONE is not set 1601 | # CONFIG_L2CAP_TRACE_LEVEL_ERROR is not set 1602 | CONFIG_L2CAP_TRACE_LEVEL_WARNING=y 1603 | # CONFIG_L2CAP_TRACE_LEVEL_API is not set 1604 | # CONFIG_L2CAP_TRACE_LEVEL_EVENT is not set 1605 | # CONFIG_L2CAP_TRACE_LEVEL_DEBUG is not set 1606 | # CONFIG_L2CAP_TRACE_LEVEL_VERBOSE is not set 1607 | CONFIG_L2CAP_INITIAL_TRACE_LEVEL=2 1608 | # CONFIG_RFCOMM_TRACE_LEVEL_NONE is not set 1609 | # CONFIG_RFCOMM_TRACE_LEVEL_ERROR is not set 1610 | CONFIG_RFCOMM_TRACE_LEVEL_WARNING=y 1611 | # CONFIG_RFCOMM_TRACE_LEVEL_API is not set 1612 | # CONFIG_RFCOMM_TRACE_LEVEL_EVENT is not set 1613 | # CONFIG_RFCOMM_TRACE_LEVEL_DEBUG is not set 1614 | # CONFIG_RFCOMM_TRACE_LEVEL_VERBOSE is not set 1615 | CONFIG_RFCOMM_INITIAL_TRACE_LEVEL=2 1616 | # CONFIG_SDP_TRACE_LEVEL_NONE is not set 1617 | # CONFIG_SDP_TRACE_LEVEL_ERROR is not set 1618 | CONFIG_SDP_TRACE_LEVEL_WARNING=y 1619 | # CONFIG_SDP_TRACE_LEVEL_API is not set 1620 | # CONFIG_SDP_TRACE_LEVEL_EVENT is not set 1621 | # CONFIG_SDP_TRACE_LEVEL_DEBUG is not set 1622 | # CONFIG_SDP_TRACE_LEVEL_VERBOSE is not set 1623 | CONFIG_BTH_LOG_SDP_INITIAL_TRACE_LEVEL=2 1624 | # CONFIG_GAP_TRACE_LEVEL_NONE is not set 1625 | # CONFIG_GAP_TRACE_LEVEL_ERROR is not set 1626 | CONFIG_GAP_TRACE_LEVEL_WARNING=y 1627 | # CONFIG_GAP_TRACE_LEVEL_API is not set 1628 | # CONFIG_GAP_TRACE_LEVEL_EVENT is not set 1629 | # CONFIG_GAP_TRACE_LEVEL_DEBUG is not set 1630 | # CONFIG_GAP_TRACE_LEVEL_VERBOSE is not set 1631 | CONFIG_GAP_INITIAL_TRACE_LEVEL=2 1632 | CONFIG_BNEP_INITIAL_TRACE_LEVEL=2 1633 | # CONFIG_PAN_TRACE_LEVEL_NONE is not set 1634 | # CONFIG_PAN_TRACE_LEVEL_ERROR is not set 1635 | CONFIG_PAN_TRACE_LEVEL_WARNING=y 1636 | # CONFIG_PAN_TRACE_LEVEL_API is not set 1637 | # CONFIG_PAN_TRACE_LEVEL_EVENT is not set 1638 | # CONFIG_PAN_TRACE_LEVEL_DEBUG is not set 1639 | # CONFIG_PAN_TRACE_LEVEL_VERBOSE is not set 1640 | CONFIG_PAN_INITIAL_TRACE_LEVEL=2 1641 | # CONFIG_A2D_TRACE_LEVEL_NONE is not set 1642 | # CONFIG_A2D_TRACE_LEVEL_ERROR is not set 1643 | CONFIG_A2D_TRACE_LEVEL_WARNING=y 1644 | # CONFIG_A2D_TRACE_LEVEL_API is not set 1645 | # CONFIG_A2D_TRACE_LEVEL_EVENT is not set 1646 | # CONFIG_A2D_TRACE_LEVEL_DEBUG is not set 1647 | # CONFIG_A2D_TRACE_LEVEL_VERBOSE is not set 1648 | CONFIG_A2D_INITIAL_TRACE_LEVEL=2 1649 | # CONFIG_AVDT_TRACE_LEVEL_NONE is not set 1650 | # CONFIG_AVDT_TRACE_LEVEL_ERROR is not set 1651 | CONFIG_AVDT_TRACE_LEVEL_WARNING=y 1652 | # CONFIG_AVDT_TRACE_LEVEL_API is not set 1653 | # CONFIG_AVDT_TRACE_LEVEL_EVENT is not set 1654 | # CONFIG_AVDT_TRACE_LEVEL_DEBUG is not set 1655 | # CONFIG_AVDT_TRACE_LEVEL_VERBOSE is not set 1656 | CONFIG_AVDT_INITIAL_TRACE_LEVEL=2 1657 | # CONFIG_AVCT_TRACE_LEVEL_NONE is not set 1658 | # CONFIG_AVCT_TRACE_LEVEL_ERROR is not set 1659 | CONFIG_AVCT_TRACE_LEVEL_WARNING=y 1660 | # CONFIG_AVCT_TRACE_LEVEL_API is not set 1661 | # CONFIG_AVCT_TRACE_LEVEL_EVENT is not set 1662 | # CONFIG_AVCT_TRACE_LEVEL_DEBUG is not set 1663 | # CONFIG_AVCT_TRACE_LEVEL_VERBOSE is not set 1664 | CONFIG_AVCT_INITIAL_TRACE_LEVEL=2 1665 | # CONFIG_AVRC_TRACE_LEVEL_NONE is not set 1666 | # CONFIG_AVRC_TRACE_LEVEL_ERROR is not set 1667 | CONFIG_AVRC_TRACE_LEVEL_WARNING=y 1668 | # CONFIG_AVRC_TRACE_LEVEL_API is not set 1669 | # CONFIG_AVRC_TRACE_LEVEL_EVENT is not set 1670 | # CONFIG_AVRC_TRACE_LEVEL_DEBUG is not set 1671 | # CONFIG_AVRC_TRACE_LEVEL_VERBOSE is not set 1672 | CONFIG_AVRC_INITIAL_TRACE_LEVEL=2 1673 | # CONFIG_MCA_TRACE_LEVEL_NONE is not set 1674 | # CONFIG_MCA_TRACE_LEVEL_ERROR is not set 1675 | CONFIG_MCA_TRACE_LEVEL_WARNING=y 1676 | # CONFIG_MCA_TRACE_LEVEL_API is not set 1677 | # CONFIG_MCA_TRACE_LEVEL_EVENT is not set 1678 | # CONFIG_MCA_TRACE_LEVEL_DEBUG is not set 1679 | # CONFIG_MCA_TRACE_LEVEL_VERBOSE is not set 1680 | CONFIG_MCA_INITIAL_TRACE_LEVEL=2 1681 | # CONFIG_HID_TRACE_LEVEL_NONE is not set 1682 | # CONFIG_HID_TRACE_LEVEL_ERROR is not set 1683 | CONFIG_HID_TRACE_LEVEL_WARNING=y 1684 | # CONFIG_HID_TRACE_LEVEL_API is not set 1685 | # CONFIG_HID_TRACE_LEVEL_EVENT is not set 1686 | # CONFIG_HID_TRACE_LEVEL_DEBUG is not set 1687 | # CONFIG_HID_TRACE_LEVEL_VERBOSE is not set 1688 | CONFIG_HID_INITIAL_TRACE_LEVEL=2 1689 | # CONFIG_APPL_TRACE_LEVEL_NONE is not set 1690 | # CONFIG_APPL_TRACE_LEVEL_ERROR is not set 1691 | CONFIG_APPL_TRACE_LEVEL_WARNING=y 1692 | # CONFIG_APPL_TRACE_LEVEL_API is not set 1693 | # CONFIG_APPL_TRACE_LEVEL_EVENT is not set 1694 | # CONFIG_APPL_TRACE_LEVEL_DEBUG is not set 1695 | # CONFIG_APPL_TRACE_LEVEL_VERBOSE is not set 1696 | CONFIG_APPL_INITIAL_TRACE_LEVEL=2 1697 | # CONFIG_GATT_TRACE_LEVEL_NONE is not set 1698 | # CONFIG_GATT_TRACE_LEVEL_ERROR is not set 1699 | CONFIG_GATT_TRACE_LEVEL_WARNING=y 1700 | # CONFIG_GATT_TRACE_LEVEL_API is not set 1701 | # CONFIG_GATT_TRACE_LEVEL_EVENT is not set 1702 | # CONFIG_GATT_TRACE_LEVEL_DEBUG is not set 1703 | # CONFIG_GATT_TRACE_LEVEL_VERBOSE is not set 1704 | CONFIG_GATT_INITIAL_TRACE_LEVEL=2 1705 | # CONFIG_SMP_TRACE_LEVEL_NONE is not set 1706 | # CONFIG_SMP_TRACE_LEVEL_ERROR is not set 1707 | CONFIG_SMP_TRACE_LEVEL_WARNING=y 1708 | # CONFIG_SMP_TRACE_LEVEL_API is not set 1709 | # CONFIG_SMP_TRACE_LEVEL_EVENT is not set 1710 | # CONFIG_SMP_TRACE_LEVEL_DEBUG is not set 1711 | # CONFIG_SMP_TRACE_LEVEL_VERBOSE is not set 1712 | CONFIG_SMP_INITIAL_TRACE_LEVEL=2 1713 | # CONFIG_BTIF_TRACE_LEVEL_NONE is not set 1714 | # CONFIG_BTIF_TRACE_LEVEL_ERROR is not set 1715 | CONFIG_BTIF_TRACE_LEVEL_WARNING=y 1716 | # CONFIG_BTIF_TRACE_LEVEL_API is not set 1717 | # CONFIG_BTIF_TRACE_LEVEL_EVENT is not set 1718 | # CONFIG_BTIF_TRACE_LEVEL_DEBUG is not set 1719 | # CONFIG_BTIF_TRACE_LEVEL_VERBOSE is not set 1720 | CONFIG_BTIF_INITIAL_TRACE_LEVEL=2 1721 | # CONFIG_BTC_TRACE_LEVEL_NONE is not set 1722 | # CONFIG_BTC_TRACE_LEVEL_ERROR is not set 1723 | CONFIG_BTC_TRACE_LEVEL_WARNING=y 1724 | # CONFIG_BTC_TRACE_LEVEL_API is not set 1725 | # CONFIG_BTC_TRACE_LEVEL_EVENT is not set 1726 | # CONFIG_BTC_TRACE_LEVEL_DEBUG is not set 1727 | # CONFIG_BTC_TRACE_LEVEL_VERBOSE is not set 1728 | CONFIG_BTC_INITIAL_TRACE_LEVEL=2 1729 | # CONFIG_OSI_TRACE_LEVEL_NONE is not set 1730 | # CONFIG_OSI_TRACE_LEVEL_ERROR is not set 1731 | CONFIG_OSI_TRACE_LEVEL_WARNING=y 1732 | # CONFIG_OSI_TRACE_LEVEL_API is not set 1733 | # CONFIG_OSI_TRACE_LEVEL_EVENT is not set 1734 | # CONFIG_OSI_TRACE_LEVEL_DEBUG is not set 1735 | # CONFIG_OSI_TRACE_LEVEL_VERBOSE is not set 1736 | CONFIG_OSI_INITIAL_TRACE_LEVEL=2 1737 | # CONFIG_BLUFI_TRACE_LEVEL_NONE is not set 1738 | # CONFIG_BLUFI_TRACE_LEVEL_ERROR is not set 1739 | CONFIG_BLUFI_TRACE_LEVEL_WARNING=y 1740 | # CONFIG_BLUFI_TRACE_LEVEL_API is not set 1741 | # CONFIG_BLUFI_TRACE_LEVEL_EVENT is not set 1742 | # CONFIG_BLUFI_TRACE_LEVEL_DEBUG is not set 1743 | # CONFIG_BLUFI_TRACE_LEVEL_VERBOSE is not set 1744 | CONFIG_BLUFI_INITIAL_TRACE_LEVEL=2 1745 | # CONFIG_BLE_HOST_QUEUE_CONGESTION_CHECK is not set 1746 | CONFIG_SMP_ENABLE=y 1747 | # CONFIG_BLE_ACTIVE_SCAN_REPORT_ADV_SCAN_RSP_INDIVIDUALLY is not set 1748 | CONFIG_BLE_ESTABLISH_LINK_CONNECTION_TIMEOUT=30 1749 | CONFIG_ADC2_DISABLE_DAC=y 1750 | # CONFIG_SPIRAM_SUPPORT is not set 1751 | CONFIG_TRACEMEM_RESERVE_DRAM=0x0 1752 | # CONFIG_ULP_COPROC_ENABLED is not set 1753 | CONFIG_ULP_COPROC_RESERVE_MEM=0 1754 | CONFIG_BROWNOUT_DET=y 1755 | CONFIG_BROWNOUT_DET_LVL_SEL_0=y 1756 | # CONFIG_BROWNOUT_DET_LVL_SEL_1 is not set 1757 | # CONFIG_BROWNOUT_DET_LVL_SEL_2 is not set 1758 | # CONFIG_BROWNOUT_DET_LVL_SEL_3 is not set 1759 | # CONFIG_BROWNOUT_DET_LVL_SEL_4 is not set 1760 | # CONFIG_BROWNOUT_DET_LVL_SEL_5 is not set 1761 | # CONFIG_BROWNOUT_DET_LVL_SEL_6 is not set 1762 | # CONFIG_BROWNOUT_DET_LVL_SEL_7 is not set 1763 | CONFIG_BROWNOUT_DET_LVL=0 1764 | CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC=y 1765 | # CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL is not set 1766 | # CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_OSC is not set 1767 | # CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_8MD256 is not set 1768 | # CONFIG_DISABLE_BASIC_ROM_CONSOLE is not set 1769 | # CONFIG_COMPATIBLE_PRE_V2_1_BOOTLOADERS is not set 1770 | # CONFIG_EVENT_LOOP_PROFILING is not set 1771 | CONFIG_POST_EVENTS_FROM_ISR=y 1772 | CONFIG_POST_EVENTS_FROM_IRAM_ISR=y 1773 | # CONFIG_TWO_UNIVERSAL_MAC_ADDRESS is not set 1774 | CONFIG_FOUR_UNIVERSAL_MAC_ADDRESS=y 1775 | CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS=4 1776 | CONFIG_ESP_SYSTEM_PD_FLASH=y 1777 | CONFIG_REDUCE_PHY_TX_POWER=y 1778 | CONFIG_ESP32S2_PANIC_PRINT_HALT=y 1779 | # CONFIG_ESP32S2_PANIC_PRINT_REBOOT is not set 1780 | # CONFIG_ESP32S2_PANIC_SILENT_REBOOT is not set 1781 | # CONFIG_ESP32S2_PANIC_GDBSTUB is not set 1782 | CONFIG_ESP32S2_ALLOW_RTC_FAST_MEM_AS_HEAP=y 1783 | CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32 1784 | CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2048 1785 | CONFIG_MAIN_TASK_STACK_SIZE=4096 1786 | CONFIG_CONSOLE_UART_DEFAULT=y 1787 | # CONFIG_CONSOLE_UART_CUSTOM is not set 1788 | # CONFIG_ESP_CONSOLE_UART_NONE is not set 1789 | CONFIG_CONSOLE_UART=y 1790 | CONFIG_CONSOLE_UART_NUM=0 1791 | CONFIG_CONSOLE_UART_BAUDRATE=115200 1792 | CONFIG_INT_WDT=y 1793 | CONFIG_INT_WDT_TIMEOUT_MS=300 1794 | CONFIG_TASK_WDT=y 1795 | # CONFIG_TASK_WDT_PANIC is not set 1796 | CONFIG_TASK_WDT_TIMEOUT_S=5 1797 | CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU0=y 1798 | CONFIG_IPC_TASK_STACK_SIZE=1024 1799 | CONFIG_TIMER_TASK_STACK_SIZE=4096 1800 | CONFIG_SW_COEXIST_ENABLE=y 1801 | # CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set 1802 | CONFIG_ESP32_ENABLE_COREDUMP_TO_UART=y 1803 | # CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE is not set 1804 | # CONFIG_ESP32_COREDUMP_DATA_FORMAT_BIN is not set 1805 | CONFIG_ESP32_COREDUMP_DATA_FORMAT_ELF=y 1806 | CONFIG_ESP32_COREDUMP_CHECKSUM_CRC32=y 1807 | # CONFIG_ESP32_COREDUMP_CHECKSUM_SHA256 is not set 1808 | CONFIG_ESP32_ENABLE_COREDUMP=y 1809 | CONFIG_ESP32_CORE_DUMP_MAX_TASKS_NUM=64 1810 | CONFIG_ESP32_CORE_DUMP_UART_DELAY=0 1811 | CONFIG_ESP32_CORE_DUMP_DECODE_INFO=y 1812 | # CONFIG_ESP32_CORE_DUMP_DECODE_DISABLE is not set 1813 | CONFIG_ESP32_CORE_DUMP_DECODE="info" 1814 | CONFIG_MB_MASTER_TIMEOUT_MS_RESPOND=150 1815 | CONFIG_MB_MASTER_DELAY_MS_CONVERT=200 1816 | CONFIG_MB_QUEUE_LENGTH=20 1817 | CONFIG_MB_SERIAL_TASK_STACK_SIZE=2048 1818 | CONFIG_MB_SERIAL_BUF_SIZE=256 1819 | CONFIG_MB_SERIAL_TASK_PRIO=10 1820 | CONFIG_MB_CONTROLLER_SLAVE_ID_SUPPORT=y 1821 | CONFIG_MB_CONTROLLER_SLAVE_ID=0x00112233 1822 | CONFIG_MB_CONTROLLER_NOTIFY_TIMEOUT=20 1823 | CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 1824 | CONFIG_MB_CONTROLLER_STACK_SIZE=4096 1825 | CONFIG_MB_EVENT_QUEUE_TIMEOUT=20 1826 | CONFIG_MB_TIMER_PORT_ENABLED=y 1827 | CONFIG_MB_TIMER_GROUP=0 1828 | CONFIG_MB_TIMER_INDEX=0 1829 | # CONFIG_ENABLE_STATIC_TASK_CLEAN_UP_HOOK is not set 1830 | CONFIG_TIMER_TASK_PRIORITY=1 1831 | CONFIG_TIMER_TASK_STACK_DEPTH=2048 1832 | CONFIG_TIMER_QUEUE_LENGTH=10 1833 | # CONFIG_L2_TO_L3_COPY is not set 1834 | # CONFIG_USE_ONLY_LWIP_SELECT is not set 1835 | CONFIG_ESP_GRATUITOUS_ARP=y 1836 | CONFIG_GARP_TMR_INTERVAL=60 1837 | CONFIG_TCPIP_RECVMBOX_SIZE=32 1838 | CONFIG_TCP_MAXRTX=12 1839 | CONFIG_TCP_SYNMAXRTX=6 1840 | CONFIG_TCP_MSS=1436 1841 | CONFIG_TCP_MSL=60000 1842 | CONFIG_TCP_SND_BUF_DEFAULT=5744 1843 | CONFIG_TCP_WND_DEFAULT=5744 1844 | CONFIG_TCP_RECVMBOX_SIZE=6 1845 | CONFIG_TCP_QUEUE_OOSEQ=y 1846 | # CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set 1847 | CONFIG_TCP_OVERSIZE_MSS=y 1848 | # CONFIG_TCP_OVERSIZE_QUARTER_MSS is not set 1849 | # CONFIG_TCP_OVERSIZE_DISABLE is not set 1850 | CONFIG_UDP_RECVMBOX_SIZE=6 1851 | CONFIG_TCPIP_TASK_STACK_SIZE=2560 1852 | CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY=y 1853 | # CONFIG_TCPIP_TASK_AFFINITY_CPU0 is not set 1854 | CONFIG_TCPIP_TASK_AFFINITY=0x7FFFFFFF 1855 | # CONFIG_PPP_SUPPORT is not set 1856 | CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5 1857 | CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=2048 1858 | CONFIG_ESP32_PTHREAD_STACK_MIN=768 1859 | CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT=-1 1860 | CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread" 1861 | CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y 1862 | # CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS is not set 1863 | # CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED is not set 1864 | CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y 1865 | CONFIG_SUPPORT_TERMIOS=y 1866 | CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1 1867 | CONFIG_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 1868 | # End of deprecated options 1869 | -------------------------------------------------------------------------------- /set_port.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | PORT=$1 3 | sed -i "/CONFIG_ESPTOOLPY_PORT/c\CONFIG_ESPTOOLPY_PORT=\"$PORT\"" sdkconfig --------------------------------------------------------------------------------