abilitare scheda wireless

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.
Avatar utente
thepaperboy
Linux 2.x
Linux 2.x
Messaggi: 236
Iscritto il: sab 20 giu 2009, 20:22
Slackware: 13
Kernel: 2.6.29.6-smp
Desktop: xfce
Località: milano
Contatta:

abilitare scheda wireless

Messaggio da thepaperboy »

ciao a tutti,
sono un nuovo utente di slack alle prese con l'abilitazione della scheda wireless. per abilitare la ethernet ho semplicemente cliccato abilita da centro di controllo --> impostazioni rete, ma per la wireless, che pure qui mi rileva, non funziona.

ho un hp c540ea con scheda wireless broadcom b4311 (per la quale installerò poi il driver sta ma per cui mi par di aver capito che va benissimo il b43 che già dovrebbe essere presente nel kernel. lo usavo anche in ubuntu e funzionava, solo più lenta la connesione)

queste le caratteristiche rilevata da riga di comando (non c'è eth0 perché era sconnessa):

Codice: Seleziona tutto

root@thepaperboy:~#lspci
...
06:00.0 Network controller: Broadcom Corporation BCM4311 802.11b/g WLAN (rev 01)
...
-------------
root@thepaperboy:~# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

wmaster0  no wireless extensions.

wlan0     IEEE 802.11bg  ESSID:""
          Mode:Managed  Frequency:2.412 GHz  Access Point: Not-Associated
          Tx-Power=0 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
---------------
root@thepaperboy:~# lspci -n
00:00.0 0600: 8086:27a0 (rev 03)
00:02.0 0300: 8086:27a2 (rev 03)
00:02.1 0380: 8086:27a6 (rev 03)
00:1b.0 0403: 8086:27d8 (rev 01)
00:1c.0 0604: 8086:27d0 (rev 01)
00:1c.2 0604: 8086:27d4 (rev 01)
00:1d.0 0c03: 8086:27c8 (rev 01)
00:1d.1 0c03: 8086:27c9 (rev 01)
00:1d.2 0c03: 8086:27ca (rev 01)
00:1d.7 0c03: 8086:27cc (rev 01)
00:1e.0 0604: 8086:2448 (rev e1)
00:1f.0 0601: 8086:27b9 (rev 01)
00:1f.2 0101: 8086:27c4 (rev 01)
00:1f.3 0c05: 8086:27da (rev 01)
06:00.0 0280: 14e4:4311 (rev 01)
08:08.0 0200: 10ec:8139 (rev 10)
inutile dire che sta diventando un'ossessione.

ho provato con wicd e non rileva le reti perché non trova l'accesspoint (il router di fastweb).

potete aiutarmi?

Avatar utente
Darkstar89
Packager
Packager
Messaggi: 372
Iscritto il: mer 17 dic 2008, 19:06
Nome Cognome: Francesco
Slackware: 13
Località: Sassari

Re: abilitare scheda wireless

Messaggio da Darkstar89 »

Hai provato a fare "iwlist wlan0 scan", se questo comando ti mostra i rooter presenti devi impostare wicd

Avatar utente
thepaperboy
Linux 2.x
Linux 2.x
Messaggi: 236
Iscritto il: sab 20 giu 2009, 20:22
Slackware: 13
Kernel: 2.6.29.6-smp
Desktop: xfce
Località: milano
Contatta:

Re: abilitare scheda wireless

Messaggio da thepaperboy »

iwlist scan mi dice che non è possibile scannerizzare il wlan, il network non funziona

eppure su ubuntu mi rileva una decina di reti

Avatar utente
Darkstar89
Packager
Packager
Messaggi: 372
Iscritto il: mer 17 dic 2008, 19:06
Nome Cognome: Francesco
Slackware: 13
Località: Sassari

Re: abilitare scheda wireless

Messaggio da Darkstar89 »

Credo che stai usando il modulo sbagliato, dovresti farci vedere che moduli carichi, mi sembra lsmod -m..

Avatar utente
Darkstar89
Packager
Packager
Messaggi: 372
Iscritto il: mer 17 dic 2008, 19:06
Nome Cognome: Francesco
Slackware: 13
Località: Sassari

Re: abilitare scheda wireless

Messaggio da Darkstar89 »

scusa hai provato con ifconfig se ti risulta?
se si prova da root
ifconfig wlan0 up

Avatar utente
thepaperboy
Linux 2.x
Linux 2.x
Messaggi: 236
Iscritto il: sab 20 giu 2009, 20:22
Slackware: 13
Kernel: 2.6.29.6-smp
Desktop: xfce
Località: milano
Contatta:

Re: abilitare scheda wireless

Messaggio da thepaperboy »

allora, le due cose vanno così
lsmod mi da

Codice: Seleziona tutto

Module                  Size  Used by
i915                   33280  2
drm                    74408  3 i915
snd_seq_dummy           6788  0
snd_seq_oss            33408  0
snd_seq_midi_event     10240  1 snd_seq_oss
snd_seq                50928  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
snd_seq_device         10380  3 snd_seq_dummy,snd_seq_oss,snd_seq
snd_pcm_oss            40480  0
snd_mixer_oss          17920  1 snd_pcm_oss
rfkill_input            8448  0
ipv6                  241956  14
lp                     13572  0
ppdev                  11268  0
parport_pc             28196  0
parport                34796  3 lp,ppdev,parport_pc
fuse                   54684  1
b43                   128412  0
rfkill                 12184  2 rfkill_input,b43
mac80211              158108  1 b43
cfg80211               27144  1 mac80211
led_class               7684  1 b43
input_polldev           7432  1 b43
snd_hda_intel         367756  3
i2c_i801               12688  0
intel_agp              29116  1
snd_pcm                70788  3 snd_pcm_oss,snd_hda_intel
agpgart                32584  3 drm,intel_agp
snd_timer              23176  3 snd_seq,snd_pcm
ssb                    41348  1 b43
snd_page_alloc         11400  2 snd_hda_intel,snd_pcm
snd_hwdep              10756  1 snd_hda_intel
8139too                26624  0
pcmcia                 36524  2 b43,ssb
snd                    51748  13 snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,                                            snd_mixer_oss,snd_hda_intel,snd_pcm,snd_timer,snd_hwdep
soundcore              10080  1 snd
pcmcia_core            35604  3 b43,ssb,pcmcia
mii                     8448  1 8139too
thermal                19484  0
processor              36648  1 thermal
wmi                     9768  0
battery                14340  0
evdev                  13088  6
video                  20624  0
output                  6656  1 video
button                 10128  0
psmouse                40592  0
serio_raw               9220  0
thermal_sys            15144  3 thermal,processor,video
hwmon                   6300  1 thermal_sys
ac                      8196  0
sg                     30516  0
mentre ifconfig, che non conosco come programma, mi si blocca su una freccia

Codice: Seleziona tutto

root@slacky:~# if config wlan0 up
>
e se faccio if config

Codice: Seleziona tutto

root@slacky:~# ifconfig wlan0 up
SIOCSIFFLAGS: No such file or directory
non so più cosa guardare

Avatar utente
thepaperboy
Linux 2.x
Linux 2.x
Messaggi: 236
Iscritto il: sab 20 giu 2009, 20:22
Slackware: 13
Kernel: 2.6.29.6-smp
Desktop: xfce
Località: milano
Contatta:

Re: abilitare scheda wireless

Messaggio da thepaperboy »

può essere un problema di switcher? la scheda la rileva, ma non riesco ad abilitarla. il tastino del pc non si illumina quando lo schiaccio.

Avatar utente
slucky
Iper Master
Iper Master
Messaggi: 2420
Iscritto il: mar 1 mag 2007, 15:30
Slackware: 15.0
Desktop: xfce4
Distribuzione: FreeBSD

Re: abilitare scheda wireless

Messaggio da slucky »

nel kernel dovrebbe già essere attivo il modulo per il riconoscimento della tua scheda, posta l'output dei comandi iwconfig è ifconfig -a
inoltre usi il wep o wpa come protezione? in ogni caso su Slackware, il file di configurazione per la rete, anche di tipo wireless è /etc/rc.d/rc.inet1.conf, da lì puoi sistemare tutti i parametri per la tua connessione, ti invito anche a leggere questa ottima guida di Conraid, la trovi qui:

http://www.slackers.it/configurare-le-s ... slackware/

Avatar utente
thepaperboy
Linux 2.x
Linux 2.x
Messaggi: 236
Iscritto il: sab 20 giu 2009, 20:22
Slackware: 13
Kernel: 2.6.29.6-smp
Desktop: xfce
Località: milano
Contatta:

Re: abilitare scheda wireless

Messaggio da thepaperboy »

intanto ecco gli output che mi hai suggerito
iwconfig

Codice: Seleziona tutto

root@slacky:~# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

wmaster0  no wireless extensions.

wlan0     IEEE 802.11bg  ESSID:""
          Mode:Managed  Frequency:2.412 GHz  Access Point: Not-Associated
          Tx-Power=0 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
ifconfig -a

Codice: Seleziona tutto

root@slacky:~# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:16:d4:c0:ca:c0
          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:16 Base address:0x2000

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:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr 00:1a:73:10:41:e3
          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-1A-73-10-41-E3-6C-6F-00-00-00-00-00-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)
io ho questo dubbio: sul pc c'è un tasto per attivare il wireless, con una luce che si accende quando è attivo. su ubuntu mi si accende, su slackware no.

Avatar utente
slucky
Iper Master
Iper Master
Messaggi: 2420
Iscritto il: mar 1 mag 2007, 15:30
Slackware: 15.0
Desktop: xfce4
Distribuzione: FreeBSD

Re: abilitare scheda wireless

Messaggio da slucky »

non stare a guardare il led, potrebbe funzionare anche senza accendersi, l'unica è provare... ;)
la scheda è riconosciuta dal sistema, la devi solo configurare per provare ad allacciarti al router...
configura il file /etc/rc.d/rc.inet1.conf con i parametri della tua connessione, è visto che usi una scheda broadcam dai una lettura anche qui:

http://www.slacky.eu/wikislack/index.ph ... _e_WPA-PSK

Avatar utente
thepaperboy
Linux 2.x
Linux 2.x
Messaggi: 236
Iscritto il: sab 20 giu 2009, 20:22
Slackware: 13
Kernel: 2.6.29.6-smp
Desktop: xfce
Località: milano
Contatta:

Re: abilitare scheda wireless

Messaggio da thepaperboy »

ok, riprovo, ma fammi capire una cosa: con ubuntu ho diverse reti fra cui posso scegliere, con slack posso averne una e una sola? ho provato con wicd e mi dice che non è attivata l'interfaccia wireless

Avatar utente
slucky
Iper Master
Iper Master
Messaggi: 2420
Iscritto il: mar 1 mag 2007, 15:30
Slackware: 15.0
Desktop: xfce4
Distribuzione: FreeBSD

Re: abilitare scheda wireless

Messaggio da slucky »

sinceramente, non so che dirti, perchè sia con Slackware che con Ubuntu non uso tool grafici per la rete, nè wicd è nè network-manager :)
ho soltanto configurato /etc/rc.d/rc.inet1.conf su Slack è /etc/network/interfaces su Ubuntu oltre al wpa_supplicant.conf su entrambi per il wpa, per collegarmi in auto all'inserimento del pennino usb....tutto qui....
qualcuno che usa i tool grafici, ti potrà dare migliori consigli ;)

Avatar utente
thepaperboy
Linux 2.x
Linux 2.x
Messaggi: 236
Iscritto il: sab 20 giu 2009, 20:22
Slackware: 13
Kernel: 2.6.29.6-smp
Desktop: xfce
Località: milano
Contatta:

Re: abilitare scheda wireless

Messaggio da thepaperboy »

no no guarda, se riesco a farlo editando i file sono più contento. qualcosa la sto capendo, però avrei l'esigenza di non riavviare ogni volta che mi serve internet per passare a ubuntu quindi mi accontenterei di un tool grafico.

i moduli usati mi paiono questi, da lsmod:

cfg80211 usato da mac80211
led class
input_polldev
ssb
pcmcia tutti usati da b43

allora, ho seguito passo passo quanto detto qui [url]file:///home/thepaperboy/Scrivania/os/viewtopic.php.html[/url] e ho fatto

/etc/wpa_supplicant.conf

Codice: Seleziona tutto

...
scan_ssid=0
  ssid="HO MESSO IL MIO essid"
  proto=WPA
  key_mgmt=WPA-PSK
  pairwise=CCMP TKIP
  group=CCMP TKIP WEP104 WEP40
  psk="HO MESSO LA password"
  priority=0 <!-- qui dall'esempio dava 9, ma non l'ho modificato e ho lasciato 0 -->
in /etc/rc.d/rc.inet1.conf ho decommentato

Codice: Seleziona tutto

...
IPADDR[1]=""
NETMASK[1]=""
USE_DHCP[1]="yes"
DHCP_HOSTNAME[1]=""
WLAN_IWPRIV[4]="AuthMode=WPAPSK EncrypType=TKIP WPAPSK=............
WLAN_WPA[4]="wpa_supplicant"
IFNAME[4]="wlan0"
DHCP_KEEPRESOLV[4]="yes"
... 


e in in /etc/rc.d/rc.wireless.conf ho aggiunto

Codice: Seleziona tutto

    00:16:d4:*)
    INFO="Configurazione della mia scheda"
        ESSID="MIO ESSID"
        MODE="Managed"
        CHANNEL="6"
        RATE="auto"
        KEY="MIA PASSWORD in esadecimale"
    ;;
se ora provo come suggerito questi comandi (wpa_supplicant -D b43 -c /etc/wpa_supplicant.conf -i wla0 ma non sono certo del driver b43 e /etc/rc.d/rc.inet1 restart) ecco gli outout che ho

Codice: Seleziona tutto

root@slacky:~# wpa_supplicant -D b43 -c /etc/wpa_supplicant.conf -i wlan0
Unsupported driver 'b43'.

root@slacky:~# /etc/rc.d/rc.inet1 restart
/etc/rc.d/rc.inet1: line 1: eth_up: command not found
/etc/rc.d/rc.inet1: line 2: eth_up: command not found
/etc/rc.d/rc.inet1: line 3: eth_up: command not found
/etc/rc.d/rc.inet1: line 4: eth_up: command not found
/etc/rc.d/rc.inet1: line 5: eth_up: command not found
/etc/rc.d/rc.inet1: line 6: eth_up: command not found
/sbin/dhcpcd: not running
/sbin/dhcpcd: not running
Polling for DHCP server on interface eth0:
Broadcasting DHCP_DISCOVER
timed out waiting for a valid DHCP server response
SIOCSIFFLAGS: No such file or directory
/etc/rc.d/rc.wireless.conf: line 37: syntax error near unexpected token `up'
/etc/rc.d/rc.wireless.conf: line 37: `Pick up any Access Point, should work on most 802.11 cards'
wlan0     no private ioctls.

wlan0     no private ioctls.

wlan0     no private ioctls.

Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
SIOCSIFFLAGS: No such file or directory
Polling for DHCP server on interface wlan0:
dhcpStart: ioctl SIOCSIFFLAGS: No such file or directory
root@slacky:~#
ora sono fermo, non so più che fare

Avatar utente
slucky
Iper Master
Iper Master
Messaggi: 2420
Iscritto il: mar 1 mag 2007, 15:30
Slackware: 15.0
Desktop: xfce4
Distribuzione: FreeBSD

Re: abilitare scheda wireless

Messaggio da slucky »

allora qui:
psk="HO MESSO LA password"
attento che qui non devi mettere la password che hai nel router, ma la psk che ottieni dando il comando:

wpa_passphrase "tuo_essid" "chiave_del_router"
WLAN_IWPRIV[4]="AuthMode=WPAPSK EncrypType=TKIP WPAPSK=............
questo puoi lasciarlo commentato, basta decommentare WLAN_WPA[4]="wpa_supplicant", leggendo il supplicant ricava i tuoi parametri della rete psk compreso...

inoltre devi anche decommentare il GATEWAY :
# Default gateway IP address:
GATEWAY="192.168.x.x"
dove metti l'IP del tuo router...
il file /etc/rc.d/rc.wireless.conf è ormai deprecato sulla Slackware, nel senso che non è più necessario configurarlo o modificarlo per attivare il wi-fi, puoi quindi lasciarlo invariato...

una volta fatte queste modifiche, la rete puoi avviarla in runtime (cioè senza necessità di riavviare il sistema) con il comando:
/etc/rc.d/rc.inet1 wlan0_restart

Avatar utente
thepaperboy
Linux 2.x
Linux 2.x
Messaggi: 236
Iscritto il: sab 20 giu 2009, 20:22
Slackware: 13
Kernel: 2.6.29.6-smp
Desktop: xfce
Località: milano
Contatta:

Re: abilitare scheda wireless

Messaggio da thepaperboy »

purtroppo non mi parte ancora

ecco cosa mi dice

Codice: Seleziona tutto

root@slacky:~# /etc/rc.d/rc.inet1 wlan0_restart
/etc/rc.d/rc.inet1: line 1: eth_up: command not found
/etc/rc.d/rc.inet1: line 2: eth_up: command not found
/etc/rc.d/rc.inet1: line 3: eth_up: command not found
/etc/rc.d/rc.inet1: line 4: eth_up: command not found
/etc/rc.d/rc.inet1: line 5: eth_up: command not found
/etc/rc.d/rc.inet1: line 6: eth_up: command not found
/sbin/dhcpcd: not running
SIOCSIFFLAGS: No such file or directory
/etc/rc.d/rc.inet1:  wlan0 information: 'Fill with your own settings...'
SIOCSIFFLAGS: No such file or directory
Polling for DHCP server on interface wlan0:
dhcpStart: ioctl SIOCSIFFLAGS: No such file or directory
root@slacky:~#
posto inet1.conf e inet1 che magari qualcuno capisce perché non parte. a me stanno andando insieme gli occhi

questo è l'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="1.64.139.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]=""
NETMASK[4]=""
USE_DHCP[4]="yes"
DHCP_HOSTNAME[4]=""
#DHCP_KEEPRESOLV[4]="yes"
#DHCP_KEEPNTP[4]="yes"
#DHCP_KEEPGW[4]="yes"
#DHCP_IPADDR[4]=""
#WLAN_ESSID[4]=BARRIER05
#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]="ndiswrapper"

## 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).
USE_DHCP[wlan0]="yes"

e questo è l'inet1

Codice: Seleziona tutto


	eth_up 0
	eth_up 0
	eth_up 0
	eth_up 0
	eth_up 0
	eth_up 0
#! /bin/sh
# /etc/rc.d/rc.inet1
# This script is used to bring up the various network interfaces.
#
# @(#)/etc/rc.d/rc.inet1 10.2  Sun Jul 24 12:45:56 PDT 2005  (pjv)

############################
# READ NETWORK CONFIG FILE #
############################

# Get the configuration information from /etc/rc.d/rc.inet1.conf:
. /etc/rc.d/rc.inet1.conf

###########
# LOGGING #
###########

# If possible, log events in /var/log/messages:
if [ -f /var/run/syslogd.pid -a -x /usr/bin/logger ]; then
  LOGGER=/usr/bin/logger
else # output to stdout/stderr:
  LOGGER=/bin/cat
fi

############################
# DETERMINE INTERFACE LIST #
############################

# Compose a list of interfaces from /etc/rc.d/rc.inet1.conf (with a maximum
# of 6 interfaces, but you can easily enlarge the interface limit
# - send me a picture of such a box :-).
# If a value for IFNAME[n] is not set, we assume it is an eth'n' interface.
# This way, the new script is compatible with older rc.inet1.conf files.
# The IFNAME array will be used to determine which interfaces to bring up/down.
MAXNICS=${MAXNICS:-6}
i=0
while [ $i -lt $MAXNICS ];
do
  IFNAME[$i]=${IFNAME[$i]:=eth${i}}
  i=$(($i+1))
done
if [ "$DEBUG_ETH_UP" = "yes" ]; then
  echo "/etc/rc.d/rc.inet1:  List of interfaces: '${IFNAME[@]}'" | $LOGGER
fi

######################
# LOOPBACK FUNCTIONS #
######################

# Function to bring up the loopback interface.  If loopback is
# already up, do nothing.
lo_up() {
  if grep lo: /proc/net/dev 1> /dev/null ; then
    if ! /sbin/ifconfig | grep "^lo" 1> /dev/null ; then
      echo "/etc/rc.d/rc.inet1:  /sbin/ifconfig lo 127.0.0.1" | $LOGGER
      /sbin/ifconfig lo 127.0.0.1
      echo "/etc/rc.d/rc.inet1:  /sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo" | $LOGGER
      /sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo
    fi
  fi
}

# Function to take down the loopback interface:
lo_down() {
  if grep lo: /proc/net/dev 1> /dev/null ; then
    echo "/etc/rc.d/rc.inet1:  /sbin/ifconfig lo down" | $LOGGER
    /sbin/ifconfig lo down
  fi
}

#######################
# INTERFACE FUNCTIONS #
#######################

# Function to bring up a network interface.  If the interface is
# already up or does not yet exist (perhaps because the kernel driver
# is not loaded yet), do nothing.
if_up() {
  # Determine position 'i' of this interface in the IFNAME array:
  i=0
  while [ $i -lt $MAXNICS ]; do
    [ "${IFNAME[$i]}" = "${1}" ] && break
    i=$(($i+1))
  done
  # If the interface isn't in the kernel yet (but there's an alias for it in
  # modules.conf), then it should be loaded first:
  if ! grep `echo ${1}: | cut -f 1 -d :`: /proc/net/dev 1> /dev/null ; then # no interface yet
    if /sbin/modprobe -c | grep -v "^#" | grep -w "alias ${1}" | grep -vw "alias ${1} off" > /dev/null ; then
      echo "/etc/rc.d/rc.inet1:  /sbin/modprobe ${1}" | $LOGGER
      /sbin/modprobe ${1}
    fi
  fi
  if grep `echo ${1}: | cut -f 1 -d :`: /proc/net/dev 1> /dev/null ; then # interface exists
    if ! /sbin/ifconfig | grep -w "${1}" 1>/dev/null ||       ! /sbin/ifconfig ${1} | grep "inet addr" 1> /dev/null ; then # interface not up or not configured
      if [ ! "${HWADDR[$i]}" = "" ]; then # Set hardware address _before_ the interface goes up:
        echo "/etc/rc.d/rc.inet1:  /sbin/ifconfig ${1} hw ether ${HWADDR[$i]}" | $LOGGER
        /sbin/ifconfig ${1} hw ether ${HWADDR[$i]}
      fi
      if [ ! "${MTU[$i]}" = "" ]; then # Set MTU to something else than 1500
        echo "/etc/rc.d/rc.inet1:  /sbin/ifconfig ${1} mtu ${MTU[$i]}" | $LOGGER
        /sbin/ifconfig ${1} mtu ${MTU[$i]}
      fi
      if [ -x /etc/rc.d/rc.wireless ]; then
        . /etc/rc.d/rc.wireless ${1} start # Initialize any wireless parameters
      fi
      if [ "${USE_DHCP[$i]}" = "yes" ]; then # use DHCP to bring interface up
        [ ${DHCP_HOSTNAME[$i]} ] && DHCP_OPTIONS="-h ${DHCP_HOSTNAME[$i]}"
        [ "${DHCP_KEEPRESOLV[$i]}" = "yes" ] && DHCP_OPTIONS="$DHCP_OPTIONS -R"
        [ "${DHCP_KEEPNTP[$i]}" = "yes" ] && DHCP_OPTIONS="$DHCP_OPTIONS -N"
        [ "${DHCP_KEEPGW[$i]}" = "yes" ] && DHCP_OPTIONS="$DHCP_OPTIONS -G"
        [ ${DHCP_IPADDR[$i]} ] && DHCP_OPTIONS="$DHCP_OPTIONS -s ${DHCP_IPADDR[$i]}"
        echo "Polling for DHCP server on interface ${1}:"
        # If you set a timeout, you get one, even if the kernel doesn't think that
        # your device is connected, in case /sys isn't right (which it usually isn't
        # except right after the device is loaded, when it usually is):
        #### (start commented out)
        # This is deactivated for now since the kernel has been returning incorrect
        # results concerning whether the interface carrier is detected.
        #if [ "${DHCP_TIMEOUT[$i]}" = "" ]; then
        #  ifconfig ${1} up && sleep 1
        #  CONNSTATUS="$(cat /sys/class/net/${1}/carrier 2> /dev/null)"
        #  ifconfig ${1} down
        #  if [ "$CONNSTATUS" = "0" ]; then
        #    # The kernel has just told us the cable isn't even plugged in, but we will
        #    # give any DHCP server a short chance to reply anyway:
        #    echo "No carrier detected on ${1}.  Reducing DHCP timeout to 10 seconds."
        #    DHCP_TIMEOUT[$i]=10
        #  fi
        #fi
        #### (end commented out)
        # 30 seconds should be a reasonable default DHCP timeout.  60 was too much.  :-)
        echo "/etc/rc.d/rc.inet1:  /sbin/dhcpcd -d -t ${DHCP_TIMEOUT[$i]:-30} ${DHCP_OPTIONS} ${1}" | $LOGGER
        /sbin/dhcpcd -d -t ${DHCP_TIMEOUT[$i]:-30} ${DHCP_OPTIONS} ${1}
      else # bring up interface using a static IP address
        if [ ! "${IPADDR[$i]}" = "" ]; then # skip unconfigured interfaces
          # Determine broadcast address from the IP address and netmask:
          BROADCAST[$i]=`/bin/ipmask ${NETMASK[$i]} ${IPADDR[$i]}|cut -f1 -d' '`
          # Set up the network card:
          echo "/etc/rc.d/rc.inet1:  /sbin/ifconfig ${1} ${IPADDR[$i]} broadcast ${BROADCAST[$i]} netmask ${NETMASK[$i]}" | $LOGGER
          /sbin/ifconfig ${1} ${IPADDR[$i]} broadcast ${BROADCAST[$i]} netmask ${NETMASK[$i]}
        else
          if [ "$DEBUG_ETH_UP" = "yes" ]; then
            echo "/etc/rc.d/rc.inet1:  ${1} interface is not configured in /etc/rc.d/rc.inet1.conf" | $LOGGER
          fi
        fi
      fi
    else
      if [ "$DEBUG_ETH_UP" = "yes" ]; then
        echo "/etc/rc.d/rc.inet1:  ${1} is already up, skipping" | $LOGGER
      fi
    fi 
  else
    if [ "$DEBUG_ETH_UP" = "yes" ]; then
      echo "/etc/rc.d/rc.inet1:  ${1} interface does not exist (yet)" | $LOGGER
    fi
  fi
}

# Function to take down a network interface:
if_down() {
  # Determine position 'i' of this interface in the IFNAME array:
  i=0
  while [ $i -lt $MAXNICS ]; do
    [ "${IFNAME[$i]}" = "${1}" ] && break
    i=$(($i+1))
  done
  if grep `echo ${1}: | cut -f 1 -d :`: /proc/net/dev 1> /dev/null ; then
    if [ "${USE_DHCP[$i]}" = "yes" ]; then
      echo "/etc/rc.d/rc.inet1:  /sbin/dhcpcd -k -d ${1}" | $LOGGER
      /sbin/dhcpcd -k -d ${1} 2> /dev/null || /sbin/ifconfig ${1} down
      sleep 1
    else
      echo "/etc/rc.d/rc.inet1:  /sbin/ifconfig ${1} down" | $LOGGER
      /sbin/ifconfig ${1} down
    fi
    if [ -x /etc/rc.d/rc.wireless ]; then
      . /etc/rc.d/rc.wireless ${1} stop # Kill wireless daemons if any.
    fi
  fi
}

#####################
# GATEWAY FUNCTIONS #
#####################

# Function to bring up the gateway if there is not yet a default route:
gateway_up() {
  if ! /sbin/route -n | grep "^0.0.0.0" 1> /dev/null ; then
    if [ ! "$GATEWAY" = "" ]; then
      echo "/etc/rc.d/rc.inet1:  /sbin/route add default gw ${GATEWAY} metric 1" | $LOGGER
      /sbin/route add default gw ${GATEWAY} metric 1 2>&1 | $LOGGER
    fi
  fi
}

# Function to take down an existing default gateway:
gateway_down() {
  if /sbin/route -n | grep "^0.0.0.0" 1> /dev/null ; then
    echo "/etc/rc.d/rc.inet1:  /sbin/route del default" | $LOGGER
    /sbin/route del default
  fi
}

# Function to start the network:
start() {
  lo_up
  for i in ${IFNAME[@]} ; do
    if_up $i
  done
  gateway_up
}

# Function to stop the network:
stop() {
  gateway_down
  for i in ${IFNAME[@]} ; do
    if_down $i
  done
  lo_down
}


############
### MAIN ###
############

case "$1" in
'start') # "start" brings up all configured interfaces:
  start
  ;;
'stop') # "stop" takes down all configured interfaces:
  stop
  ;;
'restart') # "restart" restarts the network:
  stop
  start
  ;;
*_start) # Example: "eth1_start" will start the specified interface 'eth1'
  INTERFACE=`echo $1 | /bin/cut -d '_' -f 1`
  if_up $INTERFACE
  gateway_up
  ;;
*_stop) # Example: "eth0_stop" will stop the specified interface 'eth0'
  INTERFACE=`echo $1 | /bin/cut -d '_' -f 1`
  if_down $INTERFACE
  ;;
*_restart) # Example: "wlan0_restart" will take 'wlan0' down and up again
  INTERFACE=`echo $1 | /bin/cut -d '_' -f 1`
  if_down $INTERFACE
  sleep 1
  if_up $INTERFACE
  gateway_up
  ;;
'up') # "up" does the same thing as "start"
  start
  ;;
'down') # "down" does the same thing as "stop"
  stop
  ;;
*_up) # "*_up" does the same thing as "*_start"
  INTERFACE=`echo $1 | /bin/cut -d '_' -f 1`
  if_up $INTERFACE
  gateway_up
  ;;
*_down) # "*_down" does the same thing as "*_stop"
  INTERFACE=`echo $1 | /bin/cut -d '_' -f 1`
  if_down $INTERFACE
  ;;
*) # The default is to bring up all configured interfaces:
  start
esac

# End of /etc/rc.d/rc.inet1

l'inet1 non ricordo proprio di averlo modificato, in ogni caso non certo nella parte iniziale

Rispondi