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