Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Jun 2011 17:09:35 +0800
From:      Adrian Chadd <adrian@freebsd.org>
To:        =?GB2312?B?19264czsz8I=?= <zhtx10@gmail.com>
Cc:        freebsd-wireless@freebsd.org
Subject:   Re: Couldn't connect to wireless networking
Message-ID:  <BANLkTimMyR2djazO-18SS-xSt%2BkuzSWpow@mail.gmail.com>
In-Reply-To: <BANLkTikkdowY5OdWzpafLKCz-MWgy_SD9w@mail.gmail.com>
References:  <BANLkTinNhA12Z2ar6mUapNQfXwJn1aRDew@mail.gmail.com> <BANLkTikHY-tKG3UL5pVMqqyTQ1ubb9GOoQ@mail.gmail.com> <BANLkTimzhBq7MyVv64LnEbQ1i44%2BGgcPhA@mail.gmail.com> <BANLkTikd3%2BdyUX8%2Bbq5Kb8KT38b2khGSZA@mail.gmail.com> <BANLkTimC-1w=opsFjMmv%2BpXmKBnerk8BZA@mail.gmail.com> <BANLkTim9BP9-KTM5LXU_0-JD6TQDk%2BL4Zg@mail.gmail.com> <BANLkTik%2BPTiWSDBPJYmuwo_kovFkv1vOeA@mail.gmail.com> <BANLkTimSkKpzijiAmFca%2BuX9HQo2ov1iFA@mail.gmail.com> <BANLkTik6BBSwSVKSpOArvYsGpN_11%2B0nrA@mail.gmail.com> <BANLkTinvU1R2YzhrGkTpr0R_cct_-=yM7w@mail.gmail.com> <4E06E668.4040603@gmail.com> <BANLkTikkdowY5OdWzpafLKCz-MWgy_SD9w@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
You interrupted wpa_supplicant. Then you tried running dhclient on it
without wpa_supplicant running, which won't work.

The problem unfortunately is that it can't seem to see the access
point. It should show up in "ifconfig wlan0 scan". If it isn't, it
means something is broken.
Please find out which channel the access point is supposed to be on
(if you see one valid scan result, please paste it here!) and then we
can move on from there.




Adrian

2011/6/26 =E7=BA=B5=E6=A8=AA=E5=A4=A9=E4=B8=8B <zhtx10@gmail.com>:
> =E5=9C=A8 2011=E5=B9=B46=E6=9C=8826=E6=97=A5 =E4=B8=8B=E5=8D=883:57=EF=BC=
=8CMatt <sendtomatt@gmail.com>=E5=86=99=E9=81=93=EF=BC=9A
>
>> On 06/25/11 21:21, Kevin Oberman wrote:
>> > You seem determined to not to provide information that might help. Out=
put
>> > of:
>> > ifconfig wlan0
>> > netstat -rnf inet
>> > would be a start.
>> >
>> > R. Kevin Oberman, Network Engineer
>> > Retired
>> > kob6558@gmail.com
>> > On Jun 25, 2011 5:00 PM, "=E7=BA=B5=E6=A8=AA=E5=A4=A9=E4=B8=8B" <zhtx1=
0@gmail.com> wrote:
>> >> I only know that it's 11g mode.
>> >>
>> >> The main issue is I cannot ping any websites if wlan0 becomes
>> associated.
>> >> I really don't know what I do next... :-(
>> >> I think my configurations are correct.
>> >>
>> >> What's the channel of the AP?
>> >>>
>> >>> adrian
>> >>>
>> >>> 2011/6/25 =E7=BA=B5=E6=A8=AA=E5=A4=A9=E4=B8=8B <zhtx10@gmail.com>:
>> >>>>> Too many possibilities to tell.
>> >>>>>
>> >>>>> Is your DNS server configured? It should be in /etc/resolv.conf.
>> >>>>>
>> >>>>> Is your default route set?
>> >>>>> netstat -rnf inet
>> >>>>>
>> >>>>> What is the output of
>> >>>>> ifconfig wlan0
>> >>>>>
>> >>>>> Most of these things should be set by DHCP, but may not be.
>> >>>>> If it shows as associated, try pinging your router.
>> >>>>>
>> >>>>> Still, without more information, it's all just guesses on my part.
>> >>>>>
>> >>>>> --
>> >>>>> R. Kevin Oberman, Network Engineer
>> >>>>> Retired
>> >>>>> kob@gmail.com
>> >>>> OK.
>> >>>> the output ifconfig wlan0:
>> >>>> wlan0: flags=3D8c43<UP,BROADCAST,RUNNING,OACTIVE,SIMPLEX,MULTICAST>
>> > metric
>> >>> 0
>> >>>> mut 1500
>> >>>> ether 00:26:37:64:1e:b9
>> >>>> inet 0.0.0 netmask 0xff000000 broadcast 255.255.255.255
>> >>>> media:IEEE 802.11 wireless ethernet autoselect (autoselect)
>> >>>> status: no carried.
>> >>>> ssid "" channel 6 (2437 MHz 11g)
>> >>>> regdomail 97 indoor ecm authmode WPA1+WPA2/802.11i privacy ON
>> >>>> deftxkey UNDEF txpower 20 bmiss 7 scanvalid 450 bgscan bgscanintvl =
300
>> >>>> bgscanidle 250 roam:rssi 7 roam:rate 5 protmode CTS wme burst
>> >>>> roaming MANUAL
>> >>>>
>> >>>> ifconfig wlan0 list scan
>> >>>> <empty !! just now it could find ssid WEB...>
>> >>>>
>> >>>> netstat -rnf inet
>> >>>> Routing tables
>> >>>> Internet:
>> >>>> Destination Gateway Flags Refs Use Netif Expire
>> >>>> 0.0.0.0/8 link#4 U 0 0 wlan0
>> >>>> 127.0.0.1 link#3 UH 0 0 lo0
>> >>>>
>> >>>>
>> >>>>
>> >> _______________________________________________
>> >> freebsd-wireless@freebsd.org mailing list
>> >> http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
>> >> To unsubscribe, send any mail to "
>> freebsd-wireless-unsubscribe@freebsd.org
>> > "
>> > _______________________________________________
>> > freebsd-wireless@freebsd.org mailing list
>> > http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
>> > To unsubscribe, send any mail to "
>> freebsd-wireless-unsubscribe@freebsd.org"
>> >
>> Please note -Dbsd is generally unnecessary, although probably not the
>> problem.
>> Below is a bit of sh that can be put into a script or run line by line
>> that should record most connection setup and connection into a log in
>> your home directory called "wifilog.txt" which you could upload if it's
>> still not working. As an added bonus, it should leave your connection
>> setup afterward (it's a modified version of a connection script I tend
>> to use).
>>
>> run the following as root or under sudo:
>>
>> echo "Setup log:" > ~/wifilog.txt
>> route -n flush &>> ~/wifilog.txt
>>
> ifconfig wlan0 destroy &>> ~/wifilog.txt
>>
> ifconfig ath0 down &>> ~/wifilog.txt
>>
> ifconfig ath0 up &>> ~/wifilog.txt
>> ifconfig wlan0 create wlandev ath0 &>>~/wifilog.txt
>> ifconfig wlan0 up scan &>> ~/wifilog.txt
>> sleep 2
>> ifconfig ath0 scan &>> ~/wifilog.txt
>> wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -B &>>~/wifilog.txt
>> sleep 5
>> dhclient wlan0 &>>~/wifilog.txt
>> echo "Connection info:" >> ~/wifilog.txt
>> netstat -rn &>>~/wifilog.txt
>> cat /etc/resolv.conf &>>~/wifilog.txt
>> ifconfig wlan0 &>>~/wifilog.txt
>> ping -t 3 4.4.4.4 &>>~/wifilog.txt
>>
>> # Hope it helps,
>> # Matt
>>
>
> I got many errors, but not save to wifilog.txt. (Copied here)
>
>
> laptop# ifconfig wlan0 destroy
> laptop# ifconfig wlan0 create wlandev ath0
> laptop# ifconfig wlan0
> wlan0: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu =
1500
> =C2=A0 =C2=A0ether 00:26:37:64:1e:b9
> =C2=A0 =C2=A0media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
> =C2=A0 =C2=A0status: no carrier
> =C2=A0 =C2=A0ssid WEB channel 6 (2437 MHz 11g)
> =C2=A0 =C2=A0regdomain 97 indoor ecm authmode WPA1+WPA2/802.11i privacy O=
N
> =C2=A0 =C2=A0deftxkey UNDEF txpower 20 bmiss 7 scanvalid 450 bgscan bgsca=
nintvl 300
> =C2=A0 =C2=A0bgscanidle 250 roam:rssi 7 roam:rate 5 protmode CTS wme burs=
t
> =C2=A0 =C2=A0roaming MANUAL
> laptop# route -n flush
> laptop# ifconfig wlan0 destroy
> laptop# ifconfig ath0 down
> laptop# ifconfig ath0 up
> laptop# ifconfig wlan0 create wlandev ath0
> laptop# ifconfig wlan0 up scan
> laptop# sleep 2
> laptop# wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -B
> laptop# dhclient wlan0
> wlan0: no link .............. giving up
> laptop# wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf
> CTRL-EVENT-SCAN-RESULTS
> CTRL-EVENT-SCAN-RESULTS
> CTRL-EVENT-SCAN-RESULTS
> CTRL-EVENT-SCAN-RESULTS
> CTRL-EVENT-SCAN-RESULTS
> CTRL-EVENT-SCAN-RESULTS
> CTRL-EVENT-SCAN-RESULTS
> CTRL-EVENT-SCAN-RESULTS
> CTRL-EVENT-SCAN-RESULTS
> CTRL-EVENT-SCAN-RESULTS
> CTRL-EVENT-SCAN-RESULTS
> CTRL-EVENT-SCAN-RESULTS
> CTRL-EVENT-SCAN-RESULTS
> CTRL-EVENT-SCAN-RESULTS
> CTRL-EVENT-SCAN-RESULTS
> CTRL-EVENT-SCAN-RESULTS
> CTRL-EVENT-SCAN-RESULTS
> ^CCTRL-EVENT-TERMINATING - signal 2 received
> ioctl[SIOCS80211, op 26, arg 0x0]: Operation not supported
> Failed to disable WPA in the driver.
> ELOOP: remaining socket: sock=3D4 eloop_data=3D0x800e0b1c0 user_data=3D0x=
800e070f0
> handler=3D0x421840
> laptop# dhclient wlan0
> wlan0: no link ....^C
> laptop# netstat -rn
> Routing tables
>
> Internet:
> Destination =C2=A0 =C2=A0 =C2=A0 =C2=A0Gateway =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0Flags =C2=A0 =C2=A0Refs =C2=A0 =C2=A0 =C2=A0Use =C2=A0Neti=
f Expire
> 127.0.0.1 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0link#3 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 UH =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A00 =C2=A0 =C2=A0 =
=C2=A0 48 =C2=A0 =C2=A0lo0
>
> Internet6:
> Destination =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 Gateway =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 Flags
> Netif Expire
> ::1 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ::1 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 UH
> lo0
> fe80::%lo0/64 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 link#3 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0U
> lo0
> fe80::1%lo0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 link#3 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0UHS
> lo0
> ff01:3::/32 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 fe80::1%lo0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 U
> lo0
> ff02::%lo0/32 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 fe80::1%lo0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 U
> lo0
> laptop# cat /etc/resolv.conf
> cat: /etc/resolv.conf: No such file or directory
> laptop# ifconfig wlan0
> wlan0: flags=3D8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
> =C2=A0 =C2=A0ether 00:26:37:64:1e:b9
> =C2=A0 =C2=A0media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
> =C2=A0 =C2=A0status: no carrier
> =C2=A0 =C2=A0ssid WEB channel 6 (2437 MHz 11g)
> =C2=A0 =C2=A0regdomain 97 indoor ecm authmode WPA1+WPA2/802.11i privacy O=
FF
> =C2=A0 =C2=A0txpower 20 bmiss 7 scanvalid 450 bgscan bgscanintvl 300 bgsc=
anidle 250
> =C2=A0 =C2=A0roam:rssi 7 roam:rate 5 protmode CTS wme burst roaming MANUA=
L
> laptop# ping -t 3 192.168.1.1
> PING 192.168.1.1 (192.168.1.1): 56 data bytes
> ping: sendto: No route to host
> ping: sendto: No route to host
> ping: sendto: No route to host
>
> --- 192.168.1.1 ping statistics ---
> 3 packets transmitted, 0 packets received, 100.0% packet loss
> laptop#
>
>
> Maybe the troubles happen when connect the DHCP server?
> _______________________________________________
> freebsd-wireless@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
> To unsubscribe, send any mail to "freebsd-wireless-unsubscribe@freebsd.or=
g"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BANLkTimMyR2djazO-18SS-xSt%2BkuzSWpow>