Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[wpa_supplicant] Configuration
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index French
View previous topic :: View next topic  
Author Message
Nicomero
n00b
n00b


Joined: 06 Feb 2007
Posts: 16

PostPosted: Sun Feb 10, 2008 1:35 pm    Post subject: [wpa_supplicant] Configuration Reply with quote

Bonjour à tous,

Suite à l'arrivée du noyau 2.6.24, j'ai installé les drivers noyau b43 pour la carte wifi (chipset 4318) de mon portable.
L'installation du driver et du firmware étant accomplie, je me lance dans la configuration de wpa_supplicant, puisque c'est le module recommandé par Gentoo et qu'il peut comprendre les clefs WPA ...

Seulement j'ai un problème. La carte semble associée à la freebox, mais l'adresse recue m'est complètement inconnue (pas celle de ma freebox) et je ne peux naviguer sur le net. Je ne vois pas comment faire.

Voici le /etc/conf.d/net :

Code:
# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d.  To create a more complete configuration,
# please review /etc/conf.d/net.example and save your configuration
# in /etc/conf.d/net (this file :]!).

modules=( "wpa_supplicant" )
wpa_supplicant_wlan0="-Dwext -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0"
iwconfig_wlan0="txpower on"
config_wlan0=( "dhcp" )


#modules=( "iwconfig" )
#key_MONMIEN="XXXXXXXXXX enc restricted"
#preferred_aps=( "MONMIEN" )
#config_wlan0=( "dhcp" )
#scan_mode_wlan0="ad-hoc"


et voici le /etc/wpa_supplicant/wpa_supplicant.conf :

Code:
# This is a network block that connects to any unsecured access point.
# We give it a low priority so any defined blocks are preferred.

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
ap_scan=1

#network={
#       ssid="Alice-8b7d"
#       key_mgmt=NONE
#       wep_key0="XXXXXXXXXXXXXXXX"
#       wep_tx_keyidx=0
#       priority=5
#}

network={
        ssid="MONMIEN"
        key_mgmt=NONE
        wep_key0="XXXXXXXXXX"
        wep_tx_keyidx=0
        priority=-9999999
}


dmesg :

Code:
b43-phy0 debug: Loading firmware version 351.126 (2006-07-29 05:54:02)
b43-phy0 debug: Chip initialized
b43-phy0 debug: 32-bit DMA initialized
Registered led device: b43-phy0:tx
Registered led device: b43-phy0:rx
b43-phy0 debug: Wireless interface started
b43-phy0 debug: Adding Interface type 2
b43-phy0 debug: Using hardware based encryption for keyidx: 0, mac: ff:ff:ff:ff:ff:ff
wlan0: Initial auth_alg=0
wlan0: authenticate with AP 00:07:cb:52:9d:50
wlan0: RX authentication from 00:07:cb:52:9d:50 (alg=0 transaction=2 status=0)
wlan0: authenticated
wlan0: associate with AP 00:07:cb:52:9d:50
wlan0: RX AssocResp from 00:07:cb:52:9d:50 (capab=0x411 status=0 aid=1)
wlan0: associated
wlan0: switched to short barker preamble (BSSID=00:07:cb:52:9d:50)


Voici ifconfig wlan0 :

Code:
wlan0     Lien encap:Ethernet  HWaddr 00:0E:9B:B9:60:DC 
          inet adr:169.254.42.155  Bcast:169.254.255.255  Masque: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:1218 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000
          RX bytes:0 (0.0 b)  TX bytes:285595 (278.9 Kb)


et enfin iwconfig :

Code:
wlan0     IEEE 802.11g  ESSID:"MONMIEN" 
          Mode:Managed  Frequency:2.442 GHz  Access Point: 00:07:CB:52:9D:50   
          Bit Rate=36 Mb/s   Tx-Power=27 dBm   
          Retry min limit:7   RTS thr:off   Fragment thr=2346 B   
          Encryption key:****-****-****-****-****
          Link Quality=73/100  Signal level=-42 dBm  Noise level=-73 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0


Voilà, avec tout ça je ne peux naviguer sur le web, l'adresse attribuée semble étrange mais il n'y a aucun message d'erreur, la carte est associée au réseau ... Bref, ne maitrisant pas du tout les reseaux wifi et leur config. je suis perdu...
remarque : avec iwconfig la connection à ce réseau fonctionne mais j'aimerai utiliser une clef wpa.

Si vous avez des idées, merci !
Back to top
View user's profile Send private message
Nicomero
n00b
n00b


Joined: 06 Feb 2007
Posts: 16

PostPosted: Wed Feb 13, 2008 6:51 pm    Post subject: Reply with quote

Finalement j'ai décidé d'utiliser tout de suite le WPA. Après de nombreuses lectures de docs, je suis enfin parvenu à configurer wpa_supplicant pour acceder à la freebox. Tout fonctionne bien :o

Seul petit bémol :
Lorsque je lance la commande /etc/init.d/net.wlan0 start, j'obtiens un "Warning" :

Code:
Clak ~ # /etc/init.d/net.wlan0 start
 * Service net.wlan0 starting
 * Starting wlan0
 *   Loading networking modules for wlan0
 *     modules: apipa arping ccwgroup macchanger macnet rename wpa_supplicant essidnet iptunnel iproute2 pppd system dhcpcd ip6to4
 *       wpa_supplicant provides wireless
 *       iproute2 provides interface
 *       pppd provides ppp
 *       dhcpcd provides dhcp
 *   Configuring wlan0 for MAC address 00:0E:9B:B9:60:DC ...              [ ok ]
 *   Starting wpa_supplicant on wlan0 ...
ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 4 value 0x0 - ioctl[SIOCSIWAUTH]: Operation not supported        [ ok ]th param 5 value 0x1 -
 *   Starting wpa_cli on wlan0 ...                                        [ ok ]
 *     Waiting for association                                            [ ok ]
 *     Backgrounding ...
 * WARNING:  net.wlan0 has started but is inactive
Clak ~ #


Voilà, j'ai accès au net quand même, mais ça m'intrigue.
Quelqu'un sait il ce que signifie le status inactive ?

Code:
Clak ~ # cat /etc/conf.d/net
modules_eth0=( "ifconfig" )
config_eth0=( "192.168.1.4 netmask 255.255.255.0 brd 192.168.1.255" )
route_eth0=( "default via 192.168.1.1" )

modules_wlan0=( "wpa_supplicant" )
wpa_supplicant_wlan0="-Dwext -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0"


Code:
Clak ~ # 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.

ctrl_interface=/var/run/wpa_supplicant
ap_scan=1
fast_reauth=1

network={
   ssid="MONMIEN"
   proto=WPA RSN
   key_mgmt=WPA-PSK
   pairwise=TKIP CCMP
   group=TKIP CCMP
   psk="xXxXxX"
   priority=5
}
Clak ~ #
Back to top
View user's profile Send private message
Da_Risk
n00b
n00b


Joined: 13 Jul 2006
Posts: 28
Location: Paris

PostPosted: Wed Feb 13, 2008 8:21 pm    Post subject: Reply with quote

Simple comme tout. :wink: Le script net.wlan0 n'attend pas que l'association soit fait par wpa_supplicant avant de te remettre la main. L'interface est donc inactive en attendant que wpa_supplicant fasse l'association. Il y a une option pour configurer le temps d'attente de net.wlan mais j'ai oublie c'est quoi...
_________________
1 + 1 = 3
Back to top
View user's profile Send private message
geekounet
Bodhisattva
Bodhisattva


Joined: 11 Oct 2004
Posts: 3772
Location: Wellington, Aotearoa

PostPosted: Wed Feb 13, 2008 8:32 pm    Post subject: Reply with quote

Ma conf pour exemple, (avec le baselayout 2.0, mais ça change presque rien), ya l'option pour le timeout :
/etc/conf.d/net:
modules="iproute2 dhcpcd wpa_supplicant"

hotplug_eth0="yes"
config_eth0="dhcp"

hotplug_eth1="yes"
config_eth1="dhcp"
wpa_supplicant_eth1="-Dwext -w -c /etc/wpa_supplicant/wpa_supplicant.conf"
wpa_timeout_eth1=60
Back to top
View user's profile Send private message
Nicomero
n00b
n00b


Joined: 06 Feb 2007
Posts: 16

PostPosted: Thu Feb 14, 2008 4:35 pm    Post subject: Reply with quote

Merci de vos réponses ! Tout vas bien maintenant :D
J'ai configuré /etc/conf.d/net avec l'option :
Code:
associate_timeout_wlan0=15


Il reste juste une petit erreur au démarrage de l'interface, mais qui ne doit pas être importante, sauf que ce n'est pas très agéable à regarder :roll: Je me pencherai dessus à l'occasion mais je vous en parle quand même, peut-être est-ce un problme que vous connaissez :
Code:
Clak ~ # /etc/init.d/net.wlan0 start
 * Caching service dependencies ...
/var/lib/init.d/depcache: line 2035: config: command not found
/var/lib/init.d/depcache: line 2086: config: command not found            [ ok ]
 * Service net.wlan0 starting
 * Starting wlan0
   ...


Voilà, en tout cas merci.

Edit : line 2035
Code:
config /etc/exports

line 2086
Code:
config /etc/fstab


Peut-être qu'il sagit de nfsv4 que jessaye d'installer mais que je n'ai pas ajouté au runlevel default ...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index French All times are GMT
Page 1 of 1

 
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