Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Wireless connection is sporadically disconnected
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
samo
Guru
Guru


Joined: 13 Mar 2004
Posts: 489

PostPosted: Sat Jul 14, 2012 11:27 pm    Post subject: Wireless connection is sporadically disconnected Reply with quote

Hello,

my wireless connection is disconnected sporadically after some time.
Code:
2012/07/15 00:18:47 ::
2012/07/15 00:18:47 :: wicd initializing...
2012/07/15 00:18:47 :: ---------------------------
2012/07/15 00:18:47 :: wicd is version 1.7.2.1 755
2012/07/15 00:18:47 :: setting backend to external
2012/07/15 00:18:47 :: trying to load backend external
2012/07/15 00:18:47 :: successfully loaded backend external
2012/07/15 00:18:47 :: WARNING: No path found for dhcpcd
2012/07/15 00:18:47 :: WARNING: No path found for udhcpc
2012/07/15 00:18:47 :: WARNING: No path found for gksudo
2012/07/15 00:18:47 :: WARNING: No path found for resolvconf
2012/07/15 00:18:47 :: trying to load backend external
2012/07/15 00:18:47 :: successfully loaded backend external
2012/07/15 00:18:47 :: WARNING: No path found for dhcpcd
2012/07/15 00:18:47 :: WARNING: No path found for udhcpc
2012/07/15 00:18:47 :: WARNING: No path found for gksudo
2012/07/15 00:18:47 :: WARNING: No path found for resolvconf
2012/07/15 00:18:47 :: Couldn't detect a wireless interface.
2012/07/15 00:18:47 :: setting wireless interface wlan0
2012/07/15 00:18:47 :: automatically detected wired interface eth1
2012/07/15 00:18:47 :: setting wired interface eth0
2012/07/15 00:18:47 :: setting wpa driver wext
2012/07/15 00:18:47 :: setting use global dns to True
2012/07/15 00:18:47 :: setting global dns
2012/07/15 00:18:47 :: global dns servers are 208.67.222.222 None None
2012/07/15 00:18:47 :: domain is None
2012/07/15 00:18:47 :: search domain is None
2012/07/15 00:18:47 :: setting automatically reconnect when connection drops True
2012/07/15 00:18:47 :: found wired_connect_mode in configuration 1
2012/07/15 00:18:47 :: found should_verify_ap in configuration 1
2012/07/15 00:18:47 :: Setting dhcp client to 3
2012/07/15 00:18:47 :: found show_never_connect in configuration True
2012/07/15 00:18:47 :: Wireless configuration file found...
2012/07/15 00:18:47 :: Wired configuration file found...
2012/07/15 00:18:47 :: chmoding configuration files 0600...
2012/07/15 00:18:47 :: chowning configuration files root:root...
2012/07/15 00:18:47 :: Using wireless interface...wlan0
2012/07/15 00:18:47 :: Using wired interface...eth0
2012/07/15 00:18:47 :: scanning start
2012/07/15 00:18:47 :: scanning done
2012/07/15 00:18:47 :: found 0 networks:
2012/07/15 00:18:53 :: ifconfig eth0
2012/07/15 00:18:53 :: ifconfig wlan0
2012/07/15 00:18:53 :: iwconfig wlan0
2012/07/15 00:18:53 :: GetCurrentNetworkID: Returning -1, current network not found
2012/07/15 00:18:53 :: Autoconnecting...
2012/07/15 00:18:53 :: Starting wireless autoconnect...
2012/07/15 00:18:53 :: No wired connection present, attempting to autoconnect to wireless network
2012/07/15 00:18:53 :: scanning start
2012/07/15 00:18:53 :: ifconfig wlan0 up
2012/07/15 00:18:53 :: iwlist wlan0 scan
2012/07/15 00:18:56 :: scanning done
2012/07/15 00:18:56 :: found 9 networks:
2012/07/15 00:18:56 :: found afterscript in configuration None
2012/07/15 00:18:56 :: found ip in configuration 192.168.178.22
2012/07/15 00:18:56 :: found use_dhcphostname in configuration 0
2012/07/15 00:18:56 :: found gateway in configuration 192.168.178.1
2012/07/15 00:18:56 :: found use_global_dns in configuration True
2012/07/15 00:18:56 :: found postdisconnectscript in configuration None
2012/07/15 00:18:56 :: found beforescript in configuration None
2012/07/15 00:18:56 :: found psk in configuration 3256da0781fb12ce15f680a13cb9225744ae7618dd3b33d4ec4c1497cb8e9601
2012/07/15 00:18:56 :: found netmask in configuration 255.255.255.0
2012/07/15 00:18:56 :: found key in configuration *****
2012/07/15 00:18:56 :: found predisconnectscript in configuration None
2012/07/15 00:18:56 :: found enctype in configuration wpa
2012/07/15 00:18:56 :: found use_settings_globally in configuration False
2012/07/15 00:18:56 :: found use_static_dns in configuration True
2012/07/15 00:18:56 :: found automatic in configuration True
2012/07/15 00:18:56 :: Gentoo has profile
2012/07/15 00:18:56 :: trying to automatically connect to...Gentoo
2012/07/15 00:18:56 :: Connecting to wireless network Gentoo
2012/07/15 00:18:56 :: iwconfig wlan0
2012/07/15 00:18:56 :: Executing /etc/wicd/scripts/predisconnect/stop-init-services with params wireless Gentoo 00:1C:4A:4F:9E:F9
2012/07/15 00:18:56 :: /etc/wicd/scripts/predisconnect/stop-init-services returned 0
2012/07/15 00:18:56 :: /sbin/pump -r -i wlan0
Operation failed.
2012/07/15 00:18:56 :: ifconfig wlan0 0.0.0.0
2012/07/15 00:18:56 :: /sbin/ip route flush dev wlan0
2012/07/15 00:18:56 :: ifconfig wlan0 down
2012/07/15 00:18:56 :: ifconfig wlan0 up
2012/07/15 00:18:57 :: wpa_cli -i wlan0 terminate
2012/07/15 00:18:57 :: Executing /etc/wicd/scripts/predisconnect/stop-init-services with params wired wired wired
2012/07/15 00:18:57 :: /etc/wicd/scripts/predisconnect/stop-init-services returned 0
2012/07/15 00:18:57 :: /sbin/pump -r -i eth0
Operation failed.
2012/07/15 00:18:57 :: ifconfig eth0 0.0.0.0
2012/07/15 00:18:57 :: /sbin/ip route flush dev eth0
2012/07/15 00:18:57 :: ifconfig eth0 down
2012/07/15 00:18:57 :: ifconfig eth0 up
2012/07/15 00:18:57 :: wpa_cli -i eth0 terminate
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
2012/07/15 00:18:57 :: Putting interface down
2012/07/15 00:18:57 :: ifconfig wlan0 down
2012/07/15 00:18:57 :: Releasing DHCP leases...
2012/07/15 00:18:57 :: /sbin/pump -r -i wlan0
Operation failed.
2012/07/15 00:18:57 :: Setting false IP...
2012/07/15 00:18:57 :: ifconfig wlan0 0.0.0.0
2012/07/15 00:18:57 :: Stopping wpa_supplicant
2012/07/15 00:18:57 :: wpa_cli -i wlan0 terminate
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
2012/07/15 00:18:57 :: Flushing the routing table...
2012/07/15 00:18:57 :: /sbin/ip route flush dev wlan0
2012/07/15 00:18:57 :: iwconfig wlan0 mode managed
2012/07/15 00:18:57 :: Putting interface up...
2012/07/15 00:18:57 :: ifconfig wlan0 up
2012/07/15 00:18:59 :: enctype is wpa
2012/07/15 00:18:59 :: Generating psk...
2012/07/15 00:18:59 :: ['/usr/bin/wpa_passphrase', 'name', 'password']
2012/07/15 00:18:59 :: Attempting to authenticate...
2012/07/15 00:18:59 :: ['wpa_supplicant', '-B', '-i', 'wlan0', '-c', '/var/lib/wicd/configurations/001c4a4f9ef9', '-Dwext']
2012/07/15 00:18:59 :: ['iwconfig', 'wlan0', 'essid', '--', 'Gentoo']
2012/07/15 00:18:59 :: iwconfig wlan0 channel 1
2012/07/15 00:18:59 :: iwconfig wlan0 ap 00:1C:4A:4F:9E:F9
2012/07/15 00:18:59 :: WPA_CLI RESULT IS DISCONNECTED
2012/07/15 00:19:00 :: WPA_CLI RESULT IS COMPLETED
2012/07/15 00:19:00 :: Setting static IP : 192.168.178.22
2012/07/15 00:19:00 :: ifconfig wlan0 192.168.178.22 netmask 255.255.255.0
2012/07/15 00:19:00 :: Setting default gateway : 192.168.178.1
2012/07/15 00:19:00 :: route add default gw 192.168.178.1 dev wlan0
2012/07/15 00:19:00 :: Setting DNS : 208.67.222.222
2012/07/15 00:19:00 :: Verifying AP association...
2012/07/15 00:19:00 :: Attempt 1 of 10...
2012/07/15 00:19:00 :: ping -q -w 3 -c 1 192.168.178.1
2012/07/15 00:19:00 :: Successfully associated.
2012/07/15 00:19:00 :: Executing /etc/wicd/scripts/postconnect/start-init-services with params wireless Gentoo 00:1C:4A:4F:9E:F9
2012/07/15 00:19:09 :: /etc/wicd/scripts/postconnect/start-init-services returned 1
2012/07/15 00:19:09 :: Connecting thread exiting.
2012/07/15 00:19:09 :: ifconfig wlan0
2012/07/15 00:19:09 :: IP Address is: 192.168.178.22
2012/07/15 00:19:13 :: Sending connection attempt result success
2012/07/15 00:19:13 :: ifconfig eth0
2012/07/15 00:19:13 :: ifconfig wlan0
2012/07/15 00:19:13 :: iwconfig wlan0
2012/07/15 00:19:18 :: ifconfig eth0
2012/07/15 00:19:18 :: ifconfig wlan0
2012/07/15 00:19:18 :: iwconfig wlan0
2012/07/15 00:19:23 :: ifconfig eth0
2012/07/15 00:19:23 :: ifconfig wlan0
2012/07/15 00:19:23 :: iwconfig wlan0
2012/07/15 00:19:28 :: ifconfig eth0
2012/07/15 00:19:28 :: ifconfig wlan0
2012/07/15 00:19:28 :: iwconfig wlan0
2012/07/15 00:19:33 :: ifconfig eth0
2012/07/15 00:19:33 :: ifconfig wlan0
2012/07/15 00:19:33 :: iwconfig wlan0
2012/07/15 00:19:38 :: ifconfig eth0
2012/07/15 00:19:38 :: ifconfig wlan0
2012/07/15 00:19:38 :: iwconfig wlan0
2012/07/15 00:19:43 :: ifconfig eth0
2012/07/15 00:19:43 :: ifconfig wlan0
2012/07/15 00:19:43 :: iwconfig wlan0
2012/07/15 00:19:48 :: ifconfig eth0
2012/07/15 00:19:48 :: ifconfig wlan0
2012/07/15 00:19:48 :: iwconfig wlan0
2012/07/15 00:19:53 :: ifconfig eth0
2012/07/15 00:19:53 :: Forced disconnect on
2012/07/15 00:19:53 :: Executing /etc/wicd/scripts/predisconnect/stop-init-services with params wireless X X
2012/07/15 00:19:53 :: /etc/wicd/scripts/predisconnect/stop-init-services returned 0
2012/07/15 00:19:53 :: Executing /etc/wicd/scripts/predisconnect/stop-init-services with params wired wired wired
2012/07/15 00:19:53 :: /etc/wicd/scripts/predisconnect/stop-init-services returned 0
2012/07/15 00:19:53 :: /sbin/pump -r -i eth0
Operation failed.
2012/07/15 00:19:53 :: ifconfig eth0 0.0.0.0
2012/07/15 00:19:53 :: /sbin/ip route flush dev eth0
2012/07/15 00:19:53 :: ifconfig eth0 down
2012/07/15 00:19:53 :: ifconfig eth0 up
2012/07/15 00:19:53 :: wpa_cli -i eth0 terminate
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
2012/07/15 00:19:58 :: ifconfig eth0
2012/07/15 00:19:58 :: ifconfig wlan0
Code:
# emerge --info
Portage 2.1.10.65 (default/linux/x86/10.0/desktop/kde, gcc-4.5.3, glibc-2.14.1-r3, 3.2.12-gentoo i686)
=================================================================
System uname: Linux-3.2.12-gentoo-i686-AMD_Athlon-tm-_XP_3200+-with-gentoo-2.1
Timestamp of tree: Sat, 14 Jul 2012 10:00:01 +0000
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3-r2, 3.2.3
dev-util/cmake:           2.8.7-r5
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.6
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r3
Repositories: gentoo x-portage
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LC_ALL="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de th"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="32bit 3dnow 3dnowext X a52 aac acl acpi addressbook akonadi alsa amarok amazon apache2 audiofile avi berkdb branding bzip2 cairo caps cdda cdr cjk cli consolekit cracklib crypt css cups curl cxx dbus declarative digikam disk-partition dri dts dvb dvd dvdr dvdread embedded emboss encode exif extras fam fbcondecor ffmpeg firefox flac fortran gd gdbm gif gimp gimpprint gnome-keyring gnutls gpg gphoto2 gpm gstreamer gtk2 history hpcups iconv ipv6 java jpeg json kate kde kdeenablefinal kerberos kipi lan lcms ldap libnotify libv4l2 libwww mad mjpeg mmx mng modules mp3 mp4 mpeg mplayer msn mudflap mysql mythtv ncurses nls nptl nsplugin odbc ogg oggvorbis opengl openmp pam pango pcre pcsc-lite pdf phonon plasma png policykit posix ppds pppd python qt3support qt4 quicktime rdesktop readline reiserfs rtc rtsp samba scanner sdl semantic-desktop session sip slp smartcard snmp spell sql sse ssl startup-notification stream stun svg tcltk tcpd threads threadsafe tiff truetype udev udisks unicode upower usb userlocales v4l v4l2 vcd video vlc vorbis wav webkit wicd win32codecs winbind wxwidgets x264 x86 xcb xine xml xorg xscreensaver xulrunner xv xvid yahoo zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authz_host cgi dir env headers mime php rewrite" APACHE2_MPMS="worker" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de th" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="fbdev vga radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LANG, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

Could someone help?
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Sun Jul 15, 2012 1:25 am    Post subject: Reply with quote

Hello,
it would be easier to disable Wicd (and any wireless network gui) and configure /etc/wpa_supplicant/wpa_supplicant.conf manually. See the man page. Then start wpa_supplicant like
Code:
wpa_supplicant -B -c /etc/wpa_supplicant/wpa_supplicant.conf -D wext -dd -f /var/log/wpa.log -i wlan0 -t 2

and start a dhcp client on the interface like
Code:
dhclient -v wlan0

That would give you and other way to conncect. You could compare. To see Wicd dancing with a cord on the network do not inspirate me any stability. You can try NetworkManager as an other alternative.

It is possible that the wext driver use by wpa_supplicant is not the best for your card. It's just an idea because wext is generic and good for a lot of wireless cards. Is it the best? It depend on your card. See the wpa_supplicant man page.
_________________
Paul
Back to top
View user's profile Send private message
moult
Retired Dev
Retired Dev


Joined: 31 Mar 2008
Posts: 146
Location: Australia

PostPosted: Sun Jul 15, 2012 8:18 am    Post subject: Reply with quote

I've been experiencing the same as the OP using driver e1000e.

What weirds me out is that sometimes after the disconnect, it's fine and I just go and reconnect, but sometimes it won't reconnect, telling me either Authentication Failed or Bad Password, when the WPA key hasn't been changed at all.

Shutting down wicd and doing attempting to connect via wpa_supplicant.conf doesn't connect either, instead looping endlessly through associating with the network but never getting any IPs.

Will be watching this thread.
_________________
thinkMoult - I write articles online. You might like some of them.
Planet Larry - do you write a blog and use Gentoo? Get your blog added to the Planet Larry Gentoo user blog aggregator!
Back to top
View user's profile Send private message
samo
Guru
Guru


Joined: 13 Mar 2004
Posts: 489

PostPosted: Sun Jul 15, 2012 10:34 am    Post subject: Reply with quote

Thanks for the hints.

I try to disable wicd and configure wpa_supplicant manually using static IP addresses. Could the following configuration work?

/etc/wpa_supplicant/wpa_supplicant.conf:
Code:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
ap_scan=1
fast_reauth=1

network={
        ssid="name"
        scan_ssid=1
        proto=RSN
        key_mgmt=WPA-PSK
        pairwise=CCMP
        group=CCMP
        psk="password"
        priority=2
}

/etc/conf.d/net:
Code:
dns_domain_lo="domainname"

modules="ifconfig"
modules_wlan0="!iwconfig wpa_supplicant"

config_eth0="192.168.178.20 netmask 255.255.255.0 broadcast 192.168.178.255"
config_eth1="192.168.178.21 netmask 255.255.255.0 broadcast 192.168.178.255"
config_wlan0="192.168.178.22 netmask 255.255.255.0 broadcast 192.168.178.255"

wpa_supplicant_wlan0="-Dwext"
wpa_timeout_wlan0=60

routes_eth0="default via 192.168.178.1
        10.0.0.0/8 via 192.168.178.1"

fallback_route_eth0="default via 192.168.178.1"

dns_servers_eth0="208.67.222.222"

routes_eth1="default via 192.168.178.1
        10.0.0.0/8 via 192.168.178.1"

fallback_route_eth1="default via 192.168.178.1"

dns_servers_eth1="208.67.222.222"

routes_wlan0="default via 192.168.178.1
        10.0.0.0/8 via 192.168.178.1"

fallback_route_wlan0="default via 192.168.178.1"

dns_servers_wlan0="208.67.222.222"
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1480

PostPosted: Sun Jul 15, 2012 1:44 pm    Post subject: Reply with quote

I just made this example:
https://forums.gentoo.org/viewtopic-t-930174.html
Back to top
View user's profile Send private message
samo
Guru
Guru


Joined: 13 Mar 2004
Posts: 489

PostPosted: Sun Jul 15, 2012 2:23 pm    Post subject: Reply with quote

@ulenrich: Do I still need /etc/conf.d/net for wireless connection when I'm following your example?
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Sun Jul 15, 2012 3:16 pm    Post subject: Reply with quote

samo wrote:
[...] I try to disable wicd and configure wpa_supplicant manually using static IP addresses. Could the following configuration work?

samo ... mostly yes, but some things you should be aware of: CCMP (AES) is not supported by all AP's so "CCMP TKIP" may be required.

As per your example, an AP is called "name", we could configure it like so:
Code:
modules_wlan0="!plug wpa_supplicant"
wpa_supplicant_wlan0="-Dwext"
wpa_timeout_wlan0=60 # 60 seem high to me, unless your connection often fails then 15 would be a more reasonable value.

config_name="192.168.178.22/24"
dns_servers_name="208.67.222.222" # you might want to add a secondary nameserver here.
routes_name="default via 192.168.178.1
        10.0.0.0/8 via 192.168.178.1" # you have such a subnet, or are you just taking this verbatum from the example?


HTH & best ...

khay
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1480

PostPosted: Sun Jul 15, 2012 3:51 pm    Post subject: Reply with quote

samo wrote:
@ulenrich: Do I still need /etc/conf.d/net for wireless connection when I'm following your example?

no. Using dhcpcd seems to me the most simple ...
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Sun Jul 15, 2012 5:27 pm    Post subject: Reply with quote

ulenrich wrote:
Using dhcpcd seems to me the most simple ...

ulenrich ... it being simple, please can you explain how it works?

best ... khay
Back to top
View user's profile Send private message
samo
Guru
Guru


Joined: 13 Mar 2004
Posts: 489

PostPosted: Mon Jul 16, 2012 8:24 pm    Post subject: Reply with quote

Thanks for the help. My configuration looks like this now:

etc/wpa_supplicant/wpa_supplicant.conf (like before, my AP supports CCMP):
Code:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
ap_scan=1
fast_reauth=1

network={
        ssid="apname"
        scan_ssid=1
        proto=RSN
        key_mgmt=WPA-PSK
        pairwise=CCMP
        group=CCMP
        psk="password"
        priority=2
}

/etc/conf.d/net:
Code:
modules_wlan0="!plug wpa_supplicant"
wpa_supplicant_wlan0="-Dwext"
wpa_timeout_wlan0=15
config_apname="192.168.178.22/24"
dns_servers_apname="208.67.222.222"
routes_apname="default via 192.168.178.1"

I've removed wicd from boot level and added net.wlan0 instead of it.

It works and connection is established after startup. I will observe it for some days to see if it's still disconnected or stable.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Mon Jul 16, 2012 9:13 pm    Post subject: Reply with quote

samo wrote:
It works and connection is established after startup. I will observe it for some days to see if it's still disconnected or stable.

samo ... good, if you have further problems you can enable the 'debug' useflag for wpa_supplicant, re-emerge, and add '-f /var/log/wpa_supplicant.conf' and a debug level (-d or -dd) to wpa_supplicant_wlan0= which should provide some idea of why the DISASSOCIATE happens.

It also helps to know what else is using the airspace, and something like airodump (net-wireless/aircrack-ng) can help ITR (assuming you card can monitor) ... probably not needed, but ask if need be.

best ... khay
Back to top
View user's profile Send private message
samo
Guru
Guru


Joined: 13 Mar 2004
Posts: 489

PostPosted: Sun Aug 12, 2012 5:03 pm    Post subject: Reply with quote

Connection is still disconnected sporadically. I have compiled wpa_supplicant with debug option and got the following infos:
Code:
...
RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING           
RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING           
RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING           
RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING           
RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING           
RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING           
RTM_NEWLINK: operstate=1 ifi_flags=0x1002 ()
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
RTM_DELLINK, IFLA_IFNAME: Interface 'wlan0' removed
Configured interface was removed.
State: COMPLETED -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 1->0 (DORMANT)
netlink: Operstate: linkmode=-1, operstate=5
EAPOL: External notification - portEnabled=0
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
EAPOL: SUPP_BE entering state INITIALIZE
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portValid=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
RTM_NEWLINK: operstate=0 ifi_flags=0x1043 ([UP][RUNNING])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Configured interface was added.
Failed to initialize the driver after interface was added.
Wireless event: cmd=0x8b15 len=20
Wireless event: new AP: 00:00:00:00:00:00
Disassociation notification
Added BSSID 00:00:00:00:00:00 into blacklist
CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0
CTRL_IFACE monitor send - hexdump(len=21): 2f 74 6d 70 2f 77 70 61 5f 63 74 72 6c 5f 32 36 34 37 2d 31 00
Disconnect event - remove keys
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
Driver did not support SIOCSIWENCODEEXT, trying SIOCSIWENCODE
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
Driver did not support SIOCSIWENCODEEXT, trying SIOCSIWENCODE
wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
Driver did not support SIOCSIWENCODEEXT, trying SIOCSIWENCODE
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
Driver did not support SIOCSIWENCODEEXT, trying SIOCSIWENCODE
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
Driver did not support SIOCSIWENCODEEXT, trying SIOCSIWENCODE
State: DISCONNECTED -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
netlink: Operstate: linkmode=-1, operstate=5
EAPOL: External notification - portEnabled=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portValid=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
Ignore event for foreign ifindex 5
RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING           
BSS: Expire BSS 1 due to age
BSS: Remove id 1 BSSID 00:1c:4a:4f:9e:f9 SSID 'gentoo'
CTRL_IFACE monitor send - hexdump(len=21): 2f 74 6d 70 2f 77 70 61 5f 63 74 72 6c 5f 32 36 34 37 2d 31 00
RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING           
RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING           
...
Could someone give me a good tip?
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Sun Aug 12, 2012 5:46 pm    Post subject: Reply with quote

samo ...

can you tell us what wireless card, driver, firmware (if any), also provide the output of 'iwconfig wlan0' and awk '/(80211|WEXT)/' /usr/src/linux/.config

best ... khay
Back to top
View user's profile Send private message
samo
Guru
Guru


Joined: 13 Mar 2004
Posts: 489

PostPosted: Sun Aug 12, 2012 7:15 pm    Post subject: Reply with quote

I'm using an AVM Fritz!WLAN N USB stick.
Code:
Bus 001 Device 006: ID 057c:8401 AVM GmbH AVM Fritz!WLAN N [Atheros AR9001U]

Code:
# iwconfig wlan0
wlan0     IEEE 802.11abgn  ESSID:"gentoo" 
          Mode:Managed  Frequency:2.412 GHz  Access Point: 00:1C:4A:4F:9E:F9   
          Bit Rate=117 Mb/s   Tx-Power=0 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=56/70  Signal level=-54 dBm 
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:51   Missed beacon:0

I'm using linux-3.2.21-gentoo with following options:
Code:
# awk '/(80211|WEXT)/' /usr/src/linux/.config
CONFIG_WEXT_CORE=y
CONFIG_WEXT_PROC=y
CONFIG_CFG80211=m
# CONFIG_NL80211_TESTMODE is not set
# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
# CONFIG_CFG80211_REG_DEBUG is not set
CONFIG_CFG80211_DEFAULT_PS=y
# CONFIG_CFG80211_INTERNAL_REGDB is not set
CONFIG_CFG80211_WEXT=y
# CONFIG_LIB80211 is not set
CONFIG_MAC80211=m
CONFIG_MAC80211_HAS_RC=y
CONFIG_MAC80211_RC_MINSTREL=y
CONFIG_MAC80211_RC_MINSTREL_HT=y
CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
CONFIG_MAC80211_RC_DEFAULT="minstrel_ht"
# CONFIG_MAC80211_MESH is not set
CONFIG_MAC80211_LEDS=y
# CONFIG_MAC80211_DEBUG_MENU is not set
# CONFIG_MAC80211_HWSIM is not set

And I'm having following files in my firmware folder, but not sure which one is used:
Code:
# ls -l /lib/firmware
insgesamt 120
-rw-r--r-- 1 root root 83968  8. Aug 2009  ar9170-1.fw
-rw-r--r-- 1 root root  3508  8. Aug 2009  ar9170-2.fw
-rw-r--r-- 1 root root 15960  9. Aug 2009  ar9170.fw
-rw-r--r-- 1 root root 13424 14. Jan 2012  carl9170-1.fw

dmesg looks a little bit strange for usb 1-5:
Code:
# dmesg | grep 'usb 1-5'
usb 1-5: firmware API: 1.9.4 2011-06-30
usb 1-5: Unprotected firmware image.
usb 1-5: Atheros AR9170 is registered as 'phy0'
usb 1-5: restart device (8)
usb 1-5: firmware upload failed (-110).
usb 1-5: Failed to restart device  (-110).
usb 1-5: reset high-speed USB device number 6 using ehci_hcd
usb 1-5: reset high-speed USB device number 6 using ehci_hcd
usb 1-5: driver   API: 1.9.4 2011-08-15 [1-1]
usb 1-5: firmware API: 1.9.4 2011-06-30
usb 1-5: Unprotected firmware image.
usb 1-5: Atheros AR9170 is registered as 'phy1'
usb 1-5: restart device (8)
usb 1-5: firmware upload failed (-110).
usb 1-5: reset high-speed USB device number 6 using ehci_hcd
usb 1-5: reset high-speed USB device number 6 using ehci_hcd
usb 1-5: driver   API: 1.9.4 2011-08-15 [1-1]
usb 1-5: firmware API: 1.9.4 2011-06-30
usb 1-5: Unprotected firmware image.
usb 1-5: Atheros AR9170 is registered as 'phy2'
usb 1-5: restart device (8)
usb 1-5: firmware upload failed (-110).
usb 1-5: Failed to restart device  (-110).
usb 1-5: reset high-speed USB device number 6 using ehci_hcd
usb 1-5: reset high-speed USB device number 6 using ehci_hcd
usb 1-5: driver   API: 1.9.4 2011-08-15 [1-1]
usb 1-5: firmware API: 1.9.4 2011-06-30
usb 1-5: Unprotected firmware image.
usb 1-5: Atheros AR9170 is registered as 'phy3'
usb 1-5: restart device (8)
usb 1-5: firmware upload failed (-110).
usb 1-5: Failed to restart device  (-110).
usb 1-5: reset high-speed USB device number 6 using ehci_hcd
usb 1-5: reset high-speed USB device number 6 using ehci_hcd
usb 1-5: driver   API: 1.9.4 2011-08-15 [1-1]
usb 1-5: firmware API: 1.9.4 2011-06-30
usb 1-5: Unprotected firmware image.
usb 1-5: Atheros AR9170 is registered as 'phy4'
Back to top
View user's profile Send private message
samo
Guru
Guru


Joined: 13 Mar 2004
Posts: 489

PostPosted: Sun Aug 12, 2012 7:42 pm    Post subject: Reply with quote

I've updated the firmware:
Code:
# ls -l /lib/firmware
insgesamt 16
-rw-r--r-- 1 root root 13388 12. Aug 21:34 carl9170-1.fw

dmesg looks better now:
Code:
# dmesg | grep 'usb 1-5'
usb 1-5: new high-speed USB device number 5 using ehci_hcd
usb 1-5: reset high-speed USB device number 5 using ehci_hcd
usb 1-5: driver   API: 1.9.4 2011-08-15 [1-1]
usb 1-5: firmware API: 1.9.6 2012-07-07
usb 1-5: driver does not support all firmware features.
usb 1-5: Atheros AR9170 is registered as 'phy0'

Maybe the connection is more stable now.
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Sun Aug 12, 2012 8:18 pm    Post subject: Reply with quote

Can your problem come from the Gentoo Access Point: 00:1C:4A:4F:9E:F9 instead of from your Gentoo client ? Did you compare the stability of the link with others clients from others operating systems?

Some modules options can help to stabilise the link. I use these options for the mac80211 module in /etc/modprobe.d/modprobe.conf
Code:

options mac80211 max_nullfunc_tries=60 max_probe_tries=60 probe_wait_ms=3600000

I never had problem with it, but I am not sure it really help.

You can change the default control algorythm of the mac80211 stack with the option ieee80211_default_rc_algo of the mac80211 module.
Code:
cat /sys/module/mac80211/parameters/ieee80211_default_rc_algo

will tell you the choices you have. Me I have pid and minstrel.

Some options of the module who drive your card can help too. For example the Wifi and bluetooth coexistence. Can some devices create interferences where you live?
_________________
Paul
Back to top
View user's profile Send private message
samo
Guru
Guru


Joined: 13 Mar 2004
Posts: 489

PostPosted: Sun Aug 12, 2012 10:30 pm    Post subject: Reply with quote

The new firmware doesn't solve the problem. Connection is still disconnected. The debug output looks similar:
Code:
...
RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING           
RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING           
RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING           
RTM_NEWLINK: operstate=1 ifi_flags=0x1002 ()
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
RTM_DELLINK, IFLA_IFNAME: Interface 'wlan0' removed
Configured interface was removed.
State: COMPLETED -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 1->0 (DORMANT)
netlink: Operstate: linkmode=-1, operstate=5
EAPOL: External notification - portEnabled=0
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
EAPOL: SUPP_BE entering state INITIALIZE
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portValid=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
RTM_NEWLINK: operstate=0 ifi_flags=0x1043 ([UP][RUNNING])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Configured interface was added.
Failed to initialize the driver after interface was added.
Wireless event: cmd=0x8b15 len=20
Wireless event: new AP: 00:00:00:00:00:00
Disassociation notification
Added BSSID 00:00:00:00:00:00 into blacklist
CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0
CTRL_IFACE monitor send - hexdump(len=21): 2f 74 6d 70 2f 77 70 61 5f 63 74 72 6c 5f 32 35 39 35 2d 31 00
Disconnect event - remove keys
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
Driver did not support SIOCSIWENCODEEXT, trying SIOCSIWENCODE
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
Driver did not support SIOCSIWENCODEEXT, trying SIOCSIWENCODE
wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
Driver did not support SIOCSIWENCODEEXT, trying SIOCSIWENCODE
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
Driver did not support SIOCSIWENCODEEXT, trying SIOCSIWENCODE
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
Driver did not support SIOCSIWENCODEEXT, trying SIOCSIWENCODE
State: DISCONNECTED -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
netlink: Operstate: linkmode=-1, operstate=5
EAPOL: External notification - portEnabled=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portValid=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
Ignore event for foreign ifindex 5
BSS: Expire BSS 1 due to age
BSS: Remove id 1 BSSID 00:1c:4a:4f:9e:f9 SSID 'gentoo'
CTRL_IFACE monitor send - hexdump(len=21): 2f 74 6d 70 2f 77 70 61 5f 63 74 72 6c 5f 32 35 39 35 2d 31 00
RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING           
RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING           
...

Next I try to play with the module options as suggested.
But seems like I can't change the control algorithm of the stack because only one is supported
Code:
# cat /sys/module/mac80211/parameters/ieee80211_default_rc_algo
minstrel_ht

The AP is an Fritz!Box 7270 which comes from the same manufacturer as the wlan USB stick. I don't have any problems when connecting with other clients.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Mon Aug 13, 2012 1:01 am    Post subject: Reply with quote

samo wrote:
Code:
Bit Rate=117 Mb/s   Tx-Power=0 dBm

samo ... a bitrate of 117 Mb/s may be the cause of the DISASSOC ... higher bit rate means that data is packed more closely together, and can therefore be more prone to signal corruption. Also, a Tx-Power of zero means either that transmit-power information is unavailable or there is none, and while the former is more probable I'm not sure how 802.11 will behave under such circumstances.

'iw phy0 info' (assuming phy0 is the physical address of the card) will provide some idea of supported bit rates, etc, and so you might try testing will a lower bit rate

Code:
# iwconfig wlan0 rate 24M

best ... khay
Back to top
View user's profile Send private message
samo
Guru
Guru


Joined: 13 Mar 2004
Posts: 489

PostPosted: Mon Aug 13, 2012 4:58 am    Post subject: Reply with quote

Maybe a good hint. I'm using the 2,4 GHz band and therefore the maximum bitrate should only 54Mhz. Right?
Code:
# iw phy0 info
Wiphy phy0
        Band 1:
                Capabilities: 0x184e
                        HT20/HT40
                        SM Power Save disabled
                        RX HT40 SGI
                        No RX STBC
                        Max AMSDU length: 7935 bytes
                        DSSS/CCK HT40
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
                Minimum RX AMPDU time spacing: 8 usec (0x06)
                HT TX/RX MCS rate indexes supported: 0-15, 32
                Frequencies:
                        * 2412 MHz [1] (20.0 dBm)
                        * 2417 MHz [2] (20.0 dBm)
                        * 2422 MHz [3] (20.0 dBm)
                        * 2427 MHz [4] (20.0 dBm)
                        * 2432 MHz [5] (20.0 dBm)
                        * 2437 MHz [6] (20.0 dBm)
                        * 2442 MHz [7] (20.0 dBm)
                        * 2447 MHz [8] (20.0 dBm)
                        * 2452 MHz [9] (20.0 dBm)
                        * 2457 MHz [10] (20.0 dBm)
                        * 2462 MHz [11] (20.0 dBm)
                        * 2467 MHz [12] (20.0 dBm)
                        * 2472 MHz [13] (20.0 dBm)
                        * 2484 MHz [14] (disabled)
                Bitrates (non-HT):
                        * 1.0 Mbps
                        * 2.0 Mbps (short preamble supported)
                        * 5.5 Mbps (short preamble supported)
                        * 11.0 Mbps (short preamble supported)
                        * 6.0 Mbps
                        * 9.0 Mbps
                        * 12.0 Mbps
                        * 18.0 Mbps
                        * 24.0 Mbps
                        * 36.0 Mbps
                        * 48.0 Mbps
                        * 54.0 Mbps
        Band 2:
                Capabilities: 0x184e
                        HT20/HT40
                        SM Power Save disabled
                        RX HT40 SGI
                        No RX STBC
                        Max AMSDU length: 7935 bytes
                        DSSS/CCK HT40
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
                Minimum RX AMPDU time spacing: 8 usec (0x06)
                HT TX/RX MCS rate indexes supported: 0-15, 32
                Frequencies:
                        * 4920 MHz [-16] (disabled)
                        * 4940 MHz [-12] (disabled)
                        * 4960 MHz [-8] (disabled)
                        * 4980 MHz [-4] (disabled)
                        * 5040 MHz [8] (disabled)
                        * 5060 MHz [12] (disabled)
                        * 5080 MHz [16] (disabled)
                        * 5180 MHz [36] (20.0 dBm)
                        * 5200 MHz [40] (20.0 dBm)
                        * 5220 MHz [44] (20.0 dBm)
                        * 5240 MHz [48] (20.0 dBm)
                        * 5260 MHz [52] (20.0 dBm) (passive scanning, no IBSS, radar detection)
                        * 5280 MHz [56] (20.0 dBm) (passive scanning, no IBSS, radar detection)
                        * 5300 MHz [60] (20.0 dBm) (passive scanning, no IBSS, radar detection)
                        * 5320 MHz [64] (20.0 dBm) (passive scanning, no IBSS, radar detection)
                        * 5500 MHz [100] (26.0 dBm) (passive scanning, no IBSS, radar detection)
                        * 5520 MHz [104] (26.0 dBm) (passive scanning, no IBSS, radar detection)
                        * 5540 MHz [108] (26.0 dBm) (passive scanning, no IBSS, radar detection)
                        * 5560 MHz [112] (26.0 dBm) (passive scanning, no IBSS, radar detection)
                        * 5580 MHz [116] (26.0 dBm) (passive scanning, no IBSS, radar detection)
                        * 5600 MHz [120] (26.0 dBm) (passive scanning, no IBSS, radar detection)
                        * 5620 MHz [124] (26.0 dBm) (passive scanning, no IBSS, radar detection)
                        * 5640 MHz [128] (26.0 dBm) (passive scanning, no IBSS, radar detection)
                        * 5660 MHz [132] (26.0 dBm) (passive scanning, no IBSS, radar detection)
                        * 5680 MHz [136] (26.0 dBm) (passive scanning, no IBSS, radar detection)
                        * 5700 MHz [140] (26.0 dBm) (passive scanning, no IBSS, radar detection)
                        * 5745 MHz [149] (disabled)
                        * 5765 MHz [153] (disabled)
                        * 5785 MHz [157] (disabled)
                        * 5805 MHz [161] (disabled)
                        * 5825 MHz [165] (disabled)
                        * 5170 MHz [34] (20.0 dBm)
                        * 5190 MHz [38] (20.0 dBm)
                        * 5210 MHz [42] (20.0 dBm)
                        * 5230 MHz [46] (20.0 dBm)
                Bitrates (non-HT):
                        * 6.0 Mbps
                        * 9.0 Mbps
                        * 12.0 Mbps
                        * 18.0 Mbps
                        * 24.0 Mbps
                        * 36.0 Mbps
                        * 48.0 Mbps
                        * 54.0 Mbps
        max # scan SSIDs: 4
        max scan IEs length: 2257 bytes
        Coverage class: 0 (up to 0m)
        Supported Ciphers:
                * WEP40 (00-0f-ac:1)
                * WEP104 (00-0f-ac:5)
                * TKIP (00-0f-ac:2)
                * CCMP (00-0f-ac:4)
        Available Antennas: TX 0 RX 0
        Supported interface modes:
                 * IBSS
                 * managed
                 * AP
                 * AP/VLAN
                 * monitor
                 * P2P-client
                 * P2P-GO
        software interface modes (can always be added):
                 * AP/VLAN
                 * monitor
        valid interface combinations:
                 * #{ managed, AP, P2P-client, P2P-GO } <= 2,
                   total <= 2, #channels <= 1
        Supported commands:
                 * new_interface
                 * set_interface
                 * new_key
                 * new_beacon
                 * new_station
                 * set_bss
                 * authenticate
                 * associate
                 * deauthenticate
                 * disassociate
                 * join_ibss
                 * remain_on_channel
                 * set_tx_bitrate_mask
                 * action
                 * frame_wait_cancel
                 * set_wiphy_netns
                 * set_channel
                 * set_wds_peer
                 * connect
                 * disconnect
        Supported TX frame types:
                 * IBSS: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
                 * managed: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
                 * AP: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
                 * AP/VLAN: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
                 * mesh point: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
                 * P2P-client: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
                 * P2P-GO: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
        Supported RX frame types:
                 * IBSS: 0x00d0
                 * managed: 0x0040 0x00d0
                 * AP: 0x0000 0x0020 0x0040 0x00a0 0x00b0 0x00c0 0x00d0
                 * AP/VLAN: 0x0000 0x0020 0x0040 0x00a0 0x00b0 0x00c0 0x00d0
                 * mesh point: 0x00b0 0x00c0 0x00d0
                 * P2P-client: 0x0040 0x00d0
                 * P2P-GO: 0x0000 0x0020 0x0040 0x00a0 0x00b0 0x00c0 0x00d0

I've switched the AP to 802.11b+g standard only to reduce the bitrate:
Code:
# iwconfig wlan0
wlan0     IEEE 802.11abgn  ESSID:"gentoo" 
          Mode:Managed  Frequency:2.457 GHz  Access Point: 00:1C:4A:4F:9E:F9   
          Bit Rate=48 Mb/s   Tx-Power=20 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=57/70  Signal level=-53 dBm 
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:10   Missed beacon:0
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Mon Aug 13, 2012 11:51 am    Post subject: Reply with quote

samo wrote:
Maybe a good hint. I'm using the 2,4 GHz band and therefore the maximum bitrate should only 54Mhz. Right?

samo ... Mhz? I think you mean mbp/s, anyhow, yes, but so does 802.11a (5 GHz), these are 'maximum throughput' values, with a "g" card on a "g" network you can expect an average of 22mbp/s. With the advent of 802.11b a card should drop down to 5mbp/s, or 1mbp/s, at low signal strength, however, I've noticed (mainly with 802.11n) that higher values are often seen, which (again, higher bitrates translating to data being packaed together more closely) will be more prone to signal loss.

If your AP supports 'g only' and you have no a,b clients then I'd suggest you set it to that as there are all kinds of issues associated with b/g networks. Note that b and g are prone to interference (from microwave ovens, and other devices) not to mention other wireless networks that may be in your airspace. If you have other networks opperating in your airspace that have booster antenna then this can also cause issues (particularly if your on the same, or adjacent, channels), but your card supports monitor mode so you can scan for such things (using airodump-ng from net-wireless/aircrack-ng) and select a different channel if need be.

HTH & best ... khay
Back to top
View user's profile Send private message
samo
Guru
Guru


Joined: 13 Mar 2004
Posts: 489

PostPosted: Tue Aug 14, 2012 9:33 pm    Post subject: Reply with quote

Also with reduced bitrate according 802.1b+g I'm disconnected sporadically.
Code:
...
RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING           
RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING           
RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING           
RTM_NEWLINK: operstate=1 ifi_flags=0x1002 ()
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
RTM_DELLINK, IFLA_IFNAME: Interface 'wlan0' removed
Configured interface was removed.
State: COMPLETED -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 1->0 (DORMANT)
netlink: Operstate: linkmode=-1, operstate=5
EAPOL: External notification - portEnabled=0
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
EAPOL: SUPP_BE entering state INITIALIZE
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portValid=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
RTM_NEWLINK: operstate=0 ifi_flags=0x1043 ([UP][RUNNING])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Configured interface was added.
Failed to initialize the driver after interface was added.
Wireless event: cmd=0x8b15 len=20
Wireless event: new AP: 00:00:00:00:00:00
Disassociation notification
Added BSSID 00:00:00:00:00:00 into blacklist
CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0
CTRL_IFACE monitor send - hexdump(len=21): 2f 74 6d 70 2f 77 70 61 5f 63 74 72 6c 5f 32 36 31 39 2d 31 00
Disconnect event - remove keys
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
Driver did not support SIOCSIWENCODEEXT, trying SIOCSIWENCODE
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
Driver did not support SIOCSIWENCODEEXT, trying SIOCSIWENCODE
wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
Driver did not support SIOCSIWENCODEEXT, trying SIOCSIWENCODE
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
Driver did not support SIOCSIWENCODEEXT, trying SIOCSIWENCODE
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
Driver did not support SIOCSIWENCODEEXT, trying SIOCSIWENCODE
State: DISCONNECTED -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
netlink: Operstate: linkmode=-1, operstate=5
EAPOL: External notification - portEnabled=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portValid=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
Ignore event for foreign ifindex 5
BSS: Expire BSS 0 due to age
BSS: Remove id 0 BSSID 00:1c:4a:4f:9e:f9 SSID 'gentoo'
CTRL_IFACE monitor send - hexdump(len=21): 2f 74 6d 70 2f 77 70 61 5f 63 74 72 6c 5f 32 36 31 39 2d 31 00
RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING           
RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING           
RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING           
...
Next I need to try the above mentioned options:
Code:
options mac80211 max_nullfunc_tries=60 max_probe_tries=60 probe_wait_ms=3600000
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Wed Aug 15, 2012 4:03 am    Post subject: Reply with quote

samo wrote:
Driver did not support SIOCSIWENCODEEXT, trying SIOCSIWENCODE
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0

samo ... this looks to me as though the driver has issues with wireless extensions (WEXT) ... now, according the linux wireless AR9170 page AR9170 is depreciated (from 3.x) in favour of carl9170 and as the firmware loading states "driver does not support all firmware features" you might want to check you have the correct driver enabled, and as this driver is probably under developement a 3.4 kernel may be advisable.

best ... khay
Back to top
View user's profile Send private message
samo
Guru
Guru


Joined: 13 Mar 2004
Posts: 489

PostPosted: Wed Aug 15, 2012 4:43 am    Post subject: Reply with quote

I'm using carl9170
Code:
# lsmod | grep 9170
carl9170               57789  0
mac80211              139506  1 carl9170
ath                    10327  1 carl9170
cfg80211              118152  3 carl9170,mac80211,ath

I'm using linux-3.2.21-gentoo kernel but linux-3.3.8-gentoo is already available. I will give it a try next.
Back to top
View user's profile Send private message
samo
Guru
Guru


Joined: 13 Mar 2004
Posts: 489

PostPosted: Sat Aug 18, 2012 10:13 am    Post subject: Reply with quote

I've switch to linux-3.3.8-gentoo and added the mentioned options
Code:
# cat /etc/modprobe.d/modprobe.conf
options mac80211 max_nullfunc_tries=60 max_probe_tries=60 probe_wait_ms=3600000

My connection is still disconnected sporadically.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Sat Aug 18, 2012 3:32 pm    Post subject: Reply with quote

samo ...

Does the log still show 'Driver did not support SIOCSIWENCODEEXT'? Have you tried using '-Dnl80211' in stead of '-Dwext'?

Also, the suggestion I made above for adjusting the rate limit, I discovered that infact this can be set via the following:

/etc/conf.d/net
Code:
rate_wlan0="5.5M auto"

This is proabably not the core issue, but I thought it worth mentioning.

best ... khay
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum