From owner-freebsd-mobile@freebsd.org Mon Jan 12 18:10:51 2004 Return-Path: Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by Espresso.NEEBU.Net (8.12.10/8.12.10) with ESMTP id i0D2Ao7v002582 for ; Mon, 12 Jan 2004 18:10:50 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id B3BE7567A2; Mon, 12 Jan 2004 18:10:37 -0800 (PST) (envelope-from owner-freebsd-mobile@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 806B716A4D1; Mon, 12 Jan 2004 18:10:36 -0800 (PST) Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A11F616A4CE for ; Mon, 12 Jan 2004 18:10:17 -0800 (PST) Received: from Espresso.NEEBU.Net (espresso.neebu.net [66.166.158.130]) by mx1.FreeBSD.org (Postfix) with SMTP id B50DC43D53 for ; Mon, 12 Jan 2004 18:10:14 -0800 (PST) (envelope-from khuon@Espresso.NEEBU.Net) Received: from Espresso.NEEBU.Net (khuon@localhost [127.0.0.1]) by Espresso.NEEBU.Net (8.12.10/8.12.10) with ESMTP id i0D2AD7v002578 for ; Mon, 12 Jan 2004 18:10:13 -0800 (PST) Received: from Espresso.NEEBU.Net (khuon@localhost)i0D2AD7Y002577 for ; Mon, 12 Jan 2004 18:10:13 -0800 (PST) Message-Id: <200401130210.i0D2AD7Y002577@Espresso.NEEBU.Net> From: "Jake Khuon" To: freebsd-mobile@freebsd.org Dcc: Action: Expires: Precedence: Priority: Normal X-Face: "(e&e|OIYrcV1x8y?txN%k1E2f[qWLjRjOn+a30)3>x`Wx%_9XiXs\IO2#G5L1m=c/|^h|z29wJ#]D/.?Ks,Mw1 X-URI: http://Espresso.NEEBU.Net/~khuon/ X-Organisation: Network Engineers for Effective Bandwidth Utilisation X-Header: /usr/include gives great headers X-System: Sun UltraSPARCstation2/2300MP running SunOS Release 5.8 X-Shell: tcsh 6.07.02 (Astron) 1996-10-27 (sparc-sun-solaris) options 8b,nls,dl,al,ng,rh X-Chtorr: History is full of revisionists. Where it used to say "THOU SHALT NOT KILL" it now says, "except as specified in section III-B, Paragraph 12, Sub-section D, Schedule 3." If that still doesn't suit you, wait till next year's commandments come out and trade it in for something that does. X-Mailer: MH 6.8.4 #4[UCI] (Espresso.NEEBU.Net) of Mon Feb 19 15:14:03 EST 1996 Date: Mon, 12 Jan 2004 18:10:13 -0800 Subject: modified wmwave for Aironet driver X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.1 Reply-To: Jake Khuon List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: owner-freebsd-mobile@freebsd.org Errors-To: owner-freebsd-mobile@freebsd.org X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) on Espresso.NEEBU.Net X-Spam-Level: X-Spam-Status: No, hits=-4.9 required=3.0 tests=BAYES_00 autolearn=ham version=2.60 When I used to have a laptop with an Orinoco card, one of my most treasured dockapps was wmwave. Since moving on to a Cisco 350 MPI card, I have hunted high and low for something similar to no avail. I tried wmWiFi but all it did was spit out ioctl() failures and I really did prefer the look of wmwave. So after looking at the differences between the driver header files, I decided last night to just hack wmwave. I must admit that I was lazy and didn't bother to formally convert this port. I just simply hacked the main file. Perhaps when I have more time I'll clean things up and make it nicer. Of course if someone wants to do that for me, I'm not going to stop them. |8^) The file can be found at: http://www.neebu.net/~khuon/codebits/wmwave.c Here's a summary of the list of changes I made: [0] I grabbed a copy of the net/wmwave ports and extracted it into /tmp to do the work while not contaminating my own ports tree. [a] I just performed a make (not make install) to get the files into a state for hacking. [b] After I finished, I renamed wmwave to wmairo and copied it manually to /usr/local/bin instead of doing a make install. As I said above, if I happen to find some copious free time, I'll make this a nice and clean port. [1] Most of the definitions were similar so I started out doing a global replace on a lot of variable and structure names. [2] For some reason the signal cache (ANCACHE) for the aironet drivers never get properly populated. Either that or I'm interrogating the structure wrong. However "ancontrol -i an0 -Q" always returns a blank for me. After playing around with it for a while, I ditched the idea and just grabbed the information out of the an_ltv_status structure instead. [a] The signal quality seemed to be reversed. Even ancontrol reports what I think is opposite. In other words, as I move closer to the AP, I saw the value of an_cur_signal_quality going down. I decided to do a quick hack on the value to reverse it. It now _seems_ correct. [b] The scaling seemed wrong with the original code. Perhaps it was correct given values as reported in wi_sigcache. I removed all the scaling modifiers and the values seem to line up better. [3] I changed the name of the labels so that they make a little more sense. [a] The general status label used to show either "Quality" (card present) or "No Card" (card not available) followed by a coloured dot to indicate general signal quality (red = bad, yellow = mediocre, green = good). The actual "Link" bargraph showed the quality in a more graduated manner. I decided I could make better use of the label area so I added some code to display the channel number (an_cur_channel) instead. It will still display "No Card" when a card can't be found. My intent was to give me a better sense of which AP I was associated with. I thought about using the value of an_ap_name but my experi4ence is that it's unreliable. Many APs don't have it properly set and actually my config tools for my APs don't seem to have a way to set them. Additionally, I'm not sure they're ever transmitted. Then again I'm not an 802.11 guru. I also thought about using the MAC address off the AP but I didn't think it would fit nicely. [b] I renamed "Level" to say "Strength" since I'm grabbing the value of an_normalized_strength and thus seemed to make more sense. I also fixed scaling. [c] I left the "Noise" label alone but I'm not sure I'm retrieving the correct element. I'm looking at an_noise_prev_sec_pc which should be giving me the noise in percentage but I've never seen it anything but 1% although every once in a while I will see a slight flash to around 20% but that may just be an anomaly in the polling. Perhaps I should try firing up one of my cordless phones and sticking it next to my laptop. I also added the ability to report SNR instead of noise. Compile with -DSNR to enable this. Well, I think that's about it... I hope it's useful to someone other than me. -- /*===================[ Jake Khuon ]======================+ | Packet Plumber, Network Engineers /| / [~ [~ |) | | --------------- | | for Effective Bandwidth Utilisation / |/ [_ [_ |) |_| N E T W O R K S | +=========================================================================*/ _______________________________________________ freebsd-mobile@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-mobile To unsubscribe, send any mail to "freebsd-mobile-unsubscribe@freebsd.org"