12#ifndef __NETCFG_MODULE__
13#define __NETCFG_MODULE__
15#include "tuya_hal_wifi.h"
46#define VENDOR_TUYA (0x1 << 0)
47#define VENDOR_JD (0x1 << 1)
48#define VENDOR_WEIXIN (0x1 << 2)
49#define VENDOR_AMAZON (0x1 << 3)
51#define WIFI_SMARTCFG (0x1 << 0)
52#define WIFI_AP (0x1 << 1)
54#define CAMERA_QR (0x1 << 3)
55#define WIFI_SMARTCFG_COEXIST (0x1 << 4)
56#define WIFI_AP_COEXIST (0x1 << 5)
57#define WIFI_FFS (0x1 << 6)
58#define WIFI_PEGASUS (0x1 << 7)
59#define API_USER (0x1 << 8)
64#define NETCFG_TY_WIFI_SMARTCFG ((VENDOR_TUYA << 16) | WIFI_SMARTCFG)
66#define NETCFG_TY_WIFI_SMARTCFG_COEXIST ((VENDOR_TUYA << 16) | WIFI_SMARTCFG_COEXIST)
68#define NETCFG_TY_WIFI_AP ((VENDOR_TUYA << 16) | WIFI_AP)
70#define NETCFG_TY_WIFI_AP_COEXIST ((VENDOR_TUYA << 16) | WIFI_AP_COEXIST)
72#define NETCFG_TY_BLE ((VENDOR_TUYA << 16) | BLE)
74#define NETCFG_TY_CAMERA_QR ((VENDOR_TUYA << 16) | CAMERA_QR)
76#define NETCFG_TY_API_USER ((VENDOR_TUYA << 16) | API_USER)
77#define NETCFG_JD_WIFI_SMART ((VENDOR_JD << 16) | WIFI_SMARTCFG)
79#define NETCFG_WX_WIFI_AIRKISS ((VENDOR_WEIXIN << 16) | WIFI_SMARTCFG)
81#define NETCFG_AMAZON_WIFI_FFS ((VENDOR_AMAZON << 16) | (WIFI_FFS))
83#define NETCFG_TY_WIFI_PEGASUS ((VENDOR_TUYA << 16) | WIFI_PEGASUS)
85#define NETCFG_STOP_ALL_CFG_MODULE (0)
87#define DEF_AP_SSID_PF "SmartLife"
90 int enable_station_ap;
94#define WL_TOKEN_LEN (16)
102 uint8_t ssid[WIFI_SSID_LEN + 1];
106 uint8_t passwd[WIFI_PASSWD_LEN + 1];
110 uint8_t token[WL_TOKEN_LEN + 1];
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:151
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:137
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:163
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:89
netcfg handler
Definition: netcfg_module.h:169
LIST_HEAD node
Definition: netcfg_module.h:171
FN_NETCFG_STOP stop
Definition: netcfg_module.h:177
void * args
Definition: netcfg_module.h:181
FN_NETCFG_CB netcfg_finish_cb
Definition: netcfg_module.h:179
int type
Definition: netcfg_module.h:173
FN_NETCFG_START start
Definition: netcfg_module.h:175
bool isStarted
Definition: netcfg_module.h:183
ssid password and token info
Definition: netcfg_module.h:100
uint8_t p_len
Definition: netcfg_module.h:108
uint8_t s_len
Definition: netcfg_module.h:104
uint8_t t_len
Definition: netcfg_module.h:112
Definition: tkl_wifi.h:75
ssid and password info
Definition: netcfg_module.h:118
uint8_t * pPasswd
Definition: netcfg_module.h:122
uint8_t * pSsid
Definition: netcfg_module.h:120
bidirection list head
Definition: tuya_list.h:25
tuya bidirection list module