WL865E4-P  36.07.001
m2mb_profile.h
Go to the documentation of this file.
1 /*===============================================================================================*/
2 /* >>> Copyright (C) Telit Communications S.p.A. Italy All Rights Reserved. <<< */
27 #ifndef _M2MB_PROFILE_H_
28 #define _M2MB_PROFILE_H_
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 #define M2M_PROFILE_DBG_PRINT(...)
35 
78 /*-----------------------------------------------------------------------------------------------*/
79 
84 /*-----------------------------------------------------------------------------------------------*/
85 
86 
87 /* Global declarations ==========================================================================*/
88 #define DEFAULT_TCP_SERVER 1
89 #define DEFAULT_TCP_CLIENT 2
90 #define DEFAULT_UDP_SOCKET 3
91 
92 /* Global typedefs ==============================================================================*/
93 
101 typedef enum M2MB_PROFILE_EVENT
102 {
154 
156 
157 extern UINT8* m2mb_profile_event_str[];
158 
160 {
161  return m2mb_profile_event_str[event];
162 }
163 
164 
211  UINT8 device_id,
212  M2MB_PROFILE_EVENT_T event,
213  M2MB_STATUS_T status,
214  VOID *pData
218  );
219 
228 typedef struct M2MB_WLAN_STA_CFG_S
229 {
232  UINT8 ssid[33];
234  UINT8 pwd[65];
246 
255 {
261 
269 typedef struct M2M_IP_CFG_S
270 {
279 
287 typedef struct M2MB_STA_SCAN_CFG_S
288 {
311 
319 typedef struct M2MB_ROAMING_CFG_S
320 {
332 
333 typedef struct M2MB_POWER_SAVE_CFG_S
334 {
341 
342 typedef struct M2MB_EAP_CONF_S
343 {
348  UINT8 id[33];
350 
358 typedef struct M2MB_STA_CFG_S
359 {
367 
378 {
379  UINT8 IP[16];
380  UINT8 DNS[16];
384 
385 
393 typedef struct M2MB_AP_WLAN_CFG_S
394 {
397  UINT8 ssid[33];
399  UINT8 pwd[65];
414 
422 typedef struct M2MB_DHCP_SRV_CFG_S
423 {
428 
436 typedef struct M2MB_AP_CFG_S
437 {
442 
453 {
454  UINT8 ssid[32];
455  UINT8 IP[16];
457 
466 typedef struct M2MB_DNS_HOST_CFG_S
467 {
469  UINT8 name[129];
470  UINT8 ip[24];
473 
482 {
486 
494 typedef struct M2MB_MDNS_HOST_CFG_S
495 {
500 
501 
510 {
521 
523 {
527 
535 typedef struct M2MB_MDNS_CFG_S
536 {
548 typedef struct M2MB_UDP_CFG_S
549 {
559 
567 typedef struct M2MB_UDP_CFG_ARRAY_S
568 {
572 
582 {
587  UINT16 port; // not valid for other connection: DEFAULT_TCP_CLIENT and DEFAULT_UDP_SOCKET
588  M2MB_IP46_ADDR_T addr; // not valid for other connection: DEFAULT_TCP_CLIENT and DEFAULT_UDP_SOCKET
591 
599 typedef struct M2MB_T_CFG_S
600 {
610 }M2MB_T_CFG_T;
611 
619 typedef struct M2MB_T_CFG_ARRAY_S
620 {
624 
632 typedef struct M2MB_PROFILE_UART_CFG
633 {
643 
653 {
657 
666 typedef struct M2MB_PROFILE_UART_CB
667 {
671 
680 {
684 
693 {
697 
705 typedef struct M2MB_HTTPC_CGF_S
706 {
713 
722 {
739 
748 {
750  CHAR name[129];
752 
761 {
765 
773 typedef struct M2MB_HTTPD_PROFILE_S
774 {
779 
787 typedef struct M2MB_SNTP_CFG_S
788 {
794 
795 typedef struct M2MB_RETRY_CFG_S
796 {
804 
812 typedef struct M2MB_BLE_CONN_PARAM_S
813 {
818 
820 {
823 
825 {
831 
832 typedef struct M2MB_BLE_DIS_INFO_S
833 {
839 
840 typedef struct M2MB_BLE_ADV_PARAM_S
841 {
847 
849 {
858 
859 typedef struct M2MB_BLE_CGF_S
860 {
868 
869 
877 typedef struct M2MB_SYSTEM_CFG_S
878 {
894 #ifdef M2M_HTTPD_PROFILE_ENABLE
895  M2MB_HTTPD_PROFILE_T httpd;
896 #endif
898 
900 
901 /*---------------------------------------------------------------------------*/
963 /*---------------------------------------------------------------------------*/
965 
966 /*---------------------------------------------------------------------------*/
1000 /*---------------------------------------------------------------------------*/
1002 
1003 /*---------------------------------------------------------------------------*/
1038 /*---------------------------------------------------------------------------*/
1040 
1044 /*-----------------------------------------------------------------------------------------------*/
1045 
1046 #ifdef __cplusplus
1047 }
1048 #endif
1049 #endif /* _M2MB_PROFILE_H_ */
struct M2MB_BLE_GENERAL_PARAM_S M2MB_BLE_GENERAL_PARAM_T
struct M2MB_PROFILE_SOC_RESULT M2MB_PROFILE_SOC_RESULT_T
Socket for UDP & TCP initialization result.
unsigned char UINT8
Definition: m2mb_types.h:83
M2MB_BLE_ADV_PARAM_T ble_advParam
Definition: m2mb_profile.h:865
STA structure used in user callback to update the status of STA initialization.
Definition: m2mb_profile.h:377
struct M2M_PROFILE_STA_SET_RESULT_S M2M_PROFILE_STA_SET_RESULT_T
STA structure used in user callback to update the status of STA initialization.
HTTP Server Profile cfg structure.
Definition: m2mb_profile.h:773
M2MB_IP_CFG_T ip
Definition: m2mb_profile.h:439
struct M2M_PROFILE_AP_SET_RESULT_S M2M_PROFILE_AP_SET_RESULT_T
AP structure used in user callback to update the status of AP initialization.
struct M2MB_ROAMING_CFG_S M2MB_ROAMING_CFG_T
Roaming cfg structure.
M2MB_RETRY_CFG_T ncm_retry_cfg
Definition: m2mb_profile.h:892
struct M2MB_UDP_CFG_ARRAY_S M2MB_UDP_CFG_ARRAY_T
UDP cfg structure for the system.
struct M2MB_SYSTEM_CFG_S M2MB_SYSTEM_CFG_T
System cfg structure.
UINT8 password[33]
Definition: m2mb_profile.h:347
const M2MB_JSON_COMPLEX_OBJ_T system_schema
struct M2MB_BLE_CONN_PARAM_S M2MB_BLE_CONN_PARAM_T
BLE cfg structure.
struct M2MB_T_CFG_S M2MB_T_CFG_T
TCP cfg structure.
M2MB_BLE_CENTRAL_CFG_T ble_centralCfg
Definition: m2mb_profile.h:862
struct M2MB_BLE_SECURITY_CFG_S M2MB_BLE_SECURITY_CFG_T
Debug module configuration context.
Definition: m2mb_dbg.h:141
DHCP server cfg structure.
Definition: m2mb_profile.h:422
M2MB_STA_SCAN_CFG_T scan
Definition: m2mb_profile.h:362
M2MB_BLE_CGF_T ble
Definition: m2mb_profile.h:893
INT32 M2MB_STATUS_T
Definition: m2mb_status.h:95
struct M2MB_DNS_HOST_CFG_S M2MB_DNS_HOST_CFG_T
DNS host cfg structure.
INT32 m2mb_profile_tcp_soc_init(M2MB_T_CFG_T *t_cfg)
m2mb_profile_tcp_soc_init is called to apply the profile related to TCP.
struct M2MB_UDP_CFG_S M2MB_UDP_CFG_T
UDP cfg structure.
struct M2MB_SNTP_CFG_S M2MB_SNTP_CFG_T
SNTP client cfg structure.
struct M2MB_MDNS_SERVICE_CFG_S M2MB_MDNS_SERVICE_CFG_T
MDNS service cfg structure.
struct M2MB_BLE_CGF_S M2MB_BLE_CGF_T
M2MB_MDNS_SERVICE_CFG_T cfg[1]
Definition: m2mb_profile.h:525
M2MB_PROFILE_UART_CFG_T uart[2]
Definition: m2mb_profile.h:888
M2MB_DBG_CFG_T d_cfg
Definition: m2mb_profile.h:682
UINT8 * serverName
Definition: m2mb_profile.h:791
M2MB_BLE_GENERAL_PARAM_T ble_genParam
Definition: m2mb_profile.h:866
M2MB_IP46_ADDR_T addr
Definition: m2mb_profile.h:588
MDNS host cfg structure.
Definition: m2mb_profile.h:494
struct M2MB_STA_SCAN_CFG_S M2MB_STA_SCAN_CFG_T
STA scan cfg structure.
struct M2MB_PROFILE_SOC_RESULT * next
Definition: m2mb_profile.h:589
struct M2MB_PROFILE_UART_CFG M2MB_PROFILE_UART_CFG_T
UART configuration structure.
M2MB_BLE_CONN_PARAM_T ble_connParam
Definition: m2mb_profile.h:861
M2MB_DHCP_SRV_CFG_T dhcp
Definition: m2mb_profile.h:440
M2MB_SNTP_CFG_T sntp_cfg
Definition: m2mb_profile.h:891
struct M2MB_T_CFG_ARRAY_S M2MB_TCP_CFG_ARRAY_T
TCP cfg structure for the system.
struct M2MB_WLAN_STA_CFG_ARRAY_S M2MB_WLAN_STA_CFG_ARRAY_T
Array of WLAN STATION configuration structure.
UDP cfg structure for the system.
Definition: m2mb_profile.h:567
UINT16 httpc_max_body_len
Definition: m2mb_profile.h:710
M2MB_DNS_HOST_CFG_ARRAY_T * pDNSHost
Definition: m2mb_profile.h:884
UINT32 inactivity_ap_period
Definition: m2mb_profile.h:411
M2MB_ROAMING_CFG_T roaming
Definition: m2mb_profile.h:363
UINT16 l3_retry_time_delay
Definition: m2mb_profile.h:800
M2MB_AP_CFG_T ap
Definition: m2mb_profile.h:883
struct M2MB_HTTPD_PROFILE_URI_INFO_S M2MB_HTTPD_PROFILE_URI_INFO_T
HTTP Server URI info structure.
M2MB_HTTPD_PROFILE_CFG_T cfg
Definition: m2mb_profile.h:776
UINT16 l4_retry_time_delay
Definition: m2mb_profile.h:802
INT32 m2mb_profile_apply(const M2MB_SYSTEM_CFG_T *pCfg, M2MB_PROFILE_APPLY_CB_T cb)
m2mb_profile_apply is called to apply the profile.
M2MB_DNS_HOST_CFG_T cfg[1]
Definition: m2mb_profile.h:484
M2MB_MDNS_CFG_T mdns
Definition: m2mb_profile.h:885
UINT32 force_scan_interval
Definition: m2mb_profile.h:327
struct M2MB_EAP_CONF_S M2MB_EAP_CONF_T
struct M2MB_MDNS_HOST_CFG_S M2MB_MDNS_HOST_CFG_T
MDNS host cfg structure.
M2MB_BLE_DIS_INFO_T ble_disInfo
Definition: m2mb_profile.h:864
struct M2MB_PROFILE_DBG_CFG_S M2MB_PROFILE_DBG_CFG_T
Debug configuration structure.
AP structure used in user callback to update the status of AP initialization.
Definition: m2mb_profile.h:452
WLAN sta structure.
Definition: m2mb_profile.h:228
struct M2MB_RETRY_CFG_S M2MB_RETRY_CFG_T
UART initialization result.
Definition: m2mb_profile.h:652
struct M2MB_MDNS_SERVICE_CFG_ARRAY_S M2MB_MDNS_SERVICE_CFG_ARRAY_T
unsigned short UINT16
Definition: m2mb_types.h:84
struct M2MB_AP_CFG_S M2MB_AP_CFG_T
AP cfg structure.
M2MB_HTTPD_PROFILE_URI_CFG_ARRAY_T * pURI
Definition: m2mb_profile.h:777
struct M2MB_WLAN_STA_CFG_S M2MB_WLAN_STA_CFG_T
WLAN sta structure.
M2MB_STA_CFG_T sta
Definition: m2mb_profile.h:882
struct M2MB_BLE_DIS_INFO_S M2MB_BLE_DIS_INFO_T
unsigned long int UINT32
Definition: m2mb_types.h:85
enum M2MB_PROFILE_EVENT M2MB_PROFILE_EVENT_T
Profile event enumeration.
char CHAR
Definition: m2mb_types.h:74
HTTP Server cfg structure.
Definition: m2mb_profile.h:721
Array of DNS host cfg structure.
Definition: m2mb_profile.h:481
BLE cfg structure.
Definition: m2mb_profile.h:812
AP cfg structure.
Definition: m2mb_profile.h:436
struct M2MB_STA_CFG_S M2MB_STA_CFG_T
STA cfg structure.
M2MB_HTTPD_PROFILE_URI_INFO_T info[]
Definition: m2mb_profile.h:763
UINT8 username[33]
Definition: m2mb_profile.h:346
M2MB_IP_CFG_T ip
Definition: m2mb_profile.h:361
M2MB_WLAN_STA_CFG_ARRAY_T * pWlan
Definition: m2mb_profile.h:360
UINT32 ip_dns2
Definition: m2mb_profile.h:276
M2MB_EAP_CONF_T eap_conf
Definition: m2mb_profile.h:365
TCP cfg structure.
Definition: m2mb_profile.h:599
INT32 m2mb_profile_udp_soc_init(M2MB_UDP_CFG_T *udp_cfg)
m2mb_profile_udp_soc_init is called to apply the profile related to UDP.
UDP cfg structure.
Definition: m2mb_profile.h:548
M2MB_TCP_CFG_ARRAY_T * pTcp
Definition: m2mb_profile.h:887
void VOID
Definition: m2mb_types.h:72
Socket IPv4/IPv6 Internet address union.
Definition: m2mb_socket.h:347
struct M2MB_HTTPD_PROFILE_CFG_S M2MB_HTTPD_PROFILE_CFG_T
HTTP Server cfg structure.
M2MB_PROFILE_EVENT
Profile event enumeration.
Definition: m2mb_profile.h:101
MDNS service cfg structure.
Definition: m2mb_profile.h:509
M2MB_AP_WLAN_CFG_T wlan
Definition: m2mb_profile.h:438
DNS host cfg structure.
Definition: m2mb_profile.h:466
struct M2MB_BLE_CENTRAL_CFG_S M2MB_BLE_CENTRAL_CFG_T
struct M2MB_HTTPD_PROFILE_URI_CFG_ARRAY_S M2MB_HTTPD_PROFILE_URI_CFG_ARRAY_T
HTTP Server URI config structure.
M2MB_PROFILE_XFP_CFG_T xfp_cfg
Definition: m2mb_profile.h:890
IP cfg structure.
Definition: m2mb_profile.h:269
Debug configuration structure.
Definition: m2mb_profile.h:679
struct M2MB_PROFILE_XFP_CFG_S M2MB_PROFILE_XFP_CFG_T
XFP configuration structure.
Json complex object structure.
Definition: m2mb_json.h:244
void * HANDLE
Definition: m2mb_types.h:95
signed int INT32
Definition: m2mb_types.h:80
UINT32 ip_subnet
Definition: m2mb_profile.h:273
UART configuration structure.
Definition: m2mb_profile.h:632
UINT32 poll_interval
Definition: m2mb_profile.h:792
struct M2MB_MDNS_CFG_S M2MB_MDNS_CFG_T
MDNS cfg structure.
M2MB_T_CFG_T t_cfg[]
Definition: m2mb_profile.h:622
Socket for UDP & TCP initialization result.
Definition: m2mb_profile.h:581
M2MB_MDNS_SERVICE_CFG_ARRAY_T * pService
Definition: m2mb_profile.h:539
M2MB_BLE_SECURITY_CFG_T ble_securityCfg
Definition: m2mb_profile.h:863
UINT8 * m2mb_profile_event_str[]
System cfg structure.
Definition: m2mb_profile.h:877
MDNS cfg structure.
Definition: m2mb_profile.h:535
UINT32 ip_dns1
Definition: m2mb_profile.h:275
STA cfg structure.
Definition: m2mb_profile.h:358
unsigned long long UINT64
Definition: m2mb_types.h:87
HTTP Server URI config structure.
Definition: m2mb_profile.h:760
struct M2MB_BLE_ADV_PARAM_S M2MB_BLE_ADV_PARAM_T
Roaming cfg structure.
Definition: m2mb_profile.h:319
HTTP client cfg structure.
Definition: m2mb_profile.h:705
M2MB_PROFILE_DBG_CFG_T dbg_cfg
Definition: m2mb_profile.h:889
UINT8 channel_list[10]
Definition: m2mb_profile.h:330
Array of WLAN STATION configuration structure.
Definition: m2mb_profile.h:254
M2MB_WLAN_STA_CFG_T wlan[1]
Definition: m2mb_profile.h:259
UART read and write callback data structure.
Definition: m2mb_profile.h:666
char * m2mb_get_profile_event_string(M2MB_PROFILE_EVENT_T event)
Definition: m2mb_profile.h:159
M2MB_PROFILE_EVENT_T event
Definition: m2mb_profile.h:881
struct M2M_IP_CFG_S M2MB_IP_CFG_T
IP cfg structure.
struct M2MB_PROFILE_UART_OPEN_CB M2MB_PROFILE_UART_OPEN_CB_T
UART initialization result.
TCP cfg structure for the system.
Definition: m2mb_profile.h:619
UINT16 l2_retry_time_delay
Definition: m2mb_profile.h:798
UINT16 httpc_max_header_len
Definition: m2mb_profile.h:711
M2MB_POWER_SAVE_CFG_T power_save
Definition: m2mb_profile.h:364
struct M2MB_POWER_SAVE_CFG_S M2MB_POWER_SAVE_CFG_T
M2MB_STATUS_T(* M2MB_PROFILE_APPLY_CB_T)(UINT8 device_id, M2MB_PROFILE_EVENT_T event, M2MB_STATUS_T status, VOID *pData)
Profile apply callback prototype.
Definition: m2mb_profile.h:210
struct M2MB_DHCP_SRV_CFG_S M2MB_DHCP_SRV_CFG_T
DHCP server cfg structure.
AP WLAN cfg structure.
Definition: m2mb_profile.h:393
M2MB_UDP_CFG_T udp_cfg[]
Definition: m2mb_profile.h:570
UINT16 rssi_high_threshold
Definition: m2mb_profile.h:323
SNTP client cfg structure.
Definition: m2mb_profile.h:787
struct M2MB_HTTPD_PROFILE_S M2MB_HTTPD_PROFILE_T
HTTP Server Profile cfg structure.
M2MB_PROFILE_UART_CFG_T * pCfg
Definition: m2mb_profile.h:654
struct M2MB_PROFILE_UART_CB M2MB_PROFILE_UART_CB_T
UART read and write callback data structure.
HTTP Server URI info structure.
Definition: m2mb_profile.h:747
struct M2MB_DNS_HOST_CFG_ARRAY_S M2MB_DNS_HOST_CFG_ARRAY_T
Array of DNS host cfg structure.
STA scan cfg structure.
Definition: m2mb_profile.h:287
struct M2MB_AP_WLAN_CFG_S M2MB_AP_WLAN_CFG_T
AP WLAN cfg structure.
struct M2MB_HTTPC_CGF_S M2MB_HTTPC_CFG_ARRAY_T
HTTP client cfg structure.
XFP configuration structure.
Definition: m2mb_profile.h:692
M2MB_MDNS_HOST_CFG_T host
Definition: m2mb_profile.h:538
M2MB_UDP_CFG_ARRAY_T * pUdp
Definition: m2mb_profile.h:886