VectorLinux

The nuts and bolts => Hardware & Drivers => Topic started by: bobbear43 on October 06, 2007, 11:01:13 am

Title: Starting Over - New Wireless PCMCIA NIC
Post by: bobbear43 on October 06, 2007, 11:01:13 am
Vector Linux Standard 5.8
PCMCIA NIC: D-Link AirPlus DWL-G650 (Rev 01)
Thinkpad 600E 400 MHz Pentium II 294 MB RAM

Using: Easuter - How to Configure Your Wireless Network
I will go through this step by step until I hit an error of some type, and then post it here, stop until reasonable solution.

Identifying card works with Linux. Yes; on list. Has Atheros chipset. Uses ath-pci interface from madwifi. Card reported in several sources, including VL forums, as working with Linux. Other card tried (Belkin) with same interface was not reported anywhere as working, and did not work in procedures as below.

lspci (not going to include all output):
...
02:00.0 Ethernet controller: Atheros Communications, Inc. 802.11abg NIC (rev 01)
NOTE: no ID number in form xxxx:xxxx

VASM finds native module. Configures "alias eth0 ath_pci," which is not preference. Should be ath0. Not stopping at this error. Corrected. Continuing.

Had previously compiled madwifi following instructions from developer. According to developer compile and install worked correctly.

ifplugd.conf: INTERFACES="eth0 ath0"

ifconfig:
ath0       Link encap:Ethernet   HWaddr 00:13:46:B6:2A:8F
             UP BROADCAST RUNNINF MULTICAST   MTU:1500   Metric:1
             RX packets:0 errors:0 dropped:0 overruns:0 frame:0
             TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
             collisions:0 txquelen:0
             RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
lo.....
wifi0.....
(NOTE: eth0 only shows up when USB wired NIC is used)

ifconfig ath0 up (OK)

iwlist ath0 scan: "ath0    no scan results" - should there be? no essid specified yet

iwconfig ath0:
ath0       IEEE 802.11g   ESSID:""
             Mode: Managed   Frequency:2.437 GHz   Access Point:Not-Associated
             Bit Rate: 0 kb/s   Tx-Power:18 dBm   Sensitivity 1/1
             Retry:off   RTS thr:off   Fragment thr:off
             Encryption key:off
             Power Management:off
             Link Quality=0/70   Signal level=-256 dBm   Noise level=-256 dBm
             Rx invalid nwid:0   Rx invalid crypt:0   Rx invalid frag:0
             Tx excessive retires:0   Invalid misc:0   Missed beacon:0

iwconfig ath0 essid "Roberto" (OK and iwconfig reflects correctly)

iwlist ath0 scan: "ath0   No scan results"

Router broadcasts on channel 11.
iwconfig ath0 channel 11 (OK)
iwconfig ath0 ap any (OK, but iwconfig still shows "Access Point:Not-Associated")
(NOTE: iwconfig --help shows "auto" as option but results in AP:invalid)

Router has no WEP or any encryption. Is open. Mac address filtering is off for next command. Router uses 192.168.2.x addresses which is set in firewall config file:
PERMIT="192.168.2.0/24 445/tcp 137-139/tcp 445/udp 137-139/udp"

HOWEVER ran VASM to turn firewall off.

iwlist ath0 scan:  "ath0  No scan results"

dhcpcd -t 25 -d ath0
dhcpcd: Mac address = 00:13:46:b6:2a:8f
(NO CONNECTION)
time out

Last communication with madwifi developer, he said there is no ap associated, and that dhcpcd, or programs like wifi-radar, will not work unless there is an ap associated. He agreed with command "iwconfig ath0 ap any." But he says there is apparently no ap, and that system is communicating with card.

STOP. NEED HELP PLEASE!



Title: Re: Starting Over - New Wireless PCMCIA NIC
Post by: bigpaws on October 06, 2007, 12:13:17 pm
Give this a read:

http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:madwifivv (http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:madwifivv)

Bigpaws
Title: Re: Starting Over - New Wireless PCMCIA NIC
Post by: bobbear43 on October 06, 2007, 12:27:40 pm
There is nothing at that particular URL. "Topic does not yet exist." What would I be looking for?
Title: Re: Starting Over - New Wireless PCMCIA NIC
Post by: rbistolfi on October 06, 2007, 12:31:39 pm
I think there was a typo there

http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:madwifi (http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:madwifi)
Title: Re: Starting Over - New Wireless PCMCIA NIC
Post by: newt on October 06, 2007, 12:47:46 pm
Have you tried creating a new profile in wifi-radar and connecting that way?  Might be worth a shot just to see if it works.
Title: Re: Starting Over - New Wireless PCMCIA NIC
Post by: bobbear43 on October 06, 2007, 01:27:52 pm
tried deleting ssid in wifi-radar and created it new using auto everything.
on connect, "error for wireless request "Set Frequency" (8B04) : SET failed on device ath0 ; Invalid argument"
Says connected to Roberto ip(None)
Aquiring IP address fails

Tried manual configuration in wifi-radar. Same error message repeated multiple times on connect. It reports as connected. But I cannot access Internet. Cannot ping router or anything.
Title: Re: Starting Over - New Wireless PCMCIA NIC
Post by: M0E-lnx on October 06, 2007, 04:04:35 pm
In my experience i've found out that applications like wifi-radar sometimes just refuse to work. I had a similar problem with my broadcom chip. You may want to consider taking a glance at the howto i wrote on the wiki. the procedure should work for you as long as you use the right drivers for your device
Title: Re: Starting Over - New Wireless PCMCIA NIC
Post by: bobbear43 on October 06, 2007, 06:01:30 pm
You may want to consider taking a glance at the howto i wrote on the wiki. the procedure should work for you as long as you use the right drivers for your device
Where is the wiki with the howto?
Title: Re: Starting Over - New Wireless PCMCIA NIC
Post by: rbistolfi on October 07, 2007, 10:46:47 am
It is here:

http://vectorlinux.com/wiki/doku.php?id=howtos:wlan-broadcom
Title: Re: Starting Over - New Wireless PCMCIA NIC
Post by: bobbear43 on October 08, 2007, 05:54:32 pm
OK, that wiki was based on easuter's howto, which I have now followed as religiously as possible four times, and the wiki (not easuter's howto) seemed to be missing some things.

Have tried two paths each to get two different cards working, a Belkin which is not reported anywhere as working with Linux, and a D-Link as above which is reported multiple places including here in VL as working with Linux.

VASM would not configure either. Both a native Linux approach using the madwifi drivers, which turned out to be the same for both cards, ath_pci, and ndiswrapper failed to work with either card. All attempts have ended in the same result:
the system recognizes the card, shows correct attributes for it
iwlist xxxxxx scan produces "no scan results"
dhcpcd does not connect but shows correct MAC address for the card
wifi-radar cannot obtain an IP address from the wireless router

Maybe the problem is not with the card, but with communicating with the router? How do I troubleshoot this? The madwifi developer told me that I do not have an Access Point associated with the interface, and I think I have confirmed that I am unable to do that with either VL or the cards I have tried. It is supposed to be setup to communicate with any Access Point (..... or it won't be portable!). The generic iwconfig for Linux shows options any and auto for iwconfig. In VL 5.8,
"iwconfig wlan0 ap any" results in "Access Point:Not Associated"
"iwconfig ..... auto" results in "Access Point:Not Associated"
"iwconfig ..... "00:11:50:43:91:CF" .... router WLAN address .... results in "Access Point:Not Associated"

Router is open security, no WPA/WEP, no key. The only security is Mac address filtering, which is off for these tests.

Whatever, the card is not seeing the ap, and something is wrong that it appears that no ap can actually be configured as the last iwconfig command should result in seeing the router's mac address in iwconfig. According to what I am reading in various references for iwconfig, the last command having resulted in "Access Point:Not Associated" represents a problem.

("The little distro that grows on you." This experience reminds me of first dealing with home wireless network with Windows NT, which at least came with drivers, but required much "fiddling" of channels and parameters to get it to work! The "growing" is becoming very annoying!)
Title: Re: Starting Over - New Wireless PCMCIA NIC
Post by: newt on October 08, 2007, 07:12:44 pm
Which exact revision is your pcmcia card?  Look on the label of the card for the "H/W: ##".  It may be A1, B1, B2, B3, B4, B5.  If you can't find a "H/W" section then at the end of the serial number look for "V.##"; it may be C0, C1, ...

From the sounds of it, I think you have the "H/W: A1" card but nailing it down exactly will help for the ndiswrapper method.

(pciid: 168c:0013)
Title: Re: Starting Over - New Wireless PCMCIA NIC
Post by: bobbear43 on October 08, 2007, 07:46:11 pm
The H/W Rev is B5. Before using ndiswrapper (as I had previously done for the Belkin card as well 2 weeks ago), I looked the D-Link card up in ndiswrapper, and used the drivers from the CD which came with the card after checking to make sure they were up-to-date with those listed on the D-Link site. The drivers also corresponded to those on ndiswrapper site for the specific hardware revision.

The first card I tried, the Belkin, was just one I had laying around from another laptop .... but it did work in the Thinkpad 600E prior to installing VL. The second card I bought specifically because it was alleged to work "out of the box" with VL, and also found several references here and in other Linux forums that it worked with Linux, which was not true for the Belkin card.
Title: Re: Starting Over - New Wireless PCMCIA NIC
Post by: newt on October 08, 2007, 09:53:00 pm
Looks like these are the only correct win32 drivers for your card: ftp://ftp.dlink.com/Wireless/dwlg650_revB/Driver/dwlg650_driver_254.zip

Download and unzip the archive. You should find a 'Drivers' directory containing the required drivers; you should be fine to delete 'ar52119x.sys' since it's for win9x systems and you want the driver for winxp/nt systems.

Your pciid should be: 168c:0013 - this should be confirmed once you load the driver in ndiswrapper

If you don't have the latest ndiswrapper package from the repo then get it now, install it, and reboot (I think it's version 1.9).

Start by making sure that the hal daemon/service is stopped; in fact, if it's set to start with the system then please disable this service during this testing period.

Next, list the ndiswrapper drivers that are installed (as root, ndiswrapper -l).  My natural expectation would be that this would list none (maybe some) drivers that you had tried in the past, however on my system it lists several that are installed by default which was not my expectation.  At least you can see which drivers are already installed this way.  Did the listing show many drivers?

Next, remove some ndiswrapper modules that may be loaded by default (as root, ndiswrapper -r <modulename>).  Make sure that 'airplus', 'gplus', and 'netdlwl' are removed to help make sure there's not a conflict with a preloaded module trying to controlling your hardware.  Were any of these listed as 'driver installed'? Just to ensure they're not installed anymore, re-list your ndiswrapper modules.

Next, clean up your /etc/modprobe.conf and /etc/ifplugd/ifplugd.conf files.  Remove the alias for ath0/wlan0 from the former, and remove the atho/wlan0 interface name from the latter.  This should leave your modprobe.conf file with a single alias entry for eth0, and it should leave your ifplugd.conf file with a single interface device name (eth0).

Install the driver using ndiswrapper (as root, ndiswrapper -i net5211.inf).

Now, list your ndiswrapper drivers again.  You should see something to the effect of:
net5211 : driver installed
device (168c:0013) present
within the driver listing.  Do you see this?

Next, have ndiswrapper insert the alias info for you (as root, ndiswrapper -m); use the standard 'wlan0' interface name for this test (not ath0).  IIRC, this command exits with what seems to be an error statement; not a big deal.  Open your /etc/modprobe.conf and /etc/ifplugd/ifplugd.conf files and make sure the correct information has been inserted for you; alias wlan0 ndiswrapper and INTERFACES="eth0 wlan0", respectively.  IIRC, modprobe.conf looks good but you have to manually add the interface name to ifplugd.

Next, you need to restart the ifplugd server by issuing service ifplugd restart, or better yet just reboot.

If you're good up to this point then run depmod -aq as root, and wait a minute or so.

If you're good up to this point and you have not received any glaring errors/problems up to this point then you should insert the ndiswrapper module as root (modprobe ndiswrapper).

If you don't get any errors up to this point then you should have the drivers loaded for your wireless card and it should (theorhetically) function once it's connected to a network.

I know you've stated that you are supposed to use 'ath0'.  If this test did not work correctly using wlan0 then start from scratch and substitute ath0 as the alias/interface name throughout - really, start from scratch (i.e. clean up the modprobe/ifplugd files, remove modules, etc.).

If it seems like you're good up to this point then go straight to wifi-radar.  Delete any old profiles and start a new one; ssid name, managed network, auto channel, dhcp enabled, etc...  Then try connecting to the newly created profile; give it a couple minutes to make a good attempt.  If it doesn't seem to connect (indicated by iwconfig/ifconfig or your wifi card icon with green bars) then click disconnect - be sure to pay attention to see if the connection is made upon clicking 'disconnect'.  If it does seem to connect on disconnect, then immediately click connect again and give it a few seconds to "level out".  I only mention this odd behavious because my laptop (native driver) has this strangness, but my desktop (ndiswrapper driver) does not.  The alternative to wifi-radar is to do it manually as you've been attempting on your previous attempts.  I would certainly try wifi-radar first, and if you don't have success then try the manual method

I know this is all TOO familiar from all your other attempts but sometimes just having things listed differently helps.

Good luck!
Title: Re: Starting Over - New Wireless PCMCIA NIC
Post by: exeterdad on October 09, 2007, 05:25:45 am
Wow newtor!  You deserve some kind of merit badge for your efforts!  ;)
Title: Re: Starting Over - New Wireless PCMCIA NIC
Post by: M0E-lnx on October 09, 2007, 05:47:43 am
WoW... nice howto in a nutshell
Title: Re: Starting Over - New Wireless PCMCIA NIC
Post by: bobbear43 on October 09, 2007, 01:55:44 pm
THANK YOU!

Did all that. HAL not running .... just to be sure tell me how to check that. There were about 10 drivers already listed in ndiswrapper -l. I removed them all before inserting new driver.

No errors encountered until all finished and tried to connect. wifi-radar did not connect (disconnect actually disconnects).

Error when trying to connect in wifi-radar: "Error for wireless request "Set Frequency" (8B04) : Set failed on device wlan0 : Invalid argument." Same error on disconnect.

dhcpcd does not connect. just times out after displaying Mac address for card.

vwifi-connect reports "/sbin/dhcpcd: not running"

The security log on my router shows no attempts to login. It does show blocked repeated attempts on its firewall from IP 10.241.160.1 during the same time as these tests. No idea what that is. Reports "blocked by DoS protection."

Other error after doing all this: My USB card no longer can be accessed .... must be present at boot to open but file system never opens it though it appears on desktop after doing this driver install.

For sake of sanity, connected USB Ethernet card I have had for about 10 years to see if this computer can actually get on the Internet. VASM found it, configuted it. YUP! Working from that interface now.

I am still "haunted" in all this by the comment from the madwifi developer when trying that route earlier that my card is not seeing an ap because no ap is associated in iwconfig. Does that have any relevancy?
Title: Re: Starting Over - New Wireless PCMCIA NIC
Post by: exeterdad on October 09, 2007, 02:18:08 pm
Oh Maaaaaaan!  First thing I see is.....
Quote
THANK YOU!
I thought you nailed it.  :-\ Hang in there buddy!
Title: Re: Starting Over - New Wireless PCMCIA NIC
Post by: newt on October 09, 2007, 02:26:02 pm
I also get the "Error for wireless request "Set Frequency" (8B04) : Set failed on device wlan0 : Invalid argument" when using wifi-radar however once I actually get connected to my router those error messages stop being displayed.  I've just come to ignore them - call it "being ignorant" :D .  At this point, I wouldn't put too much weight on this particular "error".

I believe that your USB card issue is directly related to not having the HAL service running.  You should be able to see if the hal service is running by issuing ps -aux and looking for a service name with 'hald' in it. I asked you to stop the hal service because I had read (ubuntu forum I think) of someone having troubles with their wireless card (same chipset as yours) and it seemed that hal was interfering with functionality.  You should be safe to re-enable this service, reboot, and make sure your usb card can be accessed again.

I do not use dhcp/d on my network so I don't dare make any suggestion in regards to that, but let's assume that this is a point of interest.  I think your understanding of it and how it relates to your network is probably better than mine.  I assign IPs to my local systems.

Your router log is VERY interesting.  You say that repeated blocked attempts from IP 10.x.x.x show from the same time period as your tests.  The IP range 10.x.x.x is a Class A local network address range (I think the ENTIRE range) which would mean that those "DoS attacks" were coming from your local network -- most likely your VL box you're on right now.  I'm NOT suggesting that your system is compromised; I'm suggesting that (POSSIBLY) your system is being assigned an IP address in the Class A range (10.x.x.x) rather than Class C range (192.168.x.x).  If the IP 10.241.160.1 is truely coming from your VL box then I would interpret that as saying your wireless radio is working and can communicate with your router; just need to figure out why it's 10.x.x.x rather than 192.168.2.x ???

My understanding of having an associated AP is that once you're connected to a wireless network then, and only then, will you have an associated AP.  Since you cannot successfully connect to an AP then you do not have an associated AP.  Again, THIS IS MY UNDERSTANDING/INTERPRETATION of an "associated AP".

From all this I see 2 points of interest (to start with ;D ):
1) IP 10.x.x.x DoS attack on your router: I believe this is your D-Link card making these attempts.
2) Make sure DHCP/d is working correctly on router and on your system

Actually, those two points could very well be related to each other.  If dhcp is not working correctly and is assigning an incorrect IP address in the range 10.x.x.x then it would explain both points.  Since I have little experience with the dhcpd service in linux I don't dare make any recommendations to avoid you "spinning your wheels".

What I would do in your situation would be to test a static IP scenario on your local network; this takes dhcp/d out of the equation.  Simply change your router configuration so that dhcp is turned off and set the IP range of your local nework, save your changes, and reboot the router.  Then assign an appropriate IP address to your VL computer using wifi-radar - give it your desired IP address, netmask, gateway, dns (e.g. ip 192.168.2.101, n/m 255.255.255.0, g/w 192.168.2.1, dns1 192.168.2.1).  Then attempt to connect to the router.

I hope this helps!
Title: Re: Starting Over - New Wireless PCMCIA NIC
Post by: GrannyGeek on October 10, 2007, 09:48:24 pm
Bobbear,

I'm faced with a similar situation of being absolutely unable to connect to my wireless network with VL 5.8 Standard. The chip is a Realtek 8185. I've gone through every step very carefully many times. Everything looks right. However, I can't get on the network no way, no how. I use WPA and will not change this. I've found that I must use a Windows XP driver with ndiswrapper, as the native Linux driver is very bad and doesn't work, either, plus it seems incapable of doing WPA. iwlist wlan0 scan shows the network perfectly, but in iwconfig there is nothing associated with the access point. I've tried everything, including turning off encryption in the access point, but it won't connect that way, either.

Not all distros have the problem. I've been trying several LiveCDs to see which ones can connect and which ones cannot. Knoppix, no. Ubuntu, wouldn't install at all as a Live CD. Puppy Linux, no--didn't offer WPA and I couldn't find a way to add it. DSL, no--again, no WPA. ZenWalk Live CD, no. Couldn't get a desktop to come up at all. BUT.....
     PCLinuxOS *does* get a WPA wireless connection and quite easily with its system configuration utility. And Mandriva One LiveCD also gets a WPA connection with its Control Center. (Not surprising--I think PCLinuxOS is derived from Mandriva.) Both of these tend to lose the connection and I have to reconnect through the Control Center, so they're not perfect either. The wireless works perfectly in Windows, by the way.

So I think if I want to have Linux on its own partition on this laptop, I'll have to install PCLinuxOS or Mandriva. I simply can't get VL to work. But I may just leave the 16-gig partition empty and use it for beta testing 64-bit VectorLinux. Neither PCLinuxOS nor Mandriva can get sound to come out of the speakers or anywhere else, nor can Vector, nor can any other Linux I've tried on this laptop. Web searches seem to indicate that this is par for the course for the SigmaTel HDA Audio CODEC onboard sound. I can't use the laptop if I have no sound, so that's definitely a deal breaker.

I have VL installed on a VirtualBox virtual machine under Vista on the laptop and it's working perfectly--sound and networking (they're virtualized, so don't have the driver issues). Virtualization is a good solution for this kind of problem as long as you have enough horsepower.

A few minutes later:
I've given up. Even Mandriva loses the connection frequently and the last time it lost it, I couldn't get it up again. This never happens in Windows. The connection strength is excellent, but PCLinuxOS and Mandriva just can't hang onto it. I think the RTL8185 and Linux just don't get along. And with the intractible sound problem, there's no point in spending even more hours on this. I'm writing this from VL 5.8 Standard running in VirtualBox.
--GrannyGeek
Title: Re: Starting Over - New Wireless PCMCIA NIC
Post by: bobbear43 on October 18, 2007, 08:13:07 pm
I tried newtor's suggestions, but still no network. The 10.241.160.1 IP continued to bang at my firewall after everything was shut down, and still continues. That was a red herring. The IP is not shown as registered and falls in the range of reserved IP's.

So I am giving this up until someone tells me there is a way to install "out of the box" without all this extra labor.