WE310F5  39.00.000
ncm/src/main/app_cfg.h
Go to the documentation of this file.
1 /*===============================================================================================*/
2 /* >>> Copyright (C) Telit Communications S.p.A. Italy All Rights Reserved. <<< */
23 #ifndef _TEA_APP_CFG_H_
24 #define _TEA_APP_CFG_H_
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 /* Global declarations ==========================================================================*/
31 
32 /* Define the start mode for WLAN */
33 #define TEA_DEFUALT_WLAN_START_MODE 0 /* Can be STATION_MODE : 0 or AP_MODE : 1 */
34 /* WLAN regulatory domain default value */
35 #define TEA_DEFUALT_WLAN_DOMAIN 0
36 
37 
38 /**************Default (WLAN) L2 level settings when device is in STA mode*******************/
39 #define TEA_DEFAULT_STA_ENABLE 1
40 /* SSID of network when device in Station mode */
41 #define TEA_DEFAULT_STA_SSID "YOLO"
42 /* Default channel number in STA mode. */
43 #define TEA_DEFUALT_STA_CHANNEL 0
44 /* Pass phrase of network when device in STA mode */
45 #define TEA_DEFAULT_STA_PASSPHRASE ""
46 /* Security type when device is in STA mode
47  0 - NONE
48  3 - WPA-PSK
49  4 - WPA2-PSK
50  8 - WEP */
51 #define TEA_DEFAULT_STA_SECURITY_TYPE 0
52 /* Encryption type for the Station
53  0 - NONE
54  1 - WEP
55  2 - TKIP
56  3 - AES */
57 #define TEA_DEFAULT_STA_ENCRYPTION_TYPE 0
58 /*************************************************************************************************/
59 
60 /***********************IP configuration (L3) when device is in STA mode *************************/
61 /* IP flag for STA mode static or DHCP
62  1 - STATIC
63  2 - DHCP */
64 #define TEA_DEFAULT_STA_IP_FLAG 2 /* previously 0 which is invalid*/
65 /* Default IP address when device in STA mode */
66 #define TEA_DEFAULT_STA_IP_ADDR MAKEIP(192,168,4,5)
67 /* Default gateway address when device in STA mode */
68 #define TEA_DEFAULT_STA_GATEWAY_ADDR MAKEIP(192,168,4,6)
69 /* Default subnet mask when device in STA mode */
70 #define TEA_DEFAULT_STA_SUBNET_MASK MAKEIP(255,255,255,0)
71 /**************************************************************************************************/
72 
73 /***************** Preferred Network Offload (PNO) feature operation settings *********************/
74 /* Aggressive PNO scan interval in STA mode */
75 #define TEA_DEFAULT_STA_FAST_SCN_INTERVAL 20
76 /* Time allowed for aggressive PNO scan in STA mode */
77 #define TEA_DEFAULT_STA_FAST_SCN_DURATION 10
78 /* PNO scan interval after aggressive scan in STA mode (PNO power efficient)*/
79 #define TEA_DEFAULT_STA_SLOW_SCN_INTERVAL 5
80 /****************************************************************************************************/
81 
82 /*********************************** Roaming feature settings *************************************/
83 /* To enable roaming feature in STA mode */
84 #define TEA_DEFAULT_STA_ROAMING_ENABLE TRUE
85 /* Low threshold value of RSSI of the device in Station mode*/
86 #define TEA_DEFAULT_STA_RSSI_LOW_THRESHOLD -90
87 /* High threshold value of RSSI of the device in Station mode*/
88 #define TEA_DEFAULT_STA_RSSI_HIGH_THRESHOLD -20
89 /* Poll time for the stations */
90 #define TEA_DEFAULT_STA_POLL_TIME 30
91 /**************************************************************************************************/
92 
93 
94 /* Foreground scan time of the device in Station mode*/
95 #define TEA_DEFAULT_STA_FORCE_FG_SCAN 10
96 /* Time spent in each channel when scanning in Station mode other
97  than operating channel */
98 #define TEA_DEFAULT_STA_HOME_DWELL_TIME 10
99 /* Time interval between scanning channels in STA mode*/
100 #define TEA_DEFAULT_STA_FORCE_SCAN_INTERVAl 100
101 /* Scan type either active or passive in Station mode
102  0 - active
103  1 - passive */
104 #define TEA_DEFAULT_STA_SCAN_TYPE 0
105 /* Number of channels supported by STA in scanning */
106 #define TEA_DEFAULT_STA_NUM_OF_CHANNEL 11
107 
108 /* List of channels to scan in Station mode*/
109 #define TEA_DEFAULT_STA_CHANNEL_LIST TRUE
110 
111 #define TEA_DEFAULT_STA_CHANNEL_LIST_1 1
112 #define TEA_DEFAULT_STA_CHANNEL_LIST_2 2
113 #define TEA_DEFAULT_STA_CHANNEL_LIST_3 3
114 #define TEA_DEFAULT_STA_CHANNEL_LIST_4 4
115 #define TEA_DEFAULT_STA_CHANNEL_LIST_5 5
116 #define TEA_DEFAULT_STA_CHANNEL_LIST_6 6
117 #define TEA_DEFAULT_STA_CHANNEL_LIST_7 7
118 #define TEA_DEFAULT_STA_CHANNEL_LIST_8 8
119 #define TEA_DEFAULT_STA_CHANNEL_LIST_9 9
120 #define TEA_DEFAULT_STA_CHANNEL_LIST_10 10
121 #define TEA_DEFAULT_STA_CHANNEL_LIST_11 11
122 
123 /******************************************************************************************/
124 #define TEA_DEFAULT_STA_SCAN_RETRY_COUNT 3
125 #define TEA_DEFAULT_STA_TIME_DELAY_BETWEEN_SCAN_RETRY 1500
126 #define TEA_DEFAULT_STA_DHCP_RETRY_COUNT 5
127 #define TEA_DEFAULT_STA_TIME_DELAY_BETWEEN_DHCP_RETRY 5000
128 #define TEA_DEFAULT_STA_TCP_RETRY_COUNT 3
129 #define TEA_DEFAULT_STA_TCP_RETRY_TIME_DELAY 15
130 /******************************************************************************************/
131 
132 /* Default wireless PHY mode(a|b|g|an|ag|gn|agn) */
133 #if defined(WE310_BUILD_GCC)
134 #define TEA_DEFAULT_STA_PHYMODE "BGN"
135 #define TEA_DEFAULT_AP_PHYMODE "BGN"
136 #else
137 #define TEA_DEFAULT_STA_PHYMODE "AGN"
138 #define TEA_DEFAULT_AP_PHYMODE "AGN"
139 #endif /* WE310_BUILD_GCC */
140 
141 /***********************Default WLAN Power save policy configuration**************************/
142 /* Default Flag to Enable or disable the power save option */
143 #define TEA_DEFAULT_WLAN_POWER_SAVE_MODE_ENABLE TRUE
144 /*
145  Idle period during traffic after which WLAN can go to sleep.
146  Default is 200ms */
147 #define TEA_DEFAULT_WLAN_IDLE_PERIOD 200
148 /*
149  This parameter dictates the number of contiguous PS-Poll frames that
150  the WLAN firmware is to send before sending an 802.11 NULL frame to
151  indicate a power save exit to the access point. The system default
152  for this parameter is 1.*/
153 #define TEA_DEFAULT_WLAN_PS_POLL_FRAMES 2
154 /*
155  DTIM policy to be used. The application can select one of the DTIM
156  policies from M2MB_WLAN_DTIM_POLICY_E. The system default for this
157  parameter is M2MB_WLAN_DTIM_NORMAL.*/
158 #define TEA_DEFAULT_WLAN_DTIM_POLICY 2
159 /*
160  Default number of contiguous transmit packets after which the WLAN firmware
161  is to exit Protocol Power Save mode. */
162 #define TEA_DEFAULT_WLAN_TRANSMIT_PACKETS_TO_WAKEUP 1
163 
164 /***********Default (WLAN) L2 Configurations for device in Access Point mode****************/
165 /* The SSID of the Access Point */
166 #define TEA_DEFAULT_AP_SSID "AP_NCM_EXAPP"
167 /* The Pass phrase of the Access Point */
168 #define TEA_DEFAULT_AP_PASSPHRASE ""
169 /* Security type for Access Point
170  0 - NONE
171  3 - WPA-PSK
172  4 - WPA2-PSK
173  8 - WEP */
174 #define TEA_DEFAULT_AP_SECURITY_TYPE 0//4
175 /* Encryption type for the Station .
176  0 - NONE
177  1 - WEP
178  2 - TKIP
179  3 - AES */
180 #define TEA_DEFAULT_AP_ENCRYPTION_TYPE 0//3
181 /* Time interval between Beacon when device is in Access Point Mode */
182 #define TEA_DEFAULT_AP_BCN_INTERVAL 100
183 /* Default DTIM period when device is in Access Point Mode.*/
184 #define TEA_DEFAULT_AP_DTIM_PERIOD 3
185 /* Default WPS support flag when device is in Access Point Mode.*/
186 #define TEA_DEFAULT_AP_WPS_SUPPORT 0
187 /* Default hidden mode flag when device is in Access Point Mode.*/
188 #define TEA_DEFAULT_AP_HIDDEN_MODE 0
189 /* Number of channel in Access Point */
190 #define TEA_DEFAULT_AP_CHANNEL 11
191 /**********************************************************************************************/
192 
193 
194 /***************Default (IP) L3 Configurations for device in Access Point mode****************/
195 /* Flag to indicate static IP
196  1 - STATIC
197  2 - DHCP */
198 #define TEA_DEFAULT_AP_IP_FLAG 1 /*STATIC FLAG*/
199 /* The IP Address of the Access Point */
200 #define TEA_DEFAULT_AP_IP_ADDR MAKEIP(192,168,4,3) //"192.168.3.2"
201 /* The Gateway Address of the Access Point */
202 #define TEA_DEFAULT_AP_GATEWAY_ADDR MAKEIP(192,168,4,2) //"192.168.3.1"
203 /* The subnet mask of the Access Point */
204 #define TEA_DEFAULT_AP_SUBNET_MASK MAKEIP(255,255,255,0)
205 
206 /* Default Configurations of DHCP server */
207 /* DHCP start address at Access Point */
208 #define TEA_DEFAULT_AP_DHCP_IP_ADDR_START MAKEIP(192,168,4,5)
209 /* DHCP end address at Access Point */
210 #define TEA_DEFAULT_AP_DHCP_IP_ADDR_END MAKEIP(192,168,4,45)
211 
212 
213 /* Number of IP addresses allowed for DHCP at Access Point . No need of this parameter */
214 #define TEA_DEFAULT_AP_DHCP_IP_ADDR_RANGE 21//50
215 
216 /* Lease time for DHCP at Access Point */
217 #define TEA_DEFAULT_AP_DHCP_LEASE_TIME 86400000//60
218 /***********************************************************************************************/
219 
220 /* Default Configurations of Domain Name System */
221 
222 /* DNS service enable flag */
223 #define TEA_DEFAULT_DNS_ENABLE FALSE
224 /* Host Name of the Domain Name system */
225 #define TEA_DEFAULT_DNS_HOST_NAME "Telit"
226 /* IP Address of the Domain Name system */
227 #define TEA_DEFAULT_DNS_IP_ADRR MAKEIP(192,168,3,1)
228 /* Hop limit for DNS packets */
229 #define TEA_DEFAULT_DNS_TTL 60
230 
231 /* Default Configurations of Multicast Domain Name System Host and Server */
232 /* mDNS enable flag */
233 #define TEA_DEFAULT_MDNS_ENABLE FALSE
234 /* Enables MDNS service in application */
235 #define TEA_DEFAULT_MDNS_HOST_ENABLE 1
236 /* Host name of Multicast Domain Name System */
237 #define TEA_DEFAULT_MDNS_HOST_NAME "Telit"
238 /* Time to live for MDNS host packets */
239 #define TEA_DEFAULT_MDNS_HOST_TTL 60
240 
241 /* Service name of the Multicast Domain Name System */
242 #define TEA_DEFAULT_MDNS_SERVICE_NAME "_QCA4020"
243 /* Service type of the MDNS server */
244 #define TEA_DEFAULT_MDNS_SERVICE_TYPE "_MyDevice._tcp.local"
245 /* Service subtype of the MDNS server */
246 #define TEA_DEFAULT_MDNS_SERVICE_SUBTYPE ""
247 /* Default protocol for MDNS server */
248 #define TEA_DEFAULT_MDNS_SERVICE_PROTOCOL ""
249 /* Domain name of the MDNS server */
250 #define TEA_DEFAULT_MDNS_SERVICE_DOMAIN "Telit"
251 /* Text record of MDNS server */
252 #define TEA_DEFAULT_MDNS_SERVICE_TXT_RECORD "Telit"
253 /* MDNS server port number */
254 #define TEA_DEFAULT_MDNS_SERVICE_PORT 60
255 /* Hop Limit for the MDNS packets */
256 #define TEA_DEFAULT_MDNS_SERVICE_TTL 120
257 /* Enabling the MDNS server */
258 #define TEA_DEFAULT_MDNS_SERVICE_ENABLE FALSE
259 
260 /* Default Configurations of UDP */
261 #define TEA_DEFAULT_UDP_SERVER_ENABLE FALSE
262 /* UDP Server */
263 #define TEA_DEFAULT_UDP_SERVER 0
264 /* Local Port number of the UDP server */
265 #define TEA_DEFAULT_UDP_SERVER_LPORT 8355\
266 /* AFINET socket Address family of UPD */
267 #define TEA_DEFAULT_UDP_FAMILY M2MB_SOCKET_BSD_AF_INET
268 
269 /* Default Configurations of TCP */
270 #define TEA_DEFAULT_TCP_SERVER_ENABLE FALSE
271 /* Mention the TCP type, either server or client */
272 #define TEA_DEFAULT_TCP_TYPE DEFAULT_TCP_CLIENT
273 /* Local Port number of the TCP service */
274 #define TEA_DEFAULT_TCP_SERVER_LPORT 8366
275 /* Remote IP address of TCP server */
276 #define TEA_DEFAULT_TCP_IP_ADDR MAKEIP(192,168,16,42)
277 /* Port number of Remote TCP server */
278 #define TEA_DEFAULT_TCP_SERVER_RPORT 8377
279 /* AFINET socket Address family of TCP */
280 #define TEA_DEFAULT_TCP_FAMILY M2MB_SOCKET_BSD_AF_INET
281 
282 #define TEA_DEFAULT_TCP_SERVER 0//Check this
283 
284 /* Default configurations for UART PORT */
285 #define TEA_DEFAULT_UART_PORT M2MB_UART_HS_PORT_E
286 
287 #define TEA_DEFAULT_UART_CFG0_ENABLE TRUE
288 
289 #define TEA_DEFAULT_UART_CFG1_ENABLE TRUE
290 /* Baud rate of the QUART port */
291 #define TEA_DEFAULT_UART_BAUD_RATE 115200
292 /* UART parity mode indicating No parity */
293 #define TEA_DEFAULT_UART_PARITY_MODE 0
294 /* Number of UART bits to be used per character */
295 #define TEA_DEFAULT_UART_BITS_PER_CHAR 3
296 /* Number of stop bits in UART */
297 #define TEA_DEFAULT_UART_NUM_STOP_BITS 1
298 
299 /* Default Configurations for Debug interface */
300 /*
301  If XFP is Enabled then use 'M2MB_UART_DEBUG_PORT_E' for DEBUG module, as XFP uses 'M2MB_UART_HS_PORT_E' only
302 */
303 #define TEA_DEFAULT_DBG_ENABLE TRUE
304 /* UART Debug Port */
305 #define TEA_DEFAULT_DBG_PORT M2MB_UART_DEBUG_PORT_E
306 /* Enable command interface */
307 #define TEA_DEFAULT_DBG_ENABLE_CI FALSE
308 /* Total Size of the log buffer in bytes */
309 #define TEA_DEFAULT_DBG_BUFFER_SIZE 1024
310 /* Messages at or above the configured level are displayed or logged */
311 #define TEA_DEFAULT_DBG_LOG_LEVEL M2MB_DBG_LOG_SEVERITY_ERROR
312 
313 /*XFP default configurations*/
314 /*XFP Enable*/
315 #define TEA_DEFAULT_XFP_ENABLE FALSE
316 /*XFP Port*/
317 #define TEA_DEFAULT_XFP_PORT M2MB_UART_MAX_PORTS_E
318 
319 /* HTTP client default configurations */
320 /* Port number of the server */
321 #define TEA_DEFAULT_HTTPC_PORT 8080
322 /* URL of the server */
323 #define TEA_DEFAULT_HTTPC_URL "www.google.com"
324 /* Timeout (in ms) on an HTTP request */
325 #define TEA_DEFAULT_HTTPC_SESSION_TIMEOUT 6000
326 /* Size of header buffer in bytes for HTTP request */
327 #define TEA_DEFAULT_HTTPC_MAX_HDR_LEN 2000
328 /* Size of message-body buffer in bytes for HTTP request */
329 #define TEA_DEFAULT_HTTPC_MAX_BODY_LEN 5000
330 
331 /* HTTP/HTTPS server default configurations */
332 /* Listening port of the HTTP server */
333 #define TEA_DEFAULT_HTTP_PORT 80
334 /* Listening port of the HTTPS server */
335 #define TEA_DEFAULT_HTTPS_PORT 443
336 /* Default Size in bytes of the receive buffer if not specified */
337 #define TEA_DEFAULT_HTTP_RXBUFSIZE 1024
338 /* Default Size in bytes of the Transmit buffer if not specified */
339 #define TEA_DEFAULT_HTTP_TXBUFSIZE 2048
340 
341 /* Global typedefs ==============================================================================*/
349 typedef struct APP_CFG_S
350 {
355 }APP_CFG_T;
356 
364 typedef struct APP_PROFILE_CFG_S
365 {
370 
372 
373 #ifdef __cplusplus
374 }
375 #endif
376 #endif /* _TEA_APP_CFG_H_ */
struct APP_PROFILE_CFG_S APP_PROFILE_CFG_T
Application profile configuration structure.
Application configuration structure.
struct APP_CFG_S APP_CFG_T
Application configuration structure.
unsigned char UINT8
Definition: m2mb_types.h:86
System cfg structure.
Definition: m2mb_profile.h:846
Application profile configuration structure.
APP_PROFILE_CFG_T app_profile_cfg
unsigned long int UINT32
Definition: m2mb_types.h:88
M2MB_SYSTEM_CFG_T sys_cfg