LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (https://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   Connecting to WPA wireless Network (https://www.linuxquestions.org/questions/linux-wireless-networking-41/connecting-to-wpa-wireless-network-557537/)

LinuxNoob75 05-29-2007 03:19 PM

Connecting to WPA wireless Network
 
Hi. I have a broadcom Linksys wireless G Adapter connecting to a WPA encoded wireless network.
Using Ndiswrapper, I have successfully gotten the driver installed, and it says the hardware and driver are both present.
Now, what commands do I use to connect to a WPA wireless network? Or view the wireless networks in range of that card?
thanks,
LN75

2Gnu 05-30-2007 09:00 AM

/usr/local/bin/wpa_supplicant -Bw -c/etc/wpa_supplicant.conf -Dwext -iwlan0

iwlist wlan0 scan

LinuxNoob75 05-30-2007 02:49 PM

OK. The output of the first says that /usr/local/bin/wpa_supplicant doesn't exist(no such directory)

The output of the second says that the Interface doesn't support scanning.

Does this mean I'm missing something?

raskin 05-30-2007 03:14 PM

I guess that it is /usr/bin/wpa_supplicant (specify distro, by the way..)

About scanning - try 'iwlist wlan0 scan' after 'ip link set wlan0 up'. Try also 'iwlist scan'. Post lines in 'dmesg' output that appear after each command, beginning with loading ndiswrapper module.

LinuxNoob75 05-30-2007 07:25 PM

OK.
it Still says /usr/bin/wpa_supplicant isn't a file or directory.

'ip link set wlan0 up' gives
Code:

SIOCGIFFLAGS: No Such device
'iwlist wlan0 scan' gives
Code:

wlan0    Interface doesn't support scanning.
'iwlist scan' gives
Code:

lo        Interface doesn't support scanning.
eth0      Interface doesn't support scanning.
eth1      No scan results

I assume this means something is wrong...

2Gnu 05-30-2007 11:58 PM

"which wpa_supplicant" will give you the path, but the driver seems to be the issue.

Try lsmod |grep ndiswrapper to see if the module is loaded. If not, modprobe ndiswrapper. If it is, run ifconfig to see which interfaces are used. wlan0 is the default nomenclature, but your system may be different.

LinuxNoob75 05-31-2007 04:36 PM

OK
the path is:
Code:

/sbin/wpa_supplicant

But lsmod gave:
Code:

ndiswrapper          194608  0
usbcore              134280  10
ndiswrapper,usb_storage,ftdi_sio,usbhid,libusual,
lmpcm_usb,usbserial,ehci_hcd,uhci_hcd

I have no idea what that means though, so I did both of your steps.
Modprobe gives back the command line, which I remember as good.

this is what ifconfig gives back:
Code:

eth0      Link encap:Ethernet  HWaddr 00:12:3F:7E:B9:6C 
          UP BROADCAST 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:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Base address:0xcce0 Memory:ef7e0000-ef800000

eth0:avah Link encap:Ethernet  HWaddr 00:12:3F:7E:B9:6C 
          inet addr:169.254.7.11  Bcast:169.254.255.255  Mask:255.255.0.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          Base address:0xcce0 Memory:ef7e0000-ef800000

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:914 errors:0 dropped:0 overruns:0 frame:0
          TX packets:914 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:73204 (71.4 KiB)  TX bytes:73204 (71.4 KiB)


raskin 05-31-2007 04:55 PM

So I think
Code:

ip link set eth1 up
iwlist eth1 scan

is what you need for scanning networks.

2Gnu 05-31-2007 06:10 PM

Sorry, should have asked for iwconfig output as well. That will identify the expected wireless interface.

LinuxNoob75 05-31-2007 06:53 PM

I forgot to mention that I'm using Ubuntu 7.
OK.
doing '/sbin/wpa_supplicant -Bw -c/etc/wpa_supplicant.conf -Dwext -iwlan' just gives a command line back. So does 'ip link set eth1 up'. Is this supposed to happen?

iwlist eth0 scan gives me:
Code:

eth0      Interface doesn't support scanning.
It seems something is still wrong...

LinuxNoob75 05-31-2007 07:02 PM

iwconfig gives:
Code:

lo        no wireless extensions.

eth0      no wireless extensions.

eth1      IEEE 802.11b/g  ESSID:off/any  Nickname:"Broadcom 4306"
          Mode:Managed  Access Point: Invalid 
          RTS thr:off  Fragment thr:off
          Link Quality=0/100  Signal level=-256 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


2Gnu 05-31-2007 08:03 PM

Quote:

Originally Posted by LinuxNoob75
I forgot to mention that I'm using Ubuntu 7.
OK.
doing '/sbin/wpa_supplicant -Bw -c/etc/wpa_supplicant.conf -Dwext -iwlan' just gives a command line back. So does 'ip link set eth1 up'. Is this supposed to happen?

iwlist eth0 scan gives me:
Code:

eth0      Interface doesn't support scanning.
It seems something is still wrong...

Using the -B option with wpa_supplicant sends the process into the background, so you'll see no errors (or any other messages, for that matter). Remove the B for now to see more details.

Clearly, eth1 is the wireless interface. (That's why you're getting the error when trying to scan for APs with eth0.) I'm guessing that the bcm43xx driver is loading and conflicting with ndiswrapper.

Do you see bcm43xx in the output of lsmod?

LinuxNoob75 05-31-2007 08:14 PM

The output of lsmod is below:
Code:

Module                  Size  Used by
nls_iso8859_1          5120  1
nls_cp437              6784  2
vfat                  14208  1
isofs                  36284  1
fat                    53916  1 vfat
udf                    85252  0
ipv6                  268704  10
binfmt_misc            12680  1
rfcomm                40856  0
l2cap                  25728  5 rfcomm
bluetooth              55908  4 rfcomm,l2cap
ppdev                  10116  0
radeon                124576  3
drm                    81044  4 radeon
cpufreq_conservative    8200  0
cpufreq_ondemand        9228  0
cpufreq_powersave      2688  0
cpufreq_userspace      5408  0
cpufreq_stats          7360  0
freq_table              5792  2 cpufreq_ondemand,cpufreq_stats
pcc_acpi              13184  0
tc1100_wmi              8068  0
sony_acpi              6284  0
dev_acpi              12292  0
asus_acpi              17308  0
ac                      6020  0
sbs                    15652  0
battery                10756  0
backlight              7040  1 asus_acpi
container              5248  0
dock                  10268  0
button                  8720  0
i2c_ec                  5888  1 sbs
i2c_core              22784  1 i2c_ec
video                  16388  0
ndiswrapper          194608  0
parport_pc            36388  0
lp                    12452  0
parport                36936  3 ppdev,parport_pc,lp
fuse                  46612  0
snd_hda_intel          21912  1
snd_hda_codec        205440  1 snd_hda_intel
snd_pcm_oss            44544  0
snd_mixer_oss          17408  1 snd_pcm_oss
snd_pcm                79876  3 snd_hda_intel,snd_hda_codec,snd_pcm_oss
ipaq                  34456  0
snd_seq_dummy          4740  0
ftdi_sio              34696  0
snd_seq_oss            32896  0
snd_seq_midi            9600  0
snd_rawmidi            25472  1 snd_seq_midi
snd_seq_midi_event      8448  2 snd_seq_oss,snd_seq_midi
snd_seq                52592  6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
snd_timer              23684  2 snd_pcm,snd_seq
snd_seq_device          9100  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq
snd                    54020  12 snd_hda_intel,snd_hda_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
bcm43xx              125332  0
ieee80211softmac      31232  1 bcm43xx
psmouse                38920  0
lmpcm_usb              7040  0
usbserial              32488  2 ipaq,ftdi_sio
soundcore              8672  1 snd
ieee80211              34760  2 bcm43xx,ieee80211softmac
ieee80211_crypt        7040  1 ieee80211
af_packet              23816  4
pcspkr                  4224  0
intel_agp              25116  1
agpgart                35400  2 drm,intel_agp
serio_raw              7940  0
snd_page_alloc        10888  2 snd_hda_intel,snd_pcm
shpchp                34324  0
pci_hotplug            32576  1 shpchp
evdev                  11008  3
tsdev                  8768  0
ext3                  133128  1
jbd                    59816  1 ext3
mbcache                9604  1 ext3
sr_mod                17060  1
cdrom                  37664  1 sr_mod
sg                    36252  0
sd_mod                23428  4
usb_storage            72256  1
usbhid                26592  0
hid                    27392  1 usbhid
generic                5124  0 [permanent]
libusual              17936  1 usb_storage
ata_generic            9092  0
ahci                  22020  2
uhci_hcd              25360  0
ata_piix              15492  1
libata                125720  3 ata_generic,ahci,ata_piix
scsi_mod              142348  5 sr_mod,sg,sd_mod,usb_storage,libata
e1000                126016  0
ehci_hcd              34188  0
usbcore              134280  11 ndiswrapper,ipaq,ftdi_sio,lmpcm_usb,usbserial,usb_storage,usbhid,libusual,uhci_hcd,ehci_hcd
thermal                14856  0
processor              31048  1 thermal
fan                    5636  0
fbcon                  42656  0
tileblit                3584  1 fbcon
font                    9216  1 fbcon
bitblit                6912  1 fbcon
softcursor              3200  1 bitblit
vesafb                  9220  0
capability              5896  0
commoncap              8192  1 capability


LinuxNoob75 05-31-2007 08:15 PM

Yes. bm43xx is there in the list. What should I do to prevent it from interfering?

2Gnu 05-31-2007 09:21 PM

modprobe -r bcm43xx

That will unload the module.

Edit your blacklist file to specify the bcm43xx as a module that should never load. On my machine, it's /etc/modprobe.d/blacklist Might be different on yours.


All times are GMT -5. The time now is 11:23 AM.