Bug 8228 - [RESOLVED]drakx-net doesn't handle signal strength reported in dBm (negative values)
Summary: [RESOLVED]drakx-net doesn't handle signal strength reported in dBm (negative ...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: release_blocker normal
Target Milestone: ---
Assignee: Olivier Blin
QA Contact:
URL:
Whiteboard: 3Beta2
Keywords: PATCH
: 8580 8804 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-11-27 23:17 CET by Luc Menut
Modified: 2013-04-05 16:40 CEST (History)
7 users (show)

See Also:
Source RPM: drakx-net-1.16
CVE:
Status comment:


Attachments
In and out of WiFi range testing (6.42 KB, text/plain)
2013-01-08 01:03 CET, William Kenney
Details
Patch to allow wpa_cli to report signale strength in dBm (1.55 KB, patch)
2013-01-13 16:20 CET, Derek Jennings
Details | Diff

Description Luc Menut 2012-11-27 23:17:15 CET
Description of problem:
When wpa_supplicant is running, draknetcenter doesn't show any wireless network in cauldron, while lots of wireless network are available (intel 5100, driver iwlwifi).
I found that wpa_cli -i wlan0 scan_results now reports signal strength with negative value (in dBm). In mga2, on the same system, the signal strength was reported with positive value. I don't know if this change came from new kernel, or new wpa_supplicant.

eg. wpa_cli -i wlan0 scan_results
Selected interface 'wlan0'
bssid / frequency / signal level / flags / ssid
ab:cd:ef:ab:cd:e1   2412   -49   [WPA-PSK-TKIP+CCMP][WPS][ESS]	wifi-1
ab:cd:ef:ab:cd:e2   2437   -58   [WPA-PSK-TKIP+CCMP][WPS][ESS]	wifi-2
ab:cd:ef:ab:cd:e3   2427   -67   [WPA-EAP-TKIP][ESS]   wifi-3
ab:cd:ef:ab:cd:e4   2462   -68   [WPA-PSK-TKIP+CCMP][ESS]   wifi-4
ab:cd:ef:ab:cd:e5   2462   -61   [WPA2-EAP-CCMP][ESS]  wifi-5
...

drakx-net doesn't handle these negative values for signal strength, so that draknetcenter doesn't show any wireless network.

First step, in monitor.pm/list_wireless at line 35
$results =~ /^((?:[0-9a-f]{2}:){5}[0-9a-f]{2})\t(\d+)\t(\d+)\t(.*?)\t(.*)$/mg
doesn't match negative values for signal strength.
I tried to modify this line to match negative values of signal strength, but it's not sufficient. The signal strength reported in dBm (negative values) should probably need to be convert in % (positive values).
(just for the test, if I simply reverse the sign (signal_strength = -signal_strength), draknetcenter shows the wireless networks, but of course they are not sorted correctly !!).


Version-Release number of selected component (if applicable):
drakx-net-1.16-1, wpa_supplicant-1.0-4, kernel-desktop-3.6.5

How reproducible:
always
Comment 1 Derek Jennings 2013-01-07 14:14:19 CET
I am seeing the same thing  using mga3beta1 upgraded to current Cauldron
Hardware is Asus eee 701 

from lspcidrake
ath5k           : Atheros Communications Inc.|AR242x / AR542x Wireless Network Adapter (PCI-Express) [NETWORK_ETHERNET] (rev: 01)

# wpa_cli -i wlan0 scan_results
bssid / frequency / signal level / flags / ssid
00:26:44:62:4f:11	2462	-30	[WEP][ESS]	ST780wl
06:18:84:40:51:3d	2417	-78	[WPA-PSK-TKIP][ESS]	MyPlace
7c:03:4c:90:45:23	2437	-91	[WPA-PSK-TKIP+CCMP][WPA2-PSK-TKIP+CCMP][WPS][ESS]	SKY04522
00:fe:f4:0b:83:28	2437	-92	[WPA-PSK-TKIP+CCMP][WPA2-PSK-TKIP+CCMP][ESS]	BTHub3-9TQP

draknetcenter does not show any wireless networks at all, although the wireless connection is up and working.
Pressing the 'Refresh' button does nothing.

CC: (none) => derekjenn

Comment 2 William Kenney 2013-01-07 14:55:14 CET
Do review my reported bug:

https://bugs.mageia.org/show_bug.cgi?id=8580

is this what is happening to you?

CC: (none) => wilcal.int

Derek Jennings 2013-01-07 21:24:00 CET

Whiteboard: (none) => 3Beta1

Comment 3 William Kenney 2013-01-08 01:03:07 CET
Created attachment 3333 [details]
In and out of WiFi range testing
Comment 4 Derek Jennings 2013-01-13 16:20:50 CET
Created attachment 3361 [details]
Patch to allow wpa_cli to report signale strength in dBm

I found the code in libDrakX/network/monitor.pm that performed the scan of wireless networks and produced this patch.

The patch allows signal strength to be reported either as a positive or negative number

If signal strength is negative it will convert signal strength to a percentage based on an arbitary scale (which I am sure could be improved upon)

It works for me with mga 3b1 using the ath5k driver.

WDYT?
Manuel Hiebel 2013-01-13 16:26:41 CET

Keywords: (none) => PATCH

Comment 5 Derek Jennings 2013-01-13 16:38:48 CET
Testing has confirmed this bug exists whenever monitor.pm uses either mandi or wpa_cli to discover wireless networks  (when roaming is enabled)

Signal strength is now reported by mandi and wpa_cli as a negative number in dBm
It is not known if this is true for all wireless drivers.

When iwpriv is used to discover wireless networks draknetcenter behaves normally.


Raising Priority based on discussion in weekly QA meeting.
Affected users are unable to select a wireless network other than when the connection is initially defined.

Priority: Normal => High
Status: NEW => ASSIGNED

Comment 6 Manuel Hiebel 2013-01-13 16:40:41 CET
assigned is when the assigned person is willing to fix, which is not the case for yet here

Status: ASSIGNED => NEW

Comment 7 Derek Jennings 2013-01-13 16:48:05 CET
*** Bug 8580 has been marked as a duplicate of this bug. ***
Comment 8 Wolfgang Bornath 2013-01-24 16:36:37 CET
Patched monitor.pm on mga3beta2. Confirmed working for ath9k driver, at least it shows my own network while 'iwlist scan' shows 4 more networks.

Will test i586 with Broadcom BCM4312...

CC: (none) => molch.b

Manuel Hiebel 2013-01-24 17:03:47 CET

Priority: High => release_blocker
CC: (none) => thierry.vignaud
Whiteboard: 3Beta1 => 3Beta2

Comment 9 Wolfgang Bornath 2013-01-24 17:14:01 CET
Tested on MGA3Beta2 with i586 Broadcom BCM4312 - works.
Comment 10 claire robinson 2013-01-24 17:19:07 CET
This could affect alot of people, is it worth a beta2 rebuild to include the patch?

See also bug 8804

CC: (none) => eeeemail, ennael1, tmb

Comment 11 claire robinson 2013-01-24 17:21:24 CET
*** Bug 8804 has been marked as a duplicate of this bug. ***
Comment 12 Thomas Backlund 2013-01-24 18:54:34 CET
Fixed in drakx-net-1.18-1.mga3

Thanks for the patch.

Status: NEW => RESOLVED
Resolution: (none) => FIXED

William Kenney 2013-04-05 16:40:47 CEST

Summary: drakx-net doesn't handle signal strength reported in dBm (negative values) => [RESOLVED]drakx-net doesn't handle signal strength reported in dBm (negative values)


Note You need to log in before you can comment on or make changes to this bug.