├── .editorconfig ├── .gitattributes ├── .gitignore ├── .gitmodules ├── LICENSE ├── Makefile ├── README.md ├── SublimeAStyleFormatter.sublime-settings ├── main ├── Kconfig.projbuild ├── app_main.c └── component.mk └── sdkconfig /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # http://editorconfig.org 4 | 5 | root = true 6 | 7 | [*] 8 | indent_style = space 9 | indent_size = 4 10 | end_of_line = lf 11 | charset = utf-8 12 | trim_trailing_whitespace = true 13 | insert_final_newline = true 14 | 15 | [{*.md,*.rst}] 16 | trim_trailing_whitespace = false 17 | 18 | [{Makefile,*.mk,*.bat}] 19 | indent_style = tab 20 | indent_size = 2 21 | 22 | [*/freertos/**] 23 | indent_style = tab 24 | indent_size = 4 25 | 26 | [{*/freertos/**.S,**/FreeRTOSConfig.h}] 27 | indent_style = space 28 | indent_size = 4 29 | 30 | [*.pem] 31 | insert_final_newline = false 32 | 33 | [*.py] 34 | max_line_length = 119 35 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.sublime-settings linguist-language=C 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .output 3 | map.txt 4 | main/include/user_config.local.h 5 | bin 6 | build 7 | *.old 8 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "components/espmqtt"] 2 | path = components/espmqtt 3 | url = https://github.com/tuanpmt/espmqtt.git 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright 2016 Tuan PM 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # This is a project Makefile. It is assumed the directory this Makefile resides in is a 3 | # project subdirectory. 4 | # 5 | VERBOSE = 1 6 | PROJECT_NAME := esp32-audio-code-idf 7 | include $(IDF_PATH)/make/project.mk 8 | 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ESP32 MQTT Library sample application 2 | 3 | - Project has moved to: https://github.com/tuanpmt/espmqtt/tree/master/examples 4 | - This project will not be developed, and all issues will not be supported. 5 | 6 | ## License 7 | 8 | Apache 2.0 9 | -------------------------------------------------------------------------------- /SublimeAStyleFormatter.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | // NOTE: You should always edit options in user file, not this file. 3 | 4 | // Print debug message 5 | "debug": false, 6 | 7 | // Auto format on file save 8 | "autoformat_on_save": false, 9 | 10 | // The mapping key is `syntax name`, and the value is `formatting mode`. 11 | // Note that the value for each mapping should be "c", "java" or "cs". 12 | "user_defined_syntax_mode_mapping": { 13 | // For example: 14 | 15 | /* 16 | "arduino": "c", 17 | "pde": "java", 18 | "apex": "java" 19 | */ 20 | }, 21 | 22 | // Please visit http://astyle.sourceforge.net/astyle.html for more information 23 | "options_default": { 24 | // Default bracket style 25 | // Can be one of "allman", "bsd", "break", "java", "attach", "kr", "k&r", 26 | // "k/r" "stroustrup", "whitesmith", "banner", "gnu", "linux", "horstmann", 27 | // "1tbs", "otbs ", "google", "pico", "lisp", "python", "vtk", or null 28 | // for default. 29 | "style": "k&r", 30 | 31 | // Tab options 32 | // "indent": Can be one of "spaces", "tab" "force-tab", "force-tab-x", or null 33 | // "indent-spaces": Can be either null or numbers 34 | // 35 | // While both "indent" or "indent-spaces" are null (default), the indentation options 36 | // will be retrieved from Sublime Text view settings: `tab_size`, `translate_tabs_to_spaces`: 37 | // 1. If `translate_tabs_to_spaces` is true, "indent" will be "spaces", otherwise, "tab"; 38 | // 2. "indent-spaces" will equal to `tab_size`. 39 | "indent": null, 40 | "indent-spaces": null, 41 | 42 | // === Bracket Modify Options === 43 | // Attach brackets to a namespace statement. This is done regardless of 44 | // the bracket style being used. 45 | "attach-namespaces": false, 46 | 47 | // Attach brackets to a class statement. This is done regardless of the 48 | // bracket style being used. 49 | "attach-classes": false, 50 | 51 | // Attach brackets to class and struct inline function definitions. This 52 | // is not done for run-in type brackets (Horstmann and Pico styles). This 53 | // option is effective for C++ files only. 54 | "attach-inlines": false, 55 | 56 | // Attach brackets to a bracketed extern "C" statement. This is done 57 | // regardless of the bracket style being used. This option is effective 58 | // for C++ files only. 59 | // 60 | // An extern "C" statement that is part of a function definition is 61 | // formatted according to the requested bracket style. Bracketed extern 62 | // "C" statements are unaffected by the bracket style and this option is 63 | // the only way to change them. 64 | "attach-extern-c": false, 65 | 66 | // === Indentation Options === 67 | 68 | // Indent 'class' and 'struct' blocks so that the blocks 'public:', 69 | // 'protected:' and 'private:' are indented. The struct blocks are 70 | // indented only if an access modifier is declared somewhere in the 71 | // struct. The entire block is indented. This option is effective for C++ files only. 72 | "indent-classes": false, 73 | 74 | // Indent 'class' and 'struct' access modifiers, 'public:', 'protected:' 75 | // and 'private:', one half indent. The rest of the class is not indented. 76 | // This option is effective for C++ files only. If used with indent‑classes 77 | // this option will be ignored. 78 | "indent-modifiers": false, 79 | 80 | // Indent 'switch' blocks so that the 'case X:' statements are indented 81 | // in the switch block. The entire case block is indented. 82 | "indent-switches": false, 83 | 84 | // Indent 'case X:' blocks from the 'case X:' headers. Case statements 85 | // not enclosed in blocks are NOT indented. 86 | "indent-cases": false, 87 | 88 | // Add extra indentation to namespace blocks. This option has 89 | // no effect on Java files. 90 | "indent-namespaces": false, 91 | 92 | // Add extra indentation to labels so they appear 1 indent less than the 93 | // current indentation, rather than being flushed to the left (the default). 94 | "indent-labels": false, 95 | 96 | // Indent preprocessor blocks at bracket level zero, and immediately within 97 | // a namespace. There are restrictions on what will be indented. Blocks 98 | // within methods, classes, arrays, etc, will not be indented. Blocks 99 | // containing brackets or multi-line define statements will not be indented. 100 | // Without this option the preprocessor block is not indented. 101 | "indent-preproc-block": false, 102 | 103 | // Indent multi-line preprocessor definitions ending with a backslash. 104 | // Should be used with `convert-tabs` for proper results. Does a pretty 105 | // good job, but cannot perform miracles in obfuscated preprocessor 106 | // definitions. Without this option the preprocessor statements remain unchanged. 107 | "indent-preproc-define": false, 108 | 109 | // Indent preprocessor conditional statements to the same level as the 110 | // source code. 111 | "indent-preproc-cond": false, 112 | 113 | // Indent C++ comments beginning in column one. By default C++ comments 114 | // beginning in column one are not indented. This option will allow the 115 | // comments to be indented with the code. 116 | "indent-col1-comments": false, 117 | 118 | // Set the minimal indent that is added when a header is built of multiple 119 | // lines. This indent helps to easily separate the header from the command 120 | // statements that follow. The value for # indicates a number of indents 121 | // and is a minimum value. The indent may be greater to align with the data 122 | // on the previous line. 123 | // The valid values are: 124 | // 0 - no minimal indent. The lines will be aligned with the paren on the 125 | // preceding line. 126 | // 1 - indent at least one additional indent. 127 | // 2 - indent at least two additional indents. 128 | // 3 - indent at least one-half an additional indent. This is intended for 129 | // large indents (e.g. 8). 130 | // The default value is 2, two additional indents. 131 | "min-conditional-indent": 2, 132 | 133 | // Set the maximum spaces to indent a continuation line. 134 | // The maximum spaces indicate a number of columns and 135 | // must not be greater than 120. A maximum of less 136 | // than two indent lengths will be ignored. This option 137 | // will prevent continuation lines from extending too 138 | // far to the right. Setting a larger value will allow 139 | // the code to be extended further to the right. 140 | // 141 | // range: [40, 120] 142 | "max-instatement-indent": 40, 143 | 144 | // === Padding Options === 145 | 146 | // null - Do nothing 147 | // "default" - Pad empty lines around header blocks (e.g. 'if', 148 | // 'for', 'while'...). 149 | // "all" - Pad empty lines around header blocks (e.g. 'if', 150 | // 'for', 'while'...). Treat closing header blocks 151 | // (e.g. 'else', 'catch') as stand-alone blocks. 152 | "break-blocks": null, 153 | 154 | // Insert space padding around operators. Any end of line comments 155 | // will remain in the original column, if possible. Note that there 156 | // is no option to unpad. Once padded, they stay padded. 157 | "pad-oper": true, 158 | 159 | // Insert space padding around parenthesis on both the outside and 160 | // the inside. Any end of line comments will remain in the original 161 | // column, if possible. 162 | "pad-paren": false, 163 | 164 | // Insert space padding around parenthesis on the outside only. Any 165 | // end of line comments will remain in the original column, if possible. 166 | // This can be used with `unpad-paren` below to remove unwanted spaces. 167 | "pad-paren-out": false, 168 | 169 | // Insert space padding around the first parenthesis in a series on the 170 | // outside only. Any end of line comments will remain in the original 171 | // column, if possible. This can be used with unpad-paren below to remove 172 | // unwanted spaces. If used with pad-paren or pad-paren-out, this 173 | // option will be ignored. If used with pad-paren-in, the result will 174 | // be the same as pad-paren. 175 | "pad-first-paren-out": false, 176 | 177 | // Insert space padding around parenthesis on the inside only. Any 178 | // end of line comments will remain in the original column, if possible. 179 | // This can be used with `unpad-paren` below to remove unwanted spaces. 180 | "pad-paren-in": false, 181 | 182 | // Insert space padding after paren headers only (e.g. 'if', 'for', 183 | //'while'...). Any end of line comments will remain in the original 184 | // column, if possible. This can be used with unpad-paren to remove 185 | // unwanted spaces. 186 | "pad-header": true, 187 | 188 | // Remove extra space padding around parenthesis on the inside and outside. 189 | // Any end of line comments will remain in the original column, if possible. 190 | // This option can be used in combination with the paren padding options 191 | // `pad-paren`, `pad-paren-out`, `pad-paren-in`, and `pad-header` above. 192 | // Only padding that has not been requested by other options will be removed. 193 | // For example, if a source has parens padded on both the inside and outside, 194 | // and you want inside only. You need to use unpad-paren to remove the outside 195 | // padding, and pad-paren-in to retain the inside padding. Using only `pad-paren-in` 196 | // would not remove the outside padding. 197 | "unpad-paren": false, 198 | 199 | // Delete empty lines within a function or method. Empty lines outside of functions 200 | // or methods are NOT deleted. If used with break-blocks or break-blocks=all it will 201 | // delete all lines EXCEPT the lines added by the `break-blocks` options. 202 | "delete-empty-lines": false, 203 | 204 | // Fill empty lines with the white space of the previous line. 205 | "fill-empty-lines": false, 206 | 207 | // Attach a pointer or reference operator (* or &) to either the variable type (left) 208 | // or variable name (right), or place it between the type and name (middle). 209 | // The spacing between the type and name will be preserved, if possible. To format 210 | // references separately use the following `align-reference` option. 211 | // can be one of null, "type", "middle" or "name" 212 | "align-pointer": null, 213 | 214 | // This option will align references separate from pointers. Pointers are not changed 215 | // by this option. If pointers and references are to be aligned the same, use the 216 | // previous `align-pointer` option. The option align-reference=none will not change 217 | // the reference alignment. The other options are the same as for `align-pointer`. 218 | // In the case of a reference to a pointer (*&) with conflicting alignments, the 219 | // `align-pointer` value will be used. 220 | // can be one of "none", "type", "middle", "name", or null for default. 221 | "align-reference": null, 222 | 223 | // === Formatting Options === 224 | 225 | // When `style` is "attach", "linux" or "stroustrup", this breaks closing headers 226 | // (e.g. 'else', 'catch', ...) from their immediately preceding closing brackets. 227 | // Closing header brackets are always broken with broken brackets, horstmann 228 | // rackets, indented blocks, and indented brackets. 229 | "break-closing-brackets": false, 230 | 231 | // Break "else if" header combinations into separate lines. This option has no effect 232 | // if keep-one-line-statements is used, the "else if" statements will remain as they are. 233 | // If this option is NOT used, "else if" header combinations will be placed on a single line. 234 | "break-elseifs": false, 235 | 236 | // Add brackets to unbracketed one line conditional statements (e.g. 'if', 'for', 'while'...). 237 | // The statement must be on a single line. The brackets will be added according to the 238 | // currently requested predefined style or bracket type. If no style or bracket type is 239 | // requested the brackets will be attached. If `add-one-line-brackets` is also used the 240 | // result will be one line brackets. 241 | "add-brackets": false, 242 | 243 | // Add one line brackets to unbracketed one line conditional statements 244 | // (e.g. 'if', 'for', 'while'...). The statement must be on a single line. 245 | // The option implies `keep-one-line-blocks` and will not break the one line blocks. 246 | "add-one-line-brackets": false, 247 | 248 | // Remove brackets from conditional statements (e.g. 'if', 'for', 'while'...). 249 | // The statement must be a single statement on a single line. If 250 | // --add-brackets or --add-one-line-brackets is also used the result will 251 | // be to add brackets. Brackets will not be removed from 252 | // "One True Brace Style", --style=1tbs. 253 | "remove-brackets": false, 254 | 255 | // Don't break one-line blocks. 256 | "keep-one-line-blocks": true, 257 | 258 | // Don't break complex statements and multiple statements residing on a single line. 259 | "keep-one-line-statements": true, 260 | 261 | // Closes whitespace in the angle brackets of template definitions. Closing 262 | // the ending angle brackets is now allowed by the C++11 standard. 263 | // Be sure your compiler supports this before making the changes. 264 | "close-templates": false, 265 | 266 | // Remove the preceding '*' in a multi-line comment that begins a line. 267 | // A trailing '*', if present, is also removed. Text that is less than one 268 | // is indent is indented to one indent. Text greater than one indent is 269 | // not changed. Multi-line comments that begin a line but without the 270 | // preceding '*' are indented to one indent for consistency. This can 271 | // slightly modify the indentation of commented out blocks of code. 272 | // Lines containing all '*' are left unchanged. Extra spacing is removed 273 | // from the comment close '*/'. 274 | "remove-comment-prefix": false, 275 | 276 | // The option max-code-length will break a line if the code exceeds # characters. 277 | // The valid values are 50 thru 200. Lines without logical conditionals will 278 | // break on a logical conditional (||, &&, ...), comma, paren, semicolon, or space. 279 | // 280 | // Some code will not be broken, such as comments, quotes, and arrays. 281 | // If used with keep-one-line-blocks or add-one-line-brackets the blocks 282 | // will NOT be broken. If used with keep-one-line-statements the statements 283 | // will be broken at a semicolon if the line goes over the maximum length. 284 | // If there is no available break point within the max code length, the 285 | // line will be broken at the first available break point after the max code length. 286 | // 287 | // By default logical conditionals will be placed first on the new line. 288 | // The option break-after-logical will cause the logical conditionals to be 289 | // placed last on the previous line. This option has no effect without max-code-length. 290 | "max-code-length": -1, 291 | "break-after-logical": false, 292 | 293 | // == Objective-C Options == 294 | // Because of the longer indents sometimes needed for Objective-C, the option 295 | // "max-instatement-indent" may need to be increased. If you are not getting 296 | // the paren and square bracket alignment you want, try increasing this value. 297 | 298 | // Align the colons in Objective-C method declarations. This option is effective 299 | // for Objective-C files only. 300 | "align-method-colon": false, 301 | 302 | // Insert space padding after the '-' or '+' Objective-C method prefix. This will 303 | // add exactly one space. Any additional spaces will be deleted. This option is 304 | // effective for Objective-C files only. 305 | "pad-method-prefix": false, 306 | 307 | // Remove all space padding after the '-' or '+' Objective-C method prefix. 308 | // If used with pad-method-prefix, this option will be ignored. This option 309 | // is effective for Objective-C files only. 310 | "unpad-method-prefix": false, 311 | 312 | // Add or remove space padding before or after the colons in an Objective-C 313 | // method call. These options will pad exactly one space. Any additional 314 | // spaces will be deleted. Colons immediarely preceeding a paren will not 315 | // be padded. This option is effective for Objective-C files only. 316 | // 317 | // Can be one of "none", "all", "after" or "before", or null for default. 318 | "pad-method-colon": null 319 | }, 320 | 321 | // 322 | // Language Specific Options 323 | // 324 | // You can override default options in language-specific options here. 325 | // Addtional options are also provided: 326 | // 327 | // "additional_options": Addtional options following astyle options file style 328 | // (http://astyle.sourceforge.net/astyle.html). 329 | // e.g.: "additional_options": ["--indent=spaces=2", "--convert-tabs"] 330 | // 331 | // "additional_options_file": Addtional options file for astyle (aka astylerc), you must specify 332 | // a full path for that file, environment variable may be included. 333 | // e.g.: "additional_options_file": "%USERPROFILE%/astylerc" // (Windows) 334 | // e.g.: "additional_options_file": "$HOME/.astylerc" // (Linux) 335 | // === Additional variables that you may use === 336 | // $file_path The directory of the current file, e.g., C:\Files. 337 | // $file The full path to the current file, e.g., C:\Files\Chapter1.txt. 338 | // $file_name The name portion of the current file, e.g., Chapter1.txt. 339 | // $file_extension The extension portion of the current file, e.g., txt. 340 | // $file_base_name The name-only portion of the current file, e.g., Document. 341 | // $packages The full path to the Packages folder. 342 | // The following requires "Sublime Text 3" 343 | // $project The full path to the current project file. 344 | // $project_path The directory of the current project file. 345 | // $project_name The name portion of the current project file. 346 | // $project_extension The extension portion of the current project file. 347 | // $project_base_name The name-only portion of the current project file. 348 | // 349 | // "use_only_additional_options": While true, SublimeAStyleFormatter will *only* process 350 | // options in *both* "additional_options" and "additional_options_file". 351 | 352 | 353 | // Language-specific options for C 354 | "options_c": { 355 | "use_only_additional_options": false, 356 | "additional_options_file": "", 357 | "additional_options": [] 358 | }, 359 | 360 | // Language-specific for C++ 361 | "options_c++": { 362 | "use_only_additional_options": false, 363 | "additional_options_file": "", 364 | "additional_options": [] 365 | }, 366 | 367 | // Language-specific for Java 368 | "options_java": { 369 | "style": "java", 370 | "use_only_additional_options": false, 371 | "additional_options_file": "", 372 | "additional_options": [] 373 | }, 374 | 375 | // Language-specific for C# 376 | "options_cs": { 377 | "use_only_additional_options": false, 378 | "additional_options_file": "", 379 | "additional_options": [] 380 | } 381 | } 382 | -------------------------------------------------------------------------------- /main/Kconfig.projbuild: -------------------------------------------------------------------------------- 1 | menu "MQTT Application sample" 2 | 3 | config WIFI_SSID 4 | string "WiFi SSID" 5 | default "myssid" 6 | help 7 | SSID (network name) for the example to connect to. 8 | 9 | config WIFI_PASSWORD 10 | string "WiFi Password" 11 | default "mypassword" 12 | help 13 | WiFi password (WPA or WPA2) for the example to use. 14 | 15 | endmenu 16 | -------------------------------------------------------------------------------- /main/app_main.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include "esp_wifi.h" 6 | #include "esp_system.h" 7 | #include "nvs_flash.h" 8 | #include "esp_event_loop.h" 9 | 10 | #include "freertos/FreeRTOS.h" 11 | #include "freertos/task.h" 12 | #include "freertos/semphr.h" 13 | #include "freertos/queue.h" 14 | #include "freertos/event_groups.h" 15 | 16 | #include "lwip/sockets.h" 17 | #include "lwip/dns.h" 18 | #include "lwip/netdb.h" 19 | 20 | #include "esp_log.h" 21 | #include "mqtt_client.h" 22 | 23 | static const char *TAG = "MQTT_SAMPLE"; 24 | 25 | static EventGroupHandle_t wifi_event_group; 26 | const static int CONNECTED_BIT = BIT0; 27 | 28 | 29 | static esp_err_t mqtt_event_handler(esp_mqtt_event_handle_t event) 30 | { 31 | esp_mqtt_client_handle_t client = event->client; 32 | int msg_id; 33 | // your_context_t *context = event->context; 34 | switch (event->event_id) { 35 | case MQTT_EVENT_CONNECTED: 36 | ESP_LOGI(TAG, "MQTT_EVENT_CONNECTED"); 37 | msg_id = esp_mqtt_client_subscribe(client, "/topic/qos0", 0); 38 | ESP_LOGI(TAG, "sent subscribe successful, msg_id=%d", msg_id); 39 | 40 | msg_id = esp_mqtt_client_subscribe(client, "/topic/qos1", 1); 41 | ESP_LOGI(TAG, "sent subscribe successful, msg_id=%d", msg_id); 42 | 43 | msg_id = esp_mqtt_client_unsubscribe(client, "/topic/qos1"); 44 | ESP_LOGI(TAG, "sent unsubscribe successful, msg_id=%d", msg_id); 45 | break; 46 | case MQTT_EVENT_DISCONNECTED: 47 | ESP_LOGI(TAG, "MQTT_EVENT_DISCONNECTED"); 48 | break; 49 | 50 | case MQTT_EVENT_SUBSCRIBED: 51 | ESP_LOGI(TAG, "MQTT_EVENT_SUBSCRIBED, msg_id=%d", event->msg_id); 52 | msg_id = esp_mqtt_client_publish(client, "/topic/qos0", "data", 0, 0, 0); 53 | ESP_LOGI(TAG, "sent publish successful, msg_id=%d", msg_id); 54 | break; 55 | case MQTT_EVENT_UNSUBSCRIBED: 56 | ESP_LOGI(TAG, "MQTT_EVENT_UNSUBSCRIBED, msg_id=%d", event->msg_id); 57 | break; 58 | case MQTT_EVENT_PUBLISHED: 59 | ESP_LOGI(TAG, "MQTT_EVENT_PUBLISHED, msg_id=%d", event->msg_id); 60 | break; 61 | case MQTT_EVENT_DATA: 62 | ESP_LOGI(TAG, "MQTT_EVENT_DATA"); 63 | printf("TOPIC=%.*s\r\n", event->topic_len, event->topic); 64 | printf("DATA=%.*s\r\n", event->data_len, event->data); 65 | break; 66 | case MQTT_EVENT_ERROR: 67 | ESP_LOGI(TAG, "MQTT_EVENT_ERROR"); 68 | break; 69 | } 70 | return ESP_OK; 71 | } 72 | 73 | static esp_err_t wifi_event_handler(void *ctx, system_event_t *event) 74 | { 75 | switch (event->event_id) { 76 | case SYSTEM_EVENT_STA_START: 77 | esp_wifi_connect(); 78 | break; 79 | case SYSTEM_EVENT_STA_GOT_IP: 80 | xEventGroupSetBits(wifi_event_group, CONNECTED_BIT); 81 | 82 | break; 83 | case SYSTEM_EVENT_STA_DISCONNECTED: 84 | esp_wifi_connect(); 85 | xEventGroupClearBits(wifi_event_group, CONNECTED_BIT); 86 | break; 87 | default: 88 | break; 89 | } 90 | return ESP_OK; 91 | } 92 | 93 | static void wifi_init(void) 94 | { 95 | tcpip_adapter_init(); 96 | wifi_event_group = xEventGroupCreate(); 97 | ESP_ERROR_CHECK(esp_event_loop_init(wifi_event_handler, NULL)); 98 | wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT(); 99 | ESP_ERROR_CHECK(esp_wifi_init(&cfg)); 100 | ESP_ERROR_CHECK(esp_wifi_set_storage(WIFI_STORAGE_RAM)); 101 | wifi_config_t wifi_config = { 102 | .sta = { 103 | .ssid = CONFIG_WIFI_SSID, 104 | .password = CONFIG_WIFI_PASSWORD, 105 | }, 106 | }; 107 | ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA)); 108 | ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_config)); 109 | ESP_LOGI(TAG, "start the WIFI SSID:[%s] password:[%s]", CONFIG_WIFI_SSID, "******"); 110 | ESP_ERROR_CHECK(esp_wifi_start()); 111 | ESP_LOGI(TAG, "Waiting for wifi"); 112 | xEventGroupWaitBits(wifi_event_group, CONNECTED_BIT, false, true, portMAX_DELAY); 113 | } 114 | 115 | static void mqtt_app_start(void) 116 | { 117 | const esp_mqtt_client_config_t mqtt_cfg = { 118 | .uri = "mqtt://iot.eclipse.org", 119 | .event_handle = mqtt_event_handler, 120 | // .user_context = (void *)your_context 121 | }; 122 | 123 | esp_mqtt_client_handle_t client = esp_mqtt_client_init(&mqtt_cfg); 124 | esp_mqtt_client_start(client); 125 | } 126 | 127 | void app_main() 128 | { 129 | ESP_LOGI(TAG, "[APP] Startup.."); 130 | ESP_LOGI(TAG, "[APP] Free memory: %d bytes", esp_get_free_heap_size()); 131 | ESP_LOGI(TAG, "[APP] IDF version: %s", esp_get_idf_version()); 132 | 133 | esp_log_level_set("*", ESP_LOG_INFO); 134 | esp_log_level_set("MQTT_CLIENT", ESP_LOG_VERBOSE); 135 | esp_log_level_set("TRANSPORT_TCP", ESP_LOG_VERBOSE); 136 | esp_log_level_set("TRANSPORT_SSL", ESP_LOG_VERBOSE); 137 | esp_log_level_set("TRANSPORT", ESP_LOG_VERBOSE); 138 | esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE); 139 | 140 | nvs_flash_init(); 141 | wifi_init(); 142 | mqtt_app_start(); 143 | } 144 | -------------------------------------------------------------------------------- /main/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Main Makefile. This is basically the same as a component makefile. 3 | # 4 | # This Makefile should, at the very least, just include $(SDK_PATH)/make/component.mk. By default, 5 | # this will take the sources in the src/ directory, compile them and link them into 6 | # lib(subdirectory_name).a in the build directory. This behaviour is entirely configurable, 7 | # please read the SDK documents if you need to do this. 8 | # 9 | THISDIR:=$(dir $(abspath $(lastword $(MAKEFILE_LIST)))) 10 | DATETIME := $(shell date "+%Y-%b-%d_%H:%M:%S_%Z") 11 | 12 | COMPONENT_ADD_INCLUDEDIRS := include 13 | CFLAGS += -DBUID_TIME=\"$(DATETIME)\" -Wno-error=format= 14 | 15 | ifneq ("$(wildcard $(THISDIR)/include/user_config.local.h)","") 16 | CFLAGS += -DLOCAL_CONFIG_AVAILABLE 17 | endif 18 | 19 | include $(IDF_PATH)/make/component_common.mk 20 | #include $(IDF_PATH)/make/component.mk 21 | -------------------------------------------------------------------------------- /sdkconfig: -------------------------------------------------------------------------------- 1 | # 2 | # Automatically generated file; DO NOT EDIT. 3 | # Espressif IoT Development Framework Configuration 4 | # 5 | 6 | # 7 | # SDK tool configuration 8 | # 9 | CONFIG_TOOLPREFIX="xtensa-esp32-elf-" 10 | CONFIG_PYTHON="python" 11 | CONFIG_MAKE_WARN_UNDEFINED_VARIABLES=y 12 | 13 | # 14 | # Bootloader config 15 | # 16 | CONFIG_LOG_BOOTLOADER_LEVEL_NONE= 17 | CONFIG_LOG_BOOTLOADER_LEVEL_ERROR= 18 | CONFIG_LOG_BOOTLOADER_LEVEL_WARN= 19 | CONFIG_LOG_BOOTLOADER_LEVEL_INFO=y 20 | CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG= 21 | CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE= 22 | CONFIG_LOG_BOOTLOADER_LEVEL=3 23 | CONFIG_BOOTLOADER_VDDSDIO_BOOST=y 24 | 25 | # 26 | # Security features 27 | # 28 | CONFIG_SECURE_BOOT_ENABLED= 29 | CONFIG_FLASH_ENCRYPTION_ENABLED= 30 | 31 | # 32 | # Serial flasher config 33 | # 34 | CONFIG_ESPTOOLPY_PORT="/dev/tty.SLAB_USBtoUART" 35 | CONFIG_ESPTOOLPY_BAUD_115200B= 36 | CONFIG_ESPTOOLPY_BAUD_230400B= 37 | CONFIG_ESPTOOLPY_BAUD_921600B=y 38 | CONFIG_ESPTOOLPY_BAUD_2MB= 39 | CONFIG_ESPTOOLPY_BAUD_OTHER= 40 | CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200 41 | CONFIG_ESPTOOLPY_BAUD=921600 42 | CONFIG_ESPTOOLPY_COMPRESSED=y 43 | CONFIG_FLASHMODE_QIO= 44 | CONFIG_FLASHMODE_QOUT= 45 | CONFIG_FLASHMODE_DIO=y 46 | CONFIG_FLASHMODE_DOUT= 47 | CONFIG_ESPTOOLPY_FLASHMODE="dio" 48 | CONFIG_ESPTOOLPY_FLASHFREQ_80M= 49 | CONFIG_ESPTOOLPY_FLASHFREQ_40M=y 50 | CONFIG_ESPTOOLPY_FLASHFREQ_26M= 51 | CONFIG_ESPTOOLPY_FLASHFREQ_20M= 52 | CONFIG_ESPTOOLPY_FLASHFREQ="40m" 53 | CONFIG_ESPTOOLPY_FLASHSIZE_1MB= 54 | CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y 55 | CONFIG_ESPTOOLPY_FLASHSIZE_4MB= 56 | CONFIG_ESPTOOLPY_FLASHSIZE_8MB= 57 | CONFIG_ESPTOOLPY_FLASHSIZE_16MB= 58 | CONFIG_ESPTOOLPY_FLASHSIZE="2MB" 59 | CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y 60 | CONFIG_ESPTOOLPY_BEFORE_RESET=y 61 | CONFIG_ESPTOOLPY_BEFORE_NORESET= 62 | CONFIG_ESPTOOLPY_BEFORE="default_reset" 63 | CONFIG_ESPTOOLPY_AFTER_RESET=y 64 | CONFIG_ESPTOOLPY_AFTER_NORESET= 65 | CONFIG_ESPTOOLPY_AFTER="hard_reset" 66 | CONFIG_MONITOR_BAUD_9600B= 67 | CONFIG_MONITOR_BAUD_57600B= 68 | CONFIG_MONITOR_BAUD_115200B=y 69 | CONFIG_MONITOR_BAUD_230400B= 70 | CONFIG_MONITOR_BAUD_921600B= 71 | CONFIG_MONITOR_BAUD_2MB= 72 | CONFIG_MONITOR_BAUD_OTHER= 73 | CONFIG_MONITOR_BAUD_OTHER_VAL=115200 74 | CONFIG_MONITOR_BAUD=115200 75 | 76 | # 77 | # MQTT Application sample 78 | # 79 | CONFIG_WIFI_SSID="myssid" 80 | CONFIG_WIFI_PASSWORD="mypassword" 81 | 82 | # 83 | # Partition Table 84 | # 85 | CONFIG_PARTITION_TABLE_SINGLE_APP=y 86 | CONFIG_PARTITION_TABLE_TWO_OTA= 87 | CONFIG_PARTITION_TABLE_CUSTOM= 88 | CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" 89 | CONFIG_PARTITION_TABLE_CUSTOM_APP_BIN_OFFSET=0x10000 90 | CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv" 91 | CONFIG_APP_OFFSET=0x10000 92 | 93 | # 94 | # Compiler options 95 | # 96 | CONFIG_OPTIMIZATION_LEVEL_DEBUG=y 97 | CONFIG_OPTIMIZATION_LEVEL_RELEASE= 98 | CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y 99 | CONFIG_OPTIMIZATION_ASSERTIONS_SILENT= 100 | CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED= 101 | CONFIG_CXX_EXCEPTIONS= 102 | CONFIG_STACK_CHECK_NONE=y 103 | CONFIG_STACK_CHECK_NORM= 104 | CONFIG_STACK_CHECK_STRONG= 105 | CONFIG_STACK_CHECK_ALL= 106 | CONFIG_STACK_CHECK= 107 | 108 | # 109 | # Component config 110 | # 111 | 112 | # 113 | # Application Level Tracing 114 | # 115 | CONFIG_ESP32_APPTRACE_DEST_TRAX= 116 | CONFIG_ESP32_APPTRACE_DEST_NONE=y 117 | CONFIG_ESP32_APPTRACE_ENABLE= 118 | CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y 119 | 120 | # 121 | # FreeRTOS SystemView Tracing 122 | # 123 | CONFIG_AWS_IOT_SDK= 124 | 125 | # 126 | # Bluetooth 127 | # 128 | CONFIG_BT_ENABLED= 129 | CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE=0 130 | CONFIG_BT_RESERVE_DRAM=0 131 | 132 | # 133 | # ESP32-specific 134 | # 135 | CONFIG_ESP32_DEFAULT_CPU_FREQ_80= 136 | CONFIG_ESP32_DEFAULT_CPU_FREQ_160=y 137 | CONFIG_ESP32_DEFAULT_CPU_FREQ_240= 138 | CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=160 139 | CONFIG_MEMMAP_SMP=y 140 | CONFIG_SPIRAM_SUPPORT= 141 | CONFIG_MEMMAP_TRACEMEM= 142 | CONFIG_MEMMAP_TRACEMEM_TWOBANKS= 143 | CONFIG_ESP32_TRAX= 144 | CONFIG_TRACEMEM_RESERVE_DRAM=0x0 145 | CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH= 146 | CONFIG_ESP32_ENABLE_COREDUMP_TO_UART= 147 | CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y 148 | CONFIG_ESP32_ENABLE_COREDUMP= 149 | CONFIG_TWO_UNIVERSAL_MAC_ADDRESS= 150 | CONFIG_FOUR_UNIVERSAL_MAC_ADDRESS=y 151 | CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS=4 152 | CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32 153 | CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2048 154 | CONFIG_MAIN_TASK_STACK_SIZE=4096 155 | CONFIG_IPC_TASK_STACK_SIZE=1024 156 | CONFIG_TIMER_TASK_STACK_SIZE=3584 157 | CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y 158 | CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF= 159 | CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR= 160 | CONFIG_NEWLIB_STDIN_LINE_ENDING_CRLF= 161 | CONFIG_NEWLIB_STDIN_LINE_ENDING_LF= 162 | CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y 163 | CONFIG_NEWLIB_NANO_FORMAT= 164 | CONFIG_CONSOLE_UART_DEFAULT=y 165 | CONFIG_CONSOLE_UART_CUSTOM= 166 | CONFIG_CONSOLE_UART_NONE= 167 | CONFIG_CONSOLE_UART_NUM=0 168 | CONFIG_CONSOLE_UART_BAUDRATE=115200 169 | CONFIG_ULP_COPROC_ENABLED= 170 | CONFIG_ULP_COPROC_RESERVE_MEM=0 171 | CONFIG_ESP32_PANIC_PRINT_HALT= 172 | CONFIG_ESP32_PANIC_PRINT_REBOOT=y 173 | CONFIG_ESP32_PANIC_SILENT_REBOOT= 174 | CONFIG_ESP32_PANIC_GDBSTUB= 175 | CONFIG_ESP32_DEBUG_OCDAWARE=y 176 | CONFIG_INT_WDT=y 177 | CONFIG_INT_WDT_TIMEOUT_MS=300 178 | CONFIG_TASK_WDT=y 179 | CONFIG_TASK_WDT_PANIC= 180 | CONFIG_TASK_WDT_TIMEOUT_S=5 181 | CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU0=y 182 | CONFIG_BROWNOUT_DET=y 183 | CONFIG_BROWNOUT_DET_LVL_SEL_0=y 184 | CONFIG_BROWNOUT_DET_LVL_SEL_1= 185 | CONFIG_BROWNOUT_DET_LVL_SEL_2= 186 | CONFIG_BROWNOUT_DET_LVL_SEL_3= 187 | CONFIG_BROWNOUT_DET_LVL_SEL_4= 188 | CONFIG_BROWNOUT_DET_LVL_SEL_5= 189 | CONFIG_BROWNOUT_DET_LVL_SEL_6= 190 | CONFIG_BROWNOUT_DET_LVL_SEL_7= 191 | CONFIG_BROWNOUT_DET_LVL=0 192 | CONFIG_ESP32_TIME_SYSCALL_USE_RTC_FRC1=y 193 | CONFIG_ESP32_TIME_SYSCALL_USE_RTC= 194 | CONFIG_ESP32_TIME_SYSCALL_USE_FRC1= 195 | CONFIG_ESP32_TIME_SYSCALL_USE_NONE= 196 | CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC=y 197 | CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL= 198 | CONFIG_ESP32_RTC_CLK_CAL_CYCLES=1024 199 | CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY=2000 200 | CONFIG_ESP32_XTAL_FREQ_40= 201 | CONFIG_ESP32_XTAL_FREQ_26= 202 | CONFIG_ESP32_XTAL_FREQ_AUTO=y 203 | CONFIG_ESP32_XTAL_FREQ=0 204 | CONFIG_DISABLE_BASIC_ROM_CONSOLE= 205 | CONFIG_NO_BLOBS= 206 | CONFIG_ESP_TIMER_PROFILING= 207 | CONFIG_COMPATIBLE_PRE_V2_1_BOOTLOADERS= 208 | 209 | # 210 | # Wi-Fi 211 | # 212 | CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=10 213 | CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=32 214 | CONFIG_ESP32_WIFI_STATIC_TX_BUFFER= 215 | CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y 216 | CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1 217 | CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=32 218 | CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y 219 | CONFIG_ESP32_WIFI_TX_BA_WIN=6 220 | CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y 221 | CONFIG_ESP32_WIFI_RX_BA_WIN=6 222 | CONFIG_ESP32_WIFI_NVS_ENABLED=y 223 | 224 | # 225 | # PHY 226 | # 227 | CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y 228 | CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION= 229 | CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 230 | CONFIG_ESP32_PHY_MAX_TX_POWER=20 231 | 232 | # 233 | # Power Management 234 | # 235 | CONFIG_PM_ENABLE= 236 | 237 | # 238 | # Ethernet 239 | # 240 | CONFIG_DMA_RX_BUF_NUM=10 241 | CONFIG_DMA_TX_BUF_NUM=10 242 | CONFIG_EMAC_L2_TO_L3_RX_BUF_MODE= 243 | CONFIG_EMAC_TASK_PRIORITY=20 244 | 245 | # 246 | # FAT Filesystem support 247 | # 248 | CONFIG_FATFS_CODEPAGE_DYNAMIC= 249 | CONFIG_FATFS_CODEPAGE_437=y 250 | CONFIG_FATFS_CODEPAGE_720= 251 | CONFIG_FATFS_CODEPAGE_737= 252 | CONFIG_FATFS_CODEPAGE_771= 253 | CONFIG_FATFS_CODEPAGE_775= 254 | CONFIG_FATFS_CODEPAGE_850= 255 | CONFIG_FATFS_CODEPAGE_852= 256 | CONFIG_FATFS_CODEPAGE_855= 257 | CONFIG_FATFS_CODEPAGE_857= 258 | CONFIG_FATFS_CODEPAGE_860= 259 | CONFIG_FATFS_CODEPAGE_861= 260 | CONFIG_FATFS_CODEPAGE_862= 261 | CONFIG_FATFS_CODEPAGE_863= 262 | CONFIG_FATFS_CODEPAGE_864= 263 | CONFIG_FATFS_CODEPAGE_865= 264 | CONFIG_FATFS_CODEPAGE_866= 265 | CONFIG_FATFS_CODEPAGE_869= 266 | CONFIG_FATFS_CODEPAGE_932= 267 | CONFIG_FATFS_CODEPAGE_936= 268 | CONFIG_FATFS_CODEPAGE_949= 269 | CONFIG_FATFS_CODEPAGE_950= 270 | CONFIG_FATFS_CODEPAGE=437 271 | CONFIG_FATFS_LFN_NONE=y 272 | CONFIG_FATFS_LFN_HEAP= 273 | CONFIG_FATFS_LFN_STACK= 274 | CONFIG_FATFS_FS_LOCK=0 275 | CONFIG_FATFS_TIMEOUT_MS=10000 276 | CONFIG_FATFS_PER_FILE_CACHE=y 277 | 278 | # 279 | # FreeRTOS 280 | # 281 | CONFIG_FREERTOS_UNICORE=y 282 | CONFIG_FREERTOS_CORETIMER_0=y 283 | CONFIG_FREERTOS_CORETIMER_1= 284 | CONFIG_FREERTOS_HZ=1000 285 | CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y 286 | CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE= 287 | CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL=y 288 | CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY= 289 | CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK= 290 | CONFIG_FREERTOS_INTERRUPT_BACKTRACE=y 291 | CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 292 | CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y 293 | CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE= 294 | CONFIG_FREERTOS_ASSERT_DISABLE= 295 | CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1024 296 | CONFIG_FREERTOS_ISR_STACKSIZE=1536 297 | CONFIG_FREERTOS_LEGACY_HOOKS= 298 | CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16 299 | CONFIG_SUPPORT_STATIC_ALLOCATION= 300 | CONFIG_TIMER_TASK_PRIORITY=1 301 | CONFIG_TIMER_TASK_STACK_DEPTH=2048 302 | CONFIG_TIMER_QUEUE_LENGTH=10 303 | CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 304 | CONFIG_FREERTOS_USE_TRACE_FACILITY= 305 | CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS= 306 | CONFIG_FREERTOS_DEBUG_INTERNALS=y 307 | CONFIG_FREERTOS_PORTMUX_DEBUG= 308 | 309 | # 310 | # Heap memory debugging 311 | # 312 | CONFIG_HEAP_POISONING_DISABLED=y 313 | CONFIG_HEAP_POISONING_LIGHT= 314 | CONFIG_HEAP_POISONING_COMPREHENSIVE= 315 | CONFIG_HEAP_TRACING= 316 | 317 | # 318 | # libsodium 319 | # 320 | 321 | # 322 | # Log output 323 | # 324 | CONFIG_LOG_DEFAULT_LEVEL_NONE= 325 | CONFIG_LOG_DEFAULT_LEVEL_ERROR= 326 | CONFIG_LOG_DEFAULT_LEVEL_WARN= 327 | CONFIG_LOG_DEFAULT_LEVEL_INFO=y 328 | CONFIG_LOG_DEFAULT_LEVEL_DEBUG= 329 | CONFIG_LOG_DEFAULT_LEVEL_VERBOSE= 330 | CONFIG_LOG_DEFAULT_LEVEL=3 331 | CONFIG_LOG_COLORS=y 332 | 333 | # 334 | # LWIP 335 | # 336 | CONFIG_L2_TO_L3_COPY= 337 | CONFIG_LWIP_IRAM_OPTIMIZATION= 338 | CONFIG_LWIP_MAX_SOCKETS=4 339 | CONFIG_LWIP_SO_REUSE= 340 | CONFIG_LWIP_SO_RCVBUF= 341 | CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1 342 | CONFIG_LWIP_IP_FRAG= 343 | CONFIG_LWIP_IP_REASSEMBLY= 344 | CONFIG_LWIP_STATS= 345 | CONFIG_LWIP_ETHARP_TRUST_IP_MAC=y 346 | CONFIG_TCPIP_RECVMBOX_SIZE=32 347 | CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y 348 | 349 | # 350 | # DHCP server 351 | # 352 | CONFIG_LWIP_DHCPS_LEASE_UNIT=60 353 | CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8 354 | CONFIG_LWIP_AUTOIP= 355 | CONFIG_LWIP_NETIF_LOOPBACK=y 356 | CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 357 | 358 | # 359 | # TCP 360 | # 361 | CONFIG_LWIP_MAX_ACTIVE_TCP=16 362 | CONFIG_LWIP_MAX_LISTENING_TCP=16 363 | CONFIG_TCP_MAXRTX=12 364 | CONFIG_TCP_SYNMAXRTX=6 365 | CONFIG_TCP_MSS=1436 366 | CONFIG_TCP_MSL=60000 367 | CONFIG_TCP_SND_BUF_DEFAULT=5744 368 | CONFIG_TCP_WND_DEFAULT=5744 369 | CONFIG_TCP_RECVMBOX_SIZE=6 370 | CONFIG_TCP_QUEUE_OOSEQ=y 371 | CONFIG_TCP_OVERSIZE_MSS=y 372 | CONFIG_TCP_OVERSIZE_QUARTER_MSS= 373 | CONFIG_TCP_OVERSIZE_DISABLE= 374 | 375 | # 376 | # UDP 377 | # 378 | CONFIG_LWIP_MAX_UDP_PCBS=16 379 | CONFIG_UDP_RECVMBOX_SIZE=6 380 | CONFIG_TCPIP_TASK_STACK_SIZE=2560 381 | CONFIG_PPP_SUPPORT= 382 | 383 | # 384 | # ICMP 385 | # 386 | CONFIG_LWIP_MULTICAST_PING= 387 | CONFIG_LWIP_BROADCAST_PING= 388 | 389 | # 390 | # LWIP RAW API 391 | # 392 | CONFIG_LWIP_MAX_RAW_PCBS=16 393 | 394 | # 395 | # mbedTLS 396 | # 397 | CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=16384 398 | CONFIG_MBEDTLS_DEBUG= 399 | CONFIG_MBEDTLS_HARDWARE_AES=y 400 | CONFIG_MBEDTLS_HARDWARE_MPI=y 401 | CONFIG_MBEDTLS_MPI_USE_INTERRUPT=y 402 | CONFIG_MBEDTLS_HARDWARE_SHA=y 403 | CONFIG_MBEDTLS_HAVE_TIME=y 404 | CONFIG_MBEDTLS_HAVE_TIME_DATE= 405 | CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y 406 | CONFIG_MBEDTLS_TLS_SERVER_ONLY= 407 | CONFIG_MBEDTLS_TLS_CLIENT_ONLY= 408 | CONFIG_MBEDTLS_TLS_DISABLED= 409 | CONFIG_MBEDTLS_TLS_SERVER=y 410 | CONFIG_MBEDTLS_TLS_CLIENT=y 411 | CONFIG_MBEDTLS_TLS_ENABLED=y 412 | 413 | # 414 | # TLS Key Exchange Methods 415 | # 416 | CONFIG_MBEDTLS_PSK_MODES= 417 | CONFIG_MBEDTLS_KEY_EXCHANGE_RSA=y 418 | CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA=y 419 | CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE=y 420 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA=y 421 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA=y 422 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=y 423 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=y 424 | CONFIG_MBEDTLS_SSL_RENEGOTIATION=y 425 | CONFIG_MBEDTLS_SSL_PROTO_SSL3= 426 | CONFIG_MBEDTLS_SSL_PROTO_TLS1=y 427 | CONFIG_MBEDTLS_SSL_PROTO_TLS1_1=y 428 | CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y 429 | CONFIG_MBEDTLS_SSL_PROTO_DTLS= 430 | CONFIG_MBEDTLS_SSL_ALPN=y 431 | CONFIG_MBEDTLS_SSL_SESSION_TICKETS=y 432 | 433 | # 434 | # Symmetric Ciphers 435 | # 436 | CONFIG_MBEDTLS_AES_C=y 437 | CONFIG_MBEDTLS_CAMELLIA_C= 438 | CONFIG_MBEDTLS_DES_C= 439 | CONFIG_MBEDTLS_RC4_DISABLED=y 440 | CONFIG_MBEDTLS_RC4_ENABLED_NO_DEFAULT= 441 | CONFIG_MBEDTLS_RC4_ENABLED= 442 | CONFIG_MBEDTLS_BLOWFISH_C= 443 | CONFIG_MBEDTLS_XTEA_C= 444 | CONFIG_MBEDTLS_CCM_C=y 445 | CONFIG_MBEDTLS_GCM_C=y 446 | CONFIG_MBEDTLS_RIPEMD160_C= 447 | 448 | # 449 | # Certificates 450 | # 451 | CONFIG_MBEDTLS_PEM_PARSE_C=y 452 | CONFIG_MBEDTLS_PEM_WRITE_C=y 453 | CONFIG_MBEDTLS_X509_CRL_PARSE_C=y 454 | CONFIG_MBEDTLS_X509_CSR_PARSE_C=y 455 | CONFIG_MBEDTLS_ECP_C=y 456 | CONFIG_MBEDTLS_ECDH_C=y 457 | CONFIG_MBEDTLS_ECDSA_C=y 458 | CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED=y 459 | CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED=y 460 | CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y 461 | CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED=y 462 | CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED=y 463 | CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED=y 464 | CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED=y 465 | CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED=y 466 | CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED=y 467 | CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED=y 468 | CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=y 469 | CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y 470 | CONFIG_MBEDTLS_ECP_NIST_OPTIM=y 471 | 472 | # 473 | # OpenSSL 474 | # 475 | CONFIG_OPENSSL_DEBUG= 476 | CONFIG_OPENSSL_ASSERT_DO_NOTHING=y 477 | CONFIG_OPENSSL_ASSERT_EXIT= 478 | 479 | # 480 | # PThreads 481 | # 482 | CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5 483 | CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 484 | 485 | # 486 | # SPI Flash driver 487 | # 488 | CONFIG_SPI_FLASH_VERIFY_WRITE= 489 | CONFIG_SPI_FLASH_ENABLE_COUNTERS= 490 | CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y 491 | CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y 492 | CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS= 493 | CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED= 494 | 495 | # 496 | # SPIFFS Configuration 497 | # 498 | CONFIG_SPIFFS_MAX_PARTITIONS=3 499 | 500 | # 501 | # SPIFFS Cache Configuration 502 | # 503 | CONFIG_SPIFFS_CACHE=y 504 | CONFIG_SPIFFS_CACHE_WR=y 505 | CONFIG_SPIFFS_CACHE_STATS= 506 | CONFIG_SPIFFS_PAGE_CHECK=y 507 | CONFIG_SPIFFS_GC_MAX_RUNS=10 508 | CONFIG_SPIFFS_GC_STATS= 509 | CONFIG_SPIFFS_PAGE_SIZE=256 510 | CONFIG_SPIFFS_OBJ_NAME_LEN=32 511 | CONFIG_SPIFFS_USE_MAGIC=y 512 | CONFIG_SPIFFS_USE_MAGIC_LENGTH=y 513 | CONFIG_SPIFFS_META_LENGTH=4 514 | CONFIG_SPIFFS_USE_MTIME=y 515 | 516 | # 517 | # Debug Configuration 518 | # 519 | CONFIG_SPIFFS_DBG= 520 | CONFIG_SPIFFS_API_DBG= 521 | CONFIG_SPIFFS_GC_DBG= 522 | CONFIG_SPIFFS_CACHE_DBG= 523 | CONFIG_SPIFFS_CHECK_DBG= 524 | CONFIG_SPIFFS_TEST_VISUALISATION= 525 | 526 | # 527 | # tcpip adapter 528 | # 529 | CONFIG_IP_LOST_TIMER_INTERVAL=120 530 | 531 | # 532 | # Wear Levelling 533 | # 534 | CONFIG_WL_SECTOR_SIZE_512= 535 | CONFIG_WL_SECTOR_SIZE_4096=y 536 | CONFIG_WL_SECTOR_SIZE=4096 537 | --------------------------------------------------------------------------------