Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
05-28-2004, 05:32 PM
|
#1
|
Member
Registered: Mar 2004
Location: UK
Distribution: Slackware 10
Posts: 137
Rep:
|
Trouble setting up wireless connection
Hi.
Im having trouble setting up a wireless connection on my Dell Inspiron 8600 to access the internet, network etc.
Ive installed ndiswrapper and installed a driver.
As per the INSTALL file in the ndiswrapper archive, typing "ndiswrapper -l" returns the name of my driver, bcmwl5a, followed by "present".
Again, following the INSTALL file, "modprobe ndiswrapper" seems to work, returning no errors and resulting in the appropriate entry in the system log.
All good up to here i think, but its from here on that im unsure whats required.
To try to make some sense of what to do, i wrote a script, the content mainly from the steps to be taken in the INSTALL file. Whats here, i understand, but im unsure whats missing as running this script does not seem to give me any type of wireless access.
Code:
#!/bin/bash
#
#A script to configure the wlan0 interface
#
#
##VARIABLES
essid="belkin54g"
interface="wlan0"
gateway="192.168.2.1"
use_security=""
wepkey=""
operating_mode="Managed"
security_mode="restricted"
##MAIN
echo "Configuring $interface.."
modprobe ndiswrapper
#Configure operating mode
iwconfig $interface mode $operating_mode
#Configure security if applicable
if [ "$use_security" = "yes" ]; then
iwconfig $interface key $security_mode $wepkey
fi
#Configure network name
iwconfig $interface essid $essid
#Bring up the network
ifconfig $interface up
echo "Done."
This is as far as ive got.
Do i need to involve the wireless channel somewhere? From my router settings it appears that im on channel 11.
What else must i add to this to get access?
Also, what exactly does "ndiswrapper -m" do? Does this eliminate the need for me running the above script on every boot once its initially up and running?
P.S - Im running a fresh full install of slackware 9.1.
Any suggestions would be greatly appriciated.
Cheers.
Last edited by donbellioni; 05-28-2004 at 05:46 PM.
|
|
|
05-29-2004, 08:28 AM
|
#2
|
LQ Veteran
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
|
The one thing I don't see in your script is either a static IP assignment or a call to dhcpcd to get one from your friendly neighborhood DHCP server. Your lack of access could be as simple as a missing IP address. A quick check of ifconfig after the script has run should tell you if you have an IP address or not.
Also, once the script has run, is wlan0 set up properly? What I mean is does it have the proper ESSID and WEP values? You shouldn't need to set your channel frequency, although it doesn't hurt if you do.
Quote:
Also, what exactly does "ndiswrapper -m" do? Does this eliminate the need for me running the above script on every boot once its initially up and running?
|
If I understand the documentation, this simply sets up your system so that the ndiswrapper module is loaded on boot. In other words, the only bit of your script that would no longer be necessary is the modprobe ndiswrapper line.
|
|
|
05-29-2004, 10:59 AM
|
#3
|
Member
Registered: Mar 2004
Location: UK
Distribution: Slackware 10
Posts: 137
Original Poster
Rep:
|
Thanks for the reply.
Ok, i i typed "ifconfig wlan0 192.168.2.1", but still no connection!
That is the IP of my router. Is this correct or should it be the IP of my machine (192.168.2.2)?
I tried a "ping 192.168.2.1" and this returned results, but when i unplug my router the ping still carries on. Shouldnt this cause it to stop and return an error? I dont know very much about networking so this is new to me.
This is the output of "iwconfig wlan0; ifconfig wlan0":
Code:
wlan0 IEEE 802.11g ESSID:"belkin54g"
Mode:Managed Frequency:2.462GHz Access Point: XX:XX:XX:XX:XX:XX
Bit Rate:54Mb/s Tx-Power:25 dBm
RTS thr:2347 B Fragment thr:2346 B
Encryption key:off
Power Management:off
Link Quality:100/100 Signal level:-10 dBm Noise level:-256 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
wlan0 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX
inet addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING 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 txqueuelen:100
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:11 Memory:faff6000-faff7fff
where the XX:XX:XX:XX:XX:XX values are the mac addresses of my router and card, respectively.
Whats the best way to check for access from the command line? "ping yahoo.com" or something like that?
Thanks.
|
|
|
05-29-2004, 11:21 AM
|
#4
|
LQ Veteran
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
|
Quote:
That is the IP of my router.
|
That's a problem. Each device needs to have it's own IP address, you can't share them. Use the 192.168.2.2 or better yet use DHCP if your router is already supporting that. The command would be dhcpcd wlan0. That also has the advantage of setting your gateway properly. Check the output of route -n to see if the gateway is set properly. It should be pointing to the IP address of your router.
Ping is a reasonble way of checking for access from the command line. Just be sure to ping both the name and the IP address in case you've got a DNS problem.
|
|
|
05-29-2004, 12:04 PM
|
#5
|
Member
Registered: Mar 2004
Location: UK
Distribution: Slackware 10
Posts: 137
Original Poster
Rep:
|
I done what u suggested and used dhcp and it has set up my ip as 192.168.2.2. Looking good. Still no access though.
The "route -n" command returns the following:
Code:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.2.1 0.0.0.0 UG 0 0 0 wlan0
0.0.0.0 192.168.2.1 0.0.0.0 UG 1 0 0 eth0
Does this need editing?
Cheers.
|
|
|
05-29-2004, 01:24 PM
|
#6
|
Member
Registered: Mar 2004
Location: UK
Distribution: Slackware 10
Posts: 137
Original Poster
Rep:
|
I poked about the web a bit and found that the default must be configured to go through the gateway, which in this case is my router with IP 192.168.2.1.
I typed the following:
Code:
route del default
route add default gw 192.168.2.1 netmask 255.255.255.0 wlan0
Typing "route" now gives:
Code:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.2.1 255.255.255.0 UG 0 0 0 wlan0
localnet * 255.255.255.0 U 0 0 0 eth0
localnet * 255.255.255.0 U 0 0 0 wlan0
loopback * 255.0.0.0 U 0 0 0 lo
However, i STILL have no access!
Does anyone know what im missing?
|
|
|
05-29-2004, 04:26 PM
|
#7
|
Member
Registered: Jul 2001
Distribution: Ubuntu
Posts: 195
Rep:
|
you did add the following line...or any line to /etc/resolv.conf right?
nameserver 192.168.2.1
|
|
|
05-29-2004, 04:45 PM
|
#8
|
Member
Registered: Mar 2004
Location: UK
Distribution: Slackware 10
Posts: 137
Original Poster
Rep:
|
Nope, my /etc/resolv.conf now reads:
Code:
nameserver 192.168.2.1
search belkin
What does the "nameserver" line do?
The "search belkin" line was already there, not really sure where it came from or what its for.
Still no access though.
Thanks.
Last edited by donbellioni; 05-29-2004 at 04:46 PM.
|
|
|
05-29-2004, 05:01 PM
|
#9
|
Member
Registered: Jul 2001
Distribution: Ubuntu
Posts: 195
Rep:
|
Can you ping the router?
Make sure your router does not have any security turned on (WEP, MAC filters, etc)
|
|
|
05-29-2004, 05:14 PM
|
#10
|
Member
Registered: Mar 2004
Location: UK
Distribution: Slackware 10
Posts: 137
Original Poster
Rep:
|
I had mac filters on, so i turned them off.
It seems i can no longer ping my router..these are the results:
Code:
PING 192.168.2.1 (192.168.2.1) 56(84) bytes of data.
From 192.168.2.2 icmp_seq=1 Destination Host Unreachable
From 192.168.2.2 icmp_seq=2 Destination Host Unreachable
From 192.168.2.2 icmp_seq=3 Destination Host Unreachable
--- 192.168.2.1 ping statistics ---
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 2014ms
, pipe 3
|
|
|
05-29-2004, 05:22 PM
|
#11
|
Member
Registered: Jul 2001
Distribution: Ubuntu
Posts: 195
Rep:
|
Would you mind posting the output from iwconfig and ifconfig again? Sorry, that sounds like I'm getting you to repeat something you've already done, but I just want to confirm everything is detected properly.
One more thing...are you connected to the internet via a wired connection at the same time? If so, I've heard that might be trouble.
|
|
|
05-29-2004, 05:33 PM
|
#12
|
Member
Registered: Mar 2004
Location: UK
Distribution: Slackware 10
Posts: 137
Original Poster
Rep:
|
No worries, thanks for your help.
Heres the output from "ifconfig wlan0; iwconfig wlan0":
Code:
wlan0 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX
inet addr:192.168.2.2 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:833 (833.0 b) TX bytes:650 (650.0 b)
Interrupt:11 Memory:faff6000-faff7fff
wlan0 IEEE 802.11g ESSID:"belkin54g"
Mode:Managed Frequency:2.462GHz Access Point: XX:XX:XX:XX:XX:XX
Bit Rate:54Mb/s Tx-Power:25 dBm
RTS thr:2347 B Fragment thr:2346 B
Encryption key:off
Power Management:off
Link Quality:100/100 Signal level:-49 dBm Noise level:-256 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:6 Missed beacon:0
Again, where the X values are the mac addresses for the card and router respectively.
And nope, im not connected via cable.
Cheers.
Last edited by donbellioni; 05-29-2004 at 06:18 PM.
|
|
|
05-29-2004, 06:25 PM
|
#13
|
Member
Registered: Jul 2001
Distribution: Ubuntu
Posts: 195
Rep:
|
Quote:
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:833 (833.0 b) TX bytes:650 (650.0 b)
Interrupt:11 Memory:faff6000-faff7fff
|
Quote:
wlan0 IEEE 802.11g ESSID:"belkin54g"
Mode:Managed Frequency:2.462GHz Access Point: XX:XX:XX:XX:XX:XX
Bit Rate:54Mb/s Tx-Power:25 dBm
|
Quote:
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:6 Missed beacon:0
|
Everything looks good, except the "Invalid misc:6" portion. Other than that it did transmit and receive.
If I had to guess I'd say the driver isn't working properly...and is not reading information properly. So now I have to ask about your driver and device. What Wireless card is it, what version of driver are you using, etc. I have a feeling I won't be able to help, but this info will help anyone else who may be able to help.
Do you have the newest driver files for your wlan device?
Also, a little follow up on the nameserver line...that basically sets up your computer to use your router as the DNS I believe...so basically tells your system where the internet is...not just the network. I may be wrong but that is what I assumed it was for...because without it you can ping the router but not the internet.
Last edited by oudent; 05-29-2004 at 06:35 PM.
|
|
|
05-30-2004, 06:12 AM
|
#14
|
Member
Registered: Mar 2004
Location: UK
Distribution: Slackware 10
Posts: 137
Original Poster
Rep:
|
Ah thanks for the info on the nameserver.
Ok, its an internal laptop card (my laptop is a dell inspiron 8600), a Dell Wireless 1350 (802.11b/g) WLAN miniPCI Card, BCM4306/BCM2050 chipset. I used the windows driver from the dell site (the one that wasnt for the US or Japan, im in the UK), the driver version that im using in windows at the moment is 3.40.65.0, but the one i downloaded for use with ndisloader was version 3.40.69. Here is the contents of "Version.txt" that came with the driver:
Code:
Title : Network:Dell TrueMobile 1300 802.11 b/g PCMCIA, TrueMobile 1300 Internal 802.11b/g MPCI, TrueMobile 1400 Internal Dual-band WLAN Card , Wireless 1350 (802.11b/g) WLAN miniPCI Card, Wireless 1450 (802.11a/b/g) Dual-Band WLAN miniPCI Card Package
Version : A03
OEM Name : Dell
OEM Ver : 3.40.69
Computers : Inspiron - 600m, 300m, 500m, 9100, 510m, 5150, 8600, 5100, 1150, XPS;
Latitude - 100L, D505, D600, D500, D800, D400, X300;
Precision - M60
Oses : Windows 2000 Professional,Windows XP Home Edition,Windows XP Professional
Languages : Brazilian Portuguese,Chinese-S,Chinese-T,English,French,German,Italian,Japanese,Korean,Polish,Russian,Spanish,Swedish
Created : Thu May 13 11:11:07 CDT 2004
There are 4 .inf files in the download - in the "AR" directory: bcmwl5.inf, bcmwl5a.inf; and in the "IR" directory: the same again.
I didnt get the "present" message when typing "ndisloader -l" at the command line with the bcmwl5.inf driver from the AR directory the first time i tried it, so i used the bcmwl5a.inf driver and i got the OK from ndiswrapper.
I havnt tried any of the other 2, and ill try using the first one again to see if one of them gets rid of that "Invalid misc:6" bit.
Thanks for sticking with me so far.
Any suggestions would be very welcome.
Cheers.
Last edited by donbellioni; 05-30-2004 at 06:14 AM.
|
|
|
05-30-2004, 07:55 AM
|
#15
|
LQ Veteran
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
|
This may sound a bit off-base, but is your access point set up to broadcast the ESSID? Recently another poster ran into a problem that they could only connect if thier AP was set to broadcast the ESSID. Their card was set up correctly, but it just wouldn't connect without that broadcast.
I'm with oudent, your set-up looks fine.
|
|
|
All times are GMT -5. The time now is 03:42 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|