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