[RISOLTO] Problemino wireless all'avvio

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

Moderatore: Staff

Regole del forum
1) Citare sempre la versione di Slackware 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 Slackware, se l'argomento è generale usate il forum 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.
Rispondi
Avatar utente
414N
Iper Master
Iper Master
Messaggi: 2923
Iscritto il: mer 13 feb 2008, 16:19
Slackware: 15.0
Kernel: 5.15.19
Desktop: KDE5
Località: Bulagna
Contatta:

[RISOLTO] Problemino wireless all'avvio

Messaggio da 414N »

Salve a tutti!
Vi scrivo per chiedervi consiglio su come risolvere un fastidio che si presenta sul mio laptop: all'avvio l'inizializzazione della wireless inchioda il boot per più di un minuto. Questo anche quando la scheda wireless è disattivata (luce spenta).
Premetto che uso wpa_supplicant (configurato e funzionante) e i driver NDIS Broadcom tramite ndiswrapper (non mi ha mai dato problemi).
Tengo a precisare che questo succede quando non c'è una rete wireless nel campo d'azione o quando disattivo la scheda.
Ho spulciato rc.inet1.conf per cercare una qualche opzione per ridurre il timeout di attesa d'inizializzazione, ma non si notano effetti apprezzabili.
È come se l'inizializzazione della wireless fosse in foreground, bloccando nell'attesa che termini i successivi processi d'avvio... Non è possibile metterla in background?
Ecco il mio 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 data.  (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]=DARKSTAR
WLAN_MODE[4]="Managed"
#WLAN_RATE[4]="54M auto"
#WLAN_CHANNEL[4]="auto"
#WLAN_KEY[4]="D5A31F54ACF0487C2D0B1C10D2"
#WLAN_IWPRIV[4]="set AuthMode=WPAPSK | set EncrypType=TKIP | set WPAPSK=96389dc66eaf7e6efd5b5523ae43c7925ff4df2f8b7099495192d44a774fda16"
WLAN_WPA[4]="wpa_supplicant"
WLAN_WPADRIVER[4]="wext"
#WLAN_WPAWAIT[4]=10

## Some examples of additional network parameters that you can use.
## Config information for wlan0:
#IFNAME[4]="wlan0"              # Use a different interface name instead of
                                # the default 'eth4'
#IFNAME[4]="eth0:1"             # Set up an IP alias.
#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_TIMEOUT[4]=15             # The default timeout for the DHCP client to
                                # wait for server resonse is 30 seconds, but
                                # you might want a shorter wait.
#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         # An example of how you can override _any_
                                # parameter defined in rc.wireless.conf, by
                                # prepending 'WLAN_' to the parameter's name.
                                # Useful 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).
#WLAN_WPA[4]="wpa_supplicant"   # Run wpa_supplicant for WPA support
#WLAN_WPADRIVER[4]="ndiswrapper"# Tell wpa_supplicant to specifically use the
                                # ndiswrapper driver (if you leave this empty
                                # the 'wext' driver is used by default)
#WLAN_WPAWAIT[4]=30             # In case it takes long for the WPA association
                                # to finish, you can increase the wait time
                                # (defaults to 10 seconds)
Indico a wpa_supplicant di usare il driver wext perchè il driver ndiswrapper non funziona bene.
Questo è il mio rc.wireless.conf:

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 work on most 802.11 cards
#*)
#    INFO="Scheda qualsiasi (Any ESSID)"
#    ESSID=""
#    ;;
## ---------- END SECTION TO REMOVE ------------


# Here are a few examples with a few Wireless LANs supported...
# The matching is done on the first 3 bytes of the MAC address

# La mia scheduzza Broadcom :)

00:90:4B:99:88:8F)
    INFO="Broadcom bcmwl15"
    # ESSID (extended network name) : My Network, any
    ESSID="any"
    # NWID/Domain (cell identifier) : 89AB, 100, off
    NWID=""
    # Operation mode : Ad-Hoc, Managed, Master, Repeater, Secondary, auto
    MODE="Managed"
    # Frequency or channel : 1, 2, 3 (channel) ; 2.422G, 2.46G (frequency)
    FREQ=""
    CHANNEL=""
    # Sensitivity (cell size + roaming speed) : 1, 2, 3 ; -70 (dBm)
    SENS=""
    # Bit rate : auto, 1M, 11M,54M
    RATE="auto"
    # Encryption key : 4567-89AB-CD, s:password
    # Example for 40-bit encryption:
    #KEY="883e-aa67-21 [1] key 5501-d0da-87 [2] key 91f5-3368-6b [3] key 2d73-31b7-96 [4]"
    # Example for 104-bit encryption (aka 128-bit WEP):
    #KEY="d5ad2f05abd048ecf10b1c80c7"
    KEY=""
    # RTS threshold : off, 500
    RTS=""
    # Fragmentation threshold : off, 1000
    FRAG=""
    # Other iwconfig parameters : power off, ap 01:23:45:67:89:AB
    IWCONFIG=""
    # iwspy parameters : + 01:23:45:67:89:AB
    IWSPY=""
    # iwpriv parameters : set_port 2, set_histo 50 60
    IWPRIV=""
;;

# SMC2835W EZ Connect g 2.4GHz 54 Mbps Wireless Cardbus Adapter
00:04:E2:*)
    INFO="SMC2835W EZ Connect g 2.4GHz 54 Mbps Wireless Cardbus Adapter"
    # ESSID (extended network name) : My Network, any
    ESSID="any"
    # NWID/Domain (cell identifier) : 89AB, 100, off
    NWID=""
    # Operation mode : Ad-Hoc, Managed, Master, Repeater, Secondary, auto
    MODE="Managed"
    # Frequency or channel : 1, 2, 3 (channel) ; 2.422G, 2.46G (frequency)
    FREQ=""
    CHANNEL="7"
    # Sensitivity (cell size + roaming speed) : 1, 2, 3 ; -70 (dBm)
    SENS=""
    # Bit rate : auto, 1M, 11M,54M
    RATE="auto"
    # Encryption key : 4567-89AB-CD, s:password
    # Example for 40-bit encryption:
    #KEY="883e-aa67-21 [1] key 5501-d0da-87 [2] key 91f5-3368-6b [3] key 2d73-31b7-96 [4]"
    # Example for 104-bit encryption (aka 128-bit WEP):
    #KEY="d5ad2f05abd048ecf10b1c80c7"
    KEY=""
    # RTS threshold : off, 500
    RTS=""
    # Fragmentation threshold : off, 1000
    FRAG=""
    # Other iwconfig parameters : power off, ap 01:23:45:67:89:AB
    IWCONFIG=""
    # iwspy parameters : + 01:23:45:67:89:AB
    IWSPY=""
    # iwpriv parameters : set_port 2, set_histo 50 60
    IWPRIV=""
;;

# Multiband Atheros based 802.11a/b/g universal NIC cards
00:05:4E:*)
    INFO="Multiband Atheros based 802.11a/b/g universal NIC"
    # ESSID (extended network name) : My Network, any
    ESSID=""
    # Operation mode : Ad-Hoc, Managed, Master, Repeater, Secondary, auto
    MODE="Managed"
    # Frequency or channel : 1, 2, 3 (channel) ; 2.422G, 2.46G (frequency)
    FREQ=""
    CHANNEL="7"
    # Bit rate : auto, 1M, 11M,54M
    RATE="auto"
    # Encryption key : 4567-89AB-CD, s:password
    # Example for 40-bit encryption:
    #KEY="883e-aa67-21 [1] key 5501-d0da-87 [2] key 91f5-3368-6b [3] key 2d73-31b7-96 [4]"
    # Example for 104-bit encryption (aka 128-bit WEP):
    #KEY="d5ad2f05abd048ecf10b1c80c7"
    KEY=""
    # Other iwconfig parameters : power off, ap 01:23:45:67:89:AB
    IWCONFIG=""
    # iwspy parameters : + 01:23:45:67:89:AB
    IWSPY=""
    # iwpriv parameters : set_port 2, set_histo 50 60
    IWPRIV=""
    ;;

# Lucent Wavelan IEEE (+ Orinoco, RoamAbout and ELSA)
# Note : wvlan_cs driver only, and version 1.0.4+ for encryption support
00:60:1D:*|00:02:2D:*)
    INFO="Wavelan IEEE example (Lucent default settings)"
    ESSID="Wavelan Network"
    MODE="Managed"
    #RATE="auto"
    KEY="s:secu1"
    # To set all four keys, use :
    #KEY="s:secu1 [1] key s:secu2 [2] key s:secu3 [3] key s:secu4 [4] key [1]"
    # For the RG 1000 Residential Gateway: The ESSID is the identifier on
    # the unit, and the default key is the last 5 digits of the same.
    #ESSID="084d70"
    #KEY="s:84d70"
    ;;

# Cisco/Aironet 4800/3x0
# Note : MPL driver only (airo/airo_cs), version 1.3 or later
00:40:96:*|00:02:8A:*)
    INFO="Cisco/Aironet example (Cisco default settings)"
    ESSID="any"
    # To set all four ESSID, use iwconfig v21 and the same trick as above
    MODE="Managed"
    #RATE="11M auto"
    #KEY="d5ad2f05abd048ecf10b1c80c7"
    KEY="off"
    ;;

# Samsung MagicLan (+ some other PrismII cards)
# Note : Samsung binary library driver, version 1.20 or later
00:00:F0:*|00:02:78:*)
    INFO="Samsung MagicLan example (Samsung default settings)"
    ESSID="any"
    MODE="Managed"
    CHANNEL="4"
    RATE="auto"
    #KEY="883e-aa67-21 [1] key 5501-d0da-87 [2] key 91f5-3368-6b [3] key 2d73-31b7-96 [4]"
    #IWCONFIG="power on"
    ;;

# Raytheon Raylink/WebGear Aviator2.4
# Note : doesn't work yet, please use for debugging only :-(
00:00:8F:*|00:00:F1:*)
    INFO="Raylink/Aviator2.4 example (Aviator default ad-hoc setting)"
    ESSID="ADHOC_ESSID"
    MODE="Ad-Hoc"
    RATE="auto"
    IWPRIV="set_framing 1"
    ;;

# Old Lucent Wavelan
08:00:0E:*)
    INFO="Wavelan example (Lucent default settings)"
    NWID="0100"
    MODE="Ad-Hoc"
    FREQ="2.425G"
    KEY="off"
    ;;

# Netwave (Xircom Netwave/Netwave Airsurfer)
00:80:C7:*)
    INFO="Netwave example (Netwave default settings)"
    NWID="100"
    KEY="00"
    ;;

# Proxim RangeLan2/Symphony (what is the MAC address ???)
XX:XX:XX:*)
    INFO="Proxim RangeLan2/Symphony example"
    NWID="0"
    MODE="Master"
    CHANNEL="15"
    IWPRIV="setsubchan 1"
    ;;

# No Wires Needed Swallow 550 and 1100 setting (what is the MAC address ???)
XX:XX:XX:*)
    INFO="NWN Swallow example"
    ESSID="session"
    KEY="0000-0000-00 open"
    ;;

# Symbol Spectrum24 setting (what is the MAC address ???)
XX:XX:XX:*)
    INFO="Symbol Spectrum24 example"
    ESSID="Essid string"
    ;;

# Generic example (decribe all possible settings)
*)
    INFO="Fill with your own settings..."
    # ESSID (extended network name) : My Network, any
    ESSID=""
    # NWID/Domain (cell identifier) : 89AB, 100, off
    NWID=""
    # Operation mode : Ad-Hoc, Managed, Master, Repeater, Secondary, auto
    MODE="Managed"
    # Frequency or channel : 1, 2, 3 (channel) ; 2.422G, 2.46G (frequency)
    FREQ=""
    CHANNEL=""
    # Sensitivity (cell size + roaming speed) : 1, 2, 3 ; -70 (dBm)
    SENS=""
    # Bit rate : auto, 1M, 11M
    RATE="auto"
    # Encryption key : 4567-89AB-CD, s:password
    KEY=""
    # RTS threshold : off, 500
    RTS=""
    # Fragmentation threshold : off, 1000
    FRAG=""
    # Other iwconfig parameters : power off, ap 01:23:45:67:89:AB
    IWCONFIG=""
    # iwspy parameters : + 01:23:45:67:89:AB
    IWSPY=""
    # iwpriv parameters : set_port 2, set_histo 50 60
    IWPRIV=""
    ;;
esac
Qui ho specificato il MAC address della mia scheda (è la prima) per non stare a fare tutti gli switch nel case.
Se vi servono altre info sui file di configurazione chiedete.
Ultima modifica di 414N il lun 3 mar 2008, 17:36, modificato 1 volta in totale.

Avatar utente
slucky
Iper Master
Iper Master
Messaggi: 2419
Iscritto il: mar 1 mag 2007, 15:30
Slackware: 14.2
Desktop: xfce4

Re: Problemino wireless all'avvio

Messaggio da slucky »

E allora invece di avviare il wpa in auto al boot, disattivalo
#WLAN_WPA[4]="wpa_supplicant"
#WLAN_WPADRIVER[4]="wext"
e poi lo lanci manualmente da terminale con :
wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -dd -B
e vedi se così sia il boot del sistema che la connessione poi funziona più rapidamente.

Ciao :)

Avatar utente
414N
Iper Master
Iper Master
Messaggi: 2923
Iscritto il: mer 13 feb 2008, 16:19
Slackware: 15.0
Kernel: 5.15.19
Desktop: KDE5
Località: Bulagna
Contatta:

Re: Problemino wireless all'avvio

Messaggio da 414N »

Ho provato a commentare le righe che mi hai detto, ma non è cambiato nulla.
Il "blocco" avviene alla voce "Triggering udev events".

Avatar utente
slucky
Iper Master
Iper Master
Messaggi: 2419
Iscritto il: mar 1 mag 2007, 15:30
Slackware: 14.2
Desktop: xfce4

Re: Problemino wireless all'avvio

Messaggio da slucky »

allora probabilmente il problema non deriva dal wpa, ma forse dai moduli del kernel :-k
comunque ho trovato questo thread su triggering udev events vedi se può esserti di aiuto:

/viewtopic.php?t=20235&highlight=dev+udev+failed

ciao :)

Avatar utente
phobos3576
Staff
Staff
Messaggi: 2980
Iscritto il: dom 17 apr 2005, 0:00
Slackware: 13.1
Kernel: 2.6.37-smp
Desktop: KDE 4.5.3

Re: Problemino wireless all'avvio

Messaggio da phobos3576 »

E' probabile che il problema dipenda dalla riga di rc.inet1.conf:

Codice: Seleziona tutto

USE_DHCP[0]="yes"
Se la connessione non è già attiva, il timeout predefinito (in attesa che venga trovato un server DHCP) è di 30 secondi!

Per ridurre questo timeout, ad esempio, a 10 secondi, bisogna aggiungere:

Codice: Seleziona tutto

DHCP_TIMEOUT[0]=10
Siccome tu hai attivato il DHCP su eth0 e eth4, ottieni 30 + 30 = 60 secondi di attesa.

Avatar utente
414N
Iper Master
Iper Master
Messaggi: 2923
Iscritto il: mer 13 feb 2008, 16:19
Slackware: 15.0
Kernel: 5.15.19
Desktop: KDE5
Località: Bulagna
Contatta:

Re: Problemino wireless all'avvio

Messaggio da 414N »

Ho provato a settare il DHCP_TIMEOUT su entrambe le interfacce di rete ed in effetti la latenza si è ridotta.
Però per rendere il boot un po' più spedito mi piacerebbe mettere in background il polling del server DHCP all'avvio. Sapete se è possibile?

Avatar utente
aleph
Linux 0.x
Linux 0.x
Messaggi: 75
Iscritto il: sab 29 dic 2007, 21:10
Slackware: 12.0

Re: Problemino wireless all'avvio

Messaggio da aleph »

414N ha scritto:Ho provato a settare il DHCP_TIMEOUT su entrambe le interfacce di rete ed in effetti la latenza si è ridotta.
Però per rendere il boot un po' più spedito mi piacerebbe mettere in background il polling del server DHCP all'avvio. Sapete se è possibile?
sicuramente, però forse in questo caso ti conviene avviare il demone dhcp separatamente rispetto alle connessioni . ..

Avatar utente
absinthe
Iper Master
Iper Master
Messaggi: 2354
Iscritto il: dom 15 mag 2005, 0:00
Nome Cognome: Matteo Nunziati
Slackware: 12.1 - defunct
Kernel: 2.6.32-5-amd64
Desktop: gnome
Distribuzione: debian squeeze
Località: Prato
Contatta:

Re: Problemino wireless all'avvio

Messaggio da absinthe »

414N ha scritto:Ho provato a settare il DHCP_TIMEOUT su entrambe le interfacce di rete ed in effetti la latenza si è ridotta.
Però per rendere il boot un po' più spedito mi piacerebbe mettere in background il polling del server DHCP all'avvio. Sapete se è possibile?
in realtà sì basta fare questa modifica in /etc/rc.d/rc.inet1 alla riga 130 (se ricordo bene la riga originale - io ho fatto delle modifiche allo script):

Codice: Seleziona tutto

#da così
/sbin/dhcpcd -d -t ${DHCP_TIMEOUT[$i]:-30} ${DHCP_OPTIONS} ${1}
#a così
/sbin/dhcpcd -d -t ${DHCP_TIMEOUT[$i]:-30} ${DHCP_OPTIONS} ${1} &
M

Avatar utente
414N
Iper Master
Iper Master
Messaggi: 2923
Iscritto il: mer 13 feb 2008, 16:19
Slackware: 15.0
Kernel: 5.15.19
Desktop: KDE5
Località: Bulagna
Contatta:

Re: Problemino wireless all'avvio

Messaggio da 414N »

Sì, era la riga 130.
Ora la situazione è più vicina a quello che volevo in partenza.
Grazie a tutti! :notworthy:

Avatar utente
MrTry
Linux 2.x
Linux 2.x
Messaggi: 228
Iscritto il: sab 19 dic 2009, 0:26
Slackware: current
Kernel: 2.6.33.1
Desktop: attualmente Xfce

Re: [RISOLTO] Problemino wireless all'avvio

Messaggio da MrTry »

Riapro il post solo perchè può essere d'aiuto a qualcuno con il mio stesso problema
attualmente le righe sono cosi:

Codice: Seleziona tutto

echo "/etc/rc.d/rc.inet1:  /sbin/dhcpcd -t ${DHCP_TIMEOUT[$i]:-10} ${DHCP_OPTIONS} ${1}"$
        /sbin/dhcpcd -t ${DHCP_TIMEOUT[$i]:-10} ${DHCP_OPTIONS} ${1}
Non collegandomi quasi mai via wired l'attesa degli otto secondi era diventata davvero odiosa cosi io ho risolto cosi :

Codice: Seleziona tutto

echo "/etc/rc.d/rc.inet1:  /sbin/dhcpcd -b -t ${DHCP_TIMEOUT[$i]:-10} ${DHCP_OPTIONS} ${1}"$
        /sbin/dhcpcd -b -t ${DHCP_TIMEOUT[$i]:-10} ${DHCP_OPTIONS} ${1}
non perchè non funzionasse in quel modo ma perchè una volta finite le sue richieste dhcpd ti spara l'output dei sisultati nel prompt di login, che non solo è brutto ma non vedi nemmeno dove stai scrivendo se magari sbagli e vuoi cancellare..

Rispondi