xkjyeah n00b
Joined: 10 May 2003 Posts: 72
|
Posted: Wed Nov 19, 2003 2:23 am Post subject: GNOME Wireless Link Monitor for Alien Cards |
|
|
From Post 66564:
So, I've got an Inspiron 8100 with the Dell 802.11b card and it works fine. However, I cannot get the Gnome Wireless Link Monitor to work with it. All I get is a "N/A" and no link status. I have verified that it is looking at eth1 (which is my wireless nic).
What am I missing to make this work? Thanks!
I, too, have a card that works funny. I "fixed" the problem using a very underhand method -- edit the source code. First, iwconfig or /proc/net/wireless must give you clues on the signal level.
Example (iwconfig):
Code: |
wlan0 IEEE 802.11-DS ESSID:"mickeymouse" Nickname:"mickey"
Mode:Managed Channel:11 Access Point: FF:FF:FF:FF:FF:FF
Bit Rate:11Mb/s
RTS thr=1536 B Fragment thr=1536 B
Encryption key:A09D-0F6B-6D Security mode:open
Power Management:off
Link Quality:0 [b]Signal level:62[/b] Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
|
If iwconfig does not give you any clues whatsoever, sorry to say, too bad.
Issue the command:
Code: |
# ebuild /usr/portage/gnome-base/gnome-applets/gnome-applets-2.4.1-r1.ebuild unpack
# cd /var/tmp/portage/gnome-applets-2.4.1-r1/work/gnome-applets-2.4.1
# cd wireless
# vi wireless-applet.c # or any other text editor
|
Look for the word CLAMP. Two times would do. It should be in the portion with percent=(int)rint or something. Now, the percent=(int)rint is the key line. Change it to suit your needs. See my example below (diff -c)
Code: |
*** wireless-applet.c Tue Nov 18 22:21:06 2003
--- gnome-applets-2.4.1/wireless/wireless-applet.c Tue Sep 23 07:06:44 2003
***************
*** 186,197 ****
if (level < 0) {
percent = -1;
} else {
! /* if (link < 1) {
percent = 0;
! } else {*/
! percent = (int)rint (level / 80.0 * 100.0);
percent = CLAMP (percent, 0, 100);
! /* }*/
}
wireless_applet_draw (applet, percent);
--- 186,197 ----
if (level < 0) {
percent = -1;
} else {
! if (link < 1) {
percent = 0;
! } else {
! percent = (int)rint ((log (link) / log (92)) * 100.0);
percent = CLAMP (percent, 0, 100);
! }
}
wireless_applet_draw (applet, percent);
|
80.0 because 80 is my maximum. My link would always be 0, so I need to comment out if (link < 1) and co.
at work/gnome-applets-2.4.1, compile only the neccessary parts using
Code: |
# ./configure --prefix=/usr
# make -C screen-exec && make -C wireless
# cd wireless
# make install
|
--prefix=/usr is important. Default is /usr/local. Gentoo installs gnome as /usr.
screen-exec is a dependency.
Note: for me, for some reason I needed to ln -s /usr/libexec/wireless-applet /usr/local/libexec/wireless-applet
Note: Whether the signal level is a thruthful representation of the link strength, I do not know. Still, it looks better.
Note: I am using a Linksys WUSB11 with the Berlios driver. |
|