ifconfig wlan0 scan does not show any results.

Network related discussions (including general TCP/IP stuff, routing, etc).

ifconfig wlan0 scan does not show any results.

Postby bhargava » 03 Mar 2011, 19:21

Hi,

I just now did a fresh install of FreeBSD.
Code: Select all
$ uname -a
FreeBSD mybox.hsd1.ca.comcast.net. 8.2-RELEASE [B]FreeBSD 8.2-RELEASE[/B] #0: Fri Feb 18 02:24:46 UTC 2011     root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386


Code: Select all
$ pciconf -lv
...
 vendor     = 'Broadcom Corporation'
    device     = 'Broadcom Corporation Dell Wireless 1390 WLAN Mini-PCI Card (BCM4311)'
    class      = network


I installed the bwn firmware from the ports [port]net/bwn-firmware-kmod[/port].

But when I try to scan for the available networks:
Code: Select all
ifconfig wlan0 up scan
, but it just returns empty results. Does not show any available networks. I tried installing wpa_gui also but does not work. Below are the files and their contents that I think might be useful. Please let me know if any other information is needed.

Here is the [FILE]/etc/rc.conf[/FILE] file:
Code: Select all
$ cat /etc/rc.conf

# -- sysinstall generated deltas -- # Thu Mar  3 06:55:32 2011
# Created: Thu Mar  3 06:55:32 2011
# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
hostname="mybox.hsd1.ca.comcast.net."
ifconfig_nfe0="DHCP"
inetd_enable="NO"
ipv6_enable="YES"
keymap="us.iso"
moused_enable="YES"
saver="fire"
hald_enable="YES"
dbus_enable="YES"
gdm_enable="YES"
wlans_bwn0="wlan0"
ifconfig_wlan0="WPA DHCP"


Here is the [FILE]/boot/loader.conf[/FILE] file:
Code: Select all
$ cat /boot/loader.conf
nvidia_load="YES"
if_bwn_load="YES"
bwn_u4_ucode_load="YES"
wlan_scan_ap_load="YES"
wlan_scan_sta_load="YES"
wlan_wep_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"


Here is the [FILE]/etc/wpa_supplicant.conf[/FILE]
Code: Select all
$ cat /etc/wpa_supplicant.conf
network={
   ssid="Espresso"
   psk="************"
}

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel


How do I fix this and connect to a network?

Thank you.
--
Bhargava
User avatar
bhargava
Junior Member
 
Posts: 32
Joined: 30 May 2009, 22:28
Location: California

Postby wblock@ » 03 Mar 2011, 21:39

First, use
[cmd="#"]ifconfig wlan0 up list scan[/cmd]

[man=4]bwn[/man] requires installing [port]net/bwn-firmware-kmod[/port] and loading the firmware before use. If you've already done that, please show the output of
[cmd="%"]ifconfig[/cmd]

You may want to change the PSK, now that you've shown it to the world.
User avatar
wblock@
Old Fart
 
Posts: 10226
Joined: 07 Sep 2009, 23:23
Location: Milky Way galaxy

Postby bhargava » 03 Mar 2011, 22:26

wblock wrote:First, use
[cmd="#"]ifconfig wlan0 up list scan[/cmd]

[man=4]bwn[/man] requires installing [port]net/bwn-firmware-kmod[/port] and loading the firmware before use. If you've already done that, please show the output of
[cmd="%"]ifconfig[/cmd]


I already installed it. Here is the output:
Code: Select all
$ ifconfig
fwe0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
   options=8<VLAN_MTU>
   ether 02:24:1b:33:40:00
   ch 1 dma -1
fwip0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
   lladdr 0.24.1b.0.95.33.40.0.a.2.ff.fe.0.0.0.0
nfe0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
   options=82008<VLAN_MTU,WOL_MAGIC,LINKSTATE>
   ether 00:1b:24:74:c6:1c
   inet6 fe80::21b:24ff:fe74:c61c%nfe0 prefixlen 64 scopeid 0x3
   inet 192.168.1.101 netmask 0xffffff00 broadcast 192.168.1.255
   nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
   media: Ethernet autoselect (100baseTX <full-duplex>)
   status: active
bwn0: flags=8803<UP,BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 2290
   ether 00:1a:73:98:8c:94
   media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
   status: no carrier
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
   options=3<RXCSUM,TXCSUM>
   inet 127.0.0.1 netmask 0xff000000
   inet6 ::1 prefixlen 128
   inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5
   nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
wlan0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
   ether 00:1a:73:98:8c:94
   inet6 fe80::21a:73ff:fe98:8c94%wlan0 prefixlen 64 scopeid 0x6
   inet 208.68.139.38 netmask 0xffffff00 broadcast 208.68.139.255
   nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
   media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
   status: no carrier
   ssid "" channel 1 (2412 MHz 11b)
   country US authmode WPA1+WPA2/802.11i privacy OFF txpower 30 bmiss 7
   scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi 7
   roam:rate 1 wme bintval 0

wblock wrote:You may want to change the PSK, now that you've shown it to the world.

:) I forgot to change this when I posted this. Thanks for letting me know.

Thank you.
--
Bhargava
User avatar
bhargava
Junior Member
 
Posts: 32
Joined: 30 May 2009, 22:28
Location: California

Postby cheme » 03 Mar 2011, 23:15

Hello,

Try rearranging your [FILE]/etc/wpa_supplicant.conf[/FILE]. Change it to match mine and give it a try.

Code: Select all
[B]#cat /etc/wpa_supplicant.conf[/B]
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
network={
        ssid="yourssid"
        psk="yourkey"
        }


Notice how the "Global Parameters" are before the "Network Block" and that there are no uncommented spaces between a line of the file. Check out the wpa_supplicant.conf man page. http://www.FreeBSD.org/cgi/man.cgi?query=wpa_supplicant.conf&sektion=5
cheme
Junior Member
 
Posts: 16
Joined: 24 Jan 2011, 06:30

Postby wblock@ » 04 Mar 2011, 00:58

The [file]wlan_*[/file] modules are included in the GENERIC kernel. It's not necessary to load them unless you have a custom kernel without them.

Access point scanning does not use [man=8]wpa_supplicant[/man]. Does "list scan" show different results than just "scan"?

All I've ever used in [file]wpa_supplicant.conf[/file] is a network block for each network with SSID and PSK (or a bit more for open networks). But you only need that to connect to those networks, not scan for SSIDs.
User avatar
wblock@
Old Fart
 
Posts: 10226
Joined: 07 Sep 2009, 23:23
Location: Milky Way galaxy

Postby bhargava » 04 Mar 2011, 01:12

cheme wrote:Hello,

Try rearranging your [FILE]/etc/wpa_supplicant.conf[/FILE]. Change it to match mine and give it a try.

Code: Select all
[B]#cat /etc/wpa_supplicant.conf[/B]
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
network={
        ssid="yourssid"
        psk="yourkey"
        }



I tried everything it does not scan at all.

I tried using the following command
Code: Select all
[U]# wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf[/U]
ioctl[SIOCS80211, op 103, len 128]: Device not configured
Failed to initiate AP scan.
ioctl[SIOCS80211, op 103, len 128]: Device not configured
Failed to initiate AP scan.
ioctl[SIOCS80211, op 103, len 128]: Device not configured
Failed to initiate AP scan.
ioctl[SIOCS80211, op 103, len 128]: Device not configured
Failed to initiate AP scan.
ioctl[SIOCS80211, op 103, len 128]: Device not configured
Failed to initiate AP scan.
ioctl[SIOCS80211, op 103, len 128]: Device not configured
Failed to initiate AP scan.
ioctl[SIOCS80211, op 103, len 128]: Device not configured
Failed to initiate AP scan.
ioctl[SIOCS80211, op 103, len 128]: Device not configured
Failed to initiate AP scan.
ioctl[SIOCS80211, op 103, len 128]: Device not configured
Failed to initiate AP scan.
ioctl[SIOCS80211, op 103, len 128]: Device not configured
Failed to initiate AP scan.
ioctl[SIOCS80211, op 103, len 128]: Device not configured
Failed to initiate AP scan.
ioctl[SIOCS80211, op 103, len 128]: Device not configured
Failed to initiate AP scan.
ioctl[SIOCS80211, op 103, len 128]: Device not configured
Failed to initiate AP scan.
[B][I][U]^CCTRL-EVENT-TERMINATING [/U][/I][/B]- signal 2 received
ioctl[SIOCS80211, op 26, arg 0x0]: Operation not supported
Failed to disable WPA in the driver.
ELOOP: remaining socket: sock=4 eloop_data=0x28406140 user_data=0x2840d040 handler=0x8069f90


It continues the output till use C-c. Anyone who see what the problem is?

Thank you.
--
Bhargava
User avatar
bhargava
Junior Member
 
Posts: 32
Joined: 30 May 2009, 22:28
Location: California

Postby bhargava » 04 Mar 2011, 01:16

wblock wrote:The [file]wlan_*[/file] modules are included in the GENERIC kernel. It's not necessary to load them unless you have a custom kernel without them.

Access point scanning does not use [man=8]wpa_supplicant[/man]. Does "list scan" show different results than just "scan"?


no. The results do not change. I mean it shows no results at all.
Code: Select all
mybox# ifconfig wlan0 list scan
mybox#

mybox# ifconfig wlan0 scan
mybox#


Thank you.
--
Bhargava
User avatar
bhargava
Junior Member
 
Posts: 32
Joined: 30 May 2009, 22:28
Location: California

Postby bhargava » 04 Mar 2011, 01:38

Hi,

I found this line in the dmesg output.
Code: Select all
bwn_v4_ucode13: could not load firmware image, error 2
....
bwn0: the fw file(bwn_v4_ucode13) not found
bwn-open_v4_ucode13: could not load firmware image, error 2
bwn0: the fw file(bwn-open_v4_ucode13) not found


here is my kldstat:
Code: Select all
# kldstat
Id Refs Address    Size     Name
 1   18 0xc0400000 bd97b4   kernel
 2    1 0xc0fda000 37228    if_bwn.ko
 3    2 0xc1012000 a1bc     siba_bwn.ko
 4    1 0xc101d000 a4c3e0   nvidia.ko
 5    2 0xc1a6a000 2d998    linux.ko



I have added bwn_u4_ucode in [FILE]/boot/loader.conf[/FILE]
Code: Select all
cat /boot/loader.conf
nvidia_load="YES"
if_bwn_load="YES"
[B][I][U]bwn_u4_ucode_load="YES"[/U][/I][/B]
wlan_scan_ap_load="YES"
wlan_scan_sta_load="YES"
wlan_wep_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"


But i guess it is looking for file/module named bwn-open_v4_ucode[color="Red"]13[/color]

but in the /boot/modules I have:
Code: Select all
# ls /boot/modules/
bwn_v4_lp_ucode.ko   cuse4bsd.ko      nvidia.ko
bwn_v4_ucode.ko      linker.hints

No bwn-open_v4_ucode[color="Red"]13[/color]. I think this is the source of the problem (right ?). How do I fix this (if this is the problem). any suggestions.

Thanks.
--
Bhargava
User avatar
bhargava
Junior Member
 
Posts: 32
Joined: 30 May 2009, 22:28
Location: California

Postby bhargava » 04 Mar 2011, 01:57

bhargava wrote:I have added bwn_u4_ucode in [FILE]/boot/loader.conf[/FILE]
Code: Select all
cat /boot/loader.conf
nvidia_load="YES"
if_bwn_load="YES"
[B][I][U]bwn_[color="Red"]u[/color]4_ucode_load="YES"[/U][/I][/B]
wlan_scan_ap_load="YES"
wlan_scan_sta_load="YES"
wlan_wep_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"



I have a typo in there. I've now corrected it and will see if this will work. I'll post back in a minute after I reboot.
Thank you.
--
Bhargava
User avatar
bhargava
Junior Member
 
Posts: 32
Joined: 30 May 2009, 22:28
Location: California

Postby wblock@ » 04 Mar 2011, 01:58

You may also need to "up" the wlan0 interface the first time, which is why that's usually included in instructions:
[cmd="#"]ifconfig wlan0 up list scan[/cmd]
User avatar
wblock@
Old Fart
 
Posts: 10226
Joined: 07 Sep 2009, 23:23
Location: Milky Way galaxy

Postby bhargava » 04 Mar 2011, 02:11

Hi,

ifconfig wlan0 list scan is now working.

Thank you wblock and cheme for the answers and your time.
--
Bhargava
User avatar
bhargava
Junior Member
 
Posts: 32
Joined: 30 May 2009, 22:28
Location: California


Return to Networking

Who is online

Users browsing this forum: No registered users and 0 guests