├── .gitignore ├── .vscode └── settings.json ├── LICENSE ├── Makefile ├── README.md ├── main ├── component.mk └── main.c └── sdkconfig /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | sdkconfig.old 3 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "terminal.integrated.env.linux": { 3 | "PATH": "/home/todoroki/.platformio/penv/bin:/home/todoroki/.cargo/bin:/home/todoroki/.asdf/bin:/home/todoroki/.asdf/shims:/home/todoroki/esp/xtensa-esp32-elf/bin/:/home/todoroki/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/bin:/sbin" 4 | }, 5 | "C_Cpp.intelliSenseEngine": "Tag Parser", 6 | "files.associations": { 7 | "sstream": "cpp", 8 | "array": "cpp", 9 | "string_view": "cpp", 10 | "initializer_list": "cpp", 11 | "udp.h": "c", 12 | "string.h": "c", 13 | "gpio.h": "c", 14 | "sockets.h": "c", 15 | "freertos.h": "c" 16 | } 17 | } -------------------------------------------------------------------------------- /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 [yyyy] [name of copyright owner] 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 | 6 | PROJECT_NAME := app-template 7 | 8 | # CFLAGS += -D ESP_AP_CONNECT 9 | 10 | include $(IDF_PATH)/make/project.mk 11 | 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MOVED 2 | This repository is not maintained. The development continues in my personal repository. 3 | 4 | https://github.com/ndac-todoroki/esp32_aes67_sender 5 | 6 | 7 | # ESP32 AES67 audio over IP (over WiFi) trial prototype application 8 | 9 | This is a experimental application which aims to send audio packets via WiFi, while following the AES67 audio-over-IP requirements. 10 | 11 | You need a working ESP32 (two of them), and [ESP-IDF](https://github.com/espressif/esp-idf) installed to your host computer. 12 | 13 | ## Results for now 14 | 15 | AES67 L16 48kHz requires to send RTP packets every 250 _micro_ seconds in a particular format, but I acheived only about 2000 microseconds (= 2ms) for now. 16 | Sending _vanilla_ packets takes only 100 microseconds, so somewhere around the AES67 payload encoding must be taking time. 17 | 18 | ## Links 19 | - The old one (which acheived only over 5ms) 20 | https://github.com/sfc-arch/esp32_aes67_sender_old 21 | - The receiver (this becomes a AP itself too) 22 | https://github.com/sfc-arch/esp32_aes67_receiver 23 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /main/main.c: -------------------------------------------------------------------------------- 1 | #ifdef ESP_AP_CONNECT 2 | #define WIFI_SSID "ESP32_wifi" 3 | #define WIFI_PASSWORD "esp32pass" 4 | #define OPPONENT_UDP_PORT 5004 5 | #define SET_IPADDR4(ipAddr) \ 6 | IP_ADDR4((ipAddr), 192, 168, 4, 255); 7 | #else 8 | #define WIFI_SSID "WX03_Todoroki" 9 | #define WIFI_PASSWORD "TodorokiWX03" 10 | #define OPPONENT_UDP_PORT 50505 11 | #define SET_IPADDR4(ipAddr) \ 12 | IP_ADDR4((ipAddr), 192, 168, 179, 6); 13 | #endif 14 | 15 | #include "freertos/FreeRTOS.h" 16 | #include "esp_wifi.h" 17 | #include "esp_system.h" 18 | #include "esp_event.h" 19 | #include "esp_event_loop.h" 20 | #include "esp_log.h" 21 | #include "nvs_flash.h" 22 | #include "driver/gpio.h" 23 | 24 | #include "stdio.h" 25 | #include 26 | #include 27 | #include // Boolean 28 | 29 | #include "lwip/err.h" 30 | #include "lwip/sockets.h" 31 | #include "lwip/sys.h" 32 | #include "lwip/netdb.h" 33 | #include "lwip/dns.h" 34 | #include "lwip/udp.h" 35 | #include "lwip/ip_addr.h" 36 | 37 | #define UDP_PAYLOAD_SIZE 50 38 | 39 | /* --- PRINTF_BYTE_TO_BINARY macro's --- */ 40 | #define PRINTF_BINARY_SEPARATOR 41 | #define PRINTF_BINARY_PATTERN_INT8 "%c%c%c%c%c%c%c%c" 42 | #define PRINTF_BYTE_TO_BINARY_INT8(i) \ 43 | (((i)&0x80ll) ? '1' : '0'), \ 44 | (((i)&0x40ll) ? '1' : '0'), \ 45 | (((i)&0x20ll) ? '1' : '0'), \ 46 | (((i)&0x10ll) ? '1' : '0'), \ 47 | (((i)&0x08ll) ? '1' : '0'), \ 48 | (((i)&0x04ll) ? '1' : '0'), \ 49 | (((i)&0x02ll) ? '1' : '0'), \ 50 | (((i)&0x01ll) ? '1' : '0') 51 | 52 | #define PRINTF_BINARY_PATTERN_INT16 \ 53 | PRINTF_BINARY_PATTERN_INT8 PRINTF_BINARY_SEPARATOR PRINTF_BINARY_PATTERN_INT8 54 | #define PRINTF_BYTE_TO_BINARY_INT16(i) \ 55 | PRINTF_BYTE_TO_BINARY_INT8((i) >> 8), PRINTF_BYTE_TO_BINARY_INT8(i) 56 | #define PRINTF_BINARY_PATTERN_INT32 \ 57 | PRINTF_BINARY_PATTERN_INT16 PRINTF_BINARY_SEPARATOR PRINTF_BINARY_PATTERN_INT16 58 | #define PRINTF_BYTE_TO_BINARY_INT32(i) \ 59 | PRINTF_BYTE_TO_BINARY_INT16((i) >> 16), PRINTF_BYTE_TO_BINARY_INT16(i) 60 | #define PRINTF_BINARY_PATTERN_INT64 \ 61 | PRINTF_BINARY_PATTERN_INT32 PRINTF_BINARY_SEPARATOR PRINTF_BINARY_PATTERN_INT32 62 | #define PRINTF_BYTE_TO_BINARY_INT64(i) \ 63 | PRINTF_BYTE_TO_BINARY_INT32((i) >> 32), PRINTF_BYTE_TO_BINARY_INT32(i) 64 | /* --- end macros --- */ 65 | 66 | static const char *TAG = "MyModule"; 67 | 68 | esp_err_t event_handler(void *ctx, system_event_t *event) 69 | { 70 | return ESP_OK; 71 | } 72 | 73 | void esp32setup() 74 | { 75 | nvs_flash_init(); 76 | tcpip_adapter_init(); 77 | ESP_ERROR_CHECK(esp_event_loop_init(event_handler, NULL)); 78 | wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT(); 79 | ESP_ERROR_CHECK(esp_wifi_init(&cfg)); 80 | ESP_ERROR_CHECK(esp_wifi_set_storage(WIFI_STORAGE_RAM)); 81 | ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA)); 82 | } 83 | 84 | void esp32connectToWiFi() 85 | { 86 | esp_err_t wifiConnected = ESP_ERR_WIFI_NOT_INIT; 87 | 88 | wifi_config_t sta_config = { 89 | .sta = { 90 | .ssid = WIFI_SSID, 91 | .password = WIFI_PASSWORD, 92 | .bssid_set = false}}; 93 | ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_STA, &sta_config)); 94 | ESP_ERROR_CHECK(esp_wifi_start()); 95 | ESP_ERROR_CHECK(esp_wifi_connect()); 96 | 97 | ESP_LOGI(TAG, "Connecting to wifi: %s", WIFI_SSID); 98 | 99 | // wait until wifi connects 100 | while( wifiConnected != ESP_OK ) { 101 | ESP_LOGI(TAG, "wifi connect is %d", wifiConnected); 102 | wifiConnected = esp_wifi_connect(); 103 | vTaskDelay(1000 / portTICK_PERIOD_MS); 104 | }; 105 | 106 | ESP_LOGI(TAG, "wifi connect is %d", wifiConnected); 107 | ESP_LOGI(TAG, "-> Connected to: %s", WIFI_SSID); 108 | 109 | vTaskDelay(3000 / portTICK_PERIOD_MS); // 終わるまで待つ 110 | } 111 | 112 | unsigned int microsFromStart() 113 | { 114 | return (unsigned int) esp_timer_get_time(); 115 | } 116 | 117 | typedef struct _octet 118 | { 119 | union { 120 | char val; 121 | struct 122 | { 123 | unsigned h : 1; 124 | unsigned g : 1; 125 | unsigned f : 1; 126 | unsigned e : 1; 127 | unsigned d : 1; 128 | unsigned c : 1; 129 | unsigned b : 1; 130 | unsigned a : 1; 131 | }; 132 | }; 133 | } octet; 134 | 135 | octet create_octet(bool *bits) // assure length is 8.. 136 | { 137 | octet o; 138 | o.a = bits[0]; 139 | o.b = bits[1]; 140 | o.c = bits[2]; 141 | o.d = bits[3]; 142 | o.e = bits[4]; 143 | o.f = bits[5]; 144 | o.g = bits[6]; 145 | o.h = bits[7]; 146 | return o; 147 | } 148 | 149 | typedef struct _aes67 { 150 | const unsigned int bits; 151 | const unsigned int numberOfSamples; 152 | const char * packetTemplate; 153 | unsigned short sequenceNumber; 154 | unsigned int timestamp; 155 | unsigned int ssrcIdentifier; 156 | const unsigned int maxPayloadCount; 157 | const unsigned int totalBits; // maximum. 158 | unsigned short * payloadElements; 159 | char * payload; 160 | const char * payloadTemplate; 161 | unsigned int payloadOctetsCount; 162 | unsigned int currentPayloadCount; 163 | } AES67; 164 | 165 | AES67 * aes67_l16_48khz_from_scratch( 166 | unsigned short sequenceNumber, 167 | unsigned int timestamp, 168 | unsigned int ssrcIdentifier 169 | ) 170 | { 171 | const unsigned int sampleSize = 12; 172 | const unsigned int bits = 16; 173 | unsigned int totalBits = 32 * 3 + bits * sampleSize; // 288 bits of boolean 174 | 175 | AES67 *aes67 = malloc(sizeof(AES67)); 176 | AES67 _aes67 = { 177 | bits, 178 | sampleSize, 179 | "1000000000001011" PRINTF_BINARY_PATTERN_INT16 PRINTF_BINARY_PATTERN_INT32 PRINTF_BINARY_PATTERN_INT32 "%s", 180 | sequenceNumber, 181 | timestamp, 182 | ssrcIdentifier, 183 | sampleSize, 184 | totalBits, 185 | (unsigned short *)calloc(sampleSize, sizeof(unsigned short)), 186 | (char *)calloc(sampleSize * bits + 10, sizeof(char)), 187 | PRINTF_BINARY_PATTERN_INT16 PRINTF_BINARY_PATTERN_INT16 PRINTF_BINARY_PATTERN_INT16 PRINTF_BINARY_PATTERN_INT16 PRINTF_BINARY_PATTERN_INT16 PRINTF_BINARY_PATTERN_INT16 PRINTF_BINARY_PATTERN_INT16 PRINTF_BINARY_PATTERN_INT16 PRINTF_BINARY_PATTERN_INT16 PRINTF_BINARY_PATTERN_INT16 PRINTF_BINARY_PATTERN_INT16 PRINTF_BINARY_PATTERN_INT16, 188 | 0, 189 | 0 190 | }; 191 | memcpy(aes67, &_aes67, sizeof(AES67)); 192 | return aes67; 193 | } 194 | 195 | void aes67renewal(AES67 * aes67, unsigned short count, unsigned int timestamp) { 196 | aes67->sequenceNumber = count; 197 | aes67->timestamp = timestamp; 198 | free(aes67->payloadElements); 199 | free(aes67->payload); 200 | aes67->payloadElements = (unsigned short *)calloc(aes67->numberOfSamples, sizeof(unsigned short)); 201 | aes67->payload = (char *)calloc(aes67->numberOfSamples * aes67->bits + 10, sizeof(char)); 202 | aes67->payloadOctetsCount = 0; 203 | aes67->currentPayloadCount = 0; 204 | } 205 | 206 | void aes67createPayloadString(AES67 * aes67) { 207 | snprintf( 208 | aes67->payload, 209 | aes67->numberOfSamples * aes67->bits + 1, 210 | aes67->payloadTemplate, 211 | PRINTF_BYTE_TO_BINARY_INT16(aes67->payloadElements[0]), 212 | PRINTF_BYTE_TO_BINARY_INT16(aes67->payloadElements[1]), 213 | PRINTF_BYTE_TO_BINARY_INT16(aes67->payloadElements[2]), 214 | PRINTF_BYTE_TO_BINARY_INT16(aes67->payloadElements[3]), 215 | PRINTF_BYTE_TO_BINARY_INT16(aes67->payloadElements[4]), 216 | PRINTF_BYTE_TO_BINARY_INT16(aes67->payloadElements[5]), 217 | PRINTF_BYTE_TO_BINARY_INT16(aes67->payloadElements[6]), 218 | PRINTF_BYTE_TO_BINARY_INT16(aes67->payloadElements[7]), 219 | PRINTF_BYTE_TO_BINARY_INT16(aes67->payloadElements[8]), 220 | PRINTF_BYTE_TO_BINARY_INT16(aes67->payloadElements[9]), 221 | PRINTF_BYTE_TO_BINARY_INT16(aes67->payloadElements[10]), 222 | PRINTF_BYTE_TO_BINARY_INT16(aes67->payloadElements[11]) // 12 223 | ); 224 | aes67->currentPayloadCount = 12; 225 | } 226 | 227 | void aes67createSamplePayload(AES67 * aes67, unsigned int sample) { 228 | for (int i = 0; i < aes67->numberOfSamples; i++) { 229 | aes67->payloadElements[i] = sample; 230 | }; 231 | } 232 | 233 | // string must be bigger than totalBits + 1 234 | void writeAES67toString(char * str, AES67 * aes67) 235 | { 236 | aes67createPayloadString(aes67); 237 | snprintf( 238 | // overwrite given string 239 | str, 240 | aes67->totalBits + 1, 241 | // template 242 | aes67->packetTemplate, 243 | // values 244 | PRINTF_BYTE_TO_BINARY_INT16(aes67->sequenceNumber), 245 | PRINTF_BYTE_TO_BINARY_INT32(aes67->timestamp), 246 | PRINTF_BYTE_TO_BINARY_INT32(aes67->ssrcIdentifier), 247 | aes67->payload 248 | ); 249 | } 250 | 251 | void writeAES67toBinary(bool * binary, AES67 * aes67) 252 | { 253 | char str[aes67->totalBits + 1]; // last char is 0 254 | writeAES67toString(str, aes67); 255 | 256 | for (unsigned int i = 0; i < aes67->totalBits; i++) 257 | { 258 | binary[i] = str[i] - '0'; // assuming that all chars are '1' or '0' 259 | }; 260 | } 261 | 262 | char * aes67toHexArray(char * hex, AES67 * aes67) 263 | { 264 | bool binary[aes67->totalBits]; // don't need last 0 265 | writeAES67toBinary(binary, aes67); 266 | unsigned int numberOfOctets = aes67->totalBits / 8 + (aes67->totalBits % 8 != 0); // if not 8N, it ceils up the number 267 | // char * hex = (char *)calloc(numberOfOctets, sizeof(char)); // NOT need the last 0 268 | 269 | for (unsigned int i = 0; i < numberOfOctets; i++) 270 | { 271 | bool tmp_bins[] = { 272 | binary[i * 8 + 0], 273 | binary[i * 8 + 1], 274 | binary[i * 8 + 2], 275 | binary[i * 8 + 3], 276 | binary[i * 8 + 4], 277 | binary[i * 8 + 5], 278 | binary[i * 8 + 6], 279 | binary[i * 8 + 7] // need update; consider out of bounds 280 | }; 281 | hex[i] = create_octet(tmp_bins).val; // inserts a char 282 | } 283 | 284 | aes67->payloadOctetsCount = numberOfOctets; 285 | 286 | return hex; 287 | } 288 | 289 | void app_main(void) 290 | { 291 | esp32setup(); 292 | esp32connectToWiFi(); 293 | 294 | unsigned int count = 0; 295 | 296 | // UDP inits 297 | struct udp_pcb * udp; 298 | struct pbuf *p; 299 | ip_addr_t ipAddr; 300 | err_t err; 301 | SET_IPADDR4(&ipAddr); 302 | udp = udp_new(); 303 | err = udp_connect(udp, &ipAddr, OPPONENT_UDP_PORT); 304 | 305 | // payload string buffer 306 | char payload[UDP_PAYLOAD_SIZE]; 307 | memset(payload, 0, UDP_PAYLOAD_SIZE); 308 | 309 | AES67 * aes67 = aes67_l16_48khz_from_scratch(0, microsFromStart(), 52); 310 | 311 | unsigned int numberOfOctets = aes67->totalBits / 8 + (aes67->totalBits % 8 != 0); 312 | char *hex = (char *)calloc(numberOfOctets, sizeof(char)); 313 | 314 | aes67createSamplePayload(aes67, count); 315 | aes67toHexArray(hex, aes67); 316 | 317 | p = pbuf_alloc(PBUF_TRANSPORT, aes67->payloadOctetsCount, PBUF_RAM); 318 | memcpy(p->payload, hex, aes67->payloadOctetsCount); 319 | 320 | // Send packets 321 | while (true) 322 | { 323 | count++; 324 | 325 | // renew AES67 struct 326 | aes67renewal(aes67, count, microsFromStart()); 327 | aes67createSamplePayload(aes67, count); 328 | aes67toHexArray(hex, aes67); 329 | 330 | // copy new payload 331 | memcpy(p->payload, hex, aes67->payloadOctetsCount); 332 | 333 | result = udp_send(udp, p); 334 | 335 | if (result != 0) { 336 | ESP_LOGI(TAG, "%d - error code is %d", count, result); 337 | }; 338 | 339 | vTaskDelay(1); 340 | }; 341 | pbuf_free(p); 342 | 343 | while (true) { 344 | vTaskDelay(1000); 345 | }; 346 | } 347 | -------------------------------------------------------------------------------- /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=y 19 | CONFIG_LOG_BOOTLOADER_LEVEL_INFO= 20 | CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG= 21 | CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE= 22 | CONFIG_LOG_BOOTLOADER_LEVEL=2 23 | CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y 24 | CONFIG_BOOTLOADER_FACTORY_RESET= 25 | CONFIG_BOOTLOADER_APP_TEST= 26 | 27 | # 28 | # Security features 29 | # 30 | CONFIG_SECURE_BOOT_ENABLED= 31 | CONFIG_FLASH_ENCRYPTION_ENABLED= 32 | 33 | # 34 | # Serial flasher config 35 | # 36 | CONFIG_ESPTOOLPY_PORT="/dev/ttyUSB0" 37 | CONFIG_ESPTOOLPY_BAUD_115200B=y 38 | CONFIG_ESPTOOLPY_BAUD_230400B= 39 | CONFIG_ESPTOOLPY_BAUD_921600B= 40 | CONFIG_ESPTOOLPY_BAUD_2MB= 41 | CONFIG_ESPTOOLPY_BAUD_OTHER= 42 | CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200 43 | CONFIG_ESPTOOLPY_BAUD=115200 44 | CONFIG_ESPTOOLPY_COMPRESSED= 45 | CONFIG_FLASHMODE_QIO= 46 | CONFIG_FLASHMODE_QOUT= 47 | CONFIG_FLASHMODE_DIO=y 48 | CONFIG_FLASHMODE_DOUT= 49 | CONFIG_ESPTOOLPY_FLASHMODE="dio" 50 | CONFIG_ESPTOOLPY_FLASHFREQ_80M=y 51 | CONFIG_ESPTOOLPY_FLASHFREQ_40M= 52 | CONFIG_ESPTOOLPY_FLASHFREQ_26M= 53 | CONFIG_ESPTOOLPY_FLASHFREQ_20M= 54 | CONFIG_ESPTOOLPY_FLASHFREQ="80m" 55 | CONFIG_ESPTOOLPY_FLASHSIZE_1MB= 56 | CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y 57 | CONFIG_ESPTOOLPY_FLASHSIZE_4MB= 58 | CONFIG_ESPTOOLPY_FLASHSIZE_8MB= 59 | CONFIG_ESPTOOLPY_FLASHSIZE_16MB= 60 | CONFIG_ESPTOOLPY_FLASHSIZE="2MB" 61 | CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y 62 | CONFIG_ESPTOOLPY_BEFORE_RESET=y 63 | CONFIG_ESPTOOLPY_BEFORE_NORESET= 64 | CONFIG_ESPTOOLPY_BEFORE="default_reset" 65 | CONFIG_ESPTOOLPY_AFTER_RESET=y 66 | CONFIG_ESPTOOLPY_AFTER_NORESET= 67 | CONFIG_ESPTOOLPY_AFTER="hard_reset" 68 | CONFIG_MONITOR_BAUD_9600B= 69 | CONFIG_MONITOR_BAUD_57600B= 70 | CONFIG_MONITOR_BAUD_115200B=y 71 | CONFIG_MONITOR_BAUD_230400B= 72 | CONFIG_MONITOR_BAUD_921600B= 73 | CONFIG_MONITOR_BAUD_2MB= 74 | CONFIG_MONITOR_BAUD_OTHER= 75 | CONFIG_MONITOR_BAUD_OTHER_VAL=115200 76 | CONFIG_MONITOR_BAUD=115200 77 | 78 | # 79 | # Partition Table 80 | # 81 | CONFIG_PARTITION_TABLE_SINGLE_APP=y 82 | CONFIG_PARTITION_TABLE_TWO_OTA= 83 | CONFIG_PARTITION_TABLE_CUSTOM= 84 | CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" 85 | CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv" 86 | CONFIG_PARTITION_TABLE_OFFSET=0x8000 87 | CONFIG_PARTITION_TABLE_MD5=y 88 | 89 | # 90 | # Compiler options 91 | # 92 | CONFIG_OPTIMIZATION_LEVEL_DEBUG=y 93 | CONFIG_OPTIMIZATION_LEVEL_RELEASE= 94 | CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y 95 | CONFIG_OPTIMIZATION_ASSERTIONS_SILENT= 96 | CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED= 97 | CONFIG_CXX_EXCEPTIONS= 98 | CONFIG_STACK_CHECK_NONE=y 99 | CONFIG_STACK_CHECK_NORM= 100 | CONFIG_STACK_CHECK_STRONG= 101 | CONFIG_STACK_CHECK_ALL= 102 | CONFIG_STACK_CHECK= 103 | CONFIG_WARN_WRITE_STRINGS= 104 | 105 | # 106 | # Component config 107 | # 108 | 109 | # 110 | # Application Level Tracing 111 | # 112 | CONFIG_ESP32_APPTRACE_DEST_TRAX= 113 | CONFIG_ESP32_APPTRACE_DEST_NONE=y 114 | CONFIG_ESP32_APPTRACE_ENABLE= 115 | CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y 116 | CONFIG_AWS_IOT_SDK= 117 | 118 | # 119 | # Bluetooth 120 | # 121 | CONFIG_BT_ENABLED= 122 | CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE=0 123 | CONFIG_BT_RESERVE_DRAM=0 124 | 125 | # 126 | # Driver configurations 127 | # 128 | 129 | # 130 | # ADC configuration 131 | # 132 | CONFIG_ADC_FORCE_XPD_FSM= 133 | CONFIG_ADC2_DISABLE_DAC=y 134 | 135 | # 136 | # SPI master configuration 137 | # 138 | CONFIG_SPI_MASTER_IN_IRAM= 139 | CONFIG_SPI_MASTER_ISR_IN_IRAM=y 140 | 141 | # 142 | # ESP32-specific 143 | # 144 | CONFIG_ESP32_DEFAULT_CPU_FREQ_80= 145 | CONFIG_ESP32_DEFAULT_CPU_FREQ_160= 146 | CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y 147 | CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=240 148 | CONFIG_SPIRAM_SUPPORT= 149 | CONFIG_MEMMAP_TRACEMEM= 150 | CONFIG_MEMMAP_TRACEMEM_TWOBANKS= 151 | CONFIG_ESP32_TRAX= 152 | CONFIG_TRACEMEM_RESERVE_DRAM=0x0 153 | CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH= 154 | CONFIG_ESP32_ENABLE_COREDUMP_TO_UART= 155 | CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y 156 | CONFIG_ESP32_ENABLE_COREDUMP= 157 | CONFIG_TWO_UNIVERSAL_MAC_ADDRESS= 158 | CONFIG_FOUR_UNIVERSAL_MAC_ADDRESS=y 159 | CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS=4 160 | CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32 161 | CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=8192 162 | CONFIG_MAIN_TASK_STACK_SIZE=12288 163 | CONFIG_IPC_TASK_STACK_SIZE=1024 164 | CONFIG_TIMER_TASK_STACK_SIZE=3584 165 | CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y 166 | CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF= 167 | CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR= 168 | CONFIG_NEWLIB_STDIN_LINE_ENDING_CRLF= 169 | CONFIG_NEWLIB_STDIN_LINE_ENDING_LF= 170 | CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y 171 | CONFIG_NEWLIB_NANO_FORMAT= 172 | CONFIG_CONSOLE_UART_DEFAULT=y 173 | CONFIG_CONSOLE_UART_CUSTOM= 174 | CONFIG_CONSOLE_UART_NONE= 175 | CONFIG_CONSOLE_UART_NUM=0 176 | CONFIG_CONSOLE_UART_BAUDRATE=115200 177 | CONFIG_ULP_COPROC_ENABLED= 178 | CONFIG_ULP_COPROC_RESERVE_MEM=0 179 | CONFIG_ESP32_PANIC_PRINT_HALT=y 180 | CONFIG_ESP32_PANIC_PRINT_REBOOT= 181 | CONFIG_ESP32_PANIC_SILENT_REBOOT= 182 | CONFIG_ESP32_PANIC_GDBSTUB= 183 | CONFIG_ESP32_DEBUG_OCDAWARE=y 184 | CONFIG_ESP32_DEBUG_STUBS_ENABLE=y 185 | CONFIG_INT_WDT=y 186 | CONFIG_INT_WDT_TIMEOUT_MS=300 187 | CONFIG_TASK_WDT=y 188 | CONFIG_TASK_WDT_PANIC= 189 | CONFIG_TASK_WDT_TIMEOUT_S=5 190 | CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU0=y 191 | CONFIG_BROWNOUT_DET=y 192 | CONFIG_BROWNOUT_DET_LVL_SEL_0=y 193 | CONFIG_BROWNOUT_DET_LVL_SEL_1= 194 | CONFIG_BROWNOUT_DET_LVL_SEL_2= 195 | CONFIG_BROWNOUT_DET_LVL_SEL_3= 196 | CONFIG_BROWNOUT_DET_LVL_SEL_4= 197 | CONFIG_BROWNOUT_DET_LVL_SEL_5= 198 | CONFIG_BROWNOUT_DET_LVL_SEL_6= 199 | CONFIG_BROWNOUT_DET_LVL_SEL_7= 200 | CONFIG_BROWNOUT_DET_LVL=0 201 | CONFIG_ESP32_TIME_SYSCALL_USE_RTC_FRC1=y 202 | CONFIG_ESP32_TIME_SYSCALL_USE_RTC= 203 | CONFIG_ESP32_TIME_SYSCALL_USE_FRC1= 204 | CONFIG_ESP32_TIME_SYSCALL_USE_NONE= 205 | CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC=y 206 | CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL= 207 | CONFIG_ESP32_RTC_CLK_CAL_CYCLES=1024 208 | CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY=2000 209 | CONFIG_ESP32_XTAL_FREQ_40=y 210 | CONFIG_ESP32_XTAL_FREQ_26= 211 | CONFIG_ESP32_XTAL_FREQ_AUTO= 212 | CONFIG_ESP32_XTAL_FREQ=40 213 | CONFIG_DISABLE_BASIC_ROM_CONSOLE= 214 | CONFIG_NO_BLOBS= 215 | CONFIG_ESP_TIMER_PROFILING= 216 | CONFIG_COMPATIBLE_PRE_V2_1_BOOTLOADERS= 217 | CONFIG_ESP_ERR_TO_NAME_LOOKUP=y 218 | 219 | # 220 | # Wi-Fi 221 | # 222 | CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=10 223 | CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=32 224 | CONFIG_ESP32_WIFI_STATIC_TX_BUFFER= 225 | CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y 226 | CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1 227 | CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=32 228 | CONFIG_ESP32_WIFI_CSI_ENABLED= 229 | CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y 230 | CONFIG_ESP32_WIFI_TX_BA_WIN=6 231 | CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y 232 | CONFIG_ESP32_WIFI_RX_BA_WIN=6 233 | CONFIG_ESP32_WIFI_NVS_ENABLED=y 234 | 235 | # 236 | # PHY 237 | # 238 | CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y 239 | CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION= 240 | CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 241 | CONFIG_ESP32_PHY_MAX_TX_POWER=20 242 | 243 | # 244 | # Power Management 245 | # 246 | CONFIG_PM_ENABLE=y 247 | CONFIG_PM_DFS_INIT_AUTO= 248 | CONFIG_PM_USE_RTC_TIMER_REF= 249 | CONFIG_PM_PROFILING= 250 | CONFIG_PM_TRACE= 251 | 252 | # 253 | # ADC-Calibration 254 | # 255 | CONFIG_ADC_CAL_EFUSE_TP_ENABLE=y 256 | CONFIG_ADC_CAL_EFUSE_VREF_ENABLE=y 257 | CONFIG_ADC_CAL_LUT_ENABLE=y 258 | 259 | # 260 | # ESP HTTP client 261 | # 262 | CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=y 263 | 264 | # 265 | # Ethernet 266 | # 267 | CONFIG_DMA_RX_BUF_NUM=10 268 | CONFIG_DMA_TX_BUF_NUM=10 269 | CONFIG_EMAC_L2_TO_L3_RX_BUF_MODE= 270 | CONFIG_EMAC_TASK_PRIORITY=20 271 | 272 | # 273 | # FAT Filesystem support 274 | # 275 | CONFIG_FATFS_CODEPAGE_DYNAMIC= 276 | CONFIG_FATFS_CODEPAGE_437=y 277 | CONFIG_FATFS_CODEPAGE_720= 278 | CONFIG_FATFS_CODEPAGE_737= 279 | CONFIG_FATFS_CODEPAGE_771= 280 | CONFIG_FATFS_CODEPAGE_775= 281 | CONFIG_FATFS_CODEPAGE_850= 282 | CONFIG_FATFS_CODEPAGE_852= 283 | CONFIG_FATFS_CODEPAGE_855= 284 | CONFIG_FATFS_CODEPAGE_857= 285 | CONFIG_FATFS_CODEPAGE_860= 286 | CONFIG_FATFS_CODEPAGE_861= 287 | CONFIG_FATFS_CODEPAGE_862= 288 | CONFIG_FATFS_CODEPAGE_863= 289 | CONFIG_FATFS_CODEPAGE_864= 290 | CONFIG_FATFS_CODEPAGE_865= 291 | CONFIG_FATFS_CODEPAGE_866= 292 | CONFIG_FATFS_CODEPAGE_869= 293 | CONFIG_FATFS_CODEPAGE_932= 294 | CONFIG_FATFS_CODEPAGE_936= 295 | CONFIG_FATFS_CODEPAGE_949= 296 | CONFIG_FATFS_CODEPAGE_950= 297 | CONFIG_FATFS_CODEPAGE=437 298 | CONFIG_FATFS_LFN_NONE=y 299 | CONFIG_FATFS_LFN_HEAP= 300 | CONFIG_FATFS_LFN_STACK= 301 | CONFIG_FATFS_FS_LOCK=0 302 | CONFIG_FATFS_TIMEOUT_MS=10000 303 | CONFIG_FATFS_PER_FILE_CACHE=y 304 | 305 | # 306 | # FreeRTOS 307 | # 308 | CONFIG_FREERTOS_UNICORE=y 309 | CONFIG_FREERTOS_CORETIMER_0=y 310 | CONFIG_FREERTOS_CORETIMER_1= 311 | CONFIG_FREERTOS_HZ=1000 312 | CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y 313 | CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE= 314 | CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL=y 315 | CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY= 316 | CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK= 317 | CONFIG_FREERTOS_INTERRUPT_BACKTRACE=y 318 | CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=3 319 | CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y 320 | CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE= 321 | CONFIG_FREERTOS_ASSERT_DISABLE= 322 | CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1024 323 | CONFIG_FREERTOS_ISR_STACKSIZE=1536 324 | CONFIG_FREERTOS_LEGACY_HOOKS= 325 | CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16 326 | CONFIG_SUPPORT_STATIC_ALLOCATION= 327 | CONFIG_TIMER_TASK_PRIORITY=1 328 | CONFIG_TIMER_TASK_STACK_DEPTH=2048 329 | CONFIG_TIMER_QUEUE_LENGTH=10 330 | CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 331 | CONFIG_FREERTOS_USE_TRACE_FACILITY= 332 | CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS= 333 | CONFIG_FREERTOS_USE_TICKLESS_IDLE= 334 | CONFIG_FREERTOS_DEBUG_INTERNALS= 335 | 336 | # 337 | # Heap memory debugging 338 | # 339 | CONFIG_HEAP_POISONING_DISABLED= 340 | CONFIG_HEAP_POISONING_LIGHT= 341 | CONFIG_HEAP_POISONING_COMPREHENSIVE=y 342 | CONFIG_HEAP_TRACING=y 343 | CONFIG_HEAP_TRACING_STACK_DEPTH=2 344 | CONFIG_HEAP_TASK_TRACKING= 345 | 346 | # 347 | # libsodium 348 | # 349 | CONFIG_LIBSODIUM_USE_MBEDTLS_SHA=y 350 | 351 | # 352 | # Log output 353 | # 354 | CONFIG_LOG_DEFAULT_LEVEL_NONE= 355 | CONFIG_LOG_DEFAULT_LEVEL_ERROR= 356 | CONFIG_LOG_DEFAULT_LEVEL_WARN= 357 | CONFIG_LOG_DEFAULT_LEVEL_INFO=y 358 | CONFIG_LOG_DEFAULT_LEVEL_DEBUG= 359 | CONFIG_LOG_DEFAULT_LEVEL_VERBOSE= 360 | CONFIG_LOG_DEFAULT_LEVEL=3 361 | CONFIG_LOG_COLORS=y 362 | 363 | # 364 | # LWIP 365 | # 366 | CONFIG_L2_TO_L3_COPY= 367 | CONFIG_LWIP_IRAM_OPTIMIZATION= 368 | CONFIG_LWIP_MAX_SOCKETS=4 369 | CONFIG_USE_ONLY_LWIP_SELECT= 370 | CONFIG_LWIP_SO_REUSE= 371 | CONFIG_LWIP_SO_RCVBUF=y 372 | CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1 373 | CONFIG_LWIP_IP_FRAG= 374 | CONFIG_LWIP_IP_REASSEMBLY= 375 | CONFIG_LWIP_STATS= 376 | CONFIG_LWIP_ETHARP_TRUST_IP_MAC=y 377 | CONFIG_TCPIP_RECVMBOX_SIZE=32 378 | CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y 379 | 380 | # 381 | # DHCP server 382 | # 383 | CONFIG_LWIP_DHCPS_LEASE_UNIT=60 384 | CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8 385 | CONFIG_LWIP_AUTOIP= 386 | CONFIG_LWIP_NETIF_LOOPBACK=y 387 | CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 388 | 389 | # 390 | # TCP 391 | # 392 | CONFIG_LWIP_MAX_ACTIVE_TCP=16 393 | CONFIG_LWIP_MAX_LISTENING_TCP=16 394 | CONFIG_TCP_MAXRTX=12 395 | CONFIG_TCP_SYNMAXRTX=6 396 | CONFIG_TCP_MSS=1436 397 | CONFIG_TCP_MSL=60000 398 | CONFIG_TCP_SND_BUF_DEFAULT=5744 399 | CONFIG_TCP_WND_DEFAULT=5744 400 | CONFIG_TCP_RECVMBOX_SIZE=6 401 | CONFIG_TCP_QUEUE_OOSEQ=y 402 | CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES= 403 | CONFIG_TCP_OVERSIZE_MSS=y 404 | CONFIG_TCP_OVERSIZE_QUARTER_MSS= 405 | CONFIG_TCP_OVERSIZE_DISABLE= 406 | 407 | # 408 | # UDP 409 | # 410 | CONFIG_LWIP_MAX_UDP_PCBS=16 411 | CONFIG_UDP_RECVMBOX_SIZE=6 412 | CONFIG_TCPIP_TASK_STACK_SIZE=2048 413 | CONFIG_PPP_SUPPORT= 414 | 415 | # 416 | # ICMP 417 | # 418 | CONFIG_LWIP_MULTICAST_PING= 419 | CONFIG_LWIP_BROADCAST_PING= 420 | 421 | # 422 | # LWIP RAW API 423 | # 424 | CONFIG_LWIP_MAX_RAW_PCBS=16 425 | 426 | # 427 | # mbedTLS 428 | # 429 | CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=16384 430 | CONFIG_MBEDTLS_DEBUG= 431 | CONFIG_MBEDTLS_HARDWARE_AES=y 432 | CONFIG_MBEDTLS_HARDWARE_MPI=y 433 | CONFIG_MBEDTLS_MPI_USE_INTERRUPT=y 434 | CONFIG_MBEDTLS_HARDWARE_SHA= 435 | CONFIG_MBEDTLS_HAVE_TIME=y 436 | CONFIG_MBEDTLS_HAVE_TIME_DATE= 437 | CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y 438 | CONFIG_MBEDTLS_TLS_SERVER_ONLY= 439 | CONFIG_MBEDTLS_TLS_CLIENT_ONLY= 440 | CONFIG_MBEDTLS_TLS_DISABLED= 441 | CONFIG_MBEDTLS_TLS_SERVER=y 442 | CONFIG_MBEDTLS_TLS_CLIENT=y 443 | CONFIG_MBEDTLS_TLS_ENABLED=y 444 | 445 | # 446 | # TLS Key Exchange Methods 447 | # 448 | CONFIG_MBEDTLS_PSK_MODES= 449 | CONFIG_MBEDTLS_KEY_EXCHANGE_RSA=y 450 | CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA=y 451 | CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE=y 452 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA=y 453 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA=y 454 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=y 455 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=y 456 | CONFIG_MBEDTLS_SSL_RENEGOTIATION=y 457 | CONFIG_MBEDTLS_SSL_PROTO_SSL3= 458 | CONFIG_MBEDTLS_SSL_PROTO_TLS1=y 459 | CONFIG_MBEDTLS_SSL_PROTO_TLS1_1=y 460 | CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y 461 | CONFIG_MBEDTLS_SSL_PROTO_DTLS= 462 | CONFIG_MBEDTLS_SSL_ALPN=y 463 | CONFIG_MBEDTLS_SSL_SESSION_TICKETS=y 464 | 465 | # 466 | # Symmetric Ciphers 467 | # 468 | CONFIG_MBEDTLS_AES_C=y 469 | CONFIG_MBEDTLS_CAMELLIA_C= 470 | CONFIG_MBEDTLS_DES_C= 471 | CONFIG_MBEDTLS_RC4_DISABLED=y 472 | CONFIG_MBEDTLS_RC4_ENABLED_NO_DEFAULT= 473 | CONFIG_MBEDTLS_RC4_ENABLED= 474 | CONFIG_MBEDTLS_BLOWFISH_C= 475 | CONFIG_MBEDTLS_XTEA_C= 476 | CONFIG_MBEDTLS_CCM_C=y 477 | CONFIG_MBEDTLS_GCM_C=y 478 | CONFIG_MBEDTLS_RIPEMD160_C= 479 | 480 | # 481 | # Certificates 482 | # 483 | CONFIG_MBEDTLS_PEM_PARSE_C=y 484 | CONFIG_MBEDTLS_PEM_WRITE_C=y 485 | CONFIG_MBEDTLS_X509_CRL_PARSE_C=y 486 | CONFIG_MBEDTLS_X509_CSR_PARSE_C=y 487 | CONFIG_MBEDTLS_ECP_C=y 488 | CONFIG_MBEDTLS_ECDH_C=y 489 | CONFIG_MBEDTLS_ECDSA_C=y 490 | CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED=y 491 | CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED=y 492 | CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y 493 | CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED=y 494 | CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED=y 495 | CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED=y 496 | CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED=y 497 | CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED=y 498 | CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED=y 499 | CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED=y 500 | CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=y 501 | CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y 502 | CONFIG_MBEDTLS_ECP_NIST_OPTIM=y 503 | 504 | # 505 | # mDNS 506 | # 507 | CONFIG_MDNS_MAX_SERVICES=10 508 | 509 | # 510 | # OpenSSL 511 | # 512 | CONFIG_OPENSSL_DEBUG= 513 | CONFIG_OPENSSL_ASSERT_DO_NOTHING=y 514 | CONFIG_OPENSSL_ASSERT_EXIT= 515 | 516 | # 517 | # PThreads 518 | # 519 | CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5 520 | CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 521 | 522 | # 523 | # SPI Flash driver 524 | # 525 | CONFIG_SPI_FLASH_VERIFY_WRITE= 526 | CONFIG_SPI_FLASH_ENABLE_COUNTERS= 527 | CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y 528 | CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y 529 | CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS= 530 | CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED= 531 | 532 | # 533 | # SPIFFS Configuration 534 | # 535 | CONFIG_SPIFFS_MAX_PARTITIONS=3 536 | 537 | # 538 | # SPIFFS Cache Configuration 539 | # 540 | CONFIG_SPIFFS_CACHE=y 541 | CONFIG_SPIFFS_CACHE_WR=y 542 | CONFIG_SPIFFS_CACHE_STATS= 543 | CONFIG_SPIFFS_PAGE_CHECK=y 544 | CONFIG_SPIFFS_GC_MAX_RUNS=10 545 | CONFIG_SPIFFS_GC_STATS= 546 | CONFIG_SPIFFS_PAGE_SIZE=256 547 | CONFIG_SPIFFS_OBJ_NAME_LEN=32 548 | CONFIG_SPIFFS_USE_MAGIC=y 549 | CONFIG_SPIFFS_USE_MAGIC_LENGTH=y 550 | CONFIG_SPIFFS_META_LENGTH=4 551 | CONFIG_SPIFFS_USE_MTIME=y 552 | 553 | # 554 | # Debug Configuration 555 | # 556 | CONFIG_SPIFFS_DBG= 557 | CONFIG_SPIFFS_API_DBG= 558 | CONFIG_SPIFFS_GC_DBG= 559 | CONFIG_SPIFFS_CACHE_DBG= 560 | CONFIG_SPIFFS_CHECK_DBG= 561 | CONFIG_SPIFFS_TEST_VISUALISATION= 562 | 563 | # 564 | # tcpip adapter 565 | # 566 | CONFIG_IP_LOST_TIMER_INTERVAL=120 567 | 568 | # 569 | # Virtual file system 570 | # 571 | CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y 572 | 573 | # 574 | # Wear Levelling 575 | # 576 | CONFIG_WL_SECTOR_SIZE_512= 577 | CONFIG_WL_SECTOR_SIZE_4096=y 578 | CONFIG_WL_SECTOR_SIZE=4096 579 | --------------------------------------------------------------------------------