Resolvendo erro ao levantar módulo de rede: "SET failed on device wlan0"

Publicado por Paulo Henrrique de LIma Filgueira em 03/07/2010

[ Hits: 12.064 ]

 


Resolvendo erro ao levantar módulo de rede: "SET failed on device wlan0"



Para aqueles que ao tentar levantar o módulo da placa de rede wireless obtiveram esse erro:

Error org.freedesktop.NetworkManagerSettings.InternalError: unable to get the connection D-Bus path
Error org.freedesktop.NetworkManagerSettings.InternalError: unable to get the connection D-Bus path
Error for wireless request "Set Mode" (8B06) : SET failed on device wlan0 ; Invalid argument. RTNETLINK answers: Operation not possible due to RF-kill
Error for wireless request "Set Encode" (8B2A) : SET failed on device wlan0 ; Invalid argument. RTNETLINK answers: Operation not possible due to RF-kill Falha ao ativar wlan0.


O processo foi complicado, mas após algumas tentativas resolvi o problema ao levantar a placa.

Inicialmente atualizei o pacote do wpa_supplicant. No caso do Fedora o comando é:

# yum reinstall wpa_supplicant

Em seguida, para aqueles que tiverem editado o arquivo pelo system-config-network, editado diretamente no arquivo /etc/sysconfig/network-scripts/ifcfg-wlan0 ou similar, restaurar a configuração padrão da placa no sistema - para isso basta observar o exemplo de configuração dos dados neste guia até o passo 4.

Logo depois substitui o arquivo /etc/sysconfig/network-scripts/ifup-wireless pelo do anexo abaixo e finalmente reiniciei.

#!/bin/bash
# Network Interface Configuration System
# Copyright (c) 1996-2002 Red Hat, Inc. all rights reserved.
#
# Based on PCMCIA wireless script by (David Hinds/Jean Tourrilhes)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, version 2,
# as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
#
# Configure wireless network device options.  See iwconfig(8) for more info.
# Valid variables:
#    MODE: Ad-Hoc, Managed, etc.
#    ESSID: Name of the wireless network
#    NWID: Name of this machine on the network.  Hostname is default
#    FREQ: Frequency to operate on.  See CHANNEL
#    CHANNEL: Numbered frequency to operate on.  See FREQ
#    SENS: Sensitivity threshold for packet rejection.
#    RATE: Transfer rate.  Usually one of Auto, 11, 5, 2, or 1.
#    KEY: Encryption key for WEP.
#    RTS: Explicit RTS handshake.  Usually not specified (auto)
#    FRAG: Fragmentation threshold to split packets.  Usually not specified.
#    SPYIPS: List of IP addresses to "spy" on for link performance stats.
#    IWCONFIG: Extra parameters to pass directly to IWCONFIG
#    SECURITYMODE: Security mode, e.g: 'open' or 'restricted'
#    IWPRIV: Extra parameters to pass directly to IWPRIV

# Only meant to be called from ifup.

# Mode need to be first : some settings apply only in a specific mode !


if [ -n "$MODE" ] ; then
    iwconfig $DEVICE mode $MODE
fi

# Set link up (some cards require this.)
/sbin/ip link set dev ${DEVICE} up

# This is a bit hackish, but should do the job right...
if [ -n "$ESSID" -o -n "$MODE" ] ; then
    NICKNAME=`/bin/hostname`
    iwconfig $DEVICE nick "$NICKNAME" >/dev/null 2>&1
fi
# Regular stuff...
if [ -n "$NWID" ] ; then
    iwconfig $DEVICE nwid $NWID
fi
if [ -n "$FREQ" -a "$MODE" != "Managed" ] ; then
    iwconfig $DEVICE freq $FREQ
elif [ -n "$CHANNEL" -a "$MODE" != "Managed" ] ; then
    iwconfig $DEVICE channel $CHANNEL
fi
if [ -n "$SENS" ] ; then
    iwconfig $DEVICE sens $SENS
fi
if [ -n "$RATE" ] ; then
    iwconfig $DEVICE rate "$RATE"
fi
if [ -n "$KEY" -o -n "$KEY1" -o -n "$KEY2" -o -n "$KEY3" -o -n "$KEY4" ] ; then
    [ -n "$KEY1" ] && iwconfig $DEVICE key "[1]" $KEY1
    [ -n "$KEY2" ] && iwconfig $DEVICE key "[2]" $KEY2
    [ -n "$KEY3" ] && iwconfig $DEVICE key "[3]" $KEY3
    [ -n "$KEY4" ] && iwconfig $DEVICE key "[4]" $KEY4
    [ -n "$DEFAULTKEY" ] && iwconfig $DEVICE key "[${DEFAULTKEY}]"
    [ -n "$KEY" ] && iwconfig $DEVICE key $KEY
else
    iwconfig $DEVICE key off
fi
if [ -n "$SECURITYMODE" ]; then
    iwconfig $DEVICE enc $SECURITYMODE
fi
if [ -n "$RTS" ] ; then
    iwconfig $DEVICE rts $RTS
fi
if [ -n "$FRAG" ] ; then
    iwconfig $DEVICE frag $FRAG
fi

# More specific parameters passed directly to IWCONFIG
if [ -n "$IWCONFIG" ] ; then
    iwconfig $DEVICE $IWCONFIG
fi

if [ -n "$SPYIPS" ] ; then
    for IP in $SPYIPS; do
iwspy $DEVICE + $IP
    done
fi
if [ -n "$IWPRIV" ] ; then
    iwpriv $DEVICE $IWPRIV
fi

# ESSID need to be last : most device re-perform the scanning/discovery
# when this is set, and things like encryption keys are better be
# defined if we want to discover the right set of APs/nodes.
if [ -n "$ESSID" ] ; then
    iwconfig $DEVICE essid "$ESSID"
else
    # use any essid
    iwconfig $DEVICE essid any >/dev/null 2>&1
fi

Outras dicas deste autor

LimeWire e/ou FrostWire: Error unexpected token

Leitura recomendada

Configurando o sudo no Debian

Problema de NO_PUBKEY em repositórios Debian, Ubuntu ou Mint [Resolvido]

Resolvendo bug do dbus-launch no Pidgin

Migrando usuários entre servidores Linux

Configuração de teclado utilizando as distribuições CentOS, Debian e Ubuntu

  

Comentários
[1] Comentário enviado por matrixbhz em 14/02/2012 - 11:25h

Amigo estou com um erro deste: SET failed on device eth0; No such device
Mas minha placa de rede nao é wireless chipset RTL 8139
Pode me ajudar

[2] Comentário enviado por gnoba em 17/02/2012 - 00:15h

Boa noite,

É o seguinte, depois que eu realizei este procedimento, tentei novamente e descobri que não resolvia.

Então o que vi e validei como correto.

Toda vez que iniciava o notebook com um livecd da mesma distro que conseguia levantar minha placa, não importando se era de versão anterior ou mais nova, quando eu reiniciava, e removia o livecd, o sistema ao reiniciar reconhecia a placa.

Acontece que se você o desligar e desconectá-lo da energia ou remover a bateria(se for notebook), ele descarrega estas configurações que o livecd deve estar realizando.
Aí passa a ser necessário iniciá-lo novamente com o livecd. Não precisa nem concluir o boot só deixá-lo carregar alguns módulo aí você o reinicia, com isto ele já deve carregar as configurações para que o sistema possa reiniciá-lo sem problemas.

Consegui levantá-lo uma vez mas não anotei o processo e fiquei preso neste que descrevi até que o pessoal da distro o corrigisse.

Um colega meu falou que era interessante verificar os módulos levantados pelo livecd e copiá-los para a distro que está tendo problema...



Contribuir com comentário




Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts