Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RDKEMW-1618 - GetConnectedSSID is returning empty string for noise #89

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions NetworkManagerGnomeWIFI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ namespace WPEFramework
{
guint32 flags, wpaFlags, rsnFlags, freq, bitrate;
guint8 strength;
gint16 noise;
GBytes *ssid;
const char *hwaddr;
NM80211Mode mode;
Expand All @@ -201,6 +202,7 @@ namespace WPEFramework
mode = nm_access_point_get_mode(AccessPoint);
bitrate = nm_access_point_get_max_bitrate(AccessPoint);
strength = nm_access_point_get_strength(AccessPoint);
noise = 0; /* ToDo: Returning as 0 as of now. Need to fetch actual noise value */

/* Convert to strings */
if (ssid) {
Expand Down Expand Up @@ -229,6 +231,7 @@ namespace WPEFramework
NMLOG_DEBUG("bssid: %s", wifiInfo.bssid.c_str());
wifiInfo.frequency = std::to_string((double)freq/1000);
wifiInfo.rate = std::to_string(bitrate);
wifiInfo.noise = std::to_string(noise);
NMLOG_DEBUG("bitrate : %s kbit/s", wifiInfo.rate.c_str());
//TODO signal strenght to dBm
wifiInfo.strength = std::string(nmUtils::convertPercentageToSignalStrengtStr(strength));
Expand Down
2 changes: 2 additions & 0 deletions gdbus/NetworkManagerGdbusUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ namespace WPEFramework
{
guint32 flags= 0, wpaFlags= 0, rsnFlags= 0, freq= 0, bitrate= 0;
uint8_t strength = 0;
gint16 noise = 0;
NM80211Mode mode = NM_802_11_MODE_UNKNOWN;
bool ret = false;
GVariant* ssidVariant = NULL;
Expand Down Expand Up @@ -425,6 +426,7 @@ namespace WPEFramework
wifiInfo.frequency = std::to_string((double)freq/1000);
wifiInfo.rate = std::to_string(bitrate);
wifiInfo.security = static_cast<Exchange::INetworkManager::WIFISecurityMode>(wifiSecurityModeFromApFlags(flags, wpaFlags, rsnFlags));
wifiInfo.noise = std::to_string(noise); /* ToDo: Returning 0 as of now. Need to change to return actual noise value */

// NMLOG_DEBUG("SSID: %s", wifiInfo.m_ssid.c_str());
// NMLOG_DEBUG("bssid %s", wifiInfo.m_bssid.c_str());
Expand Down