1# Copyright (c) 2023 Trackunit Corporation 2# SPDX-License-Identifier: Apache-2.0 3 4menuconfig MODEM_MODULES 5 bool "Modem modules" 6 7if MODEM_MODULES 8 9config MODEM_DEDICATED_WORKQUEUE 10 bool "Use a dedicated workqueue for modem operations" 11 12if MODEM_DEDICATED_WORKQUEUE 13 14config MODEM_DEDICATED_WORKQUEUE_STACK_SIZE 15 int "Modem dedicated workqueue stack size" 16 default 1024 17 18config MODEM_DEDICATED_WORKQUEUE_PRIORITY 19 int "Modem dedicated workqueue priority" 20 default SYSTEM_WORKQUEUE_PRIORITY 21 22endif # MODEM_DEDICATED_WORKQUEUE 23 24config MODEM_CHAT 25 bool "Modem chat module" 26 select RING_BUFFER 27 select MODEM_PIPE 28 29if MODEM_CHAT 30 31config MODEM_CHAT_LOG_BUFFER_SIZE 32 int "Modem chat log buffer size in bytes" 33 default 128 34 35endif 36 37config MODEM_CMUX 38 bool "Modem CMUX module" 39 select MODEM_PIPE 40 select RING_BUFFER 41 select EVENTS 42 select CRC 43 44if MODEM_CMUX 45 46config MODEM_CMUX_DEFAULT_MTU_127 47 bool 48 help 49 Hint that the default MODEM_CMUX_MTU size should be 127 bytes. 50 51config MODEM_CMUX_MTU 52 int "CMUX MTU size in bytes" 53 range 16 1500 54 default 127 if MODEM_CMUX_DEFAULT_MTU_127 55 default 31 56 help 57 Maximum Transmission Unit (MTU) size for the CMUX module. 58 Linux ldattach defaults to 127 bytes, 3GPP TS 27.010 to 31. 59 60config MODEM_CMUX_WORK_BUFFER_SIZE_EXTRA 61 int "CMUX module extra work buffer size in bytes" 62 default 0 63 help 64 Extra bytes to add to the work buffers used by the CMUX module. 65 The default size of these buffers is MODEM_CMUX_MTU + 7 (CMUX header size). 66 67config MODEM_CMUX_MSC_FC_THRESHOLD 68 int "Enable flow control when the DLCI ring buffer has less than this many bytes free" 69 range 0 MODEM_CMUX_MTU 70 default MODEM_CMUX_MTU if MODEM_CMUX_WORK_BUFFER_SIZE_EXTRA > 0 71 default 0 72 help 73 When the available space in a DLCI receive ring buffer is less than this 74 value, the CMUX module will send Modem Status Command frame with the 75 flow control bit set to indicate that the sender should stop sending data. 76 Flow control is released once the incoming buffer has at least MODEM_CMUX_MTU 77 bytes free again. 78 This only works if the peer supports MSC messages. 79 Disable flow control by setting this value to 0. 80 81config MODEM_CMUX_T1_TIMEOUT 82 int "CMUX T1 timeout in milliseconds" 83 range 10 2550 84 default 100 85 help 86 Acknowledgment Timer (T1). 87 Time in milliseconds to wait for an acknowledgment before retransmitting 88 a frame. 89 90config MODEM_CMUX_T2_TIMEOUT 91 int "CMUX T2 timeout in milliseconds" 92 range 20 2550 93 default 300 94 help 95 Response Timer for multiplexer control channel (T2). 96 Time in milliseconds to wait for a response to a multiplexer control 97 command before considering the link dead. 98 NOTE: Zephyr's CMUX implementation deviates from the 3GPP TS 27.010 99 specification by using T1 for all retry timers and T2 only for 100 a total response timeout. 101 102config MODEM_CMUX_T3_TIMEOUT 103 int "CMUX T3 timeout in seconds" 104 range 1 255 105 default 10 106 help 107 Response Timer for wake-up procedure(T3). 108 Time in seconds before the link is considered dead. 109 110module = MODEM_CMUX 111module-str = modem_cmux 112source "subsys/logging/Kconfig.template.log_config" 113 114config MODEM_CMUX_LOG_FRAMES 115 bool "Log CMUX frames" 116 depends on MODEM_CMUX_LOG_LEVEL_DBG 117 help 118 Enable logging of CMUX frames. This can produce a lot of log data. 119 120endif 121 122config MODEM_PIPE 123 bool "Modem pipe module" 124 select EVENTS 125 126config MODEM_PIPELINK 127 bool "Modem pipelink module" 128 depends on MODEM_PIPE 129 130config MODEM_PPP 131 bool "Modem PPP module" 132 depends on NET_L2_PPP 133 select MODEM_PIPE 134 select RING_BUFFER 135 select CRC 136 select PM_DEVICE_RUNTIME_ASYNC if PM_DEVICE_RUNTIME 137 138if MODEM_PPP 139 140config MODEM_PPP_NET_BUF_FRAG_SIZE 141 int "Network buffer fragment size" 142 default NET_BUF_DATA_SIZE if NET_BUF_FIXED_DATA_SIZE 143 default 128 144 145endif 146 147config MODEM_STATS 148 bool "Modem statistics" 149 depends on SHELL 150 help 151 Enables modem statistics shell commands which track the usage of 152 buffers across the modem modules. The statistics are useful for 153 scaling buffer sizes, as these are application specific. 154 155config MODEM_STATS_BUFFER_NAME_SIZE 156 int "Maximum string size of modem stats buffer name" 157 default 32 158 range 8 64 159 160config MODEM_UBX 161 bool "Modem U-BLOX module" 162 select RING_BUFFER 163 select MODEM_PIPE 164 help 165 Enable Modem U-BLOX module. 166 167if MODEM_UBX 168 169config MODEM_UBX_LOG_BUFFER 170 int "Modem U-BLOX log buffer size" 171 default 128 172 173endif 174 175module = MODEM_MODULES 176module-str = modem_modules 177source "subsys/logging/Kconfig.template.log_config" 178 179rsource "backends/Kconfig" 180 181endif 182