Kconfig 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455
  1. # Copyright (C) 2018 RDA Technologies Limited and/or its affiliates("RDA").
  2. # All rights reserved.
  3. #
  4. # This software is supplied "AS IS" without any warranties.
  5. # RDA assumes no responsibility or liability for the use of the software,
  6. # conveys no license or title under any patent, copyright, or mask work
  7. # right to the product. RDA reserves the right to make changes in the
  8. # software without notification. RDA also make no representation or
  9. # warranty that such application will be suitable for the specified use
  10. # without further testing or modification.
  11. menu "AT receiver"
  12. config ATR_CMD_PARAM_MAX
  13. int "Max AT command parameter count"
  14. default 56 if SOC_8910
  15. default 24
  16. help
  17. Maximum parameter count for each AT command. When there are too many
  18. parameters, AT parser will report it as an error.
  19. config ATR_CMDLINE_MAX
  20. int "Max AT command line size"
  21. default 3072 if AT_CUS_SUPPORT || AT_CTIOTSM_SUPPORT
  22. default 2048 if SRV_SIMLOCK_ENABLE && !SOC_8850
  23. default 12288 if SRV_SIMLOCK_ENABLE && SOC_8850
  24. default 1024
  25. help
  26. AT parser command line buffer, including \r and not including terminate
  27. \0. When there are BACKSPACE, BACKSPACE won't occupy buffer. At buffer
  28. overflow, the content of the buffer will be dropped silently, and start
  29. AT or A/ search again.
  30. config ATR_CMD_WORKER_STACK_SIZE
  31. int "ATR worker thread stack size"
  32. default 2048
  33. help
  34. Each AT channel will have a worker thread for blocking calls. This is
  35. the thread stack size for worker thread.
  36. config ATR_URC_BUFF_ENABLE
  37. bool "Enable URC buffer"
  38. default y
  39. help
  40. When enabled, URC will be buffered when there are AT command in excution.
  41. And only after current AT command is finished, the buffered URC will be
  42. outputed.
  43. It is possible that URC during AT command execution will affect peer.
  44. So, it is recommended to enable this.
  45. config ATR_URC_BUFF_SIZE
  46. int "URC buffer size"
  47. default 2048
  48. help
  49. When there are AT commands in excution, URC will be buffered. And only
  50. after current AT command is finished, the buffered URC will be outputed.
  51. This is the per channel URC buffer size.
  52. config ATR_URC_BUFF_COUNT
  53. int "URC buffered count"
  54. default 32
  55. help
  56. When URC is buffered, this is the max count of buffered URC. When the
  57. URC count is larger than ATR_URC_BUFF_COUNT, or the total URC size
  58. exceeds ATR_URC_BUFF_SIZE, the oldest URC will be discarded.
  59. config ATR_ECHO_COMMAND_ONLY
  60. bool "Echo command line only"
  61. default n
  62. help
  63. When this option is enabled, AT echo will only echo command line only.
  64. AT command line is started with "AT" and ended with "\r". For example,
  65. "AT\r\n" will echo "AT\r". "\n" will be regarded as invalid characters,
  66. and won't echo. Also, other invalid characters not belongs to command
  67. line will be ignored.
  68. If the peer is robust enough, invalid character echo won't affect peer.
  69. Only when the peer can't accept extra characters, this shall be enabled.
  70. When it is enabled, it is suggested to set ATR_LF_WAIT_MS to zero to
  71. disable the timer for waiting "\n", due to the purpose of this timer is
  72. to make the echo more readable.
  73. config ATR_LF_WAIT_MS
  74. int "Timeout in ms to wait \\n after \\r"
  75. default 20
  76. help
  77. Though \r is the end character of AT command line, \n is followed
  78. in most cases. In echo mode, it is weird to echo \n after the previous
  79. command line is handled, and before the next command line.
  80. So, after \r is received, AT engine will wait a while. If \n comes,
  81. it will be echoed before handling the command line.
  82. config ATR_CMD_TPLUS_ENABLE
  83. bool "support +++ in command line mode"
  84. default n
  85. help
  86. It is a non-standard feature. When enabled, "+++" in command line mode
  87. will be regarded as a dummy AT command.
  88. config ATR_CMD_OUTPUT_CACHE_ENABLE
  89. bool "Enable command engine output cache"
  90. default y
  91. help
  92. When enabled, line cache will be used for command engine output.
  93. Without output line cache, AT command handlers may call more times
  94. of device write. For example, "\r\nOK\r\n" may be output through
  95. three write calls: "\r\n", "OK", "\r\n". It doesn't violate
  96. specification, however it is possible that peer will has trouble
  97. to parse AT command responses. With line cache, AT command response
  98. will be easier to be parsed.
  99. if ATR_CMD_OUTPUT_CACHE_ENABLE
  100. config ATR_CMD_OUTPUT_CACHE_SIZE
  101. int "Command engine output cache size"
  102. default 1024
  103. help
  104. The output line cache is shared for all command engines.
  105. endif
  106. config ATR_DATA_BUFF_SIZE
  107. int "Data mode buffer size"
  108. default 4096
  109. help
  110. Buffer size for data mode. In PPP mode, it should be enough to hold the
  111. packet before HDLC decoding. At buffer overflow, the content of the buffer
  112. will be dropped silently.
  113. config ATR_PPP_END_CHECK_TIMEOUT
  114. int "PPP packet check timeout after PPP end"
  115. default 2000 if SOC_8811
  116. default 1000
  117. help
  118. After PPP terminated, it is possible that peer will still send more
  119. PPP packets. If they are interpreted as AT commands, it is possible
  120. some "bad" commands will be interpreted.
  121. So, after PPP terminated, AT engine will still check incoming data.
  122. If incoming data looks like PPP packet, the PPP packet will be dopped.
  123. This is the timeout of the checking. It can be configured to be
  124. relatively larger, due to AT engine will enter command line mode if
  125. the incoming data don't look like PPP packet.
  126. When it is set to 0, AT engine will enter command mode immediately
  127. after PPP terminated. It should be only used when it is known that
  128. peer won't send more data after PPP terminated.
  129. config ATR_CMUX_SUPPORT
  130. bool "CMUX support"
  131. default y
  132. help
  133. When enabled, +CMUX command will be supported.
  134. choice
  135. prompt "Default UART"
  136. default ATR_DEFAULT_UART1 if SOC_8910
  137. default ATR_DEFAULT_UART1 if SOC_8811
  138. config ATR_DEFAULT_UART1
  139. bool "UART1"
  140. config ATR_DEFAULT_UART2
  141. bool "UART2"
  142. config ATR_DEFAULT_UART3
  143. bool "UART3"
  144. config ATR_DEFAULT_UART4
  145. bool "UART4"
  146. config ATR_DEFAULT_UART5
  147. bool "UART5"
  148. config ATR_DEFAULT_UART6
  149. bool "UART6"
  150. endchoice
  151. config ATR_DEFAULT_UART
  152. string
  153. default "DRV_NAME_UART1" if ATR_DEFAULT_UART1
  154. default "DRV_NAME_UART2" if ATR_DEFAULT_UART2
  155. default "DRV_NAME_UART3" if ATR_DEFAULT_UART3
  156. default "DRV_NAME_UART4" if ATR_DEFAULT_UART4
  157. default "DRV_NAME_UART5" if ATR_DEFAULT_UART5
  158. default "DRV_NAME_UART6" if ATR_DEFAULT_UART6
  159. default ""
  160. config ATR_DEFAULT_UART_BAUD
  161. int "Baud rate of default UART"
  162. default 115200
  163. config ATR_UART_AUTO_SLEEP_TIMEOUT
  164. int "UART auto sleep timeout"
  165. default 0 if SOC_8811 && (ATR_DEFAULT_UART1 || ATR_DEFAULT_UART2)
  166. default 500
  167. help
  168. When UART auto sleep is enabled, UART will release system wake lock
  169. when there are neither input nor output for a while. This is the
  170. timeout.
  171. In production, this timeout is wanted to be small for power saving.
  172. However, at debug, it can be set to longer because interactive
  173. operation is slow.
  174. When the UART can work normally at sleep, this can be set to a small
  175. value.
  176. config ATR_CFW_AUTO_POWER_ON
  177. bool "AT auto power on"
  178. default y if SOC_8811
  179. default n
  180. help
  181. Normally, AT engine will wait EV_DM_POWER_ON_IND to power on CFW.
  182. When defined, AT engine will power on CFW automatically. It should
  183. only be defined on system that EV_DM_POWER_ON_IND is unavailable.
  184. if ATR_CMUX_SUPPORT
  185. config ATR_CMUX_DLC_NUM
  186. int "CMUX DLC number"
  187. default 63
  188. help
  189. Maximum DLC number
  190. config ATR_CMUX_IN_BUFF_SIZE
  191. int "CMUX input buffer size"
  192. default 4096
  193. help
  194. Input buffer size. It should be enough to hold the input packet. At buffer
  195. overflow, the content of the buffer will be dropped silently.
  196. config ATR_CMUX_OUT_BUFF_SIZE
  197. int "CMUX input buffer size"
  198. default 4096
  199. help
  200. Output buffer size. It should be enough to hold the output packet. At buffer
  201. overflow, the content of the buffer will be dropped silently, and no data
  202. will be output for that packet.
  203. config ATR_CMUX_SUBCHANNEL_MIN_IN_BUFF_SIZE
  204. int "CMUX sub-channel minimum input buffer size"
  205. default 64
  206. help
  207. CMUX sub-channel input buffer should be able to hold a frame, which can be
  208. determined by CMUX max frame size. However, it is possible that peer will
  209. send frame larger than the max frame size parameter. So, this option can
  210. set a minimum input buffer size. When max frame size parameter is less than
  211. this option, the input buffer size will use this option.
  212. It will just consume a little more memory, when max frame size parameter is
  213. very small.
  214. endif
  215. config ATR_PROFILE_COUNT
  216. int "ATR profile count"
  217. default 2
  218. help
  219. Profile count.
  220. config ATR_MEM_FREE_LATER_COUNT
  221. int "Maximum count of delay free memory"
  222. default 40
  223. help
  224. Some memory will be freed after the event is processed. The typical use
  225. case is pointer in event. It is tedious to free it at every return. And
  226. "free later" concept is introduced. It means it will be freed in event
  227. loop after the current event is processed.
  228. The maximum count is to avoid dynamic management.
  229. config ATR_CINIT_URC_ENABLED
  230. bool "Output CINIT URC"
  231. default y
  232. config ATR_EVENT_MAX_COUNT
  233. int "Maximum registered event count"
  234. default 200
  235. help
  236. Static array is used for event registration, and this is the maximum count.
  237. config ATR_CFW_PENDING_UTI_COUNT
  238. int "Maximum pending UTI count"
  239. default 64
  240. help
  241. CFW response manager is used for CFW response callback. This is the
  242. maximum count of pending UTI count.
  243. config ATR_CREATE_UART
  244. bool "Create uart AT device"
  245. default y
  246. help
  247. When defined, uart AT device will be created
  248. config ATR_CREATE_USB_SERIAL
  249. bool "Create 2nd device of USB serial"
  250. default y if (SOC_8910) || ((SOC_8850) && (USB_DEVICE_SUPPORT))
  251. default n if (!USB_DEVICE_SUPPORT)
  252. help
  253. When defined, USB serial device DRV_NAME_USRL_COM0 will be created
  254. at AT engine initialization.
  255. config ATR_CREATE_DIAG
  256. bool "Create diag AT device"
  257. default y if SOC_8910
  258. default n
  259. help
  260. When defined, diag AT device will be created.
  261. config ATS_FS_SUPPORT
  262. bool "Support file system AT commands"
  263. default y
  264. help
  265. Whether to support file system related AT commands.
  266. config ATS_CISSDK_SUPPORT
  267. bool "Support CISSDK AT commands"
  268. default n
  269. help
  270. Whether to support CISSDK AT commands.
  271. if ATS_FS_SUPPORT
  272. config ATS_FS_DWN_SIZE_MAX
  273. int "Maximum download file size"
  274. default 500000
  275. help
  276. Buffer for the download file size will be allocated. To avoid memory
  277. overflow, it is needed to set upper limit for it.
  278. config ATS_FS_RD_SIZE_MAX
  279. int "Maximum read file size"
  280. default 100000
  281. help
  282. When read a large file, AT UART will busy on output file data. It may
  283. be frustrated when read a large file unintentionally.
  284. endif
  285. config ATS_UPDATE_SUPPORT
  286. bool "Support +UPDATE for firmware update"
  287. default y
  288. help
  289. +UPDATE is local firmware update. Firmware update pack data are sent
  290. by AT command prompt.
  291. config ATS_ALARM_SUPPORT
  292. bool "Support alarm AT commands"
  293. default y
  294. help
  295. When enabled, +CALA and +CALD are supported.
  296. if ATS_ALARM_SUPPORT
  297. config ATS_ALARM_COUNT
  298. int "Maximum alarm count"
  299. default 16
  300. help
  301. Maximum alarm count supported.
  302. config ATS_ALARM_TEXT_LEN
  303. int "Maximum alarm text length"
  304. default 32
  305. help
  306. Maximum alarm text length, not including the terminating null byte.
  307. endif
  308. config ATS_SGCC_CATM_SUPPORT
  309. bool "Support SGCC CATM command"
  310. default n
  311. help
  312. When defined, SGCC CATM command will be used.
  313. config ATR_NBONLY_API_SUPPORT
  314. bool "Support Non NB-only reference API"
  315. default y if SOC_8811
  316. default n
  317. help
  318. When defined, Non NB-only reference API cannt be used.
  319. config AT_CMD_SUPPORT
  320. bool "Support Enable AT command"
  321. default y
  322. help
  323. When defined, AT command will be supported.
  324. config DUAL_SIM_SUPPORT
  325. bool "DUAL SIM SUPPORT"
  326. default n
  327. help
  328. When defined, the dual sim card will be support.
  329. config ATR_OVERFLOW_REEOR_REPORT
  330. bool "AT overflow error report"
  331. default n
  332. help
  333. Normally, When AT parameter is overfolow,return error.
  334. config AT_CUS_SUPPORT
  335. bool "Support Customized AT commands"
  336. select NBSELFREG_CUS_SUPPORT
  337. select LWM2M_NOTIFY_SEQ_SUPPORT
  338. select NET_LWIP_RFACK_ON
  339. select LWM2M_OCEANCONNECT_CUS_SUPPORT
  340. default n
  341. help
  342. When defined, Customized AT Command can be used.
  343. config AT_AP_CALL_CP_SUPPORT
  344. bool "AP CALL CP SUPPORT"
  345. default n if SOC_8811
  346. default y
  347. help
  348. When defined, the at command will work, ap can call the api of cp.
  349. config AT_PSM_SUPPORT
  350. bool "Support PSM AT Command"
  351. default y
  352. help
  353. When defined, the at command will work.
  354. config AT_QSCANF_SUPPORT
  355. bool "Support QSCANF AT Command"
  356. default n if SOC_8811
  357. default y
  358. help
  359. When defined, the at command will work.
  360. config AT_USB_REDUCE_MEMORY
  361. bool "USB init with small memory"
  362. default n
  363. help
  364. When defined, USB will be init with small memory.
  365. config AT_DISPATCH_FETCH_BUF_SIZE
  366. int "Size for each read"
  367. default 512
  368. help
  369. AT dispatch max input size.
  370. config AT_I2S_TEST_SUPPORT
  371. bool "I2S TEST SUPPORT"
  372. default n
  373. help
  374. When enabled, +I2STEST will be support.
  375. config ATR_ECHO_COMMAND_CRLF
  376. bool "Echo command line without crlf"
  377. default n
  378. help
  379. When enabled, Echo command line will be without crlf.
  380. endmenu