1# Copyright (c) 2019 Tobias Svehagen 2# SPDX-License-Identifier: Apache-2.0 3 4menuconfig WIFI_ESP_AT 5 bool "Espressif AT Command support" 6 default y 7 depends on DT_HAS_ESPRESSIF_ESP_AT_ENABLED 8 select MODEM 9 select MODEM_CONTEXT 10 select MODEM_CMD_HANDLER 11 select MODEM_IFACE_UART 12 select NET_L2_WIFI_MGMT 13 select WIFI_OFFLOAD 14 imply UART_USE_RUNTIME_CONFIGURE 15 help 16 Enable Espressif AT Command offloaded WiFi driver. It is supported on 17 any serial capable platform and communicates with Espressif chips 18 running ESP-AT firmware (https://github.com/espressif/esp-at). 19 20if WIFI_ESP_AT 21 22config WIFI_ESP_AT_SCAN_PASSIVE 23 bool "Passive scan" 24 help 25 Use passive scanning. 26 27config WIFI_ESP_AT_SCAN_MAC_ADDRESS 28 bool "MAC address in scan response" 29 help 30 Get mac address in scan response. 31 32config WIFI_ESP_AT_SCAN_RESULT_RSSI_ORDERED 33 bool "Scan result ordering based on RSSI" 34 help 35 Order based on RSSI. 36 37config WIFI_ESP_AT_RX_STACK_SIZE 38 int "Stack size for the Espressif esp wifi driver RX thread" 39 default 1024 40 help 41 This stack is used by the Espressif ESP RX thread. 42 43config WIFI_ESP_AT_RX_THREAD_PRIORITY 44 int "Priority of RX thread" 45 default 7 46 help 47 Priority of thread used for processing RX data. 48 49config WIFI_ESP_AT_WORKQ_STACK_SIZE 50 int "Stack size for the esp driver work queue" 51 default 2048 52 help 53 This stack is used by the work queue to pass off net_pkt data 54 to the rest of the network stack, letting the rx thread continue 55 processing data. 56 57config WIFI_ESP_AT_WORKQ_THREAD_PRIORITY 58 int "Priority of work queue thread" 59 default 7 60 help 61 Priority of thread used for processing driver work queue items. 62 63config WIFI_ESP_AT_MDM_RING_BUF_SIZE 64 int "Modem ring buffer size" 65 default 1024 66 help 67 Ring buffer size used by modem UART interface handler. 68 69config WIFI_ESP_AT_MDM_RX_BUF_COUNT 70 int "Modem RX buffer count" 71 default 30 72 help 73 Number of preallocated RX buffers used by modem command handler. 74 75config WIFI_ESP_AT_MDM_RX_BUF_SIZE 76 int "Modem RX buffer size" 77 default 128 78 help 79 Size of preallocated RX buffers used by modem command handler. 80 81config WIFI_ESP_AT_PASSIVE_MODE 82 bool "Use passive mode" 83 help 84 This lets the ESP handle the TCP window so that data can flow 85 at a rate that the driver can handle. Without this, data might get 86 lost if the driver cannot empty the device buffer quickly enough. 87 88config WIFI_ESP_AT_RESET_TIMEOUT 89 int "Reset timeout" 90 default 3000 91 help 92 How long to wait for device to become ready after AT+RST has been 93 sent. This can vary with chipset (ESP8266/ESP32) and firmware 94 version. This is ignored if a reset pin is configured. 95 96config WIFI_ESP_AT_RX_NET_PKT_ALLOC_TIMEOUT 97 int "Network interface RX packet allocation timeout" 98 default 5000 99 help 100 Network interface RX net_pkt allocation timeout in milliseconds. 101 102choice 103 prompt "ESP IP Address configuration" 104 default WIFI_ESP_AT_IP_DHCP 105 help 106 Choose whether to use an IP assigned by DHCP Server or 107 configure a static IP Address. 108 109config WIFI_ESP_AT_IP_DHCP 110 bool "DHCP" 111 help 112 Use DHCP to get an IP Address. 113 114config WIFI_ESP_AT_IP_STATIC 115 bool "Static" 116 help 117 Setup Static IP Address. 118 119endchoice 120 121if WIFI_ESP_AT_IP_STATIC 122 123config WIFI_ESP_AT_IP_ADDRESS 124 string "ESP Station mode IP Address" 125 126config WIFI_ESP_AT_IP_GATEWAY 127 string "Gateway Address" 128 129config WIFI_ESP_AT_IP_MASK 130 string "Network Mask" 131 132endif 133 134choice WIFI_ESP_AT_VERSION 135 prompt "AT version" 136 default WIFI_ESP_AT_VERSION_2_1 137 help 138 Select which version of AT command set should be used. 139 140config WIFI_ESP_AT_VERSION_1_7 141 bool "AT version 1.7" 142 help 143 Use AT command set version 1.7. 144 145config WIFI_ESP_AT_VERSION_2_0 146 bool "AT version 2.0" 147 help 148 Use AT command set version 2.0. 149 150config WIFI_ESP_AT_VERSION_2_1 151 bool "AT version 2.1" 152 help 153 Use AT command set version 2.1. 154 155endchoice 156 157config WIFI_ESP_AT_DNS_USE 158 bool "Use DNS from ESP" 159 depends on DNS_RESOLVER 160 help 161 Fetch DNS servers from ESP chip with AT+CIPDNS? command and apply that 162 list to system DNS resolver. 163 164config WIFI_ESP_AT_CIPDINFO_USE 165 bool "Use CIPDINFO to get peer ip and port" 166 help 167 Enable AT+CIPDINFO to get peer ip-address and port. 168 169config WIFI_ESP_AT_FETCH_VERSION 170 bool "Fetch and log ESP-AT firmware version" 171 default y 172 depends on LOG 173 help 174 Fetch information about ESP-AT firmware version. This includes AT 175 command version, SDK (ESP-IDF), board and compile time. 176 177endif # WIFI_ESP_AT 178