[RISOLTO] Configurazione Wireless

Se avete problemi con l'installazione e la configurazione di Slackware64 postate qui. Non usate questo forum per argomenti che trattano la Slackware32 o generali... per quelli usate rispettivamente il forum Slackware e Gnu/Linux in genere.

Moderatore: Staff

Regole del forum
1) Citare sempre la versione di Slackware64 usata, la versione del Kernel e magari anche la versione della libreria coinvolta. Questi dati aiutano le persone che possono rispondere.
2) Per evitare confusione prego inserire in questo forum solo topic che riguardano appunto Slackware64, se l'argomento è Slackware32 o generale usate rispettivamente il forum Slackware o Gnu/Linux in genere.
3) Leggere attentamente le risposte ricevute
4) Scrivere i messaggi con il colore di default, evitare altri colori.
5) Scrivere in Italiano o in Inglese, se possibile grammaticalmente corretto, evitate stili di scrittura poco chiari, quindi nessuna abbreviazione tipo telegramma o scrittura stile SMS o CHAT.
6) Appena registrati è consigliato presentarsi nel forum dedicato.

La non osservanza delle regole porta a provvedimenti di vari tipo da parte dello staff, in particolare la non osservanza della regola 5 porta alla cancellazione del post e alla segnalazione dell'utente. In caso di recidività l'utente rischia il ban temporaneo.
Nilus
Linux 0.x
Linux 0.x
Messaggi: 11
Iscritto il: lun 21 feb 2011, 14:52
Slackware: 13.1
Desktop: KDE

[RISOLTO] Configurazione Wireless

Messaggio da Nilus »

Salve a tutti, sono nuovo di queste parti,
seguendo questa guida http://www.slackers.it/configurare-le-s ... slackware/ sto cercando di configurare una rete wi-fi; ho una chiavetta D-LINK DWL-G122 Rev. C1.

Se provo con rc.inet1 wlan0_start ricevo questi errori :

Codice: Seleziona tutto

Error for wireless request "Set nickname" (8B1C) :
    SET failed on device wlan0 ; Operation not supported.
Polling for DHCP server on interface wlan0:
dhcpcd: versione 5.2.2 starting
dhcpcd: wlan0: waiting for carrier
dhcpcd: timed out
dhcpcd: allowing 8 seconds for IPv4ALL timeout
dhcpcd: timed out
ifconfig da questo output :

Codice: Seleziona tutto

eth0      Link encap:Ethernet  HWaddr 00:18:f3:60:04:f4  
          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)
          Interrupt:27 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:20 errors:0 dropped:0 overruns:0 frame:0
          TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1000 (1000.0 B)  TX bytes:1000 (1000.0 B)

wlan0     Link encap:Ethernet  HWaddr 00:1e:58:9e:65:81  
          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)
Mentre iwconfig :

Codice: Seleziona tutto

wlan0     IEEE 802.11bg  ESSID:"Default"  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:on
Questo è il file rc.inet1.conf :

Codice: Seleziona tutto

# /etc/rc.d/rc.inet1.conf
#
# This file contains the configuration settings for network interfaces.
# If USE_DHCP[interface] is set to "yes", this overrides any other settings.
# If you don't have an interface, leave the settings null ("").

# You can configure network interfaces other than eth0,eth1... by setting
# IFNAME[interface] to the interface's name. If IFNAME[interface] is unset
# or empty, it is assumed you're configuring eth<interface>.

# Several other parameters are available, the end of this file contains a
# comprehensive set of examples.

# =============================================================================

# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
DHCP_HOSTNAME[0]=""

# Config information for eth1:
IPADDR[1]=""
NETMASK[1]=""
USE_DHCP[1]=""
DHCP_HOSTNAME[1]=""

# Config information for eth2:
IPADDR[2]=""
NETMASK[2]=""
USE_DHCP[2]=""
DHCP_HOSTNAME[2]=""

# Config information for eth3:
IPADDR[3]=""
NETMASK[3]=""
USE_DHCP[3]=""
DHCP_HOSTNAME[3]=""

# Default gateway IP address:
GATEWAY=""

# Change this to "yes" for debugging output to stdout.  Unfortunately,
# /sbin/hotplug seems to disable stdout so you'll only see debugging output
# when rc.inet1 is called directly.
DEBUG_ETH_UP="no"

## Example config information for wlan0.  Uncomment the lines you need and fill
## in your info.  (You may not need all of these for your wireless network)
IFNAME[4]="wlan0"
IPADDR[4]=""
NETMASK[4]=""
USE_DHCP[4]="yes"
DHCP_HOSTNAME[4]="icculus-wireless"
DHCP_KEEPRESOLV[4]="yes"
DHCP_KEEPNTP[4]="yes"
DHCP_KEEPGW[4]="yes"
DHCP_IPADDR[4]=""
WLAN_ESSID[4]="Default"
WLAN_MODE[4]=Managed
WLAN_RATE[4]="54M auto"
WLAN_CHANNEL[4]="auto"
##WLAN_KEY[4]="D5AD1F04ACF048EC2D0B1C80C7"
##WLAN_IWPRIV[4]="set AuthMode=WPAPSK | set EncrypType=TKIP | set WPAPSK=95389dc66eaf7e6efd5b5523ae33d7925bf4df2f8b6099495592d44a774fea16"
WLAN_WPA[4]="wpa_supplicant"
WLAN_WPADRIVER[4]="wext"
WLAN_WPADRIVER[4]="/etc/wpa_supplicant.conf"


## Some examples of additional network parameters that you can use.
## Config information for wlan0:
#IFNAME[4]="wlan0"              # Use a different interface name nstead of
                                # the default 'eth4'
#HWADDR[4]="00:01:23:45:67:89"  # Overrule the card's hardware MAC address
#MTU[4]=""                      # The default MTU is 1500, but you might need
                                # 1360 when you use NAT'ed IPSec traffic.
#DHCP_KEEPRESOLV[4]="yes"       # If you dont want /etc/resolv.conf overwritten
#DHCP_KEEPNTP[4]="yes"          # If you don't want ntp.conf overwritten
#DHCP_KEEPGW[4]="yes"           # If you don't want the DHCP server to change
                                # your default gateway
#DHCP_IPADDR[4]=""              # Request a specific IP address from the DHCP
                                # server
#WLAN_ESSID[4]=DARKSTAR         # Here, you can override _any_ parameter
                                # defined in rc.wireless.conf, by prepending
                                # 'WLAN_' to the parameter's name. Useful for
                                # those with multiple wireless interfaces.
#WLAN_IWPRIV[4]="set AuthMode=WPAPSK | set EncrypType=TKIP | set WPAPSK=thekey"
                                # Some drivers require a private ioctl to be
                                # set through the iwpriv command. If more than
                                # one is required, you can place them in the
                                # IWPRIV parameter (separated with the pipe (|)
                                # character, see the example).
wpa_supplicant.conf :

Codice: Seleziona tutto

# See /usr/doc/wpa_supplicant-0.6.10/wpa_supplicant.conf.sample
# for many more options that you can use in this file.

# This line enables the use of wpa_cli which is used by rc.wireless
# if possible (to check for successful association)
ctrl_interface=/var/run/wpa_supplicant
# By default, only root (group 0) may use wpa_cli
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1
#country=US

# WPA protected network, supply your own ESSID and WPAPSK here:
network={
  scan_ssid=0
  ssid="Default"
  proto=WPA RSN
  key_mgmt=NONE
  pairwise=CCMP TKIP
  group=CCMP TKIP WEP104 WEP40
  #psk=MIA_PASS
  psk=7e487a62439098f266382b89156358c339736f112bd222b0c15f8a2000e76a36
  priority=10
}

# Plaintext connection (no WPA, no IEEE 802.1X),
# nice for hotel/airport types of WiFi network.
network={
  key_mgmt=NONE
  priority=10
}
rc.wireless.conf ( anche se a quanto pare non serve più ) :

Codice: Seleziona tutto

# Wireless LAN adapter configuration
#
# Theory of operation : 
#
# The script attempts to match a block of settings to the specific wireless
# card inserted, the *first* block matching the card is used.
# The address format is "hwaddr", with * as a wildcard.
# 'hwaddr' is the unique MAC address identifier of the wireless card.
# The MAC address is usually printed on the card, or can be found via ifconfig.
# Some examples here use only half of the MAC address with a wildcard to
# match a whole family of cards...
#
# All the Wireless specific configuration is done through the Wireless
# Extensions, so we will just call 'iwconfig' with the right parameters
# defined below.
# Of course, you need to have iwconfig installled on your system.
# To download iwconfig, or for more info on Wireless Extensions :
#	http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html
#
# Note : you don't need to fill all parameters, leave them blank, in most
# cases the driver will initialise itself with sane defaults values or
# automatically figure out the value... And no drivers do support all
# possible settings...
#
# -- This is a modified '/etc/pcmcia/wireless.opts' script --
# -- I added sections for Prism/GT and Atheros based cards --
# --    (supported by the prism54 and madwifi drivers)     --
# --              16/sep/2004 * Eric Hameleers             --
#

VERBOSE=1

case "$HWADDR" in

## NOTE : Comment out the following five lines to activate the samples below ...
## --------- START SECTION TO REMOVE -----------
## Pick up any Access Point, should w
Ultima modifica di Nilus il mar 22 feb 2011, 1:08, modificato 2 volte in totale.

Avatar utente
Ansa89
Iper Master
Iper Master
Messaggi: 2703
Iscritto il: mer 29 ago 2007, 17:57
Nome Cognome: Stefano Ansaloni
Slackware: 14.2 64bit
Kernel: 4.9.61
Desktop: XFCE 4.12
Località: Modena

Re: Configurazione Wireless

Messaggio da Ansa89 »

Fai diventare così il tuo "/etc/rc.d/rc.inet1.conf":

Codice: Seleziona tutto

    # /etc/rc.d/rc.inet1.conf
    #
    # This file contains the configuration settings for network interfaces.
    # If USE_DHCP[interface] is set to "yes", this overrides any other settings.
    # If you don't have an interface, leave the settings null ("").

    # You can configure network interfaces other than eth0,eth1... by setting
    # IFNAME[interface] to the interface's name. If IFNAME[interface] is unset
    # or empty, it is assumed you're configuring eth<interface>.

    # Several other parameters are available, the end of this file contains a
    # comprehensive set of examples.

    # =============================================================================

    # Config information for eth0:
    IPADDR[0]=""
    NETMASK[0]=""
    USE_DHCP[0]="yes"
    DHCP_HOSTNAME[0]=""

    # Config information for eth1:
    IPADDR[1]=""
    NETMASK[1]=""
    USE_DHCP[1]=""
    DHCP_HOSTNAME[1]=""

    # Config information for eth2:
    IPADDR[2]=""
    NETMASK[2]=""
    USE_DHCP[2]=""
    DHCP_HOSTNAME[2]=""

    # Config information for eth3:
    IPADDR[3]=""
    NETMASK[3]=""
    USE_DHCP[3]=""
    DHCP_HOSTNAME[3]=""

    # Default gateway IP address:
    GATEWAY=""

    # Change this to "yes" for debugging output to stdout.  Unfortunately,
    # /sbin/hotplug seems to disable stdout so you'll only see debugging output
    # when rc.inet1 is called directly.
    DEBUG_ETH_UP="no"

    ## Example config information for wlan0.  Uncomment the lines you need and fill
    ## in your info.  (You may not need all of these for your wireless network)
    IFNAME[4]="wlan0"
    #IPADDR[4]=""
    #NETMASK[4]=""
    USE_DHCP[4]="yes"
    #DHCP_HOSTNAME[4]="icculus-wireless"
    #DHCP_KEEPRESOLV[4]="yes"
    #DHCP_KEEPNTP[4]="yes"
    #DHCP_KEEPGW[4]="yes"
    #DHCP_IPADDR[4]=""
    WLAN_ESSID[4]="Default"
    WLAN_MODE[4]=Managed
    #WLAN_RATE[4]="54M auto"
    #WLAN_CHANNEL[4]="auto"
    ##WLAN_KEY[4]="D5AD1F04ACF048EC2D0B1C80C7"
    ##WLAN_IWPRIV[4]="set AuthMode=WPAPSK | set EncrypType=TKIP | set WPAPSK=96389dc66eaf7e6efd5b5523ae43c7925ff4df2f8b7099495192d44a774fda16"
    WLAN_WPA[4]="wpa_supplicant"
    WLAN_WPADRIVER[4]="wext"
    #WLAN_WPADRIVER[4]="/etc/wpa_supplicant.conf"


    ## Some examples of additional network parameters that you can use.
    ## Config information for wlan0:
    #IFNAME[4]="wlan0"              # Use a different interface name nstead of
                                    # the default 'eth4'
    #HWADDR[4]="00:01:23:45:67:89"  # Overrule the card's hardware MAC address
    #MTU[4]=""                      # The default MTU is 1500, but you might need
                                    # 1360 when you use NAT'ed IPSec traffic.
    #DHCP_KEEPRESOLV[4]="yes"       # If you dont want /etc/resolv.conf overwritten
    #DHCP_KEEPNTP[4]="yes"          # If you don't want ntp.conf overwritten
    #DHCP_KEEPGW[4]="yes"           # If you don't want the DHCP server to change
                                    # your default gateway
    #DHCP_IPADDR[4]=""              # Request a specific IP address from the DHCP
                                    # server
    #WLAN_ESSID[4]=DARKSTAR         # Here, you can override _any_ parameter
                                    # defined in rc.wireless.conf, by prepending
                                    # 'WLAN_' to the parameter's name. Useful for
                                    # those with multiple wireless interfaces.
    #WLAN_IWPRIV[4]="set AuthMode=WPAPSK | set EncrypType=TKIP | set WPAPSK=thekey"
                                    # Some drivers require a private ioctl to be
                                    # set through the iwpriv command. If more than
                                    # one is required, you can place them in the
                                    # IWPRIV parameter (separated with the pipe (|)
                                    # character, see the example).
Fai diventare così il tuo "/etc/wpa_supplicant.conf":

Codice: Seleziona tutto

    # See /usr/doc/wpa_supplicant-0.6.10/wpa_supplicant.conf.sample
    # for many more options that you can use in this file.

    # This line enables the use of wpa_cli which is used by rc.wireless
    # if possible (to check for successful association)
    ctrl_interface=/var/run/wpa_supplicant
    # By default, only root (group 0) may use wpa_cli
    ctrl_interface_group=0
    eapol_version=1
    ap_scan=1
    fast_reauth=1
    #country=US

    # WPA protected network, supply your own ESSID and WPAPSK here:
    network={
      scan_ssid=1
      ssid="Default"
      proto=WPA RSN
      key_mgmt=WPA-PSK
      pairwise=CCMP TKIP
      group=CCMP TKIP WEP104 WEP40
      #psk=MIA_PASS
      psk=8d497a62429098f266382a89196358e339786f112bd12200c15d8a2000e76a36
      #priority=10
    }

    # Plaintext connection (no WPA, no IEEE 802.1X),
    # nice for hotel/airport types of WiFi network.
    #network={
    #  key_mgmt=NONE
    #  priority=10
    #}
PS: sei sicuro che sul tuo router/ap sia attivo un server dhcp?

Nilus
Linux 0.x
Linux 0.x
Messaggi: 11
Iscritto il: lun 21 feb 2011, 14:52
Slackware: 13.1
Desktop: KDE

Re: Configurazione Wireless

Messaggio da Nilus »

Ansa ho seguito i tuoi consigli ed ho connesso in rete la chiavetta wi-fi. Ti ringrazio :D .

Ora però, ho notato che durante il boot del sistema la prima interfaccia di rete che tenta di connettere non è wlan0 ( cioè quella wireless ), ma al contrario eth0. Ovviamente il tentativo fallisce perchè al pc non è connesso nessun cavo di rete.
La cosa mi annoia perchè perde moltissimo tempo, dovrei rimettere mano al file rc.inet1.conf e cancellare tutti gli esempi di configurazione per le reti wired ( eth0 ), ammesso che siano questi ad influire ?

Nilus
Linux 0.x
Linux 0.x
Messaggi: 11
Iscritto il: lun 21 feb 2011, 14:52
Slackware: 13.1
Desktop: KDE

Re: Configurazione Wireless

Messaggio da Nilus »

Alla fine ho risolto così :

durante il boot ricercava la rete eth0 a causa di questa configurazione

Codice: Seleziona tutto

# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
DHCP_HOSTNAME[0]=""
come si può vedere è attiva l' opzione USE_DHCP, quindi basta cancellare yes.

Continuando sempre all' interno di rc.inet1.conf ho creato un IP statico

Codice: Seleziona tutto

# Default gateway IP address:
GATEWAY="192.168.1.1"

# Change this to "yes" for debugging output to stdout.  Unfortunately,
# /sbin/hotplug seems to disable stdout so you'll only see debugging output
# when rc.inet1 is called directly.
DEBUG_ETH_UP="no"

## Example config information for wlan0.  Uncomment the lines you need and fill
## in your info.  (You may not need all of these for your wireless network)
IFNAME[4]="wlan0"
IPADDR[4]="192.168.1.2"
NETMASK[4]="255.255.255.0"
#USE_DHCP[4]="yes"
#DHCP_HOSTNAME[4]="icculus-wireless"
#DHCP_KEEPRESOLV[4]="yes"
#DHCP_KEEPNTP[4]="yes"
#DHCP_KEEPGW[4]="yes"
#DHCP_IPADDR[4]=""
WLAN_ESSID[4]="Default"
WLAN_MODE[4]=Managed
#WLAN_RATE[4]="54M auto"
#WLAN_CHANNEL[4]="auto"
##WLAN_KEY[4]="D5AD1F04ACF048EC2D0B1C80C7"
##WLAN_IWPRIV[4]="set AuthMode=WPAPSK | set EncrypType=TKIP | set WPAPSK=96389d$
WLAN_WPA[4]="wpa_supplicant"
WLAN_WPADRIVER[4]="wext"
#WLAN_WPADRIVER[4]="/etc/wpa_supplicant.conf"
ed ho quindi aggiunto i DNS in /etc/resolv.conf ( poichè ora non c'è più il DHCP ad occuparsene automaticamente ).

Codice: Seleziona tutto

#OPEN-DNS
nameserver 208.67.222.222
nameserver 208.67.220.220
Il problema è risolto :thumbright:

Avatar utente
targzeta
Iper Master
Iper Master
Messaggi: 6628
Iscritto il: gio 3 nov 2005, 14:05
Nome Cognome: Emanuele Tomasi
Slackware: 64-current
Kernel: latest stable
Desktop: IceWM
Località: Carpignano Sal. (LE) <-> Pisa

Re: Configurazione Wireless

Messaggio da targzeta »

Nilus ha scritto:Il problema è risolto :thumbright:
Magari ora cambia la password. Hai postato i file di configurazione senza oscurare il nome dell'AP e la password.

Emanuele
Se pensi di essere troppo piccolo per fare la differenza, prova a dormire con una zanzara -- Dalai Lama

Nilus
Linux 0.x
Linux 0.x
Messaggi: 11
Iscritto il: lun 21 feb 2011, 14:52
Slackware: 13.1
Desktop: KDE

Re: [RISOLTO] Configurazione Wireless

Messaggio da Nilus »

La password non l' ho fatta vedere, le altre informazioni si.
Quali sono quelle che possono compromettere la mia rete LAN ? :?:

Avatar utente
targzeta
Iper Master
Iper Master
Messaggi: 6628
Iscritto il: gio 3 nov 2005, 14:05
Nome Cognome: Emanuele Tomasi
Slackware: 64-current
Kernel: latest stable
Desktop: IceWM
Località: Carpignano Sal. (LE) <-> Pisa

Re: [RISOLTO] Configurazione Wireless

Messaggio da targzeta »

Generalmente la coppia AP+PASS basta e avanza. Se dici di non aver postato la pass (neanche nel primo post?) allora vai tranquillo.

Emanuele
Se pensi di essere troppo piccolo per fare la differenza, prova a dormire con una zanzara -- Dalai Lama

Nilus
Linux 0.x
Linux 0.x
Messaggi: 11
Iscritto il: lun 21 feb 2011, 14:52
Slackware: 13.1
Desktop: KDE

Re: [RISOLTO] Configurazione Wireless

Messaggio da Nilus »

Se la voce "psk" in wpa_supplicant indica la traduzione cifrata in esadecimale della mia pass allora l' ho postata, altrimenti no. Comunque sia, la cambio per sicurezza. ;)

Avatar utente
Ansa89
Iper Master
Iper Master
Messaggi: 2703
Iscritto il: mer 29 ago 2007, 17:57
Nome Cognome: Stefano Ansaloni
Slackware: 14.2 64bit
Kernel: 4.9.61
Desktop: XFCE 4.12
Località: Modena

Re: [RISOLTO] Configurazione Wireless

Messaggio da Ansa89 »

Nilus ha scritto:Se la voce "psk" in wpa_supplicant indica la traduzione cifrata in esadecimale della mia pass allora l' ho postata, altrimenti no.
La voce "psk" nel file di configurazione indica la password (esadecimale o no, non importa).

Avatar utente
daniele50
Linux 3.x
Linux 3.x
Messaggi: 964
Iscritto il: mar 10 apr 2007, 13:58
Nome Cognome: Daniele Cinquanta
Slackware: Slackware64 14.1
Kernel: 3.10.17
Desktop: Xfce 4.10
Località: San Zenone al Lambro (MI)
Contatta:

Re: [RISOLTO] Configurazione Wireless

Messaggio da daniele50 »

Scusate se riapro la discrirone ma è da due giorni che ho lo stesso errore, ache seguendo la configurazione che proponete non cambia nulla.
Con il router alice come devo fare?
Se tolgo l'autenticazione mi si collega, se la metto non va più, avete delle idee??

Avatar utente
targzeta
Iper Master
Iper Master
Messaggi: 6628
Iscritto il: gio 3 nov 2005, 14:05
Nome Cognome: Emanuele Tomasi
Slackware: 64-current
Kernel: latest stable
Desktop: IceWM
Località: Carpignano Sal. (LE) <-> Pisa

Re: [RISOLTO] Configurazione Wireless

Messaggio da targzeta »

Che tipo di autenticazione usi, WEP o WPA? In entrambi i casi, hai provato ad usare direttamente wpa_supplicant? Così almeno sappiamo che tutto funziona come dovrebbe, poi pensiamo all'automazione.

Emanuele

P.S. Mi raccomando, con i ruoter Alice, non usare la password di default.
Se pensi di essere troppo piccolo per fare la differenza, prova a dormire con una zanzara -- Dalai Lama

Avatar utente
daniele50
Linux 3.x
Linux 3.x
Messaggi: 964
Iscritto il: mar 10 apr 2007, 13:58
Nome Cognome: Daniele Cinquanta
Slackware: Slackware64 14.1
Kernel: 3.10.17
Desktop: Xfce 4.10
Località: San Zenone al Lambro (MI)
Contatta:

Re: [RISOLTO] Configurazione Wireless

Messaggio da daniele50 »

La chiave del modem Alice è di tipo WPA-PSK TKIP 256 bit.
Ecco alcune informazioni di base:

Codice: Seleziona tutto

root@slacky64 ~ #lsusb                                                                                             
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub                                                                   
Bus 001 Device 002: ID 07d1:3c09 D-Link System DWA-140 RangeBooster N Adapter(rev.B1) [Ralink RT2870]                            
Bus 001 Device 004: ID 1307:0330 Transcend Information, Inc.                                                                     
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub                                                                   
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub                                                                   
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub                                                                   
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub                                                                   
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub                                                                   
Bus 003 Device 002: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse

Codice: Seleziona tutto

root@slacky64 ~ #ifconfig
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:20 errors:0 dropped:0 overruns:0 frame:0
          TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1080 (1.0 KiB)  TX bytes:1080 (1.0 KiB)

wlan0     Link encap:Ethernet  HWaddr 00:1b:11:19:00:cb  
          inet6 addr: fe80::21b:11ff:fe19:cb/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:23 errors:0 dropped:5 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2298 (2.2 KiB)  TX bytes:2045 (1.9 KiB)

Codice: Seleziona tutto

root@slacky64 ~ #iwconfig 
lo        no wireless extensions.

eth0      no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:"Alice-75200985"  
          Mode:Managed  Frequency:2.462 GHz  Access Point: 00:1D:6A:71:5A:D9   
          Bit Rate=1 Mb/s   Tx-Power=20 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:on
          Link Quality=42/70  Signal level=-68 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:1  Invalid misc:5   Missed beacon:0

Codice: Seleziona tutto

root@slacky64 ~ #iwlist wlan0 scan
wlan0     Scan completed :                                                                                                       
          Cell 01 - Address: 00:1D:6A:71:5A:D9                                                                                   
                    Channel:11                                                                                                   
                    Frequency:2.462 GHz (Channel 11)                                                                             
                    Quality=50/70  Signal level=-60 dBm                                                                          
                    Encryption key:on                                                                                            
                    ESSID:"Alice-75200985"                                                                                       
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s                                                           
                              11 Mb/s; 12 Mb/s; 18 Mb/s                                                                          
                    Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s                                                                 
                    Mode:Master                                                                                                  
                    Extra:tsf=0000000b0c00d6f9                                                                                   
                    Extra: Last beacon: 475ms ago                                                                                
                    IE: Unknown: 000E416C6963652D3735323030393835                                                                
                    IE: Unknown: 010882848B0C12961824                                                                            
                    IE: Unknown: 03010B                                                                                          
                    IE: IEEE 802.11i/WPA2 Version 1                                                                              
                        Group Cipher : TKIP                                                                                      
                        Pairwise Ciphers (1) : TKIP                                                                              
                        Authentication Suites (1) : PSK                                                                          
                    IE: WPA Version 1                                                                                            
                        Group Cipher : TKIP                                                                                      
                        Pairwise Ciphers (1) : TKIP                                                                              
                        Authentication Suites (1) : PSK                                                                          
                    IE: Unknown: 2A0100                                                                                          
                    IE: Unknown: 32043048606C                                                                                    
                    IE: Unknown: DD0900037F01010000FF7F
                    IE: Unknown: DD0A00037F04010000000000
                    IE: Unknown: DD5B0050F204104A0001101044000102103B0001031047001011223344556677889900ABCDEF010203102100001023000010240000104200001054000800060050F2040001101100044147494610080002000110570001001041000100

Codice: Seleziona tutto

root@slacky64 ~ #more /etc/rc.d/rc.inet1.conf
## Example config information for wlan0.  Uncomment the lines you need and fill
## in your info.  (You may not need all of these for your wireless network)
IFNAME[4]="wlan0"
#IPADDR[4]=""
#NETMASK[4]=""
USE_DHCP[4]="yes"
#DHCP_HOSTNAME[4]="icculus-wireless"
#DHCP_KEEPRESOLV[4]="yes"
#DHCP_KEEPNTP[4]="yes"
#DHCP_KEEPGW[4]="yes"
#DHCP_IPADDR[4]=""
WLAN_ESSID[4]=Alice-75200985
WLAN_MODE[4]=Managed
##WLAN_RATE[4]="54M auto"
##WLAN_CHANNEL[4]="auto"
##WLAN_KEY[4]="D5AD1F04ACF048EC2D0B1C80C7"
##WLAN_IWPRIV[4]="set AuthMode=WPAPSK | set EncrypType=TKIP | set WPAPSK=96389dc66eaf7e6efd5b5523ae43c7925ff4df2f8b7099495192d44a774fda16"
WLAN_WPA[4]="wpa_supplicant"
WLAN_WPADRIVER[4]="wext"

## Some examples of additional network parameters that you can use.
## Config information for wlan0:
#IFNAME[4]="wlan0"              # Use a different interface name nstead of
                                # the default 'eth4'
#HWADDR[4]="00:01:23:45:67:89"  # Overrule the card's hardware MAC address
#MTU[4]=""                      # The default MTU is 1500, but you might need
                                # 1360 when you use NAT'ed IPSec traffic.
#DHCP_KEEPRESOLV[4]="yes"       # If you dont want /etc/resolv.conf overwritten
#DHCP_KEEPNTP[4]="yes"          # If you don't want ntp.conf overwritten
#DHCP_KEEPGW[4]="yes"           # If you don't want the DHCP server to change
                                # your default gateway
#DHCP_IPADDR[4]=""              # Request a specific IP address from the DHCP
                                # server
#WLAN_ESSID[4]=DARKSTAR         # Here, you can override _any_ parameter
                                # defined in rc.wireless.conf, by prepending
                                # 'WLAN_' to the parameter's name. Useful for
                                # those with multiple wireless interfaces.
#WLAN_IWPRIV[4]="set AuthMode=WPAPSK | set EncrypType=TKIP | set WPAPSK=thekey"
                                # Some drivers require a private ioctl to be
                                # set through the iwpriv command. If more than
                                # one is required, you can place them in the
                                # IWPRIV parameter (separated with the pipe (|)
                                # character, see the example).

Codice: Seleziona tutto

root@slacky64 ~ #more /etc/wpa_supplicant.conf
# See /usr/doc/wpa_supplicant-0.7.3/wpa_supplicant.conf.sample
# for many more options that you can use in this file.

# This line enables the use of wpa_cli which is used by rc.wireless
# if possible (to check for successful association)
ctrl_interface=/var/run/wpa_supplicant
# By default, only root (group 0) may use wpa_cli
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1
#country=US

# WPA protected network, supply your own ESSID and WPAPSK here:
network={
  scan_ssid=1
  ssid="Alice-75200985"
  proto=WPA RSN
  key_mgmt=WPA-PSK
  pairwise=CCMP TKIP
  group=CCMP TKIP WEP104 WEP40
  psk=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # chiave esadecimale ricavata con wpa_passphrase "Alice-75200985" "xxxxxxxxxxxxxxxxxxxxxxxx"
  #priority=10
}

# Plaintext connection (no WPA, no IEEE 802.1X),
# nice for hotel/airport types of WiFi network.
network={
  key_mgmt=NONE
  priority=0
}
Risultato:

Codice: Seleziona tutto

root@slacky64 ~ #wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf
Trying to associate with 00:1d:6a:71:5a:d9 (SSID='Alice-75200985' freq=2462 MHz)
Associated with 00:1d:6a:71:5a:d9
WPA: Key negotiation completed with 00:1d:6a:71:5a:d9 [PTK=TKIP GTK=TKIP]
CTRL-EVENT-CONNECTED - Connection to 00:1d:6a:71:5a:d9 completed (auth) [id=0 id_str=]
la luce della chiavetta wifi rimane accesa e non succede nulla, ifconfig e iwconfig (lanciati da un'altro terminale) sono uguali a prima...

Avatar utente
targzeta
Iper Master
Iper Master
Messaggi: 6628
Iscritto il: gio 3 nov 2005, 14:05
Nome Cognome: Emanuele Tomasi
Slackware: 64-current
Kernel: latest stable
Desktop: IceWM
Località: Carpignano Sal. (LE) <-> Pisa

Re: [RISOLTO] Configurazione Wireless

Messaggio da targzeta »

Sembra essere andato tutto bene, l'output di wpa_supplicant è ok. Dopo però devi anche prendere un indirizzo IP per navigare, hai lanciato 'dhcpcd wlan0'?

Emanuele

:edit: Nota che nel file rc.inet che hai postato c'è una password per la WPA, spero non sia quella che usi attualmente. Inoltre sembra essere inserita male perché mi sembra che ci siano dei doppi apici solo alla fine, mancano quelli iniziali (oppure non ci vogliono proprio essendo esadecimale).
Se pensi di essere troppo piccolo per fare la differenza, prova a dormire con una zanzara -- Dalai Lama

Avatar utente
daniele50
Linux 3.x
Linux 3.x
Messaggi: 964
Iscritto il: mar 10 apr 2007, 13:58
Nome Cognome: Daniele Cinquanta
Slackware: Slackware64 14.1
Kernel: 3.10.17
Desktop: Xfce 4.10
Località: San Zenone al Lambro (MI)
Contatta:

Re: [RISOLTO] Configurazione Wireless

Messaggio da daniele50 »

dhcpcd wlan0 non l'ho lanciato, nonostante le mie ricerche è la prima volta che lo sento.
Il parametro WPAPSK probilmente è in coda alla riga precedente che è commentata, appena arrivo a casa controllo.

Quindi, una volta eliminato il parametro wpapsk (la chiave la metto in wpa_supplicant.conf), provo a lanciare prima il comando dhcpcd wlan0 e poi wpa_supplicant?

comunque provo e faccio sapere...
Tks!

Avatar utente
targzeta
Iper Master
Iper Master
Messaggi: 6628
Iscritto il: gio 3 nov 2005, 14:05
Nome Cognome: Emanuele Tomasi
Slackware: 64-current
Kernel: latest stable
Desktop: IceWM
Località: Carpignano Sal. (LE) <-> Pisa

Re: [RISOLTO] Configurazione Wireless

Messaggio da targzeta »

daniele50 ha scritto:dhcpcd wlan0 non l'ho lanciato, nonostante le mie ricerche è la prima volta che lo sento.
Ti serve per avere un indirizzo IP, un default gateway e l'IP di un DNS server, senza non puoi navigare. Forse avrai sentito parlare del comando dhclient, sono tutti client per il server DHCP (il router alice, come quasi tutti i ruoter, di default dovrebbe fare da server DHCP). Se dai uno sguardo al file /etc/rc/rc.inet1 ti accorgi che la Slackware usa proprio dhcpcd se si setta il parametro:

Codice: Seleziona tutto

USE_DHCP[4]="yes"
nel file /etc/rc.d/rc.inet1.conf.
daniele50 ha scritto:Il parametro WPAPSK probilmente è in coda alla riga precedente che è commentata, appena arrivo a casa controllo.
Sì, forse hai ragione. Comunque, momentaneamente a noi non interessano questi file, puntiamo l'attenzione solo sugli strumenti di base.
daniele50 ha scritto:Quindi, una volta eliminato il parametro wpapsk (la chiave la metto in wpa_supplicant.conf), provo a lanciare prima il comando dhcpcd wlan0 e poi wpa_supplicant?
Non è necessario eliminare il parametro, l'importante è il file di configurazion di wpa_supplicant. Come ho detto prima, dall'output del comando sembra che tu ti sia correttamente autenticato con l'access point, quindi quello che ti serve è semplicemente ottenere un indirizzo IP, un gateway e l'IP di un DNS server, tutto ottinibile attraverso dhcpcd. Però, prima devi lanciare wpa_supplicant (come hai gia fatto) e poi lanci dhcpcd.

Nota0: dhcpcd di default modifica il file /etc/resolv.conf inserendoci dentro gli indirizzi IP per i DNS forniti dal server DHCP. Se usi dei DNS server particolari e vuoi preservare il contenuto del file /etc/resolv.conf, devi editare il file '/etc/dhcpcd.conf' e sostituire la riga:

Codice: Seleziona tutto

nohook lookup-hostname
con questa:

Codice: Seleziona tutto

nohook lookup-hostname, resolv.conf
dicendogli quindi che non vuoi ottenere nessun DNS dal server DHCP.

Nota1: lo stesso discorso vale per il file /etc/ntp.conf. Se hai personalizzato quel file o ti serve preservarlo dovrai aggiungere anche 'ntp.conf' tra i 'nohook'. Tutte queste cose si configurano anche attraverso il file rc.inet1.conf, ti posto le righe:

Codice: Seleziona tutto

#DHCP_KEEPRESOLV[4]="yes"       # If you dont want /etc/resolv.conf overwritten
#DHCP_KEEPNTP[4]="yes"          # If you don't want ntp.conf overwritten
#DHCP_KEEPGW[4]="yes"           # If you don't want the DHCP server to change
                                # your default gateway
Emanuele
Se pensi di essere troppo piccolo per fare la differenza, prova a dormire con una zanzara -- Dalai Lama

Rispondi