LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 09-05-2004, 04:09 PM   #1
kersten78
Member
 
Registered: Nov 2003
Location: Minneapolis, MN
Distribution: Slackware, Debian, Gentoo, openSuSE
Posts: 358

Rep: Reputation: 33
ndiswrapper active, card connected, no TX, no IP


This is going to sound really stupid, but I just dumped Mandrake 10 with a working ndiswrapper setup in favor of Slackware 10. I'm running a dlink dwl g-520 and ndiswrapper 10, and once I got it working under Mandrake 10, I got bored and decided to see if I could get it working under Slackware 10. Pretty stupid, eh? Trashing a prefectly good setup....jeez.

Anyway, ndiswrapper 10 is compiled, installed, detects hardware, and wlan0 appears in my iwconfig. Once I set all the options on iwconfig and run ifconfig wlan0 up, ifconfig shows the wlan0 interface with the correct AP, etc.
The thing I can't understand is that when i run ifconfig wlan0, the wlan0 interface is not showing any TX activity, only RX. It's also lacking netmask and IP info.
To solve this problem in Mandrake 10 I edited the /etc/sysconfig/network-scripts/ifcfg-wlan0 file to include BOOTPROTO=dhcp and NETMASK=255.255.255.0
Then it was as simple as running dhclient and everything was up and running.

Now in Slackware 10, I can't seem to locate any newtork-scripts (except for the various scripts in rc.d, none of which seem to pertain to wlan0). And even more preplexing is that dhclient terminates with an error: No broadcast interface detected (or something similar to that)
And dhcpd doesn't do anything.

I'm fairly new to slackware and I'm sure I'm missing some simple step that allows interface wlan0 to become active and broadcast for an IP. If anyone could point me in the right direction, I would really appreciate it.

Thanks,
Kris
 
Old 09-05-2004, 05:43 PM   #2
kersten78
Member
 
Registered: Nov 2003
Location: Minneapolis, MN
Distribution: Slackware, Debian, Gentoo, openSuSE
Posts: 358

Original Poster
Rep: Reputation: 33
Still working on this one. I read another post about getting prism54 card working with slack 10. There was something mentioned about using the route command and setting ifconfig settings like netmask and ip. I tried ifconfig wlan0 netmask 255.255.255.0 but I get an error that I can't assign that address. Weird. Anyone have any experience with this?
 
Old 09-06-2004, 07:53 AM   #3
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Quote:
Once I set all the options on iwconfig and run ifconfig wlan0 up, ifconfig shows the wlan0 interface with the correct AP, etc.
The thing I can't understand is that when i run ifconfig wlan0, the wlan0 interface is not showing any TX activity, only RX. It's also lacking netmask and IP info.
That is because you missed a step. In the more "user friendly" distro's like Mandrake, the DHCP request for an IP address is frequently hidden in a script like ifup. Slackware doesn't hold your hand like that . Before you bring up your interface with ifconfig, try running dhcpcd wlan0 and see if that doesn't solve your problems.

Quote:
Now in Slackware 10, I can't seem to locate any newtork-scripts (except for the various scripts in rc.d, none of which seem to pertain to wlan0).
Well, there is always writing your own script. Here is one I've used successfully:

Code:
#!/bin/sh
   #
   # rc.wlan0
   #

   #CHANNEL=_
   ESSID="DomainName"
   INTERFACE="wlan0"
   KEY="WEPKey"
   MODE="Managed"
   NETMASK="255.255.255.0"

   #Load the module
   echo "Loading NDISWRAPPER"
   /sbin/modprobe ndiswrapper

   # Set up the WiFi card

   echo "Configuring ${INTERFACE}:"
   /usr/sbin/iwconfig ${INTERFACE} essid ${ESSID}
   #/usr/sbin/iwconfig ${INTERFACE} channel ${CHANNEL}
   /usr/sbin/iwconfig ${INTERFACE} mode ${MODE}
   /usr/sbin/iwconfig ${INTERFACE} key ${KEY}

   # Get IP address from dhcp

   /sbin/dhcpcd -t 10 -d wlan0

   # Bring up interface - I'm not sure if this is necessary, 
   # but it doesn't hurt

   ifconfig wlan0 up
I call this one from rc.inet1, but you could also call it from rc.local. That way the call to this file won't get trashed if you upgrade your Slackware.

Quote:
Pretty stupid, eh? Trashing a prefectly good setup....jeez.
Not really. I did the same thing moving from RH to Slackware a couple of years ago. Best move I ever made.
 
Old 09-06-2004, 09:39 AM   #4
kersten78
Member
 
Registered: Nov 2003
Location: Minneapolis, MN
Distribution: Slackware, Debian, Gentoo, openSuSE
Posts: 358

Original Poster
Rep: Reputation: 33
Thanks for the info, Hangdog. I may have to see if the script works, because I'm still not having any luck with dhcpd wlan0 or with dhclient. For some reason dhcpd was first giving me an error that I need to add a line:
ddns-update-style ad-hoc; to the dhcpd.conf file. I did that and now dhcpd terminates with an error "Not configured to listen on any interfaces." I get a similar error with dhclient: No broadcast interface fount - exiting...
It's really weird since wlan0 is up and configured in both iwconfig and ifconfig. I guess I'll have to try adding a script to rc.d to see if that will bring up the interface. If I'm missing some step to start broadcasting on wlan0, please let me know... And thanks again for the help, Hangdog.
-Kris
 
Old 09-06-2004, 09:43 AM   #5
kersten78
Member
 
Registered: Nov 2003
Location: Minneapolis, MN
Distribution: Slackware, Debian, Gentoo, openSuSE
Posts: 358

Original Poster
Rep: Reputation: 33
Quick update. I wasn't using the -d wlan0 tag in dhcpd to specify the device, but even when I do call dhcpd -d wlan0, it terminates with:
wlan0: not found.
 
Old 09-06-2004, 11:11 AM   #6
kersten78
Member
 
Registered: Nov 2003
Location: Minneapolis, MN
Distribution: Slackware, Debian, Gentoo, openSuSE
Posts: 358

Original Poster
Rep: Reputation: 33
Wow, I'm definitely in the running for the "Moron of the Week" award. It's really cruel to have two commands that are so similar. This whole time I've been using "dhcpd" instead of "dhcpcd" LOL. I modified Hangdog's script a bit and only discovered that I was using the wrong dhcpd command when it returned an error No such file /sbin/dhcpd... I'm now using dhcpcd and I have wireless up and running. Thanks again for the help Hangdog.
-Kris
 
Old 09-06-2004, 12:45 PM   #7
kersten78
Member
 
Registered: Nov 2003
Location: Minneapolis, MN
Distribution: Slackware, Debian, Gentoo, openSuSE
Posts: 358

Original Poster
Rep: Reputation: 33
Well, I now have unexplainable rc.wlan0 problems. On boot, my iwconfig settings WILL NOT take an Access Point. No matter what I do. I've tried assigning the correct AP, I've tried setting iwconfig wlan0 ap any, etc. etc... All other settings are correct on boot. Then as soon as I log in, I run iwconfig wlan0 essid myessid, and BAM, I have an AP. Then I can either run the script or do it manually--run ifconfig wlan0 up and the dhcpcd, and I'm online. I even tried adding a second essid assignment in my script and it still won't work. In fact, I simplified the script to the point that it contains the exact commands that I type after boot to get the network up. Won't work. Hmm.... maybe I'll try adding "sleep 1" after each command in the script to simulate the time it takes me to type in the commands manually. Heh...it will probably work the way things have been going so far.
 
Old 09-06-2004, 01:23 PM   #8
kersten78
Member
 
Registered: Nov 2003
Location: Minneapolis, MN
Distribution: Slackware, Debian, Gentoo, openSuSE
Posts: 358

Original Poster
Rep: Reputation: 33
OK, I promise I'll stop loading this thread with my useless rambling, but I finally got a script to work and it might help somebody... For some reason, I had to put a delay after modprobe ndiswrapper to get any of my iwconfig settings to take effect. Anyway, here is my hackjob of a script...at least it works
Code:
modprobe ndiswrapper
sleep 6
ndiswrapper -l
#echo "iwconfig settings after modprobe"
#iwconfig wlan0
iwconfig wlan0 key open mykeyaaaaa
#sleep 3
iwconfig wlan0 essid myessid
#sleep 3
#iwconfig wlan0 channel 6
#echo "iwconfig settings after config"
#iwconfig wlan0
#sleep 3
ifconfig wlan0 up
#sleep 3
#echo "ifconfig settings after wlan0 up"
#ifconfig wlan0
dhcpcd -t 10 -d wlan0
I guess I could probably get rid of all those troubleshooting comments...
Essentially all I had to do was add the sleep 6 delay after the modprobe and then set my key and essid. After the ifconfig wlan0 up and dhcpcd -t 10 -d wlan0 commands, everything is up and running.
I just added a line to rc.local to call the rc.wlan0 script and viola. I have wireless at boot.
Thanks everybody for all the help.
-Kris
 
Old 09-06-2004, 01:26 PM   #9
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Quote:
This whole time I've been using "dhcpd" instead of "dhcpcd"
You have no idea how often people trip up on that one "c"....


As for rc.wlan0, can I ask where in your boot sequence are you running it? The sleep command sounds like a decent idea, particularly after the modprobe statement. You also might rummage around in your syslog or messages (both in /var/log) and see if there are any complaints being logged.
 
Old 09-06-2004, 01:27 PM   #10
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Dang, you beat me to the solution.
 
Old 09-06-2004, 01:39 PM   #11
MikeyMike
LQ Newbie
 
Registered: Sep 2004
Distribution: Fedora Core 2
Posts: 28

Rep: Reputation: 15
I cant get my linksys card to work
 
Old 09-06-2004, 02:40 PM   #12
kersten78
Member
 
Registered: Nov 2003
Location: Minneapolis, MN
Distribution: Slackware, Debian, Gentoo, openSuSE
Posts: 358

Original Poster
Rep: Reputation: 33
I checked syslog and messages.... WOW. Looks like I have some serious work ahead of me. Although there aren't any issues with ndiswrapper or my iwconfig. I guess it must just take a few seconds to become active. There's a ton of insmod errors with my cdrom/sbpcd.g No clue what that is all about. And in the whole wireless mess and rebooting my computer about 75 times, I noticed a couple errors. First, it looks like there's a problem with kmod trying to detect SCSI devices (of which I have none) and for some reason PCMCIA services are starting on boot although this is a desktop system with no PCMCIA. It also seems like the hotplug startup takes waaay too long. I looked at rc.hotplug and it was pretty much all meaningless to me. I'm sure there's a bunch of other problems too, but I don't really know where to start.
Would this be an issue that could be solved by recompiling the kernel and removing modules and such that I don't need for my particular setup? If so, does anyone know of a kernel howto geared toward clueless users? If it is a kernel issue I might as well try upgrading to 2.6.x while I'm at it. If anyone has any input, I'd like to hear it...
-Kris
 
Old 09-06-2004, 03:46 PM   #13
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Quote:
for some reason PCMCIA services are starting on boot although this is a desktop system with no PCMCIA
This one and the hotplug are easy. Jump into your /etc/rc.d and make rc.pcmcia and rc.hotplug non-executable (chmod -x filename). Since you don't have pcmcia and hotplug largely works with pcmcia devices, you can safely turn them off. In Slackware, pretty much all the boot work is done from scripts in /etc/rc.d and the best way to control stuff is by making scripts executable or non-executable.

Quote:
Would this be an issue that could be solved by recompiling the kernel and removing modules and such that I don't need for my particular setup? If so, does anyone know of a kernel howto geared toward clueless users?
Recompiling the kernel would probably solve most of the problems (and maybe introduce a few new ones ). For guides, head to the Slackware forum here. There are a couple of sticky threads at the top (one for 2.4 and one for 2.6) that explain it in good detail. I've pretty much regurgitated them as a how-to on my site.

By the way, if you are jumping to 2.6, you might want to stick with 2.6.7 for the time being. 2.6.8.1 has been a bit touchy.

Quote:
I cant get my linksys card to work
Well that's too bad. Care to do something about it besides complain?
 
Old 09-06-2004, 03:54 PM   #14
MikeyMike
LQ Newbie
 
Registered: Sep 2004
Distribution: Fedora Core 2
Posts: 28

Rep: Reputation: 15
well im a newbie so its hard for me to tell whats goin wrong

but the drivers installed but I cant get an IP also... ive spent like 4hrs in books and stuff tryna see if i could fix it but i cant rite now but i do think i can get it to work any ideas on what i should do first

btw its hard for me to work on it because i have to boot out of linux and into windows to read stuff

and sorry if i sounded like i was complainin

if it helps my disro is Fedora Core 2
and my card is a linksys wireless g with speedbooster Model no. WMP54GS

Last edited by MikeyMike; 09-06-2004 at 03:58 PM.
 
Old 09-06-2004, 04:13 PM   #15
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Well, there is an entire thread on that card. You might want to have a read through it. However, it looks like linksys has been changing chipsets so you will want to look at the output of lspci to find out what chipset your card has. Some of them may have native linux drivers which would be good. Otherwise you are probably going to need to use ndiswrapper or linuxat.


By the way, it is bad form to hijack a thread with a new question, particularly since this thread has nothing to do with Linksys cards. If you have a question, start a new thread since that is the best way to get an answer.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[Debian] Ndiswrapper can't get connected (No DHCPOFFERS received) freek sanders Linux - Wireless Networking 0 12-20-2004 02:46 PM
command active card :King_58: Linux - Newbie 2 09-05-2004 02:50 PM
Active ethernet card, no connection toegrim Linux - Networking 1 10-15-2003 03:55 PM
Cant get my routing network card to be active! im_not_jose Linux - Networking 9 07-25-2003 12:28 PM
Mounting Drives connected to a controller card tvman Linux - Newbie 2 05-08-2002 06:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking

All times are GMT -5. The time now is 11:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration