Kconfig.projbuild 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422
  1. menu "Example Connection Configuration"
  2. orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps"
  3. config EXAMPLE_CONNECT_WIFI
  4. bool "connect using WiFi interface"
  5. depends on !IDF_TARGET_LINUX && SOC_WIFI_SUPPORTED
  6. default y
  7. help
  8. Protocol examples can use Wi-Fi and/or Ethernet to connect to the network.
  9. Choose this option to connect with WiFi
  10. if EXAMPLE_CONNECT_WIFI
  11. config EXAMPLE_WIFI_SSID_PWD_FROM_STDIN
  12. bool "Get ssid and password from stdin"
  13. default n
  14. help
  15. Give the WiFi SSID and password from stdin.
  16. config EXAMPLE_PROVIDE_WIFI_CONSOLE_CMD
  17. depends on !EXAMPLE_WIFI_SSID_PWD_FROM_STDIN
  18. bool "Provide wifi connect commands"
  19. default y
  20. help
  21. Provide wifi connect commands for esp_console.
  22. Please use `example_register_wifi_connect_commands` to register them.
  23. config EXAMPLE_WIFI_SSID
  24. depends on !EXAMPLE_WIFI_SSID_PWD_FROM_STDIN
  25. string "WiFi SSID"
  26. default "myssid"
  27. help
  28. SSID (network name) for the example to connect to.
  29. config EXAMPLE_WIFI_PASSWORD
  30. depends on !EXAMPLE_WIFI_SSID_PWD_FROM_STDIN
  31. string "WiFi Password"
  32. default "mypassword"
  33. help
  34. WiFi password (WPA or WPA2) for the example to use.
  35. Can be left blank if the network has no security set.
  36. config EXAMPLE_WIFI_CONN_MAX_RETRY
  37. int "Maximum retry"
  38. default 6
  39. help
  40. Set the Maximum retry to avoid station reconnecting to the AP unlimited,
  41. in case the AP is really inexistent.
  42. choice EXAMPLE_WIFI_SCAN_METHOD
  43. prompt "WiFi Scan Method"
  44. default EXAMPLE_WIFI_SCAN_METHOD_ALL_CHANNEL
  45. help
  46. WiFi scan method:
  47. If "Fast" is selected, scan will end after find SSID match AP.
  48. If "All Channel" is selected, scan will end after scan all the channel.
  49. config EXAMPLE_WIFI_SCAN_METHOD_FAST
  50. bool "Fast"
  51. config EXAMPLE_WIFI_SCAN_METHOD_ALL_CHANNEL
  52. bool "All Channel"
  53. endchoice
  54. menu "WiFi Scan threshold"
  55. config EXAMPLE_WIFI_SCAN_RSSI_THRESHOLD
  56. int "WiFi minimum rssi"
  57. range -127 0
  58. default -127
  59. help
  60. The minimum rssi to accept in the scan mode.
  61. choice EXAMPLE_WIFI_SCAN_AUTH_MODE_THRESHOLD
  62. prompt "WiFi Scan auth mode threshold"
  63. default EXAMPLE_WIFI_AUTH_OPEN
  64. help
  65. The weakest authmode to accept in the scan mode.
  66. config EXAMPLE_WIFI_AUTH_OPEN
  67. bool "OPEN"
  68. config EXAMPLE_WIFI_AUTH_WEP
  69. bool "WEP"
  70. config EXAMPLE_WIFI_AUTH_WPA_PSK
  71. bool "WPA PSK"
  72. config EXAMPLE_WIFI_AUTH_WPA2_PSK
  73. bool "WPA2 PSK"
  74. config EXAMPLE_WIFI_AUTH_WPA_WPA2_PSK
  75. bool "WPA WPA2 PSK"
  76. config EXAMPLE_WIFI_AUTH_WPA2_ENTERPRISE
  77. bool "WPA2 ENTERPRISE"
  78. config EXAMPLE_WIFI_AUTH_WPA3_PSK
  79. bool "WPA3 PSK"
  80. config EXAMPLE_WIFI_AUTH_WPA2_WPA3_PSK
  81. bool "WPA2 WPA3 PSK"
  82. config EXAMPLE_WIFI_AUTH_WAPI_PSK
  83. bool "WAPI PSK"
  84. endchoice
  85. endmenu
  86. choice EXAMPLE_WIFI_CONNECT_AP_SORT_METHOD
  87. prompt "WiFi Connect AP Sort Method"
  88. default EXAMPLE_WIFI_CONNECT_AP_BY_SIGNAL
  89. help
  90. WiFi connect AP sort method:
  91. If "Signal" is selected, Sort matched APs in scan list by RSSI.
  92. If "Security" is selected, Sort matched APs in scan list by security mode.
  93. config EXAMPLE_WIFI_CONNECT_AP_BY_SIGNAL
  94. bool "Signal"
  95. config EXAMPLE_WIFI_CONNECT_AP_BY_SECURITY
  96. bool "Security"
  97. endchoice
  98. endif
  99. config EXAMPLE_CONNECT_ETHERNET
  100. bool "connect using Ethernet interface"
  101. depends on !IDF_TARGET_LINUX
  102. default y if !SOC_WIFI_SUPPORTED
  103. help
  104. Protocol examples can use Wi-Fi and/or Ethernet to connect to the network.
  105. Choose this option to connect with Ethernet
  106. if EXAMPLE_CONNECT_ETHERNET
  107. config EXAMPLE_ETHERNET_EMAC_TASK_STACK_SIZE
  108. int "emac_rx task stack size"
  109. default 2048
  110. help
  111. This set stack size for emac_rx task
  112. config EXAMPLE_USE_SPI_ETHERNET
  113. bool
  114. choice EXAMPLE_ETHERNET_TYPE
  115. prompt "Ethernet Type"
  116. default EXAMPLE_USE_INTERNAL_ETHERNET if IDF_TARGET_ESP32
  117. default EXAMPLE_USE_W5500
  118. help
  119. Select which kind of Ethernet will be used in the example.
  120. config EXAMPLE_USE_INTERNAL_ETHERNET
  121. depends on IDF_TARGET_ESP32
  122. select ETH_USE_ESP32_EMAC
  123. bool "Internal EMAC"
  124. help
  125. Select internal Ethernet MAC controller.
  126. config EXAMPLE_USE_DM9051
  127. bool "DM9051 Module"
  128. select EXAMPLE_USE_SPI_ETHERNET
  129. select ETH_USE_SPI_ETHERNET
  130. select ETH_SPI_ETHERNET_DM9051
  131. help
  132. Select external SPI-Ethernet module.
  133. config EXAMPLE_USE_W5500
  134. bool "W5500 Module"
  135. select EXAMPLE_USE_SPI_ETHERNET
  136. select ETH_USE_SPI_ETHERNET
  137. select ETH_SPI_ETHERNET_W5500
  138. help
  139. Select external SPI-Ethernet module (W5500).
  140. config EXAMPLE_USE_OPENETH
  141. bool "OpenCores Ethernet MAC (EXPERIMENTAL)"
  142. select ETH_USE_OPENETH
  143. help
  144. When this option is enabled, the example is built with support for
  145. OpenCores Ethernet MAC, which allows testing the example in QEMU.
  146. Note that this option is used for internal testing purposes, and
  147. not officially supported. Examples built with this option enabled
  148. will not run on a real ESP32 chip.
  149. endchoice # EXAMPLE_ETHERNET_TYPE
  150. if EXAMPLE_USE_INTERNAL_ETHERNET
  151. choice EXAMPLE_ETH_PHY_MODEL
  152. prompt "Ethernet PHY Device"
  153. default EXAMPLE_ETH_PHY_IP101
  154. help
  155. Select the Ethernet PHY device to use in the example.
  156. config EXAMPLE_ETH_PHY_IP101
  157. bool "IP101"
  158. help
  159. IP101 is a single port 10/100 MII/RMII/TP/Fiber Fast Ethernet Transceiver.
  160. Goto http://www.icplus.com.tw/pp-IP101G.html for more information about it.
  161. config EXAMPLE_ETH_PHY_RTL8201
  162. bool "RTL8201/SR8201"
  163. help
  164. RTL8201F/SR8201F is a single port 10/100Mb Ethernet Transceiver with auto MDIX.
  165. Goto http://www.corechip-sz.com/productsview.asp?id=22 for more information about it.
  166. config EXAMPLE_ETH_PHY_LAN87XX
  167. bool "LAN87xx"
  168. help
  169. Below chips are supported:
  170. LAN8710A is a small footprint MII/RMII 10/100 Ethernet Transceiver with HP Auto-MDIX and
  171. flexPWR® Technology.
  172. LAN8720A is a small footprint RMII 10/100 Ethernet Transceiver with HP Auto-MDIX Support.
  173. LAN8740A/LAN8741A is a small footprint MII/RMII 10/100 Energy Efficient Ethernet Transceiver
  174. with HP Auto-MDIX and flexPWR® Technology.
  175. LAN8742A is a small footprint RMII 10/100 Ethernet Transceiver with HP Auto-MDIX and
  176. flexPWR® Technology.
  177. Goto https://www.microchip.com for more information about them.
  178. config EXAMPLE_ETH_PHY_DP83848
  179. bool "DP83848"
  180. help
  181. DP83848 is a single port 10/100Mb/s Ethernet Physical Layer Transceiver.
  182. Goto http://www.ti.com/product/DP83848J for more information about it.
  183. config EXAMPLE_ETH_PHY_KSZ80XX
  184. bool "KSZ80xx"
  185. help
  186. With the KSZ80xx series, Microchip offers single-chip 10BASE-T/100BASE-TX
  187. Ethernet Physical Layer Tranceivers (PHY).
  188. The following chips are supported: KSZ8001, KSZ8021, KSZ8031, KSZ8041,
  189. KSZ8051, KSZ8061, KSZ8081, KSZ8091
  190. Goto https://www.microchip.com for more information about them.
  191. endchoice
  192. config EXAMPLE_ETH_MDC_GPIO
  193. int "SMI MDC GPIO number"
  194. range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
  195. default 23
  196. help
  197. Set the GPIO number used by SMI MDC.
  198. config EXAMPLE_ETH_MDIO_GPIO
  199. int "SMI MDIO GPIO number"
  200. range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
  201. default 18
  202. help
  203. Set the GPIO number used by SMI MDIO.
  204. endif
  205. if EXAMPLE_USE_SPI_ETHERNET
  206. config EXAMPLE_ETH_SPI_HOST
  207. int "SPI Host Number"
  208. range 0 2
  209. default 1
  210. help
  211. Set the SPI host used to communicate with the SPI Ethernet Controller.
  212. config EXAMPLE_ETH_SPI_SCLK_GPIO
  213. int "SPI SCLK GPIO number"
  214. range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
  215. default 14
  216. help
  217. Set the GPIO number used by SPI SCLK.
  218. config EXAMPLE_ETH_SPI_MOSI_GPIO
  219. int "SPI MOSI GPIO number"
  220. range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
  221. default 13
  222. help
  223. Set the GPIO number used by SPI MOSI.
  224. config EXAMPLE_ETH_SPI_MISO_GPIO
  225. int "SPI MISO GPIO number"
  226. range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX
  227. default 12
  228. help
  229. Set the GPIO number used by SPI MISO.
  230. config EXAMPLE_ETH_SPI_CS_GPIO
  231. int "SPI CS GPIO number"
  232. range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
  233. default 15
  234. help
  235. Set the GPIO number used by SPI CS.
  236. config EXAMPLE_ETH_SPI_CLOCK_MHZ
  237. int "SPI clock speed (MHz)"
  238. range 5 80
  239. default 36
  240. help
  241. Set the clock speed (MHz) of SPI interface.
  242. config EXAMPLE_ETH_SPI_INT_GPIO
  243. int "Interrupt GPIO number"
  244. range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX
  245. default 4
  246. help
  247. Set the GPIO number used by the SPI Ethernet module interrupt line.
  248. endif # EXAMPLE_USE_SPI_ETHERNET
  249. config EXAMPLE_ETH_PHY_RST_GPIO
  250. int "PHY Reset GPIO number"
  251. range -1 ENV_GPIO_OUT_RANGE_MAX
  252. default 5
  253. help
  254. Set the GPIO number used to reset PHY chip.
  255. Set to -1 to disable PHY chip hardware reset.
  256. config EXAMPLE_ETH_PHY_ADDR
  257. int "PHY Address"
  258. range 0 31 if EXAMPLE_USE_INTERNAL_ETHERNET
  259. default 1
  260. help
  261. Set PHY address according your board schematic.
  262. endif # EXAMPLE_CONNECT_ETHERNET
  263. config EXAMPLE_CONNECT_PPP
  264. bool "connect using Point to Point interface"
  265. select LWIP_PPP_SUPPORT
  266. help
  267. Protocol examples can use PPP connection over serial line.
  268. Choose this option to connect to the ppp server running
  269. on your laptop over a serial line (either UART or USB ACM)
  270. if EXAMPLE_CONNECT_PPP
  271. choice EXAMPLE_CONNECT_PPP_DEVICE
  272. prompt "Choose PPP device"
  273. default EXAMPLE_CONNECT_PPP_DEVICE_USB
  274. help
  275. Select which peripheral to use to connect to the PPP server.
  276. config EXAMPLE_CONNECT_PPP_DEVICE_USB
  277. bool "USB"
  278. depends on SOC_USB_OTG_SUPPORTED
  279. select TINYUSB_CDC_ENABLED
  280. help
  281. Use USB ACM device.
  282. config EXAMPLE_CONNECT_PPP_DEVICE_UART
  283. bool "UART"
  284. help
  285. Use UART.
  286. endchoice
  287. menu "UART Configuration"
  288. depends on EXAMPLE_CONNECT_PPP_DEVICE_UART
  289. config EXAMPLE_CONNECT_UART_TX_PIN
  290. int "TXD Pin Number"
  291. default 4
  292. range 0 31
  293. help
  294. Pin number of UART TX.
  295. config EXAMPLE_CONNECT_UART_RX_PIN
  296. int "RXD Pin Number"
  297. default 5
  298. range 0 31
  299. help
  300. Pin number of UART RX.
  301. config EXAMPLE_CONNECT_UART_BAUDRATE
  302. int "UART Baudrate"
  303. default 115200
  304. range 9600 3000000
  305. help
  306. Baudrate of the UART device
  307. endmenu
  308. config EXAMPLE_PPP_CONN_MAX_RETRY
  309. int "Maximum retry"
  310. default 6
  311. help
  312. Set the Maximum retry to avoid station reconnecting if the pppd
  313. is not available
  314. endif # EXAMPLE_CONNECT_PPP
  315. config EXAMPLE_CONNECT_IPV4
  316. bool
  317. depends on LWIP_IPV4
  318. default y
  319. config EXAMPLE_CONNECT_IPV6
  320. depends on EXAMPLE_CONNECT_WIFI || EXAMPLE_CONNECT_ETHERNET || EXAMPLE_CONNECT_PPP
  321. bool "Obtain IPv6 address"
  322. default y
  323. select LWIP_IPV6
  324. select LWIP_PPP_ENABLE_IPV6 if EXAMPLE_CONNECT_PPP
  325. help
  326. By default, examples will wait until IPv4 and IPv6 local link addresses are obtained.
  327. Disable this option if the network does not support IPv6.
  328. Choose the preferred IPv6 address type if the connection code should wait until other than
  329. the local link address gets assigned.
  330. Consider enabling IPv6 stateless address autoconfiguration (SLAAC) in the LWIP component.
  331. if EXAMPLE_CONNECT_IPV6
  332. choice EXAMPLE_CONNECT_PREFERRED_IPV6
  333. prompt "Preferred IPv6 Type"
  334. default EXAMPLE_CONNECT_IPV6_PREF_LOCAL_LINK
  335. help
  336. Select which kind of IPv6 address the connect logic waits for.
  337. config EXAMPLE_CONNECT_IPV6_PREF_LOCAL_LINK
  338. bool "Local Link Address"
  339. help
  340. Blocks until Local link address assigned.
  341. config EXAMPLE_CONNECT_IPV6_PREF_GLOBAL
  342. bool "Global Address"
  343. help
  344. Blocks until Global address assigned.
  345. config EXAMPLE_CONNECT_IPV6_PREF_SITE_LOCAL
  346. bool "Site Local Address"
  347. help
  348. Blocks until Site link address assigned.
  349. config EXAMPLE_CONNECT_IPV6_PREF_UNIQUE_LOCAL
  350. bool "Unique Local Link Address"
  351. help
  352. Blocks until Unique local address assigned.
  353. endchoice
  354. endif
  355. endmenu