# how to debug WEP connection?

## Gentree

Hi,

I have got some way to establishing a link to a wireless router (Orage livebox) but don't know how to move forward.

I have followed the handbook and installed a patched wpa_supplicant that works with ralink rt73

http://mjh.name/Ralink_rt73_wpa_supplicant_rt2x00_wpa2

```

Feb 24 08:52:08 linbox usb 3-4: Product: 802.11 bg WLAN

Feb 24 08:52:08 linbox usb 3-4: Manufacturer: Ralink

Feb 24 08:52:08 linbox usb 3-4: uevent

Feb 24 08:52:08 linbox usb 3-4: usb_probe_device

Feb 24 08:52:08 linbox usb 3-4: configuration #1 chosen from 1 choice

Feb 24 08:52:08 linbox usb 3-4: adding 3-4:1.0 (config #1, interface 0)

Feb 24 08:52:08 linbox usb 3-4:1.0: uevent

Feb 24 08:52:08 linbox drivers/usb/core/inode.c: creating file '004'

Feb 24 08:52:08 linbox rt73: init

Feb 24 08:52:08 linbox rt73 3-4:1.0: usb_probe_interface

Feb 24 08:52:08 linbox rt73 3-4:1.0: usb_probe_interface - got id

Feb 24 08:52:08 linbox rt73: idVendor = 0x7d1, idProduct = 0x3c03 

Feb 24 08:52:09 linbox rt73: using permanent MAC addr

Feb 24 08:52:09 linbox rt73: Active MAC addr: 00:1e:59.....

Feb 24 08:52:09 linbox rt73: Local MAC = 00:1e:59.....

Feb 24 08:52:09 linbox usbcore: registered new interface driver rt73

Feb 24 08:52:24 linbox rt73: driver version - 1.0.3.6 CVS

Feb 24 08:52:24 linbox rt73: using net dev supplied MAC addr

Feb 24 08:52:24 linbox rt73: Active MAC addr: 00:1e:59.....

Feb 24 08:52:24 linbox rt73: Local MAC = 00:1e:59.....
```

```

bash-3.2#lsmod|grep 73

rt73                  221056  1 

firmware_class         10176  2 rt73,prism54

bash-3.2#
```

```
bash-3.2#wpa_supplicant -D ralink -i wlan0 -c /etc/wpa_supplicant/wpa_supplican$

ioctl[SIOCGIWAP]: Transport endpoint is not connected

ioctl[SIOCGIWAP]: Transport endpoint is not connected

ioctl[SIOCGIWAP]: Transport endpoint is not connected

ioctl[SIOCGIWAP]: Transport endpoint is not connected

#poss result of wireless-tools config in /etc/conf.d/net

#no, genuine result after clean boot with no wireless-tools config

bash-3.2#wpa_cli -iwlan0 list_networks

network id / ssid / bssid / flags

0               any

1       Livebox-8471    any

2       Livebox-8471    any

```

If I am reading this correctly my ralink USB wifi is finding the router, it just does not identify correctly.

I adapted the following from the handbook.

```

# Shared WEP key connection (no WPA, no IEEE 802.1X) using Shared Key

# IEEE 802.11 authentication

network={

  ssid="static-wep-test2"

  key_mgmt=NONE

  wep_key0=9A..26characterHex Key

#  wep_key1=0102030405

#  wep_key2="1234567890123"

  wep_tx_keyidx=0

  priority=5

  auth_alg=SHARED

}

```

The handbook does not explain what the meaning of ssid is. Is this a temporary name I give to my usb node or should this be the AP's name livebox-xxxx ?

The livebox is set up with default configuration , WEP , with the name I see and a "key" which is probably the pass-phrase and NOT the key:

http://www.orangeproblems.co.uk/phpBB2/viewtopic.php?t=3440

The handbook seems to imagine all this will go flawlessly and does not seem to give any help in sorting out the inevitable hickcoughs.

Can someone point me in the right direction. I'm sure this is not far from a working connection.

TIA, Gentree.   :Cool: 

----------

## smerf

ssid is the name of your network (as configured on router)

----------

## Gentree

Thanks,

what do you mean "the name of your network"? Domain name ?

In fact 

thanks.

----------

## smerf

I mean this: http://en.wikipedia.org/wiki/Service_set_identifier  :Wink: 

(BTW: do you really use 2yrs old kernel as you say in signature?)

----------

## Gentree

Thanks , that link explains it all beautifully.  ssid , ESSID all becomes clear. Once I have understood all this I'll open a bug to suggest improvements to handbook. It seems to assume you know what all this means already, hardly the point of a howto.

Yes I'm still running 2.6.20. At one time I was madly updating my kernel with every release. I grew out of it once the novelty wore off. Now I wait until there's a need. Neddy Sygoon has pointed out that there was pretty bad security whole in many kernels from 2.6.17 - 2.6.24 so I'm in the process of finding a newer release.

The ralink rt73 driver only handles WEP , so I'm working on using that now.  The device loads the driver and firmware OK on plugin and the ACT light starts flashing so it's searching for a connection. However dhcpcd is failing to communicate with the router. (wpa_cli that I was running before established that the network was available and provided confirmation of what I now know to be the ssid).

The problem is probably indicated by errors that I get during boot when the static network gets activated. The lines defining the WEP key produces an error.

```
key_Livebox-8491="[1] 26-char-hex-key-22 key [1] enc restricted"

```

This gets echoed in the boot log as 

```
key_Livebox-8491=[1] 26-char-hex-key-22 key [1] enc restricted command not found
```

Note the quotes are gone. Am I misinterpreting the handbook again or is the information given out if date now?

Thanks again for you help.

 :Cool: 

----------

## smerf

Newer kernels contain sometimest substantial improvements of drivers,

some things that were broken suddenly work or gain new features.

Ralink chipset drivers are now inside kernel and work beautifully with WPA2

I'm using this right now with TL-WN321G, so I know what I'm talking about  :Wink: 

Drivers form Ralink website are now obsolete, better use those from rt2x00:

Dev.drivers->Net.dev.supp.->Wireless LAN->Ralink driver support

(rt24xx and rt25xx PCI/PCMCIA/USB chips at least)

Of course I mean "reasonably new kernel", after 24 Jan 2008 (>=2.6.24) which

is still 1y old! That's why I asked about this (howto you used is from 2007!)

The World Keeps Changing  :Very Happy: 

My wpa_supplicant.conf:

```
network={

        ssid="my_ssid"

        scan_ssid=0

        proto=WPA2

        key_mgmt=WPA-PSK

        pairwise=CCMP

        group=CCMP

        psk="my_initial_psk"

        priority=9999

}
```

----------

## Gentree

hi,

I just installed a 2.6.28 kernel and then remembered why I had not updated before. Nvidia-drivers that I need for my Geforce2 card dont compile to recent kernels.   :Mad: 

<rant>

The lack of backward compatability in Linux is becoming a major headache.  I object to having to update my hardware in order to update my kernel. It should be the other way around!

 This sort of thing just makes maintaining software more of a job than writing it in the first place.

How many good project have gone to the wall because the developers can't devote their lives to constantly modifying their code to catch up with other's laziness.   :Rolling Eyes: 

</rant>

So I'm stuck with wireless for the moment and I need to find out why the handbook example code does not work   :Confused: 

Thanks.

----------

## smerf

IMO Linux is perfectly backward compatible. At least much better than any other system.

I'm running small home server on hardware manufactured befofe 2000 and the newest

kernel works perfectly. On desktop I have GeForce4 MX 440 AGP 8x which also requires

older nvidia drivers and I managed to compile nvidia module, which also runs just fine

(I remember, that it required some not very obvious steps, but finally it worked)

 *Gentree wrote:*   

> I just installed a 2.6.28 kernel and then remembered why I had not updated before. Nvidia-drivers that I need for my Geforce2 card dont compile to recent kernels.  

 

On my desktop I need kernels with badram patch and some not-so-typical hardware. Together with

backward-incompatible drivers like those from nvidia it makes kernel upgrade complicated, but possible  :Wink: 

As soon as I find some time (maybe tomorrow) I'll post instructions how I managed to compile nvidia drivers (I need to upgrade kernel on my desktop, for now there is still 2.6.26 I compiled about 0.5y ago and forgot how I managed to compile nvidia, maybe with their automatic installer and/or manually make -f Makefile.kbuild and/or some stupid patching)

 *Gentree wrote:*   

> So I'm stuck with wireless for the moment and I need to find out why the handbook example code does not work  

 

No idea, maybe you need to ask author(s)? ;P

I like playing with new features in new kernels, but I can understand, that if

everything works there is much weaker temptation to change anything  :Wink: 

----------

## Gentree

thanks, what nvidia-drivers are you using? I'm using x11-drivers/nvidia-drivers-96.43.07

if they work with 2.6.26 that would at least get a safer kernel and probably allow me to use WPA

thx

----------

## smerf

Currently 96.43.01.

BTW: AFAIR the problem is because of gcc NOT because of kernel (ebuild tries -m64 or something like that)

----------

## d2_racing

Hi, when I debug someone, I always ask this :

```

# emerge --info

# lspci -v

# ifconfig -a

# iwconfig

# lsmod

# cat /etc/conf.d/net

# cat /etc/wpa_supplicant/wpa_supplicant.conf

# cd /etc/init.d/ && ls -la

# rc-update show

# iwlist scan

```

With that, I can find what is going on actually  :Razz: 

----------

## Gentree

OK here goes. Some of it does not apply but it's your list so I'll let you pick through it.

```
bash-3.2#emerge --info

Portage 2.1.6.7 (default/linux/x86/2008.0/desktop, gcc-4.2.3/vanilla, glibc-2.7-r2, 2.6.20-nicus1 i686)

=================================================================

System uname: Linux-2.6.20-nicus1-i686-Unknown_CPU_Typ-with-glibc2.0

Timestamp of tree: Fri, 27 Feb 2009 21:45:01 +0000

ccache version 2.4 [disabled]

app-admin/eselect-compiler: 2.0.0_rc2-r1

app-shells/bash:     3.2_p39

dev-java/java-config: 1.3.7, 2.1.6-r1

dev-lang/python:     2.5.2-r8

dev-python/pycrypto: 2.0.1-r6

dev-util/ccache:     2.4-r8

dev-util/cmake:      2.6.2

sys-apps/baselayout: 1.12.12

sys-apps/sandbox:    1.2.18.1-r3

sys-devel/autoconf:  2.13, 2.63

sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2

sys-devel/binutils:  2.18.50.0.9

sys-devel/gcc-config: 2.0.0_rc1

sys-devel/libtool:   2.2.6a

virtual/os-headers:  2.6.26

ACCEPT_KEYWORDS="x86 ~x86"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer -falign-functions=64 -fgnu89-inline"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/compiler /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php

5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"

CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer -falign-functions=64"

DISTDIR="/usr/portage/new/distfiles"

FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"

GENTOO_MIRRORS="  ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo #ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo   #http://gentoo.mirror.

sdv.fr   #http://gentoo.oregonstate.edu  http://www.ibiblio.org/pub/Linux/distributions/gentoo "

LANG="en_GB"

LC_ALL="en_GB"

LDFLAGS="-Wl,-O1 -Wl,--sort-common -s -Wl,--hash-style=gnu"

LINGUAS="en fr en_GB fr_FR"

MAKEOPTS="-j2"

PKGDIR="/usr/portage/packages"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfil

es --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/usr/portage/new/../tmp"

PORTDIR="/usr/portage/new"

PORTDIR_OVERLAY="/usr/portage/local/layman/zen-overlay /usr/portage/local/layman/lxde /usr/portage/overlay"

SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"

USE="3dnow X acl acpi acpi4linux aiglx alsa apache2 bluetooth branding bzip2 cairo cdr cli cracklib crypt cups curl dbus directfb dri dvd dvdr dvdread

 eds emboss encode esd evo fam fbcon fbdev firefox flac foomaticdb fortran fuse gdbm gif gimp gpm gstreamer gtk gtk2 iconv imagemagick imlib isdnlog j

oystick jpeg kde lcms ldap libnotify mad midi mikmod mmx mng mp3 mpeg mudflap mysql nas ncurses network nls nptl nptlonly nvidia ogg opengl openmp pam

 pcre pdf perl php png ppds pppd python qt3 qt3support qt4 quicktime readline reflection rtc samba sdl session slang sms spell spl sse ssl startup-not

ification svg svga sysfs tcltk tcpd threads tiff truetype unicode usb userlocales vesa vorbis win32codecs x86 xml xorg xulrunner xv xvid zlib" ALSA_CA

RDS="ens1371 cmipci es1938" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear mete

r mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_defau

lt authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env

 expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status uniq

ue_id userdir usertrack vhost_alias" CAMERAS="ptp2 fuji panasonic canon" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayr

ad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en fr en_GB fr_FR" USERLAND="GNU" VIDEO_CARDS="nvidia 3dfx nv vesa vesafb"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

```

```

bash-3.2#ifconfig -a

eth1      Link encap:Ethernet  HWaddr 00:30:b4:00:00:00  

          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)

          Interrupt:20 

eth_mobo  Link encap:Ethernet  HWaddr 00:04:4b:80:80:03  

          inet addr:192.168.0.129  Bcast:192.168.0.255  Mask:255.255.255.128

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:24316 errors:0 dropped:0 overruns:0 frame:0

          TX packets:18771 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:28703447 (27.3 MiB)  TX bytes:2187476 (2.0 MiB)

          Interrupt:16 Base address:0x4000 

eth_pci   Link encap:Ethernet  HWaddr 00:d0:b7:8e:ac:39  

          inet addr:192.168.1.3  Bcast:192.168.1.255  Mask:255.255.255.0

          BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:82 errors:0 dropped:0 overruns:0 frame:0

          TX packets:57 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:112582 (109.9 KiB)  TX bytes:4895 (4.7 KiB)

lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:220 errors:0 dropped:0 overruns:0 frame:0

          TX packets:220 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:17764 (17.3 KiB)  TX bytes:17764 (17.3 KiB)

ppp0      Link encap:Point-to-Point Protocol  

          inet addr:93.9.147.4  P-t-P:93.9.147.1  Mask:255.255.255.255

          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1

          RX packets:85 errors:0 dropped:0 overruns:0 frame:0

          TX packets:95 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:3 

          RX bytes:44614 (43.5 KiB)  TX bytes:19993 (19.5 KiB)

wlan0     Link encap:Ethernet  HWaddr 00:1e:58:9e:61:81  

          inet addr:169.254.228.128  Bcast:169.254.255.255  Mask:255.255.0.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:13780 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:0 (0.0 B)  TX bytes:914940 (893.4 KiB)

```

```

bash-3.2#iwconfig 

lo        no wireless extensions.

eth_mobo  no wireless extensions.

eth_pci   no wireless extensions.

eth1      NOT READY!  ESSID:off/any  

          Mode:Managed  Channel:0  Access Point: Not-Associated   

          Tx-Power=31 dBm   Sensitivity=0/200  

          Retry short limit:0   RTS thr=-1 B   Fragment thr=-1 B   

          Encryption key:off

          Link Quality:0  Signal level:0  Noise level:0

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

wlan0     RT73 WLAN  ESSID:"Livebox-8194"  

          Mode:Managed  Frequency=2.412 GHz  Bit Rate=54 Mb/s   

          RTS thr:off   Fragment thr:off

          Encryption key:off

          Link Quality=0/100  Signal level:-121 dBm  Noise level:-115 dBm

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

ppp0      no wireless extensions.

```

```
bash-3.2#lsmod 

Module                  Size  Used by

rt73                  221056  1 

nfsd                   93544  9 

exportfs                6208  1 nfsd

lockd                  63944  2 nfsd

sunrpc                161020  8 nfsd,lockd

ipt_MASQUERADE          4032  1 

iptable_nat             8260  1 

nf_nat                 18092  2 ipt_MASQUERADE,iptable_nat

ipt_REJECT              4288  1 

xt_tcpudp               3072  15 

nf_conntrack_ipv4      18380  18 iptable_nat

xt_state                2304  16 

nf_conntrack           63640  5 ipt_MASQUERADE,iptable_nat,nf_nat,nf_conntrack_ipv4,xt_state

nfnetlink               6552  2 nf_conntrack_ipv4,nf_conntrack

iptable_filter          2816  1 

ip_tables              12872  2 iptable_nat,iptable_filter

x_tables               15684  6 ipt_MASQUERADE,iptable_nat,ipt_REJECT,xt_tcpudp,xt_state,ip_tables

snd_seq_midi            8288  0 

snd_pcm_oss            43680  0 

snd_mixer_oss          17216  1 snd_pcm_oss

snd_seq_oss            32448  0 

snd_seq_midi_event      7744  2 snd_seq_midi,snd_seq_oss

snd_seq                51152  5 snd_seq_midi,snd_seq_oss,snd_seq_midi_event

snd_rtctimer            3296  0 

abituguru              19344  0 

hwmon                   3348  1 abituguru

fuse                   44116  0 

analog                 11744  0 

joydev                  9664  0 

nvidia               4715728  22 

snd_ens1371            25696  2 

gameport               15432  2 analog,snd_ens1371

snd_rawmidi            24992  2 snd_seq_midi,snd_ens1371

snd_seq_device          8012  4 snd_seq_midi,snd_seq_oss,snd_seq,snd_rawmidi

snd_ac97_codec         93920  1 snd_ens1371

ac97_bus                2048  1 snd_ac97_codec

snd_pcm                80776  3 snd_pcm_oss,snd_ens1371,snd_ac97_codec

snd_timer              23300  3 snd_seq,snd_rtctimer,snd_pcm

usblp                  13568  0 

snd                    52580  14 snd_pcm_oss,snd_mixer_oss,snd_seq_oss,snd_seq,snd_ens1371,snd_rawmidi,snd_seq_device,snd_ac97_codec,snd_pcm,snd_timer

soundcore               8288  1 snd

snd_page_alloc          9672  1 snd_pcm

e100                   34760  0 

prism54                57608  0 

firmware_class         10176  2 rt73,prism54

forcedeth              44612  0 

ehci_hcd               44044  0 

i2c_nforce2             5824  0 

ohci_hcd               34372  0 

```

```

bash-3.2#cat /etc/conf.d/net |grep -e "^[^#]"

config_eth_mobo=(

        "192.168.0.129 broadcast 192.168.0.255 netmask 255.255.255.128"

)

config_eth_pci=(

        "192.168.1.3 broadcast 192.168.1.255 netmask 255.255.255.0"

)

wpa_supplicant_wlan1="-Drt73"

modules=( "iwconfig" )

key_Livebox-8491="[1] 26-char-hex-key-string-without-quotes key [1] enc restricted"

mode_wlan0="managed"

essid_wlan0="Livebox-8491"

channel_wlan0="6"

config_wlan0=( "dhcp" ) 

dhcp_wlan0="nontp nonis"

```

```

bash-3.2#cat /etc/wpa_supplicant/wpa_supplicant.conf 

# This is a network block that connects to any unsecured access point.

# We give it a low priority so any defined blocks are preferred.

#network={

# key_mgmt=NONE

# priority=-9999999

#}

# The below line not be changed otherwise we refuse to work 

ctrl_interface=/var/run/wpa_supplicant

# Ensure that only root can read the WPA configuration 

ctrl_interface_group=0 

# Let wpa_supplicant take care of scanning and AP selection 

ap_scan=1

# Simple case: WPA-PSK, PSK as an ASCII passphrase, allow all valid ciphers 

network={ 

  ssid="Livebox-8491" 

  psk="26-char-hex-key-string" 

  # The higher the priority the sooner we are matched 

  priority=5 

}

# Shared WEP key connection (no WPA, no IEEE 802.1X) using Shared Key

# IEEE 802.11 authentication

network={

#  ssid="Livebox-8491"

  ssid="Livebox-8491"

  key_mgmt=NONE

  wep_key2=26-char-hex-key-string-without-quotes

  wep_tx_keyidx=0

  priority=5

  auth_alg=SHARED

}

```

```

-rwxr-xr-x   1 root root  6557 2008-10-24 01:14 alsasound

-rwxr-xr-x   1 root root  3674 2008-10-23 21:49 apache2

-rwxr-xr-x   1 root root  3760 2007-10-14 20:17 apache2.tmp

-rwxr-xr-x   1 root root  3661 2008-08-12 22:59 bootmisc

-rwxr-xr-x   1 root root   631 2002-01-01 02:56 bttrack

-rwxr-xr-x   1 root root  1188 2008-08-12 22:59 checkfs

-rwxr-xr-x   1 root root  3226 2008-08-12 22:59 checkroot

-rwxr-xr-x   1 root root  3054 2008-08-12 22:59 clock

-rwxr-xr-x   1 root root  1408 2008-08-12 22:59 consolefont

-rwxr-xr-x   1 root root  1722 2008-10-23 22:08 crypto-loop

-rwxr-xr-x   1 root root   286 2008-10-24 01:27 cupsd

-rwxr-xr-x   1 root root  1152 2008-10-23 02:02 dbus

-rwxr-xr-x   1 root root  1227 2008-05-09 00:41 ddclient

lrwxrwxrwx   1 root root    21 2008-12-05 22:51 depscan.sh -> ../../sbin/depscan.sh

-rwxr-xr-x   1 root root   620 2008-10-23 19:56 device-mapper

-rwxr-xr-x   1 root root  1530 2002-01-01 02:56 dhcp

-rwxr-xr-x   1 root root   660 2008-10-23 04:16 dmcrypt

-rwxr-xr-x   1 root root   547 2008-10-23 19:56 dmeventd

-rwxr-xr-x   1 root root   998 2007-05-16 09:51 dnsextd

-rwxr-xr-x   1 root root   612 2002-01-01 02:56 dnsmasq

-rwxr-xr-x   1 root root   913 2008-05-09 17:05 dropbear

-rwxr-xr-x   1 root root   993 2008-10-23 01:49 esound

-rwxr-xr-x   1 root root   490 2007-05-16 15:17 famd

-rwxr-xr-x   1 root root   726 2008-10-24 01:13 fancontrol

-rw-r--r--   1 root root  5543 2002-01-01 02:56 firewall2

lrwxrwxrwx   1 root root    23 2008-12-05 22:51 functions.sh -> ../../sbin/functions.sh

-rwxr-xr-x   1 root root   756 2008-05-09 09:38 fuse

-rwxr-xr-x   1 root root   529 2008-10-24 09:57 git-daemon

-rwxr-xr-x   1 root root   636 2008-05-09 11:02 gkrellmd

-rwxr-xr-x   1 root root   951 2008-10-23 00:09 gpm

-rwxr-xr-x   1 root root  1111 2009-01-16 00:22 hald

-rwxr-xr-x   1 root root  5606 2008-08-12 22:59 halt.sh

-rwxr-xr-x   1 root root   543 2007-10-14 15:41 hddtemp

-rwxr-xr-x   1 root root  3407 2008-12-13 18:18 hdparm

-rwxr-xr-x   1 root root   433 2008-08-12 22:59 hostname

-rwxr-xr-x   1 root root  1076 2002-01-01 02:56 hotplug

-rwxr-xr-x   1 root root   443 2008-05-13 14:55 in.tftpd

-rwxr-xr-x   1 root root  2570 2008-10-24 01:12 ip6tables

-rwxr-xr-x   1 root root  2570 2008-10-24 01:12 iptables

-rwxr-xr-x   1 root root  1217 2002-01-01 02:56 kexec

-rwxr-xr-x   1 root root  1844 2008-08-12 22:59 keymaps

-rwxr-xr-x   1 root root   742 2009-02-23 20:37 kismet

-rwxr-xr-x   1 root root   645 2002-01-01 02:56 klive

-rwxr-xr-x   1 root root  2457 2008-10-24 01:13 lm_sensors

-rwxr-xr-x   1 root root   620 2008-08-12 22:59 local

-rwxr-xr-x   1 root root  2088 2008-08-12 22:59 localmount

-rwxr-xr-x   1 root root   845 2007-05-16 09:51 mdnsd

-rwxr-xr-x   1 root root  1247 2007-05-16 09:51 mDNSResponderPosix

-rwxr-xr-x   1 root root   687 2008-10-23 01:45 mit-krb5kadmind

-rwxr-xr-x   1 root root   656 2008-10-23 01:45 mit-krb5kdc

-rwxr-xr-x   1 root root     6 2008-12-05 22:51 net.eth0 -> net.lo

lrwxrwxrwx   1 root root     6 2009-01-08 09:59 net.eth1 -> net.lo

lrwxrwxrwx   1 root root     6 2008-12-05 22:51 net.eth_mobo -> net.lo

lrwxrwxrwx   1 root root     6 2008-12-05 22:51 net.eth_pci -> net.lo

-rwxr-xr-x   1 root root 30696 2008-08-12 22:59 net.lo

-rwxr-xr-x   1 root root  3307 2008-08-12 22:59 netmount

-rwxr-xr-x   1 root root  3969 2008-10-23 22:44 nfs

-rwxr-xr-x   1 root root  1084 2008-10-23 22:44 nfsmount

-rwxr-xr-x   1 root root  1566 2008-05-09 04:19 nscd

-rwxr-xr-x   1 root root   670 2008-08-12 22:59 numlock

-rwxr-xr-x   1 root root   756 2002-01-01 02:56 partimaged

-rwxr-xr-x   1 root root  1871 2008-10-23 19:51 pciparm

-rwxr-xr-x   1 root root  1313 2007-05-16 10:08 pktcdvd

-rwxr-xr-x   1 root root   995 2007-05-16 10:12 portmap

-rwxr-xr-x   1 root root  1416 2007-05-17 12:22 pure-ftpd

-rwxr-xr-x   1 root root   538 2007-05-17 11:46 pwcheck

-rwxr-xr-x   1 root root   666 2008-10-23 23:35 pydoc-2.5

-rwxr-xr-x   1 root root   639 2007-05-17 00:52 rdate

-rwxr-xr-x   1 root root   304 2007-12-26 18:58 reboot.sh

-rwxr-xr-x   1 root root   276 2008-08-12 22:59 rmnologin

-rwxr-xr-x   1 root root  1093 2008-10-23 22:44 rpc.gssd

-rwxr-xr-x   1 root root  1327 2008-10-23 22:44 rpc.idmapd

-rwxr-xr-x   1 root root   858 2008-10-23 22:44 rpc.statd

-rwxr-xr-x   1 root root  1110 2008-10-23 22:44 rpc.svcgssd

-rwxr-xr-x   1 root root   498 2002-01-01 02:56 rp-pppoe.not

-rwxr-xr-x   1 root root   558 2008-10-23 01:46 rsyncd

lrwxrwxrwx   1 root root    23 2008-12-05 22:51 runscript.sh -> ../../sbin/runscript.sh

-rwxr-xr-x   1 root root  1133 2008-10-24 01:36 samba

-rwxr-xr-x   1 root root   525 2007-05-17 11:46 saslauthd

-rwxr-xr-x   1 root root   750 2008-05-08 02:55 serial

-rwxr-xr-x   1 root root  1057 2002-01-01 02:56 shorewall

-rwxr-xr-x   1 root root   385 2007-12-26 18:58 shutdown.sh

-rwxr-xr-x   1 root root   578 2008-10-23 02:43 slapd

-rwxr-xr-x   1 root root  1445 2002-01-01 02:56 splash

-rwxr-xr-x   1 root root  2114 2008-05-09 15:52 sshd

-rwxr-xr-x   1 root root   817 2008-10-23 22:20 svnserve

-rwxr-xr-x   1 root root  1894 2008-04-15 15:33 syslog-ng

-rwxr-xr-x   1 root root   457 2002-01-01 02:56 timidity

drwxr-xr-x   2 root root     4 2004-10-13 21:24 tmp

-rwxr-xr-x   1 root root   545 2002-01-01 02:56 twistd

-rwxr-xr-x   1 root root   508 2008-10-23 04:08 udev-postmount

-rwxr-xr-x   1 root root   942 2008-08-12 22:59 urandom

-rwxr-xr-x   1 root root   530 2008-10-24 01:16 vixie-cron

-rwxr-xr-x   1 root root  5210 2008-05-08 10:45 xdm

-rwxr-xr-x   1 root root  7484 2002-01-01 02:56 xfs

```

```

bash-3.2#rc-update show 

           alsasound |      default                  

            bootmisc | boot                          

             checkfs | boot                          

           checkroot | boot                          

               clock | boot                          

         consolefont | boot                          

            hostname | boot                          

             hotplug |      default                  

            iptables |      default                  

             keymaps | boot                          

               local |      default nonetwork        

          localmount | boot                          

             modules | boot                          

        net.eth_mobo |      default                  

         net.eth_pci |      default                  

              net.lo | boot                          

            netmount |      default                  

                 nfs |      default                  

           rmnologin | boot                          

              smartd |      default                  

           syslog-ng | boot                          

             urandom | boot  
```

```

bash-3.2#iwlist scan 

lo        Interface doesn't support scanning.

eth_mobo  Interface doesn't support scanning.

eth_pci   Interface doesn't support scanning.

eth1      No scan results

wlan0     No scan results

ppp0      Interface doesn't support scanning.

```

```

bash-3.2#iwconfig 

lo        no wireless extensions.

eth_mobo  no wireless extensions.

eth_pci   no wireless extensions.

eth1      NOT READY!  ESSID:off/any  

          Mode:Managed  Channel:0  Access Point: Not-Associated   

          Tx-Power=31 dBm   Sensitivity=0/200  

          Retry short limit:0   RTS thr=-1 B   Fragment thr=-1 B   

          Encryption key:off

          Link Quality:0  Signal level:0  Noise level:0

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

wlan0     RT73 WLAN  ESSID:"Livebox-8194"  

          Mode:Managed  Frequency=2.412 GHz  Bit Rate=54 Mb/s   

          RTS thr:off   Fragment thr:off

          Encryption key:off

          Link Quality=0/100  Signal level:-121 dBm  Noise level:-115 dBm

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

ppp0      no wireless extensions.

```

Finally iwconfig showed a null essid originally , presumably a consequence of the apparent error reading conf.d/net

I added the essid with iwconfig but the scan still drew a blank.

Please note that at this stage I'm focusing on get wireless-tools approach to work since the WPA issue is mushrooming out of proportion. (Unless smerf can dig out what he had to do to get nv to build, that would be great.)

Pleasant reading   :Wink: 

----------

## Gentree

ignore earlier typo , result is as stated:

```

bash-3.2#iwconfig wlan0 essid Livebox-8491

bash-3.2#iwlist wlan0 scan 

wlan0     No scan results

```

also spotted an extra char in my "26char" key. iwconfig now shows a key set but scan still blank.

during the scan I see not activity on the ACT led of the device. 

 :Cool: 

----------

## smerf

I have never used wireless-tools, not even installed - just wpa_supplicant.

----------

## Gentree

Well it's in the guide and it seems pretty close to working with the rt73 driver. 

But if you can remember the trick you needed to get nv to build I'll be happy to give supplicant another blow. I need to get rid of this flakey insecure kernel anyway. 

thanks for your help.

 :Cool: 

----------

## d2_racing

Hi, ok you have 2 problems.

First, your /etc/conf.d/net

```

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="-Drt73"

config_wlan0=( "dhcp" )

```

After that, you need to run this command :

```

# cd /etc/init.d/ && ln -s net.lo net.wlan0

```

After that, reboot your box and run this :

```

# ifconfig -a

# iwconfig

# /etc/init.d/net.wlan0 start

# dmesg | grep -i rt73

# ifconfig -a

# iwconfig 

# wpa_cli status

# iwlist scan

```

----------

## d2_racing

You should double check this thread too : https://forums.gentoo.org/viewtopic-t-739292-highlight-rt73.html

----------

## smerf

Okay, this one is dirty and tricky, but I don't know the proper way... d2_racing: maybe you can help us?

 Try to emerge nvidia-drivers: emerge -v =nvidia-drivers-${PV}

 After it fails go to ${WORKDIR}/${NV_PACKAGE}${PKG_V}/usr/src/nv (where the module sources are)

 Compile it manually: make clear module (this time kbuild is invoked with proper ABI)

 Fake compilation by creating empty file touch ${WORKDIR}/../.compiled

 Perform next two steps of emerge: ebuild /usr/portage/x11-drivers/nvidia-drivers/${PV} install

 and ebuild /usr/portage/x11-drivers/nvidia-drivers/${PV} qmerge

For example, to compile 96.43.07:

```
emerge =nvidia-drivers-96.43.07

cd /var/tmp/portage/x11-drivers/nvidia-drivers-96.43.07/work/NVIDIA-Linux-x86-96.43.07-pkg0/usr/src/nv

make clear module

touch ../../../../../.compiled

ebuild /usr/portage/x11-drivers/nvidia-drivers/nvidia-drivers-96.43.07.ebuild install

ebuild /usr/portage/x11-drivers/nvidia-drivers/nvidia-drivers-96.43.07.ebuild qmerge
```

Of course you can use ebuild [path_to_ebuild] {fetch,unpack} only (without calling emerge).

I am sure, that I finally managed to fix this without this ugly, semi-manual trick, but I simply don't remember  :Sad: 

For some reason (I suspect multilib/toolchain/flag-o-matic eclasses - filter-flags or something) linux-mod tries to compile

with -m64 flag, but for x86 it should be -m32 or nothing... maybe my gcc configuraction is wrong... Any ideas?

----------

## Gentree

Thanks , I've got it sussed now. Seems /usr/lib/file had disappeared for some reason   :Confused: 

now running 2.6.28 with rt73usb module. and  wpa_supplicant-0.6.4

```

usb 2-4:1.0: uevent

drivers/usb/core/inode.c: creating file '004'

usb 2-4: New USB device found, idVendor=07d1, idProduct=3c03

usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=0

usb 2-4: Product: 802.11 bg WLAN

usb 2-4: Manufacturer: Ralink

cfg80211: Using static regulatory domain info

cfg80211: Regulatory domain: US

        (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)

        (2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2700 mBm)

        (5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)

        (5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)

        (5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)

        (5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)

        (5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm)

cfg80211: Calling CRDA for country: US

rt73usb 2-4:1.0: usb_probe_interface

rt73usb 2-4:1.0: usb_probe_interface - got id

phy0 -> rt73usb_validate_eeprom: EEPROM recovery - NIC: 0xffef

phy0 -> rt73usb_validate_eeprom: EEPROM recovery - Led: 0xe000

phy0 -> rt73usb_validate_eeprom: EEPROM recovery - RSSI OFFSET A: 0x0000

phy0 -> rt2x00_set_chip: Info - Chipset detected - rt: 1300, rf: 0002, rev: 0002573a.

phy0: Selected rate control algorithm 'pid'

usbcore: registered new interface driver rt73usb

phy0 -> rt2x00lib_request_firmware: Info - Loading firmware file 'rt73.bin'.

rt73usb 2-4:1.0: firmware: requesting rt73.bin

phy0 -> rt2x00lib_request_firmware: Info - Firmware detected - version: 1.7.

phy0 -> rt2x00mac_conf_tx: Info - Configured TX queue 0 - CWmin: 5, CWmax: 10, Aifs: 2, TXop: 0.

phy0 -> rt2x00mac_conf_tx: Info - Configured TX queue 1 - CWmin: 5, CWmax: 10, Aifs: 2, TXop: 0.

phy0 -> rt2x00mac_conf_tx: Info - Configured TX queue 2 - CWmin: 5, CWmax: 10, Aifs: 2, TXop: 0.

phy0 -> rt2x00mac_conf_tx: Info - Configured TX queue 3 - CWmin: 5, CWmax: 10, Aifs: 2, TXop: 0.

phy0 -> rt2x00mac_conf_tx: Info - Configured TX queue 0 - CWmin: 5, CWmax: 10, Aifs: 2, TXop: 0.

phy0 -> rt2x00mac_conf_tx: Info - Configured TX queue 1 - CWmin: 5, CWmax: 10, Aifs: 2, TXop: 0.

phy0 -> rt2x00mac_conf_tx: Info - Configured TX queue 2 - CWmin: 5, CWmax: 10, Aifs: 2, TXop: 0.

phy0 -> rt2x00mac_conf_tx: Info - Configured TX queue 3 - CWmin: 5, CWmax: 10, Aifs: 2, TXop: 0.

phy0 -> rt2x00mac_conf_tx: Info - Configured TX queue 0 - CWmin: 5, CWmax: 10, Aifs: 2, TXop: 0.

phy0 -> rt2x00mac_conf_tx: Info - Configured TX queue 1 - CWmin: 5, CWmax: 10, Aifs: 2, TXop: 0.

phy0 -> rt2x00mac_conf_tx: Info - Configured TX queue 2 - CWmin: 5, CWmax: 10, Aifs: 2, TXop: 0.

phy0 -> rt2x00mac_conf_tx: Info - Configured TX queue 3 - CWmin: 5, CWmax: 10, Aifs: 2, TXop: 0.

phy0 -> rt2x00mac_conf_tx: Info - Configured TX queue 0 - CWmin: 5, CWmax: 10, Aifs: 2, TXop: 0.

phy0 -> rt2x00mac_conf_tx: Info - Configured TX queue 1 - CWmin: 5, CWmax: 10, Aifs: 2, TXop: 0.

phy0 -> rt2x00mac_conf_tx: Info - Configured TX queue 2 - CWmin: 5, CWmax: 10, Aifs: 2, TXop: 0.

phy0 -> rt2x00mac_conf_tx: Info - Configured TX queue 3 - CWmin: 5, CWmax: 10, Aifs: 2, TXop: 0.

bash-3.2#

```

looks healthier, but still no scan result. At least both trhe ACT and LNK lights are flashing during the scan.

```

bash-3.2#iwlist scan

lo        Interface doesn't support scanning.

eth_pci   Interface doesn't support scanning.

eth_mobo  Interface doesn't support scanning.

wmaster0  Interface doesn't support scanning.

wlan0     No scan results

ppp0      Interface doesn't support scanning.

```

and I still have to add the passphrase and essid manually 

```

wmaster0  no wireless extensions.

wlan0     IEEE 802.11bg  ESSID:"Livebox-8491"  

          Mode:Managed  Frequency:2.412 GHz  Access Point: Not-Associated   

          Tx-Power=19 dBm   

          Retry min limit:7   RTS thr:off   Fragment thr=2352 B   

          Encryption key:xxxxxxxxxxxxxxxxxxxxxxxxxxxx   Security mode:open

          Power Management:off

          Link Quality:0  Signal level:0  Noise level:0

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

```

slow forward. Slowly!

 :Cool: 

----------

## smerf

/usr/lib/file?

As I said before, I use just wpa_supplicant:

```
#/etc/conf.d/net

modules_wlan0=( "!ifplugd" "wpa_supplicant" )

wpa_supplicant_wlan0="-Dwext"
```

```
wpa_cli scan

wpa_cli scan_results
```

(WPA supplicant is running: /sbin/wpa_supplicant -Dwext -c/etc/wpa_supplicant/wpa_supplicant.conf -W -W -B -iwlan0 -P/var/run/wpa_supplicant-wlan0.pid)

----------

## Gentree

This seems different to your usage since you use one of the standard drivers. I seem to have a missing link since wpa_supplicant is not running and that's presumably why I don't get the essid etc.

```
bash-3.2#wpa_supplicant -Drt73usb -iwlan0  -c/etc/wpa_supplicant/wpa_supplicant.conf

Unsupported driver 'rt73usb'.

```

If I run without the -D (which is already in /etc/conf.d/net) I do get scan results, blank.

Odd though that the firmware gets loaded when I plug the device and the leds start flashing periodically.

```

bash-3.2#wpa_supplicant  -iwlan0  -c/etc/wpa_supplicant/wpa_supplicant.conf

CTRL-EVENT-SCAN-RESULTS 

CTRL-EVENT-SCAN-RESULTS 

...

bash-3.2#iwlist scan

lo        Interface doesn't support scanning.

eth_pci   Interface doesn't support scanning.

eth_mobo  Interface doesn't support scanning.

ppp0      Interface doesn't support scanning.

wmaster0  Interface doesn't support scanning.

wlan0     No scan results

```

```
bash-3.2#wpa_cli -iwlan0 list_networks

Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
```

I also notice that running supplicant turns OFF the encryption key. 

```

wpa_supplicant  -iwlan0  -c/etc/wpa_supplicant/wpa_supplicant.conf

wlan0     IEEE 802.11bg  ESSID:"Livebox-8491"  

          Mode:Managed  Frequency:2.412 GHz  Access Point: Not-Associated   

          Tx-Power=19 dBm   

          Retry min limit:7   RTS thr:off   Fragment thr=2352 B   

          Encryption key:off

          Power Management:off

          Link Quality:0  Signal level:0  Noise level:0

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
```

```

bash-3.2#cat  /etc/wpa_supplicant/wpa_supplicant.conf |grep -e "^[^#]"

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0 

ap_scan=1

network={

  ssid="Livebox-8491"

  key_mgmt=NONE

  wep_key0=9A41221FCE99A992E7451D26D2

  wep_tx_keyidx=0

  priority=5

  auth_alg=SHARED

}

```

After resetting the key manually:

```
bash-3.2#wpa_cli -iwlan0 list_networks

Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
```

The last bit is odd since I was seeing the network and this was working with wpa_supplicant-0.5.4 patched for legacy rt73. This much is worse that before.

I'm not out of the woods. 

 :Confused: 

----------

## smerf

Well, wpa_cli simply fails to connect to running wpa_supplicant.

(it has nothing to do with ability to see APs or not, encryption, keys and stuff like that)

Make sure, that your ctrl_interface and wpa_cli -p parameter are consistent.

Check permissions (ctrl_interface_group, or just use root account only).

Check where your wpa_supplicant listen for connections (lsof -p `pidof wpa_supplicant`).

However, if you use wpa_supplicant from conf.d/net everything should work out of the box.

I do not like wireless-tools because AFAIR it can't use WPA2 and tries to connect to unsecured

hotspots first (maybe it can be configured/finetuned, I don't know, wpa_supplicant works for me)

I don't know, what 'iwlist scan' does internally.

Make wpa_cli connect to wpa_supplicant and use wpa_cli scan/scan_results.

Why don't you like wext? This funny rt-something was for legacy Ralink drivers.

----------

## Gentree

No, rt73 was the legacy driver, that was what I started with (and did scan).

rt73usb is part of the rt2x00 driver project, now integrated into main line kernel. I though it should be available to wpa_supplicant so maybe something is wrong there. 

I didnot realise I could use wext or else I would not huffing and puffing with specific drivers. I assume this project was not adopted into the kernel for no reason. Are you using it with a ralink device?

thx.  :Cool: 

----------

## smerf

No, no, no, no  :Wink: 

The name you use with -D is not the name of the kernel driver!!!

AFAIK you should use always Linux Wireless EXTensions, except for

ndiswrapper, prism cards and some special cases (like legacy ralink)

I think, that you really need to read wpa_supplicant manual and wpa_supplicant -h output (drivers: section)

I've already posted all related configuration I use  :Wink: 

----------

## Gentree

Thanks I read the man page but the "documentation" on wext is hardly explanatory.

 *man wrote:*   

>        wext   Linux wireless extensions (generic).

 

There's absolutely no indication that it relates to the kernel drives. It sounded like a minimalistic generic driver to try if you did not have one specific for a particular device. 

Anyway, thanks for the suggestion, I am getting a lot nearer. The connection shows in ifconfig once I plug the device.

```

wlan0     Link encap:Ethernet  HWaddr 00:1e:58:9e:61:81  

          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)

wmaster0  Link encap:UNSPEC  HWaddr 00-1E-58-9E-61-81-00-00-00-00-00-00-00-00-00-00  

          UP BROADCAST RUNNING 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)
```

supplicant is running:

```

20672 ?        S<     0:00 [rt73usb]

21157 ?        S<s    0:00 /sbin/wpa_supplicant -Dwext -c/etc/wpa_supplicant/wpa_supplicant.conf -W -W -B -iwlan0

21168 ?        S<s    0:00 /bin/wpa_cli -a/etc/wpa_supplicant/wpa_cli.sh -p/var/run/wpa_supplicant -iwlan0 -P/var/

```

and I get some sort of a scan , an empty one. 

```

bash-3.2#wpa_cli scan

Selected interface 'wlan0'

OK

bash-3.2#wpa_cli scan_results

Selected interface 'wlan0'

bssid / frequency / signal level / flags / ssid

bash-3.2#iwlist scan

lo        Interface doesn't support scanning.

eth_pci   Interface doesn't support scanning.

eth_mobo  Interface doesn't support scanning.

ppp0      Interface doesn't support scanning.

wmaster0  Interface doesn't support scanning.

wlan0     No scan results

```

[code]

In fact, I don't see anywhere in all this where the implicit call to wpa_supplicant gets to define the config file. 

Now I'm pretty confident I am getting a signal from the router because the legacy driver was able to show something from wpa_cli scan.

Is there something I've missed?

thanks again.

 :Cool: 

----------

## smerf

Okay, now let's focus on scanning problems.

Can you post complete (wifi-related) dmesg output after scan attempt?

----------

## Gentree

OK, here's the dmesg after plugging the device , it did not add anything after I ran iwlist scan

```
usb 1-4: usb_probe_device

usb 1-4: configuration #1 chosen from 1 choice

usb 1-4: adding 1-4:1.0 (config #1, interface 0)

usb 1-4:1.0: uevent

rt73usb 1-4:1.0: usb_probe_interface

rt73usb 1-4:1.0: usb_probe_interface - got id

phy2 -> rt73usb_validate_eeprom: EEPROM recovery - NIC: 0xffef

phy2 -> rt73usb_validate_eeprom: EEPROM recovery - Led: 0xe000

phy2 -> rt73usb_validate_eeprom: EEPROM recovery - RSSI OFFSET A: 0x0000

phy2 -> rt2x00_set_chip: Info - Chipset detected - rt: 1300, rf: 0002, rev: 0002573a.

phy2: Selected rate control algorithm 'pid'

drivers/usb/core/inode.c: creating file '005'

usb 1-4: New USB device found, idVendor=07d1, idProduct=3c03

usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=0

usb 1-4: Product: 802.11 bg WLAN

usb 1-4: Manufacturer: Ralink

phy2 -> rt2x00lib_request_firmware: Info - Loading firmware file 'rt73.bin'.

rt73usb 1-4:1.0: firmware: requesting rt73.bin

phy2 -> rt2x00lib_request_firmware: Info - Firmware detected - version: 1.7.

phy2 -> rt2x00mac_conf_tx: Info - Configured TX queue 0 - CWmin: 5, CWmax: 10, Aifs: 2, TXop: 0.

phy2 -> rt2x00mac_conf_tx: Info - Configured TX queue 1 - CWmin: 5, CWmax: 10, Aifs: 2, TXop: 0.

phy2 -> rt2x00mac_conf_tx: Info - Configured TX queue 2 - CWmin: 5, CWmax: 10, Aifs: 2, TXop: 0.

phy2 -> rt2x00mac_conf_tx: Info - Configured TX queue 3 - CWmin: 5, CWmax: 10, Aifs: 2, TXop: 0.

```

```
wlan0     Link encap:Ethernet  HWaddr 00:1e:58:9e:61:81  

          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)

```

```

wmaster0  no wireless extensions.

wlan0     IEEE 802.11bg  ESSID:""  

          Mode:Managed  Frequency:2.412 GHz  Access Point: Not-Associated   

          Tx-Power=19 dBm   

          Retry min limit:7   RTS thr:off   Fragment thr=2352 B   

          Encryption key:off

          Power Management:off

          Link Quality:0  Signal level:0  Noise level:0

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

```

I note the essid is not set and key is off. I dont know if this is expected before it has found a network.

Thx.

----------

## smerf

You should be able to detect all non-hidden networks with

just ap_scan=1 and wpa_cli scan - keys are needed for

association only and ssids are used to assign keys/passwords

to networks and allow connecting to hidden networks.

Looks like we have the same chipset (2573), so this should work.

Do you have mac80211 module loaded (compiled in)?

----------

## Gentree

cool, 

module:

```
rt73usb                25028  0 

rt2x00usb              10432  1 rt73usb

rt2x00lib              37632  2 rt73usb,rt2x00usb

mac80211              167720  2 rt2x00usb,rt2x00lib

cfg80211               30352  2 rt2x00lib,mac80211

```

----------

## smerf

yep, cool, but I'm running out of ideas what could be wrong  :Sad: 

Now you are running wpa_supplicant via gentoo init scripts, right?

What do you have inside RC_PLUG_SERVICES (/etc/conf.d/rc)?

Do you use hotplugged configuration or start interface manually,

my only idea for now is that something interferes with wpa_supplicant

(for me it once was ifplugd - it should not run on wireless interfaces,

but turning it off along with iwconfig helped resolve the situation).

When I installed wireless tools I lost the possibility to associate with

AP (not sure why, turning it off in modules_wlan0= did not help), but

I was still able to see all available networks.

For me this does not look like hardware/driver issue, dmesg is ok.

(however a bit more verbose in comparison with mine)

Let me think about this for a few minutes (I need to refer to your first posts).

EDIT: Oh, I just noticed: have you EVER scanned for networks (previous setup) or just

issued list_networks which merely parses configuration file and lists all network={} blocks?

----------

## Gentree

```
RC_PLUG_SERVICES =""
```

I could have been kidding myself. Being completely new to all these tools I thought wpa_cli -iwlan0 list_networks actually listed the networks it could see not the ones it hoped it might see one day in the future  :Rolling Eyes: 

I dug this off one of my other posts:

```

bash-3.2#wpa_supplicant -D ralink -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf -B

ioctl[SIOCGIWAP]: Transport endpoint is not connected

ioctl[SIOCGIWAP]: Transport endpoint is not connected

ioctl[SIOCGIWAP]: Transport endpoint is not connected

ioctl[SIOCGIWAP]: Transport endpoint is not connected

bash-3.2#wpa_cli -iwlan0 list_networks

network id / ssid / bssid / flags

0               any

1       Livebox-8491    any

2       Livebox-8491    any 
```

So it seems likely at this point that I have my end operational now but am simply out of range (or obstructed) from the router. I may have to displace one end or the other to verify if that's the case. 

does that make sense from what you see?

I removed wireless-tools for good measure.

Thanks for your persistence and help.  :Cool: 

----------

## smerf

 *Gentree wrote:*   

> So it seems likely at this point that I have my end operational now but am simply out of range (or obstructed) from the router. I may have to displace one end or the other to verify if that's the case. 
> 
> does that make sense from what you see?

 

Yes. Make sure, that router is not configured to hide its ssid from probes.

 *Gentree wrote:*   

> Thanks for your persistence and help. 

 

You're welcome. I still have hope, that we finally end this little discussion by adding [SOLVED] to the topic  :Wink: 

----------

## Gentree

OK , I'm back on this issue (working away from base quite a bit).

Today I moved the computer next to the router and managed to get the two to associate, so the basic problem was lack of signal strength.

```
bash-3.2#iwconfig wlan0

wlan0     IEEE 802.11bg  ESSID:"Livebox-8491"

          Mode:Managed  Frequency:2.437 GHz  Access Point: 00:1D:6A:99:93:F8

          Bit Rate=2 Mb/s   Tx-Power=19 dBm

          Retry min limit:7   RTS thr:off   Fragment thr=2352 B

          Encryption key:blah-blah-blah...  [2]   Security mode:open

          Power Management:off

          Link Quality=73/100  Signal level:-40 dBm

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

```

I ran dhcpcd and got an IP from the server. I later configured the server to use a static IP.

So far, so good. However, I cannot ping the router IP from gentoo or vice versa.

This seems a bit curious if dhcp is working.  :Confused: 

Thanks for your help in getting me this far, I can smell victory.    :Cool: 

----------

## smerf

Did you get correct IP or just something like 169.254.0.0/16? Run tcpdump while trying to get lease and watch for packets from router.

----------

## Gentree

yes I got a valid 192.168.x.x IP and the gentoo box displayed this as being the same at the router. When I set the router to give a fixed IP and restarted wpa_supplicant I got the new IP showing on the gentoo box.

That much seems to be working nicely.

 :Cool: 

----------

## smerf

So, you got IP - now you can transmit/receive packets?

----------

## Gentree

```
#ifconfig

...

wlan0     Link encap:Ethernet  HWaddr 00:1e:58:9e:61:81

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:24 errors:0 dropped:0 overruns:0 frame:0

          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:8646 (8.4 KiB)  TX bytes:556 (556.0 B)

wmaster0  Link encap:UNSPEC  HWaddr 00-1E-58-9E-61-81-00-00-00-00-00-00-00-00-00-00

          UP BROADCAST RUNNING 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)

```

yeah , looks OK.

----------

## Gentree

I booted with the device connected and iwconfig gave me this

```

wlan0     IEEE 802.11bg  ESSID:"Livebox-8491"

          Mode:Managed  Frequency:2.437 GHz  Access Point: 00:1D:6A:99:93:F8

          Bit Rate=54 Mb/s   Tx-Power=19 dBm

          Retry min limit:7   RTS thr:off   Fragment thr=2352 B

          Encryption key:9F09xxxxxxxxxxxxxxxxxxxxxxx51EB [3]   Security mode:open

          Power Management:off

          Link Quality=65/100  Signal level:-86 dBm

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

```

```

ps ax

...

 2756 ?        Ss     0:00 /sbin/wpa_supplicant -Dwext -c/etc/wpa_supplicant/wpa_supplicant.conf -W -W -B -iwlan0 -P/var/run/wpa_supplicant-wlan0.pid

 2767 ?        Ss     0:00 /bin/wpa_cli -a/etc/wpa_supplicant/wpa_cli.sh -p/var/run/wpa_supplicant -iwlan0 -P/var/run/wpa_cli-wlan0.pid -B

```

Looks like I was connected to the AP so I tried dhcpcd wlan0 and it failed to connect. 

I then unplugged and replugged the device.

```

bash-3.2#wpa_cli -iwlan0 list_networks

network id / ssid / bssid / flags

0       Livebox-8491    any     [CURRENT]

[UNPLUG USB]

bash-3.2#wpa_cli -iwlan0 list_networks

Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory

[rePLUG USB]

bash-3.2#wpa_cli -iwlan0 list_networks

network id / ssid / bssid / flags

0       Livebox-8491    any

```

Now even a reboot as before fails to restore the connection.   :Confused: 

Is the router locking me out now?

Very frustrating being this close.

----------

