LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 05-28-2004, 05:32 PM   #1
donbellioni
Member
 
Registered: Mar 2004
Location: UK
Distribution: Slackware 10
Posts: 137

Rep: Reputation: 15
Arrow 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.
 
Old 05-29-2004, 08:28 AM   #2
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
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.
 
Old 05-29-2004, 10:59 AM   #3
donbellioni
Member
 
Registered: Mar 2004
Location: UK
Distribution: Slackware 10
Posts: 137

Original Poster
Rep: Reputation: 15
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.
 
Old 05-29-2004, 11:21 AM   #4
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
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.
 
Old 05-29-2004, 12:04 PM   #5
donbellioni
Member
 
Registered: Mar 2004
Location: UK
Distribution: Slackware 10
Posts: 137

Original Poster
Rep: Reputation: 15
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.
 
Old 05-29-2004, 01:24 PM   #6
donbellioni
Member
 
Registered: Mar 2004
Location: UK
Distribution: Slackware 10
Posts: 137

Original Poster
Rep: Reputation: 15
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?
 
Old 05-29-2004, 04:26 PM   #7
oudent
Member
 
Registered: Jul 2001
Distribution: Ubuntu
Posts: 195

Rep: Reputation: 30
you did add the following line...or any line to /etc/resolv.conf right?

nameserver 192.168.2.1
 
Old 05-29-2004, 04:45 PM   #8
donbellioni
Member
 
Registered: Mar 2004
Location: UK
Distribution: Slackware 10
Posts: 137

Original Poster
Rep: Reputation: 15
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.
 
Old 05-29-2004, 05:01 PM   #9
oudent
Member
 
Registered: Jul 2001
Distribution: Ubuntu
Posts: 195

Rep: Reputation: 30
Can you ping the router?
Make sure your router does not have any security turned on (WEP, MAC filters, etc)
 
Old 05-29-2004, 05:14 PM   #10
donbellioni
Member
 
Registered: Mar 2004
Location: UK
Distribution: Slackware 10
Posts: 137

Original Poster
Rep: Reputation: 15
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
 
Old 05-29-2004, 05:22 PM   #11
oudent
Member
 
Registered: Jul 2001
Distribution: Ubuntu
Posts: 195

Rep: Reputation: 30
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.
 
Old 05-29-2004, 05:33 PM   #12
donbellioni
Member
 
Registered: Mar 2004
Location: UK
Distribution: Slackware 10
Posts: 137

Original Poster
Rep: Reputation: 15
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.
 
Old 05-29-2004, 06:25 PM   #13
oudent
Member
 
Registered: Jul 2001
Distribution: Ubuntu
Posts: 195

Rep: Reputation: 30
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.
 
Old 05-30-2004, 06:12 AM   #14
donbellioni
Member
 
Registered: Mar 2004
Location: UK
Distribution: Slackware 10
Posts: 137

Original Poster
Rep: Reputation: 15
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.
 
Old 05-30-2004, 07:55 AM   #15
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
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.
 
  


Reply



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
Setting Up The Wireless Connection jude01 Fedora - Installation 2 09-10-2005 06:11 AM
Setting up wireless connection on Fedora 2 pitimespi Linux - Wireless Networking 2 08-01-2004 03:11 PM
setting up wireless connection on redhat linux 9 g123 Linux - Wireless Networking 0 04-09-2004 08:08 AM
Trouble Setting up Wireless Card on Mandrak2 9.2 memphis518 Linux - Hardware 2 01-25-2004 02:50 PM
Setting up a Wireless Connection Showtime8000 Linux - Wireless Networking 2 09-22-2003 09:32 AM

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

All times are GMT -5. The time now is 07:09 AM.

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