12#ifndef __NETCFG_MODULE__
13#define __NETCFG_MODULE__
49#define VENDOR_TUYA (0x1 << 0)
50#define VENDOR_JD (0x1 << 1)
51#define VENDOR_WEIXIN (0x1 << 2)
52#define VENDOR_AMAZON (0x1 << 3)
54#define WIFI_SMARTCFG (0x1 << 0)
55#define WIFI_AP (0x1 << 1)
57#define CAMERA_QR (0x1 << 3)
58#define WIFI_SMARTCFG_COEXIST (0x1 << 4)
59#define WIFI_AP_COEXIST (0x1 << 5)
60#define WIFI_FFS (0x1 << 6)
61#define WIFI_PEGASUS (0x1 << 7)
62#define API_USER (0x1 << 8)
67#define NETCFG_TY_WIFI_SMARTCFG ((VENDOR_TUYA << 16) | WIFI_SMARTCFG)
69#define NETCFG_TY_WIFI_SMARTCFG_COEXIST ((VENDOR_TUYA << 16) | WIFI_SMARTCFG_COEXIST)
71#define NETCFG_TY_WIFI_AP ((VENDOR_TUYA << 16) | WIFI_AP)
73#define NETCFG_TY_WIFI_AP_COEXIST ((VENDOR_TUYA << 16) | WIFI_AP_COEXIST)
75#define NETCFG_TY_BLE ((VENDOR_TUYA << 16) | BLE)
77#define NETCFG_TY_CAMERA_QR ((VENDOR_TUYA << 16) | CAMERA_QR)
79#define NETCFG_TY_API_USER ((VENDOR_TUYA << 16) | API_USER)
80#define NETCFG_JD_WIFI_SMART ((VENDOR_JD << 16) | WIFI_SMARTCFG)
82#define NETCFG_WX_WIFI_AIRKISS ((VENDOR_WEIXIN << 16) | WIFI_SMARTCFG)
84#define NETCFG_AMAZON_WIFI_FFS ((VENDOR_AMAZON << 16) | (WIFI_FFS))
86#define NETCFG_TY_WIFI_PEGASUS ((VENDOR_TUYA << 16) | WIFI_PEGASUS)
88#define NETCFG_STOP_ALL_CFG_MODULE (0)
90#define DEF_AP_SSID_PF "SmartLife"
93 int enable_station_ap;
94 WF_AP_CFG_IF_S *pDevApCfg;
97#define WL_TOKEN_LEN (16)
105 uint8_t ssid[WIFI_SSID_LEN + 1];
109 uint8_t passwd[WIFI_PASSWD_LEN + 1];
113 uint8_t token[WL_TOKEN_LEN + 1];
313VOID_T netcfg_module_clear(VOID_T);
int netcfg_module_register(int type, FN_NETCFG_START start, FN_NETCFG_STOP stop)
register netcfg type
int netcfg_stop_other_all(int type)
stop all netcfg type except the specified type
int netcfg_start(int type, FN_NETCFG_CB netcfg_finish_cb, void *args)
start netcfg type
int netcfg_start_other_all(int type)
start all netcfg type except the specified type
int netcfg_module_uninit(VOID_T)
uninit netcfg module.
int netcfg_module_init(VOID_T)
init netcfg module.
int netcfg_module_unregister(int type)
unregister netcfg type
int(* FN_NETCFG_START)(FN_NETCFG_CB cb, void *args, int type)
netcfg start function.
Definition: netcfg_module.h:154
int netcfg_stop(int type)
stop netcfg type
int(* FN_NETCFG_CB)(PTR_SSID_PASSWORD_TOKEN info, int type)
netcfg finished callback function.
Definition: netcfg_module.h:140
int netcfg_set_transporter_switch_interval(int ms_interval)
set channel switch interval(default:110ms)
int(* FN_NETCFG_STOP)(int type)
netcfg stop function.
Definition: netcfg_module.h:166
struct apSsidPasswd_s ApSsidPasswd_t
ssid and password info
BOOL_T is_netcfg_module_inited(VOID_T)
whether netcfg module is inited or not
Definition: netcfg_module.h:92
netcfg handler
Definition: netcfg_module.h:172
LIST_HEAD node
Definition: netcfg_module.h:174
FN_NETCFG_STOP stop
Definition: netcfg_module.h:180
void * args
Definition: netcfg_module.h:184
FN_NETCFG_CB netcfg_finish_cb
Definition: netcfg_module.h:182
int type
Definition: netcfg_module.h:176
FN_NETCFG_START start
Definition: netcfg_module.h:178
bool isStarted
Definition: netcfg_module.h:186
ssid password and token info
Definition: netcfg_module.h:103
uint8_t p_len
Definition: netcfg_module.h:111
uint8_t s_len
Definition: netcfg_module.h:107
uint8_t t_len
Definition: netcfg_module.h:115
ssid and password info
Definition: netcfg_module.h:121
uint8_t * pPasswd
Definition: netcfg_module.h:125
uint8_t * pSsid
Definition: netcfg_module.h:123