DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 20th January 2009
stukov's Avatar
stukov stukov is offline
Real Name: Jean-Michel Philippon-Nadeau
Package Pilot
 
Join Date: May 2008
Location: Sherbrooke, Qc, Canada
Posts: 167
Default Problems with wireless client

Hello,

It is my first time installing a FreeBSD wireless client to a network. I've got a D-Link adapter with the Atheros chipset. I've setuped the whole thing following the Handbook.

My setup is fairly relatively simple. It's a common D-Link AP with WPA2.

My box can connect to the AP but looses "carrier" very often resulting in packet loss.

My laptop is in the same room, but connects everywhere without any packet loss.

Here is my ifconfig output:
Code:
%ifconfig ath0
ath0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 00:1e:58:a3:08:91
        inet 192.168.0.100 netmask 0xffffff00 broadcast 192.168.0.255
        media: IEEE 802.11 Wireless Ethernet autoselect (DS/11Mbps)
        status: associated
        ssid ssid_name channel 1 (2412 Mhz 11g) bssid 00:1e:58:3f:de:6b
        authmode WPA2/802.11i privacy ON deftxkey UNDEF TKIP 2:128-bit
        txpower 31.5 bmiss 7 scanvalid 60 bgscan bgscanintvl 300
        bgscanidle 250 roam:rssi11g 7 roam:rate11g 5 protmode CTS burst
        roaming MANUAL
And here is my /etc/wpa_supplicant.conf:
Code:
network={
  ssid="ssid_name"
  psk="passphrase"
}
And my /etc/rc.conf:
Code:
ifconfig_ath0="WPA DHCP"
hostname="pfeil"
Thanks for the help,
__________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
Reply With Quote
  #2   (View Single Post)  
Old 20th January 2009
stukov's Avatar
stukov stukov is offline
Real Name: Jean-Michel Philippon-Nadeau
Package Pilot
 
Join Date: May 2008
Location: Sherbrooke, Qc, Canada
Posts: 167
Default

Forgot to mention I am running FBSD 7.1 release i386. Fresh install.
__________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
Reply With Quote
  #3   (View Single Post)  
Old 20th January 2009
richardpl richardpl is offline
Spam Deminer
 
Join Date: May 2008
Location: Croatia
Posts: 284
Default

You can disable bgscan, it is really usefull only when roaming is not MANUAL.
What is difference in setup with device that lost carrier and one which does not?
You also can explore wlandebug(8) ...
Reply With Quote
  #4   (View Single Post)  
Old 20th January 2009
stukov's Avatar
stukov stukov is offline
Real Name: Jean-Michel Philippon-Nadeau
Package Pilot
 
Join Date: May 2008
Location: Sherbrooke, Qc, Canada
Posts: 167
Default

Thanks for the reply richardpl,

The main difference between the two machines is the OS: one is running Windows and the other FreeBSD.

wlandebug looks exactly like the magic wand that will help me identifying the problem, however the man page doesn't mention where the debug output is shown...

The box is currently rebuilding world and kernel, I'll continue experimenting as soon as it finishes.

Thanks again!
__________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
Reply With Quote
  #5   (View Single Post)  
Old 20th January 2009
richardpl richardpl is offline
Spam Deminer
 
Join Date: May 2008
Location: Croatia
Posts: 284
Default

Quote:
Originally Posted by stukov View Post
wlandebug looks exactly like the magic wand that will help me identifying the problem, however the man page doesn't mention where the debug output is shown...
It is outputed by kernel on console.
You could also enable ath(4) special debug options available in driver itself.
Note that such ath debug options are documented only in ath source and are mostly used by developers.

But enable first one by one so you dont get lost in forest of console messages.

You could also sniff WLAN packets with another device while carrier get lost. But understanding
such captured output is another story ....
Reply With Quote
  #6   (View Single Post)  
Old 20th January 2009
stukov's Avatar
stukov stukov is offline
Real Name: Jean-Michel Philippon-Nadeau
Package Pilot
 
Join Date: May 2008
Location: Sherbrooke, Qc, Canada
Posts: 167
Default

Thanks!

I've began playing with wlandebug and I see that my client connects and reconnects very often to the access point. Accordingly, I see the following in my router's logs:
Code:
Jan/20/2009 15:59:00 	Authenticating......	 	 	 00-1e-58-a3-08-91
Jan/20/2009 15:58:59 	Wireless PC connected	 	 	 00-1e-58-a3-08-91
Jan/20/2009 15:57:31 	Authentication Success	 	 	 00-1e-58-a3-08-91
Jan/20/2009 15:57:30 	Authenticating......	 	 	 00-1e-58-a3-08-91
Jan/20/2009 15:57:30 	Wireless PC connected	 	 	 00-1e-58-a3-08-91
Jan/20/2009 15:52:14 	Authentication Success	 	 	 00-1e-58-a3-08-91
Jan/20/2009 15:52:13 	Authenticating......	 	 	 00-1e-58-a3-08-91
Jan/20/2009 15:52:13 	Wireless PC connected	 	 	 00-1e-58-a3-08-91
Jan/20/2009 15:51:18 	Authenticating......	 	 	 00-1e-58-a3-08-91
Jan/20/2009 15:51:18 	Wireless PC connected	 	 	 00-1e-58-a3-08-91
My lack of knowledge on the Wireless topic makes me wonder, what could be the cause of these frequent reconnections?
__________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
Reply With Quote
  #7   (View Single Post)  
Old 21st January 2009
fbsduser fbsduser is offline
Shell Scout
 
Join Date: Aug 2008
Posts: 110
Default

It can be a bit of a blind guess. But if you can, try to connect from a wifi-enabled windoze box. This is because this constant reconections can be caused by special instructions embedded in some router's firmware that makes the router drop conections if it detects the computer uses any non-Windoze operating system.
Reply With Quote
  #8   (View Single Post)  
Old 21st January 2009
stukov's Avatar
stukov stukov is offline
Real Name: Jean-Michel Philippon-Nadeau
Package Pilot
 
Join Date: May 2008
Location: Sherbrooke, Qc, Canada
Posts: 167
Default

Quote:
Originally Posted by fbsduser View Post
It can be a bit of a blind guess. But if you can, try to connect from a wifi-enabled windoze box. This is because this constant reconections can be caused by special instructions embedded in some router's firmware that makes the router drop conections if it detects the computer uses any non-Windoze operating system.
Thanks for the reply. Connecting to the router works for Win XP, Win Vista and Mac OS X. If the Mac OS X works, why FreeBSD wouldn't?

I am going to test connecting without WPA, just to see if the problem could come from misconfigured encryption.
__________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
Reply With Quote
  #9   (View Single Post)  
Old 21st January 2009
fbsduser fbsduser is offline
Shell Scout
 
Join Date: Aug 2008
Posts: 110
Default

Quote:
Originally Posted by stukov View Post
Thanks for the reply. Connecting to the router works for Win XP, Win Vista and Mac OS X. If the Mac OS X works, why FreeBSD wouldn't?

I am going to test connecting without WPA, just to see if the problem could come from misconfigured encryption.
Well if it works from OSX you could try copying the relevant config files/folders from OSX to the BSD box. After all OSX is a BSD OS.
Reply With Quote
Old 25th January 2009
stukov's Avatar
stukov stukov is offline
Real Name: Jean-Michel Philippon-Nadeau
Package Pilot
 
Join Date: May 2008
Location: Sherbrooke, Qc, Canada
Posts: 167
Default

Quote:
Originally Posted by fbsduser View Post
Well if it works from OSX you could try copying the relevant config files/folders from OSX to the BSD box. After all OSX is a BSD OS.
They do not use the same driver. The network card of the Mac OS X laptop is em1 and my network card is ath0. I do not believe they interact the same way with the rest of the system.

Anyway, I've replaced WPA2 by WEP (security is not much a concern here) and I've fixed a big part of the problem. I can now download things at 600ko/s and I have a lot less packet loss. However, sometimes everything hangs. All I could find is the following kernel log, highlighted by periodic:
Code:
+ath0: device timeout
+ath0: device timeout
+ath0: device timeout
+ath0: link state changed to DOWN
+ath0: link state changed to UP
+ath0: link state changed to DOWN
+ath0: link state changed to UP
+ath0: link state changed to DOWN
+ath0: link state changed to UP
+ath0: link state changed to DOWN
+ath0: link state changed to UP
What could be the cause of this?


Thanks!
__________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
Reply With Quote
Old 25th January 2009
stukov's Avatar
stukov stukov is offline
Real Name: Jean-Michel Philippon-Nadeau
Package Pilot
 
Join Date: May 2008
Location: Sherbrooke, Qc, Canada
Posts: 167
Default

Forgot to mention I have configured WEP only via ifconfig, not via wpa_supplicant, simplifying the whole situation.
__________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
Reply With Quote
Old 25th January 2009
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

There is a feature called that turns off the radio.. wireless isn't my forte, but consider using -powersave.

Hope it helps..
Reply With Quote
Old 26th January 2009
stukov's Avatar
stukov stukov is offline
Real Name: Jean-Michel Philippon-Nadeau
Package Pilot
 
Join Date: May 2008
Location: Sherbrooke, Qc, Canada
Posts: 167
Default

Thanks for the reply BSDfan666 but disabling power saving on the interface made things go worse. I had to disable it in order to get networking working "correctly".

Is there a way to check signal strength in CLI?


Thanks!
__________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Server-Client c0mrade Programming 3 18th March 2009 05:22 PM
ipsec with client nat sicute OpenBSD General 0 30th October 2008 05:39 PM
IM Client schrodinger OpenBSD Packages and Ports 6 16th September 2008 02:09 PM
DDNS Client revzalot OpenBSD Installation and Upgrading 3 12th August 2008 02:21 AM
Client torrent ! gnowar OpenBSD General 10 3rd June 2008 10:50 AM


All times are GMT. The time now is 05:01 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick