WE310F5  39.00.000
hello_world/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 2 /* Can be STATION_MODE : 1 or AP_MODE : 0 */
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 "Telit_Guest"
55  /* Default channel number in STA mode. */
56 #define TEA_DEFUALT_STA_CHANNEL 6
57  /* Pass phrase of network when device in STA mode */
58 #define TEA_DEFAULT_STA_PASSPHRASE "qwerty123456"
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 1 /* 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 FALSE
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 
137 
138  /***********Default (WLAN) L2 Configurations for device in Access Point mode****************/
139  /* The SSID of the Access Point */
140 #define TEA_DEFAULT_AP_SSID "ap_testing2"
141  /* The Pass phrase of the Access Point */
142 #define TEA_DEFAULT_AP_PASSPHRASE "123454321"
143  /* Security type for Access Point
144  0 - NONE
145  3 - WPA-PSK
146  4 - WPA2-PSK
147  8 - WEP */
148 #define TEA_DEFAULT_AP_SECURITY_TYPE 4
149  /* Encryption type for the Station .
150  0 - NONE
151  1 - WEP
152  2 - TKIP
153  3 - AES */
154 #define TEA_DEFAULT_AP_ENCRYPTION_TYPE 3
155  /* Time interval between Beacon when device is in Access Point Mode */
156 #define TEA_DEFAULT_AP_BCN_INTERVAL 100
157  /* Default DTIM period when device is in Access Point Mode.*/
158 #define TEA_DEFAULT_AP_DTIM_PERIOD 3
159  /* Default WPS support flag when device is in Access Point Mode.*/
160 #define TEA_DEFAULT_AP_WPS_SUPPORT 0
161  /* Default hidden mode flag when device is in Access Point Mode.*/
162 #define TEA_DEFAULT_AP_HIDDEN_MODE 0
163  /* Number of channel in Access Point */
164 #define TEA_DEFAULT_AP_CHANNEL 11
165  /**********************************************************************************************/
166 
167 
168  /***************Default (IP) L3 Configurations for device in Access Point mode****************/
169  /* Flag to indicate static IP
170  1 - STATIC
171  2 - DHCP */
172 #define TEA_DEFAULT_AP_IP_FLAG 1 /*STATIC FLAG*/
173  /* The IP Address of the Access Point */
174 #define TEA_DEFAULT_AP_IP_ADDR MAKEIP(192,168,4,3) //"192.168.3.2"
175  /* The Gateway Address of the Access Point */
176 #define TEA_DEFAULT_AP_GATEWAY_ADDR MAKEIP(192,168,4,2) //"192.168.3.1"
177  /* The subnet mask of the Access Point */
178 #define TEA_DEFAULT_AP_SUBNET_MASK MAKEIP(255,255,255,0)
179 
180  /* Default Configurations of DHCP server */
181  /* DHCP start address at Access Point */
182 #define TEA_DEFAULT_AP_DHCP_IP_ADDR_START MAKEIP(192,168,4,5)
183  /* DHCP end address at Access Point */
184 #define TEA_DEFAULT_AP_DHCP_IP_ADDR_END MAKEIP(192,168,4,45)
185 
186 
187  /* Number of IP addresses allowed for DHCP at Access Point . No need of this parameter */
188 #define TEA_DEFAULT_AP_DHCP_IP_ADDR_RANGE 21 //50
189 
190  /* Lease time for DHCP at Access Point */
191 #define TEA_DEFAULT_AP_DHCP_LEASE_TIME 86400000//60
192  /***********************************************************************************************/
193 
194  /* Default Configurations of Domain Name System */
195 
196  /* DNS service enable flag */
197 #define TEA_DEFAULT_DNS_ENABLE FALSE
198  /* Host Name of the Domain Name system */
199 #define TEA_DEFAULT_DNS_HOST_NAME "Telit"
200  /* IP Address of the Domain Name system */
201 #define TEA_DEFAULT_DNS_IP_ADRR MAKEIP(192,168,3,1)
202  /* Hop limit for DNS packets */
203 #define TEA_DEFAULT_DNS_TTL 60
204 
205  /* Default Configurations of Multicast Domain Name System Host and Server */
206  /* mDNS enable flag */
207 #define TEA_DEFAULT_MDNS_ENABLE FALSE
208  /* Enables MDNS service in application */
209 #define TEA_DEFAULT_MDNS_HOST_ENABLE 1
210  /* Host name of Multicast Domain Name System */
211 #define TEA_DEFAULT_MDNS_HOST_NAME "Telit"
212  /* Time to live for MDNS host packets */
213 #define TEA_DEFAULT_MDNS_HOST_TTL 60
214 
215  /* Service name of the Multicast Domain Name System */
216 #define TEA_DEFAULT_MDNS_SERVICE_NAME "_QCA4020"
217  /* Service type of the MDNS server */
218 #define TEA_DEFAULT_MDNS_SERVICE_TYPE "_MyDevice._tcp.local"
219  /* Service subtype of the MDNS server */
220 #define TEA_DEFAULT_MDNS_SERVICE_SUBTYPE ""
221  /* Default protocol for MDNS server */
222 #define TEA_DEFAULT_MDNS_SERVICE_PROTOCOL ""
223  /* Domain name of the MDNS server */
224 #define TEA_DEFAULT_MDNS_SERVICE_DOMAIN "Telit"
225  /* Text record of MDNS server */
226 #define TEA_DEFAULT_MDNS_SERVICE_TXT_RECORD "Telit"
227  /* MDNS server port number */
228 #define TEA_DEFAULT_MDNS_SERVICE_PORT 60
229  /* Hop Limit for the MDNS packets */
230 #define TEA_DEFAULT_MDNS_SERVICE_TTL 120
231  /* Enabling the MDNS server */
232 #define TEA_DEFAULT_MDNS_SERVICE_ENABLE FALSE
233 
234  /* Default Configurations of UDP */
235 #define TEA_DEFAULT_UDP_SERVER_ENABLE FALSE
236  /* UDP Server */
237 #define TEA_DEFAULT_UDP_SERVER 0
238  /* Local Port number of the UDP server */
239 #define TEA_DEFAULT_UDP_SERVER_LPORT 8355
240  /* AFINET socket Address family of UPD */
241 #define TEA_DEFAULT_UDP_FAMILY M2MB_SOCKET_BSD_AF_INET
242 
243  /* Default Configurations of TCP */
244 #define TEA_DEFAULT_TCP_SERVER_ENABLE FALSE
245  /* Mention the TCP type, either server or client */
246 #define TEA_DEFAULT_TCP_TYPE DEFAULT_TCP_CLIENT
247  /* Local Port number of the TCP service */
248 #define TEA_DEFAULT_TCP_SERVER_LPORT 8366
249  /* Remote IP address of TCP server */
250 #define TEA_DEFAULT_TCP_IP_ADDR MAKEIP(192,168,16,42)
251  /* Port number of Remote TCP server */
252 #define TEA_DEFAULT_TCP_SERVER_RPORT 8377
253  /* AFINET socket Address family of TCP */
254 #define TEA_DEFAULT_TCP_FAMILY M2MB_SOCKET_BSD_AF_INET
255 
256 #define TEA_DEFAULT_TCP_SERVER 0//Check this
257 
258  /* Default configurations for UART PORT */
259 #define TEA_DEFAULT_UART_PORT M2MB_UART_HS_PORT_E
260 
261 #define TEA_DEFAULT_UART_CFG0_ENABLE TRUE
262 
263 #define TEA_DEFAULT_UART_CFG1_ENABLE TRUE
264  /* Baud rate of the QUART port */
265 #define TEA_DEFAULT_UART_BAUD_RATE 115200
266  /* UART parity mode indicating No parity */
267 #define TEA_DEFAULT_UART_PARITY_MODE 0
268  /* Number of UART bits to be used per character */
269 #define TEA_DEFAULT_UART_BITS_PER_CHAR 3
270  /* Number of stop bits in UART */
271 #define TEA_DEFAULT_UART_NUM_STOP_BITS 1
272 
273  /* Default Configurations for Debug interface */
274  /*
275 If XFP is Enabled then use 'M2MB_UART_DEBUG_PORT_E' for DEBUG module, as XFP uses 'M2MB_UART_HS_PORT_E' only
276 */
277 #define TEA_DEFAULT_DBG_ENABLE TRUE
278  /* UART Debug Port */
279 #define TEA_DEFAULT_DBG_PORT M2MB_UART_DEBUG_PORT_E
280  /* Enable command interface */
281 #define TEA_DEFAULT_DBG_ENABLE_CI FALSE
282  /* Total Size of the log buffer in bytes */
283 #define TEA_DEFAULT_DBG_BUFFER_SIZE 1024
284  /* Messages at or above the configured level are displayed or logged */
285 #define TEA_DEFAULT_DBG_LOG_LEVEL M2MB_DBG_LOG_SEVERITY_ERROR
286 
287  /*XFP default configurations*/
288  /*XFP Enable*/
289 #define TEA_DEFAULT_XFP_ENABLE FALSE
290  /*XFP Port : HS port is Mandatory */
291 #define TEA_DEFAULT_XFP_PORT M2MB_UART_MAX_PORTS_E //M2MB_UART_HS_PORT_E
292 
293  /* HTTP client default configurations */
294  /* Port number of the server */
295 #define TEA_DEFAULT_HTTPC_PORT 8080
296  /* URL of the server */
297 #define TEA_DEFAULT_HTTPC_URL "www.google.com"
298  /* Timeout (in ms) on an HTTP request */
299 #define TEA_DEFAULT_HTTPC_SESSION_TIMEOUT 6000
300  /* Size of header buffer in bytes for HTTP request */
301 #define TEA_DEFAULT_HTTPC_MAX_HDR_LEN 2000
302  /* Size of message-body buffer in bytes for HTTP request */
303 #define TEA_DEFAULT_HTTPC_MAX_BODY_LEN 5000
304 
305  /* HTTP/HTTPS server default configurations */
306  /* Listening port of the HTTP server */
307 #define TEA_DEFAULT_HTTP_PORT 80
308  /* Listening port of the HTTPS server */
309 #define TEA_DEFAULT_HTTPS_PORT 443
310  /* Default Size in bytes of the receive buffer if not specified */
311 #define TEA_DEFAULT_HTTP_RXBUFSIZE 1024
312  /* Default Size in bytes of the Transmit buffer if not specified */
313 #define TEA_DEFAULT_HTTP_TXBUFSIZE 2048
314 
315 
316 #ifdef __cplusplus
317 }
318 #endif
319 
322 #endif /* _TEA_APP_CFG_H_ */