 |
RDK Documentation (Open Sourced RDK Components)
|
20 #ifndef WIFIHALUTILES_H_
21 #define WIFIHALUTILES_H_
23 #include "wifiSrvMgr.h"
24 #include "NetworkMgrMain.h"
25 #include "wifiSrvMgrIarmIf.h"
28 #include "hostIf_tr69ReqHandler.h"
31 #ifdef ENABLE_XCAM_SUPPORT
38 #if defined(XHB1) || defined(XHC3)
45 #ifdef ENABLE_LOST_FOUND
47 #include "authserviceIARM.h"
51 #ifdef USE_RDK_WIFI_HAL
53 #include "wifi_client_hal.h"
56 #ifdef ENABLE_LOST_FOUND
57 #include "netSrvCurl.h"
59 #include "lost_and_found.h"
62 #include <netinet/in.h>
63 #include <sys/ioctl.h>
64 #ifndef ENABLE_NLMONITOR
69 #define WIFI_DEFAULT_INTERFACE "wlan0"
76 #include "libIBusDaemon.h"
79 #ifdef ENABLE_RTMESSAGE
82 #include "rtConnection.h"
83 #include "rtMessage.h"
84 #define SOCKET_ADDRESS "tcp://127.0.0.1:10001"
91 #define ACTION_ON_CONNECT 1
92 #define ACTION_ON_DISCONNECT 0
93 #define RETRY_TIME_INTERVAL 3
94 #define DEVICE_ACTIVATED 1
95 #define DEFAULT_TR69_INSTANCE 0
96 #define XRE_REFRESH_SESSION "Device.X_COMCAST-COM_Xcalibur.Client.XRE.xreRefreshXreSession"
97 #define XRE_REFRESH_SESSION_WITH_RR "Device.X_COMCAST-COM_Xcalibur.Client.XRE.xreRefreshXreSessionWithRR"
99 #define WIFI_ADAPTER_STATUS_PARAM "Device.WiFi.Radio.1.Status"
100 #define WIFI_ADAPTER_ENABLE_PARAM "Device.WiFi.Radio.1.Enable"
101 #define WIFI_SSID_ENABLE_PARAM "Device.WiFi.SSID.1.Enable"
102 #define WIFI_SSID_STATUS_PARAM "Device.WiFi.SSID.1.Status"
103 #define WIFI_SSID_NAME_PARAM "Device.WiFi.SSID.1.SSID"
104 #define WIFI_SSID_BSSID_PARAM "Device.WiFi.SSID.1.BSSID"
105 #define WIFI_SSID_MACADDR_PARAM "Device.WiFi.SSID.1.MACAddress"
107 #define SERIALNUMBER_SIZE 15
108 #define MODELNAME_SIZE 10
109 #define MANUFACTURER_SIZE 40
110 #define WIFIMAC_SIZE 20
111 #define DEVICEID_SIZE 512
112 #define PARTNERID_SIZE 128
113 #define TIME_FORMAT "%Y-%m-%d %H:%M:%S"
120 #ifdef ENABLE_RTMESSAGE
121 void rtConnection_init();
122 void* rtMessage_Receive(
void* arg);
123 void rtConnection_destroy();
124 void onMessage(rtMessageHeader
const* hdr, uint8_t
const* buff, uint32_t n,
void* closure);
125 void onConnectWifi(rtMessageHeader
const* hdr, uint8_t
const* buff, uint32_t n,
void* closure);
167 extern IARM_Bus_Daemon_SysMode_t sysModeParam;
176 #ifdef USE_RDK_WIFI_HAL
186 bool connect_WpsPush();
194 bool connect_WpsPin(
char* wps_pin);
237 bool connect_withSSID(
int,
char *, SsidSecurity,
char *,
char *,
char *,
int,
char *,
char *,
char *,
char *,
int conType = 0);
246 bool scan_Neighboring_WifiAP(
char *);
258 bool scan_SpecificSSID_WifiAP(
char *buffer,
const char* SSID,
double freq_in);
272 void monitor_WiFiStatus();
279 bool clearSSID_On_Disconnect_AP();
280 bool disconnectFromCurrentSSID();
285 bool getHALVersion();
286 #ifdef WIFI_CLIENT_ROAMING
294 bool getRoamingConfigInfo(WiFi_RoamingCtrl_t *param);
303 bool setRoamingConfigInfo(WiFi_RoamingCtrl_t *param);
307 #ifdef ENABLE_LOST_FOUND
311 bool isWifiConnected();
322 void lafConnectToPrivate();
345 bool triggerLostFound(LAF_REQUEST_TYPE lafRequestType);
357 #if defined(XHB1) || defined(XHC3)
366 int getMfrDeviceInfo(mfrSerializedType_t stdatatype,
char* data);
376 bool getDeviceInfo(laf_device_info_t *dev_info);
384 bool addSwitchToPrivateResults(
int lnfError,
char *currTime);
391 bool convertSwitchToPrivateResultsToJson(
char *buffer);
396 bool clearSwitchToPrivateResults();
407 bool getMfrData(GString* mfrDataStr,mfrSerializedType_t mfrType);
417 int laf_wifi_connect(laf_wifi_ssid_t*
const wificred);
424 int laf_wifi_disconnect(
void);
425 int laf_get_lfat(laf_lfat_t *lfat);
426 int laf_set_lfat(laf_lfat_t*
const lfat);
436 void log_message(laf_loglevel_t level,
char const*
function,
int line,
char const* msg);
438 static void _eventHandler(
const char *owner, IARM_EventId_t eventId,
void *data,
size_t len);
446 bool getDeviceActivationState();
451 void lnfConnectPrivCredentials();
495 void put_int(
char *ptr,
int val);
517 bool connectToMfrWifiCredentials(
void);
544 bool cancelWPSPairingOperation();
bool storeMfrWifiCredentials(void)
This function retrieve and store the WIFI credentials(SSID, password).
bool shutdownWifi()
This function is used to cancel all the WIFI related threads and un initialize the WIFI module.
enum _WiFiStatusCode_t WiFiStatusCode_t
bool isWiFiCapable()
This function is used to check whether the device supports wireless communication or not.
IARM-Bus Sys Manager Public API.
void getEndPointInfo(WiFi_EndPoint_Diag_Params *)
This function checks for WIFI connection enable status, If connection enabled, then it provide WIFI s...
WiFiConnectionTypeCode_t get_WifiConnectionType()
This function is used to get WIFI connection type.
void getConnectedSSIDInfo(WiFiConnectedSSIDInfo_t *)
This function is used to get the connected SSID informations such as SSID, BSSID, signal strength etc...
void put_boolean(char *ptr, bool val)
This function converts the input data to Boolean type.
bool getRadioStats(WiFi_Radio_Stats_Diag_Params *params)
This function is used to get detail radio traffic statistics information.
void put_int(char *ptr, int val)
This function converts the input data to integer type.
bool ethernet_on()
This function is used to get the ethernet connection ON/OFF status in order to proceed with IARM bus ...
bool eraseMfrWifiCredentials(void)
This function erase the stored MFR WIFI credentials.
gchar * getmacaddress(const gchar *ifname)
This function is used to get the mac address of the target device.
enum _HostIf_ParamType HostIf_ParamType_t
bool updateWiFiList()
This function gets the host interface parameters through IARM TR69 calls and update BSS identifier li...
WiFiStatusCode_t get_WifiRadioStatus()
This function is used to get WIFI connectivity status.
void get_CurrentSsidInfo(WiFiConnectionStatus *currSsidConnInfo)
This function is used to get current SSID and connection status from persistent memory.
enum _WiFiLNFStatusCode_t WiFiLNFStatusCode_t
wifiStatusCode_t
Enumerators for Wi-Fi connection status.