WI-FI
Network Manager
Network Manager provide support for configuring and monitoring WI-FI networking functionality. We strongly recommend enabling network manager due to the rebust usage of Wi-Fi networking.
Header File -
quick_dev/app_ref/mngr_api/net_mngr_api.h
API List -
API Name |
---|
APP_NmInit |
APP_NmInitAndCnct |
APP_NmEventProc |
APP_NmQuickCnctSetReq |
APP_NmWifiScanReq |
APP_NmWifiCnctReq |
Functions -
APP_NmInit
- Prototype
T_oplErr APP_NmInit(uint8_t u8AcEnable, T_NmUslctdCbFp fpUslctdCb)
- Description
Network manager initiate function (optional to assign unsolicited callback)
- Return
Reference to opl_err
- Parameters
u8AcEnable: enable auto-connect
fpUslctdCb: unsolicited callback function pointer
APP_NmInitAndCnct
- Prototype
T_OplErr APP_NmInitAndCnct(T_NmUslctdCbFp fpUslctdCb, T_NmWifiCnctConfig *ptNmWifiCnctConfig);
- Description
Network manager initiate function and trigger WI-FI connect direclty
Info
optional to assign unsolicited callback
Info
SSID & PWD connection only, and will clear all profile record only store the assigned one
- Return
Reference to opl_err
- Parameters
fpUslctdCb: unsolicited callback function pointer
ptNmWifiCnctConfig: WI-FI connect config
APP_NmEventProc
- Prototype
T_OplErr APP_NmEventProc(uint32_t u32EventId, uint8_t *u8Data, uint32_t u32DataLen);
- Description
Network manager event process (context in app_main, should runs in app_main task)
- Return
Reference to opl_err
- Parameters
u32EventId: network manager event ID
u8Data: data send to network manager
data lens send to network manager
APP_NmQuickCnctSetReq
- Prototype
T_OplErr APP_NmQuickCnctSetReq(T_NmWifiQCnctSet *ptNmWifiQCnctSet, T_NmQCnctSetIndCbFp fpIndCb);
- Description
Trigger Wi-Fi quick connect set request, that is insert AP profile and enable auto
- Return
Reference to opl_err
- Parameters
fpIndCb: indicate callback function pointer (if required)
APP_NmWifiScanReq
- Prototype
T_OplErr APP_NmWifiScanReq(T_NmScanDoneIndCbFp fpIndCb);
- Description
Trigger WI-FI scan request, and carried the scan result in indicate callback
- Return
Reference to opl_err
- Parameters
fpIndCb: indicate callback function pointer (if required)
APP_NmWifiCnctReq
- Prototype
T_OplErr APP_NmWifiCnctReq(T_NmWifiCnctConfig *ptNmWifiCnctConfig, T_NmCnctIndCbFp fpIndCb);
- Description
Trigger WI-FI connect request, and carried the connect result in indicate callback
- Return
Reference to opl_err
- Parameters
ptWmWifiCnctConfig: WI-FI connect configuration
fpIndCb: indicate callback function pointer (if required)
WI-FI Manager
Header File -
quick_dev/app_ref/mngr_api/wifi_mngr_api.h
API List -
Functions -
Opl_Wifi_Init_Req
- Prototype
T_OplErr Opl_Wifi_Init_Req(T_WaInitDoneIndCbFp fpIndCb);
- Description
WI-FI manager initiate function, and carried the init result in indicate callback
- Return
Reference to opl_err
- Parameters
fpUslctdCb: unsolicited callback function pointer
Opl_Wifi_Scan_Req
- Prototype
T_OplErr Opl_Wifi_Scan_Req(wifi_scan_config_t *ptWifiScanConfig, T_WaScanDoneIndCbFp fpIndCb);
- Description
Trigger WI-FI scan request, and carried the scan result in indicate callback
- Return
Reference to opl_err
- Parameters
ptWifiScanConfig: scan config structure
fpIndCb: indicate callback function pointer (if required)
Opl_Wifi_Conn_Req
- Prototype
T_OplErr Opl_Wifi_Conn_Req(T_WmConnConfig *ptWifiConnConfig, T_WaConnectIndCbFp fpIndCb);
- Description
Trigger WI-FI connect request, and carried the connect result in indicate callback
- Return
Reference to opl_err
- Parameters
ptWifiConnConfig: connect config structure
fpIndCb: indicate callback function pointer (if required)
Opl_Wifi_Disc_Req
- Prototype
T_OplErr Opl_Wifi_Disc_Req(T_WaDisconnectIndCbFp fpIndCb);
- Description
Trigger WI-FI disconnect request, and carried the disconnect result in indicate callback
- Return
Reference to opl_err
- Parameters
fpIndCb: indicate callback function pointer (if required)
Opl_Wifi_Uslctd_CB_Reg
- Prototype
T_OplErr Opl_Wifi_Uslctd_CB_Reg(T_WmUslctedCbFp fpUslctdCb);
- Description
Register unsolicited callback for WI-FI manager
- Return
Reference to opl_err
- Parameters
indicate callback function pointer (if required)
Opl_Wifi_AC_Enable_Req
- Prototype
T_OplErr Opl_Wifi_AC_Enable_Req(T_AcEnableIndCbFp fpIndCb);
- Description
Enable auto-connect request, and carried the enable result in indicate callback
- Return
Reference to opl_err
- Parameters
fpIndCb: indicate callback function pointer (if required)
Opl_Wifi_AC_Disable_Req
- Prototype
T_OplErr Opl_Wifi_AC_Disable_Req(bool blActDisconnect, T_AcDisableIndCbFp fpIndCb);
- Description
Disable auto-connect request, and carried the disabled result in indicate callback
- Return
Reference to opl_err
- Parameters
blActDisconnect:
true -> will do WI-FI disconnect while disable auto-connect
false -> will not do WI-FI disconnect while disable auto-connect
fpIndCb: indicate callback function pointer (if required)
Opl_Wifi_Profile_Ins
- Prototype
void Opl_Wifi_Profile_Ins(T_PrApProfile tNewProfile);
- Description
Insert WI-FI AP information into AP profile list
- Return
None
- Parameters
tNewProfile: AP information structure
Opl_Wifi_Profile_Get
- Prototype
T_PrApProfilePtr Opl_Wifi_Profile_Get(void);
- Description
Get WI-FI AP profile list
- Return
AP profile list
- Parameters
None
Opl_Wifi_Profile_Clear
- Prototype
void Opl_Wifi_Profile_Clear(void);
- Description
Clear WI-FI AP profile list
- Return
None
- Parameters
None
Opl_Wifi_ApInfo_Get
- Prototype
T_OplErr Opl_Wifi_ApInfo_Get(wifi_ap_record_t *ptApRecord);
- Description
Get WI-FI AP information
- Return
Reference to opl_err
- Parameters
ptApRecord: AP information
Opl_Wifi_MacAddr_Get
- Prototype
T_OplErr Opl_Wifi_MacAddr_Get(uint8_t *pu8Address);
- Description
Get WI-FI mac address
- Return
Reference to opl_err
- Parameters
pu8Address: WI-FI mac address
Opl_Wifi_ManufName_Get
- Prototype
T_OplErr Opl_Wifi_ManufName_Get(uint8_t *pu8Name);
- Description
Get manufacturer name
- Return
Reference to opl_err
- Parameters
pu8Name: manufacturer name
Opl_Wifi_ConfigSource_Get
- Prototype
T_OplErr Opl_Wifi_ConfigSource_Get(T_WmWifiGetConfigSource *tWmWifiGetConfigSource);
- Description
Get configure source
- Return
Reference to opl_err
- Parameters
tWmWifiGetConfigSource: configure source structure
Opl_Wifi_Rssi_Get
- Prototype
T_OplErr Opl_Wifi_Rssi_Get(int8_t *pi8Rssi);
- Description
Get current rssi value
- Return
Reference to opl_err
- Parameters
pi8Rssi: rssi value
Opl_Wifi_ApNum_Get
- Prototype
T_OplErr Opl_Wifi_ApNum_Get(uint16_t *pu16ApCount, wifi_scan_info_t *ptScanInfo);
- Description
Get AP scanned number
- Return
Reference to opl_err
- Parameters
pu16ApCount: count number of AP
ptScanInfo: sacn information structure
Opl_Wifi_ApRecord_Get
- Prototype
T_OplErr Opl_Wifi_ApRecord_Get(uint16_t *pu16ApCount, wifi_scan_info_t *ptScanInfo);
- Description
Get AP record
- Return
Reference to opl_err
- Parameters
pu16ApCount: count number of AP
ptScanInfo: sacn information structure
Opl_Wifi_AutoConnectApNum_Get
- Prototype
T_OplErr Opl_Wifi_AutoConnectApNum_Get(uint8_t *pu8Num);
- Description
Get auto-connect AP number
- Return
Reference to opl_err
- Parameters
Pu8Num: auto-connect AP number
Opl_Wifi_AutoConnectApInfo_Get
- Prototype
T_OplErr Opl_Wifi_AutoConnectApInfo_Get(uint8_t u8Index, wifi_auto_connect_info_t *ptAutoConnInfo);
- Description
Get specific auto-connect AP information
- Return
Reference to opl_err
- Parameters
u8Index: index of auto-connect list
ptAutoConnInfo: auto-connect AP information structure
Opl_Wifi_AutoConnectListNum_Get
- Prototype
T_OplErr Opl_Wifi_AutoConnectListNum_Get(uint8_t *pu8Num);
- Description
Get auto-connect list number
- Return
Reference to opl_err
- Parameters
Pu8Num: auto-connect list number
Opl_Wifi_ScanList_Get
- Prototype
T_OplErr Opl_Wifi_ScanList_Get(wifi_scan_list_t *ptScanList);
- Description
Get scan list result
- Return
Reference to opl_err
- Parameters
ptScanList: scan list structure
Opl_Wifi_MacAddr_Set
- Prototype
T_OplErr Opl_Wifi_MacAddr_Set(uint8_t *pu8Address);
- Description
Set Wi-Fi mac address
- Return
Reference to opl_err
- Parameters
pu8Address: WI-FI mac address
Opl_Wifi_ManufName_Set
- Prototype
T_OplErr Opl_Wifi_ManufName_Set(uint8_t *pu8Name);
- Description
Set manufacturer name
- Return
Reference to opl_err
- Parameters
tWmWifiSetConfigSource: configure source structure
Opl_Wifi_ConfigSource_Set
- Prototype
T_OplErr Opl_Wifi_ConfigSource_Set(T_WmWifiSetConfigSource *tWmWifiSetConfigSource);
- Description
Set configure sourse
- Return
Reference to opl_err
- Parameters
tWmWifiSetConfigSource: configure source structure
Opl_Wifi_Skip_Dtim_Module_Reg
- Prototype
T_OplErr Opl_Wifi_Skip_Dtim_Module_Reg(uint16_t *u16ModuleId);
- Description
Resgister skip DTIM module
- Return
Reference to opl_err
- Parameters
u16ModuleId: skip DTIM module ID
Opl_Wifi_Skip_Dtim_Set
- Prototype
T_OplErr Opl_Wifi_Skip_Dtim_Set(uint16_t u16ModuleId, uint8_t u8Enable);
- Description
Set skip DTIM
- Return
Reference to opl_err
- Parameters
u16ModuleId: registed skip DTIM module ID
Info
must reigster by calling Opl_Wifi_Skip_Dtim_Module_Reg first
u8Enable: true -> skip DTIM, false -> no skip DTIM